From 01d2e36671826c4aebda689c8c8e4de795be98d9 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 16 Nov 2003 21:54:37 +0000 Subject: [PATCH] Reinstate fixes for (#124212, Marco Pesenti Gritti): Sun Nov 16 22:50:58 2003 Matthias Clasen Reinstate fixes for (#124212, Marco Pesenti Gritti): * gtk/gtkuimanager.c (update_smart_separators): Don't spit warnings for popups. (_gtk_menu_is_empty): Return FALSE for non-menus. --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ ChangeLog.pre-2-4 | 8 ++++++++ ChangeLog.pre-2-6 | 8 ++++++++ ChangeLog.pre-2-8 | 8 ++++++++ gtk/gtkuimanager.c | 8 +++++--- 6 files changed, 45 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 53a5e0ab4f..45ba2eda0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Sun Nov 16 22:50:58 2003 Matthias Clasen + + Reinstate fixes for (#124212, Marco Pesenti Gritti): + + * gtk/gtkuimanager.c (update_smart_separators): Don't spit + warnings for popups. + (_gtk_menu_is_empty): Return FALSE for non-menus. + Sun Nov 16 21:48:40 2003 Kristian Rietveld * gtk/gtkcellview.c (gtk_cell_view_finalize): just call diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 53a5e0ab4f..45ba2eda0d 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Sun Nov 16 22:50:58 2003 Matthias Clasen + + Reinstate fixes for (#124212, Marco Pesenti Gritti): + + * gtk/gtkuimanager.c (update_smart_separators): Don't spit + warnings for popups. + (_gtk_menu_is_empty): Return FALSE for non-menus. + Sun Nov 16 21:48:40 2003 Kristian Rietveld * gtk/gtkcellview.c (gtk_cell_view_finalize): just call diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 53a5e0ab4f..45ba2eda0d 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Sun Nov 16 22:50:58 2003 Matthias Clasen + + Reinstate fixes for (#124212, Marco Pesenti Gritti): + + * gtk/gtkuimanager.c (update_smart_separators): Don't spit + warnings for popups. + (_gtk_menu_is_empty): Return FALSE for non-menus. + Sun Nov 16 21:48:40 2003 Kristian Rietveld * gtk/gtkcellview.c (gtk_cell_view_finalize): just call diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 53a5e0ab4f..45ba2eda0d 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Sun Nov 16 22:50:58 2003 Matthias Clasen + + Reinstate fixes for (#124212, Marco Pesenti Gritti): + + * gtk/gtkuimanager.c (update_smart_separators): Don't spit + warnings for popups. + (_gtk_menu_is_empty): Return FALSE for non-menus. + Sun Nov 16 21:48:40 2003 Kristian Rietveld * gtk/gtkcellview.c (gtk_cell_view_finalize): just call diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 53a5e0ab4f..45ba2eda0d 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Sun Nov 16 22:50:58 2003 Matthias Clasen + + Reinstate fixes for (#124212, Marco Pesenti Gritti): + + * gtk/gtkuimanager.c (update_smart_separators): Don't spit + warnings for popups. + (_gtk_menu_is_empty): Return FALSE for non-menus. + Sun Nov 16 21:48:40 2003 Kristian Rietveld * gtk/gtkcellview.c (gtk_cell_view_finalize): just call diff --git a/gtk/gtkuimanager.c b/gtk/gtkuimanager.c index 048b851269..0d9ec632cb 100644 --- a/gtk/gtkuimanager.c +++ b/gtk/gtkuimanager.c @@ -1662,7 +1662,7 @@ _gtk_menu_is_empty (GtkWidget *menu) g_return_val_if_fail (menu == NULL || GTK_IS_MENU (menu), TRUE); if (!menu) - return TRUE; + return FALSE; children = gtk_container_get_children (GTK_CONTAINER (menu)); @@ -1772,8 +1772,10 @@ update_smart_separators (GtkWidget *proxy) GtkWidget *item; item = gtk_menu_get_attach_widget (GTK_MENU (parent)); - _gtk_action_sync_menu_visible (NULL, item, empty); - g_object_set (G_OBJECT (filler), "visible", empty, NULL); + if (GTK_IS_MENU_ITEM (item)) + _gtk_action_sync_menu_visible (NULL, item, empty); + if (GTK_IS_WIDGET (filler)) + g_object_set (G_OBJECT (filler), "visible", empty, NULL); } } }