Example #1
0
        private void BuildNowPlaying()
        {
            var box = new MeeGoHeaderBox()
            {
                Title = Catalog.GetString("Now Playing")
            };

            var seek_slider = new ConnectedSeekSlider(SeekSliderLayout.Horizontal);

            seek_slider.StreamPositionLabel.FormatString = "<small>{0}</small>";

            track_info_display = new MeeGoTrackInfoDisplay()
            {
                HeightRequest = 64,
                NoShowAll     = true
            };

            track_view = new TerseTrackListView()
            {
                Name         = "meego-panel-tracks",
                WidthRequest = 220
            };
            track_view.ColumnController.Insert(new Column(null, "indicator",
                                                          new ColumnCellStatusIndicator(null), 0.05, true, 20, 20), 0);

            box.PackStartHighlighted(track_info_display, false, false, 0, MeeGoHeaderBox.HighlightFlags.Background);
            box.PackStartHighlighted(seek_slider, false, false, 0, MeeGoHeaderBox.HighlightFlags.Background);
            box.PackStart(SetupView(track_view), true, true, 0);
            box.PackStartHighlighted(new PlaybackBox(), false, false, 0, MeeGoHeaderBox.HighlightFlags.TopLine);

            Attach(box, 1, 2, 1, 2,
                   AttachOptions.Shrink,
                   AttachOptions.Expand | AttachOptions.Fill,
                   0, 0);
        }
Example #2
0
        private void BuildLibrary()
        {
            var box = new MeeGoHeaderBox()
            {
                Title = Catalog.GetString("Library")
            };

            // Build the Library Header
            var header = new HBox()
            {
                Spacing     = 5,
                BorderWidth = 5
            };

            var app_button = new Button(new Image()
            {
                IconSize = (int)IconSize.LargeToolbar,
                IconName = "media-player-banshee"
            })
            {
                TooltipText = Catalog.GetString("Launch the Banshee Media Player")
            };

            app_button.Clicked += (o, e) => {
                ServiceManager.SourceManager.SetActiveSource(ServiceManager.SourceManager.MusicLibrary);
                ServiceManager.Get <MeeGoService> ().PresentPrimaryInterface();
            };

            header.PackStart(source_combo_box = new SourceComboBox(), false, false, 0);
            header.PackStart(app_button, false, false, 0);
            header.PackStart(search_entry = new SearchEntry(), true, true, 0);
            box.PackStartHighlighted(header, false, false, 0, MeeGoHeaderBox.HighlightFlags.Background);

            // Build the Library Views
            var views = new HBox()
            {
                Spacing = 5
            };

            views.PackStart(SetupView(artist_view = new ArtistListView()
            {
                Name                 = "meego-panel-artists",
                WidthRequest         = 150,
                DoNotRenderNullModel = true
            }), false, false, 0);
            views.PackStart(SetupView(album_view = new AlbumListView()
            {
                Name = "meego-panel-albums",
                DoNotRenderNullModel = true
            }), true, true, 0);
            box.PackStart(views, true, true, 0);

            Attach(box, 0, 1, 1, 2,
                   AttachOptions.Expand | AttachOptions.Fill,
                   AttachOptions.Expand | AttachOptions.Fill,
                   0, 0);
        }