private void BuildFooter ()
        {
            if (PlatformDetection.IsMeeGo) {
                return;
            }

            footer_toolbar = new HBox () { BorderWidth = 2 };

            task_status = new Banshee.Gui.Widgets.TaskStatusIcon ();

            EventBox status_event_box = new EventBox ();
            status_event_box.ButtonPressEvent += OnStatusBoxButtonPress;

            status_label = new Label ();
            status_event_box.Add (status_label);

            HBox status_hbox = new HBox (true, 0);
            status_hbox.PackStart (status_event_box, false, false, 0);

            Alignment status_align = new Alignment (0.5f, 0.5f, 1.0f, 1.0f);
            status_align.Add (status_hbox);

            RepeatActionButton repeat_button = new RepeatActionButton ();
            repeat_button.SizeAllocated += delegate (object o, Gtk.SizeAllocatedArgs args) {
                status_align.LeftPadding = (uint)args.Allocation.Width;
            };

            footer_toolbar.PackStart (task_status, false, false, 0);
            footer_toolbar.PackStart (status_align, true, true, 0);
            footer_toolbar.PackStart (repeat_button, false, false, 0);

            footer_toolbar.ShowAll ();
            primary_vbox.PackStart (footer_toolbar, false, true, 0);
        }
Exemple #2
0
        private void Build()
        {
            var vbox = new VBox () { Spacing = 12 };
            var top = new HBox () { Spacing = 6 };
            var bot = new HBox () { Spacing = 6 };
            vbox.PackStart (top, false, false, 0);
            vbox.PackStart (bot, false, false, 0);

            // Top row: playback buttons, seek slider, full-mode button, volume
            Widget previous_button = ActionService.PlaybackActions["PreviousAction"].CreateToolItem ();
            Widget playpause_button = ActionService.PlaybackActions["PlayPauseAction"].CreateToolItem ();
            Widget button = ActionService.PlaybackActions["NextAction"].CreateToolItem ();
            Menu menu = ActionService.PlaybackActions.ShuffleActions.CreateMenu ();
            MenuButton next_button = new MenuButton (button, menu, true);

            top.PackStart (previous_button, false, false, 0);
            top.PackStart (playpause_button, false, false, 0);
            top.PackStart (next_button, false, false, 0);

            seek_slider = new ConnectedSeekSlider ();
            top.PackStart (seek_slider, true, true, 0);

            var fullmode_button = new Button () {
                Label = Catalog.GetString ("Full Mode"),
                Image = new Image (Stock.LeaveFullscreen, Gtk.IconSize.Button),
                Relief = Gtk.ReliefStyle.None
            };
            fullmode_button.Clicked += OnFullmode;
            top.PackStart (fullmode_button, false, false, 0);

            volume_button = new ConnectedVolumeButton ();
            top.PackStart (volume_button, false, false, 0);

            // Bottom row: source dropdown, track info display (cover art, etc), repeat mode button
            source_combo_box = new SourceComboBox ();
            bot.PackStart (source_combo_box, false, false, 0);

            track_info_display = new ClassicTrackInfoDisplay ();
            track_info_display.WidthRequest = 250;
            bot.PackStart (track_info_display, true, true, 0);

            var repeat_align = new Alignment (1, 1, 1, 1);
            var repeat_toggle_button = new RepeatActionButton (true);
            repeat_align.Add (repeat_toggle_button);
            bot.PackEnd (repeat_align, false, false, 0);

            fullmode_button.TooltipText = Catalog.GetString ("Switch back to full mode");
            repeat_toggle_button.TooltipText = Catalog.GetString ("Change repeat playback mode");

            Add (vbox);
        }