Beispiel #1
0
        void OnPreferencesTreeViewSelectionChanged(object o, EventArgs args)
        {
            TreeSelection sel = (TreeSelection)o;
            TreeModel     tm;
            TreeIter      ti;

            if (sel.GetSelected(out tm, out ti))
            {
                IPluginPreferences ipp = (IPluginPreferences)tm.GetValue(ti, 1);

                // If user tried to select a header row, keep the previous selection
                if (ipp == null)
                {
                    sel.SelectIter(selectedIter);
                    return;
                }

                if (PreferencesPaned.Child2 != null)
                {
                    PreferencesPaned.Remove(PreferencesPaned.Child2);
                }

                PreferencesPaned.Pack2(ipp.Widget, true, false);
                ipp.LoadPreferences();
                ipp.Widget.ShowAll();

                selectedIter = ti;
            }
        }
Beispiel #2
0
 private void Reset()
 {
     // The main container gets destroyed since it will be recreated.
     if (container != null)
     {
         if (frame != null)
         {
             container.Remove(frame);
         }
         if (main_expander != null)
         {
             container.Remove(main_expander);
         }
         main_expander.Activated     -= OnExpander;
         main_expander.SizeRequested -= HandleSizeRequested;
         Remove(container);
     }
 }
        /// <summary>
        /// Unparent the views' scrolled window parents so they can be re-packed in
        /// a new layout. The main container gets destroyed since it will be recreated.
        /// </summary>
        private void Reset()
        {
            if (container != null && main_scrolled_window != null)
            {
                container.Remove(main_scrolled_window);
            }

            if (container != null)
            {
                Remove(container);
            }
        }
Beispiel #4
0
        void Rebuild()
        {
            settingSize = true;
            ClearPaneds();
            var currentPaned = paned;
            int currentChild = 1;

            for (int n = 0; n < Children.Count; n++)
            {
                var c = Children [n];
                if (currentChild == 1)
                {
                    currentPaned.Add1(c);
                    currentChild++;
                }
                else if (n < Children.Count - 1)
                {
                    if (!(paned.Child2 is Paned childPaned))
                    {
                        childPaned = CreatePaned();
                        currentPaned.Add2(childPaned);
                    }
                    childPaned.Add1(c);
                    currentPaned = childPaned;
                    currentChild = 2;
                }
                else
                {
                    if (paned.Child2 is Paned childPaned)
                    {
                        paned.Remove(childPaned);
                        childPaned.Destroy();
                    }
                    paned.Add2(c);
                    currentPaned = null;
                }
            }
            if (currentPaned?.Child2 is Paned nextPaned)
            {
                currentPaned.Remove(nextPaned);
                nextPaned.Destroy();
            }
            RestoreSizes();
            settingSize = false;
        }
        private void Reset()
        {
            // Unparent the views' scrolled window parents so they can be re-packed in
            // a new layout. The main container gets destroyed since it will be recreated.

            foreach (ScrolledWindow window in filter_scrolled_windows)
            {
                Paned filter_container = window.Parent as Paned;
                if (filter_container != null)
                {
                    filter_container.Remove(window);
                }
            }

            if (container != null && main_scrolled_window != null)
            {
                container.Remove(main_scrolled_window);
            }

            if (container != null)
            {
                Remove(container);
            }
        }