From 9975feaf203105ee4e48ea81ef41f56636c66b65 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 8 Oct 2004 04:59:35 +0000 Subject: [PATCH] Also update smart separators if the visibility of a menuitem with a 2004-10-08 Matthias Clasen * gtk/gtkuimanager.c (update_node): Also update smart separators if the visibility of a menuitem with a submenu changes. (#153791, Christian Persch) --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ gtk/gtkuimanager.c | 4 +++- 5 files changed, 27 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6411e9dac1..cbd52e35ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-10-08 Matthias Clasen + + * gtk/gtkuimanager.c (update_node): Also update smart separators + if the visibility of a menuitem with a submenu changes. (#153791, + Christian Persch) + 2004-10-07 Matthias Clasen * gtk/gtkfilechooserdefault.c (check_is_folder): Don't free diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 6411e9dac1..cbd52e35ef 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2004-10-08 Matthias Clasen + + * gtk/gtkuimanager.c (update_node): Also update smart separators + if the visibility of a menuitem with a submenu changes. (#153791, + Christian Persch) + 2004-10-07 Matthias Clasen * gtk/gtkfilechooserdefault.c (check_is_folder): Don't free diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 6411e9dac1..cbd52e35ef 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2004-10-08 Matthias Clasen + + * gtk/gtkuimanager.c (update_node): Also update smart separators + if the visibility of a menuitem with a submenu changes. (#153791, + Christian Persch) + 2004-10-07 Matthias Clasen * gtk/gtkfilechooserdefault.c (check_is_folder): Don't free diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 6411e9dac1..cbd52e35ef 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2004-10-08 Matthias Clasen + + * gtk/gtkuimanager.c (update_node): Also update smart separators + if the visibility of a menuitem with a submenu changes. (#153791, + Christian Persch) + 2004-10-07 Matthias Clasen * gtk/gtkfilechooserdefault.c (check_is_folder): Don't free diff --git a/gtk/gtkuimanager.c b/gtk/gtkuimanager.c index 2589414116..3bfadaf0d6 100644 --- a/gtk/gtkuimanager.c +++ b/gtk/gtkuimanager.c @@ -2195,6 +2195,8 @@ update_node (GtkUIManager *self, gtk_menu_shell_append (GTK_MENU_SHELL (menu), filler); gtk_menu_item_set_submenu (GTK_MENU_ITEM (info->proxy), menu); gtk_menu_shell_insert (GTK_MENU_SHELL (menushell), info->proxy, pos); + g_signal_connect (info->proxy, "notify::visible", + G_CALLBACK (update_smart_separators), 0); } } else @@ -2516,7 +2518,7 @@ update_node (GtkUIManager *self, { if (info->type == NODE_TYPE_MENU) update_smart_separators (gtk_menu_item_get_submenu (GTK_MENU_ITEM (info->proxy))); - else if (info->type == NODE_TYPE_TOOLBAR) + else if (info->type == NODE_TYPE_TOOLBAR || info->type == NODE_TYPE_POPUP) update_smart_separators (info->proxy); }