2007-05-10 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkbutton.c (gtk_button_set_image): Unparent the old
image before overwriting priv->image. (#437281, Jochen Baier)
svn path=/trunk/; revision=17816
+2007-05-10 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtkbutton.c (gtk_button_set_image): Unparent the old
+ image before overwriting priv->image. (#437281, Jochen Baier)
+
2007-05-10 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_scroll_child):
image = g_object_ref (priv->image);
if (image->parent)
gtk_container_remove (GTK_CONTAINER (image->parent), image);
-
+
priv->image = NULL;
}
priv = GTK_BUTTON_GET_PRIVATE (button);
+ if (priv->image && priv->image->parent)
+ gtk_container_remove (GTK_CONTAINER (priv->image->parent), priv->image);
+
priv->image = image;
priv->image_is_stock = (image == NULL);