[gimp] Use gtk_widget_get_parent() instead of widget->parent



commit c0bf72eb3cdef1878a140211ebc1de32f8c7e907
Author: Michael Natterer <mitch gimp org>
Date:   Fri Oct 9 18:19:35 2009 +0200

    Use gtk_widget_get_parent() instead of widget->parent

 plug-ins/help-browser/gimpthrobber.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/plug-ins/help-browser/gimpthrobber.c b/plug-ins/help-browser/gimpthrobber.c
index 5c47d45..a7844bc 100644
--- a/plug-ins/help-browser/gimpthrobber.c
+++ b/plug-ins/help-browser/gimpthrobber.c
@@ -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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]