Commit 75092d29 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Unparent the old image before overwriting priv->image. (#437281, Jochen

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
parent 16f9e30b
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):
......
......@@ -733,7 +733,7 @@ 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;
}
......@@ -1970,6 +1970,9 @@ gtk_button_set_image (GtkButton *button,
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment