[gedit/wip/panels-as-stacks: 18/19] MenuStackSwitcher: do not show hidden children in the menu.



commit 8fb38828df96eeb4375b903e36135980c21b7d37
Author: Steve Frécinaux <code istique net>
Date:   Mon Jan 20 07:44:55 2014 +0100

    MenuStackSwitcher: do not show hidden children in the menu.

 gedit/gedit-menu-stack-switcher.c |    3 +++
 gedit/gedit-window-private.h      |    1 -
 gedit/gedit-window.c              |    1 -
 3 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gedit/gedit-menu-stack-switcher.c b/gedit/gedit-menu-stack-switcher.c
index e2d2ffb..01d3e3c 100644
--- a/gedit/gedit-menu-stack-switcher.c
+++ b/gedit/gedit-menu-stack-switcher.c
@@ -110,6 +110,9 @@ add_menu_entry (GtkWidget              *widget,
   gchar *title, *name;
   GMenuItem *item;
 
+  if (!gtk_widget_get_visible(widget))
+    return;
+
   gtk_container_child_get (GTK_CONTAINER (priv->stack), widget,
                            "title", &title,
                            "name", &name,
diff --git a/gedit/gedit-window-private.h b/gedit/gedit-window-private.h
index 8f25b82..8eb3149 100644
--- a/gedit/gedit-window-private.h
+++ b/gedit/gedit-window-private.h
@@ -56,7 +56,6 @@ struct _GeditWindowPrivate
 
        GtkWidget      *side_panel;
        GtkWidget      *bottom_panel_box;
-       GtkWidget      *bottom_panel_close_button;
        GtkWidget      *bottom_panel;
 
        GtkWidget      *hpaned;
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index 07e752e..2f6e271 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -435,7 +435,6 @@ gedit_window_class_init (GeditWindowClass *klass)
        gtk_widget_class_bind_template_child_private (widget_class, GeditWindow, vpaned);
        gtk_widget_class_bind_template_child_private (widget_class, GeditWindow, multi_notebook);
        gtk_widget_class_bind_template_child_private (widget_class, GeditWindow, bottom_panel_box);
-       gtk_widget_class_bind_template_child_private (widget_class, GeditWindow, bottom_panel_close_button);
        gtk_widget_class_bind_template_child_private (widget_class, GeditWindow, bottom_panel);
        gtk_widget_class_bind_template_child_private (widget_class, GeditWindow, statusbar);
        gtk_widget_class_bind_template_child_private (widget_class, GeditWindow, fullscreen_controls);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]