Exemple #1
0
        //collapses the info bar
        private void collapseBar()
        {
            if (!expanded)
                return;

            panel_box.Remove (active_button.Panel.DisplayWidget);
            active_button = null;

            main_box.Remove (panel_frame);
            Global.Core.Library.CollapseInfoBar ();
            expanded = false;
        }
Exemple #2
0
        //a tab has been selected
        private void tab_clicked(object o, EventArgs args)
        {
            InfoButton button = (InfoButton)o;

            if (button != active_button && !button.Active)
                return;

            if (active_button != null)
                panel_box.Remove (active_button.Panel.DisplayWidget);

            panel_box.PackStart (button.Panel.DisplayWidget, true, true, 0);
            active_button = button;

            foreach (InfoButton tab in tabs)
                if (tab != button)
                    tab.Active = false;

            if (button.Active)
                expandBar ();
            else
                collapseBar ();

            LoadMedia (Global.Core.Library.MediaTree.CurrentMedia);
            this.ShowAll ();
        }
Exemple #3
0
        // adds an info panel to the info bar
        private void addInfoPanel(InfoPanel panel, string title)
        {
            InfoButton button = new InfoButton (panel, title);
            button.Clicked += tab_clicked;

            tabs.Add (button);
            button_box.PackStart (button, false, true, 0);
        }