Use gtk_widget_get_parent() instead of widget->parent

This commit is contained in:
Michael Natterer 2009-10-09 18:19:35 +02:00
parent 2e1caf6be8
commit c0bf72eb3c
1 changed files with 4 additions and 4 deletions

View File

@ -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);