diff --git a/ChangeLog b/ChangeLog index 88c3965c75..d28db1f463 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-07-03 Matthias Clasen + + * gtk/gtkbutton.c (gtk_button_construct_child): Don't leave + priv->image dangling when use-stock is set to FALSE. (#437281, + Jochen Baier) + 2007-07-03 Tor Lillqvist * configure.in: Handle GDK_PIXBUF_EXTRA_LIBS like GDK_EXTRA_LIBS, diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index 1b7db3921f..00216899cc 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -733,14 +733,14 @@ gtk_button_construct_child (GtkButton *button) image = g_object_ref (priv->image); if (image->parent) gtk_container_remove (GTK_CONTAINER (image->parent), image); - - priv->image = NULL; } + priv->image = NULL; + if (GTK_BIN (button)->child) gtk_container_remove (GTK_CONTAINER (button), GTK_BIN (button)->child); - + if (button->use_stock && button->label_text && gtk_stock_lookup (button->label_text, &item))