From b092021ba6e8aa55de595aee52eef683f8ced034 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Sat, 4 Aug 2001 12:48:16 +0000 Subject: [PATCH] Need to show the image after adding it to the GtkImageMenuItem. This used 2001-08-04 Michael Natterer * gtk/gtkitemfactory.c (gtk_item_factory_create_item): Need to show the image after adding it to the GtkImageMenuItem. This used to work without in testgtk because of the gtk_widget_show_all() at the end of the function. (Closes #54978). --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-0 | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ ChangeLog.pre-2-2 | 8 ++++++++ ChangeLog.pre-2-4 | 8 ++++++++ ChangeLog.pre-2-6 | 8 ++++++++ ChangeLog.pre-2-8 | 8 ++++++++ gtk/gtkitemfactory.c | 10 ++++++++-- 8 files changed, 64 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 358cabba8a..683b84ff78 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-08-04 Michael Natterer + + * gtk/gtkitemfactory.c (gtk_item_factory_create_item): + Need to show the image after adding it to the GtkImageMenuItem. + This used to work without in testgtk because of the + gtk_widget_show_all() at the end of the function. + (Closes #54978). + Tue Jul 31 22:59:33 2001 Tim Janik * gtk/gtknotebook.c (gtk_notebook_get_child_property): diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 358cabba8a..683b84ff78 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,11 @@ +2001-08-04 Michael Natterer + + * gtk/gtkitemfactory.c (gtk_item_factory_create_item): + Need to show the image after adding it to the GtkImageMenuItem. + This used to work without in testgtk because of the + gtk_widget_show_all() at the end of the function. + (Closes #54978). + Tue Jul 31 22:59:33 2001 Tim Janik * gtk/gtknotebook.c (gtk_notebook_get_child_property): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 358cabba8a..683b84ff78 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +2001-08-04 Michael Natterer + + * gtk/gtkitemfactory.c (gtk_item_factory_create_item): + Need to show the image after adding it to the GtkImageMenuItem. + This used to work without in testgtk because of the + gtk_widget_show_all() at the end of the function. + (Closes #54978). + Tue Jul 31 22:59:33 2001 Tim Janik * gtk/gtknotebook.c (gtk_notebook_get_child_property): diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 358cabba8a..683b84ff78 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,11 @@ +2001-08-04 Michael Natterer + + * gtk/gtkitemfactory.c (gtk_item_factory_create_item): + Need to show the image after adding it to the GtkImageMenuItem. + This used to work without in testgtk because of the + gtk_widget_show_all() at the end of the function. + (Closes #54978). + Tue Jul 31 22:59:33 2001 Tim Janik * gtk/gtknotebook.c (gtk_notebook_get_child_property): diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 358cabba8a..683b84ff78 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +2001-08-04 Michael Natterer + + * gtk/gtkitemfactory.c (gtk_item_factory_create_item): + Need to show the image after adding it to the GtkImageMenuItem. + This used to work without in testgtk because of the + gtk_widget_show_all() at the end of the function. + (Closes #54978). + Tue Jul 31 22:59:33 2001 Tim Janik * gtk/gtknotebook.c (gtk_notebook_get_child_property): diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 358cabba8a..683b84ff78 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +2001-08-04 Michael Natterer + + * gtk/gtkitemfactory.c (gtk_item_factory_create_item): + Need to show the image after adding it to the GtkImageMenuItem. + This used to work without in testgtk because of the + gtk_widget_show_all() at the end of the function. + (Closes #54978). + Tue Jul 31 22:59:33 2001 Tim Janik * gtk/gtknotebook.c (gtk_notebook_get_child_property): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 358cabba8a..683b84ff78 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +2001-08-04 Michael Natterer + + * gtk/gtkitemfactory.c (gtk_item_factory_create_item): + Need to show the image after adding it to the GtkImageMenuItem. + This used to work without in testgtk because of the + gtk_widget_show_all() at the end of the function. + (Closes #54978). + Tue Jul 31 22:59:33 2001 Tim Janik * gtk/gtknotebook.c (gtk_notebook_get_child_property): diff --git a/gtk/gtkitemfactory.c b/gtk/gtkitemfactory.c index dcaa3a80f2..3aa134183e 100644 --- a/gtk/gtkitemfactory.c +++ b/gtk/gtkitemfactory.c @@ -1234,7 +1234,11 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory, image = gtk_image_new_from_pixbuf (pixbuf); if (image) - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (widget), image); + { + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (widget), image); + + gtk_widget_show (image); + } if (pixbuf) g_object_unref (G_OBJECT (pixbuf)); @@ -1244,7 +1248,9 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory, image = gtk_image_new_from_stock (entry->extra_data, GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (widget), image); - + + gtk_widget_show (image); + if (gtk_stock_lookup (entry->extra_data, &stock_item)) { if (!accelerator)