コード例 #1
0
        void ReleaseDesignerOutlets()
        {
            if (TaskDetail != null)
            {
                TaskDetail.Dispose();
                TaskDetail = null;
            }

            if (TaskImage != null)
            {
                TaskImage.Dispose();
                TaskImage = null;
            }

            if (TaskStatus != null)
            {
                TaskStatus.Dispose();
                TaskStatus = null;
            }

            if (TaskTitle != null)
            {
                TaskTitle.Dispose();
                TaskTitle = null;
            }

            if (TaskStatusIcon != null)
            {
                TaskStatusIcon.Dispose();
                TaskStatusIcon = null;
            }
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        Grid _Toolbar()
        {
            var grid = new Grid {
                ColumnHomogeneous = true, MarginLeft = 10, MarginRight = 10
            };

            var task_status = new TaskStatusIcon {
                ShowOnlyBackgroundTasks = false
            };

            var toolbar = (Toolbar)ActionService.UIManager.GetWidget("/ControlToolbar");

            toolbar.ShowArrow    = false;
            toolbar.ToolbarStyle = ToolbarStyle.Icons;
            toolbar.IconSize     = IconSize.SmallToolbar;
            toolbar.Margin       = 0;

            var next_button = new NextButton(ActionService)
            {
                IconSize = IconSize.SmallToolbar
            };

            ActionService.PopulateToolbarPlaceholder(toolbar, "/ControlToolbar/NextArrowButton", next_button);

            var repeat_button = new RepeatButton {
                Relief = ReliefStyle.None
            };

            ActionService.PopulateToolbarPlaceholder(toolbar, "/ControlToolbar/RepeatButton", repeat_button);

            var seek_slider = new ConnectedSeekSlider();

            var tools_align = new Alignment(0.5f, 0.5f, 0f, 0f);

            tools_align.Child = toolbar;

            var search_align = new Alignment(0.5f, 0.5f, 0f, 0f);

            search_align.Child = _view_container.SearchEntry;

            var lbox = new HBox();

            lbox.PackStart(task_status, false, false, 0);
            lbox.PackStart(tools_align, true, true, 0);

            var rbox = new HBox();

            rbox.PackEnd(search_align, true, true, 0);

            grid.Attach(lbox, 0, 0, 1, 1);
            grid.Attach(seek_slider, 1, 0, 1, 1);
            grid.Attach(rbox, 2, 0, 1, 1);

            _ready.Add(() => {
                task_status.Show();
                next_button.Show();
                repeat_button.Show();
                tools_align.Show();
                search_align.Show();

                lbox.Show();
                seek_slider.Show();
                rbox.Show();
            });

            return(grid);
        }