mirror of https://github.com/GNOME/gimp.git
Use gtk_widget_get_parent() instead of widget->parent
This commit is contained in:
parent
2e1caf6be8
commit
c0bf72eb3c
|
@ -173,8 +173,8 @@ gimp_throbber_construct_contents (GtkToolItem *tool_item)
|
|||
GtkWidget *image;
|
||||
GtkToolbarStyle style;
|
||||
|
||||
if (button->priv->image && button->priv->image->parent)
|
||||
gtk_container_remove (GTK_CONTAINER (button->priv->image->parent),
|
||||
if (button->priv->image && gtk_widget_get_parent (button->priv->image))
|
||||
gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (button->priv->image)),
|
||||
button->priv->image);
|
||||
|
||||
if (gtk_bin_get_child (GTK_BIN (button->priv->button)))
|
||||
|
@ -339,8 +339,8 @@ gimp_throbber_set_image (GimpThrobber *button,
|
|||
{
|
||||
if (button->priv->image)
|
||||
{
|
||||
if (button->priv->image->parent)
|
||||
gtk_container_remove (GTK_CONTAINER (button->priv->image->parent),
|
||||
if (gtk_widget_get_parent (button->priv->image))
|
||||
gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (button->priv->image)),
|
||||
button->priv->image);
|
||||
|
||||
g_object_unref (button->priv->image);
|
||||
|
|
Loading…
Reference in New Issue