mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
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
This commit is contained in:
parent
16f9e30bea
commit
75092d295b
@ -1,3 +1,8 @@
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user