[gtk+] Do not use GtkBoxChild in GtkStatusBar



commit 82efd2d92f775a60639a4b404b66a4096acbcd12
Author: Javier Jardón <jjardon gnome org>
Date:   Thu Jul 15 00:46:22 2010 +0200

    Do not use GtkBoxChild in GtkStatusBar
    
    https://bugzilla.gnome.org/show_bug.cgi?id=624397

 gtk/gtkstatusbar.c |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkstatusbar.c b/gtk/gtkstatusbar.c
index 350a034..f6972f9 100644
--- a/gtk/gtkstatusbar.c
+++ b/gtk/gtkstatusbar.c
@@ -1031,8 +1031,9 @@ static gboolean
 has_extra_children (GtkStatusbar *statusbar)
 {
   GtkStatusbarPriv *priv = statusbar->priv;
+  GtkPackType child_pack_type, frame_pack_type;
+  GtkWidget *child, *frame;
   GList *l, *children;
-  GtkBoxChild *child, *frame;
 
   /* If the internal frame has been modified assume we have extra children */
   if (gtk_bin_get_child (GTK_BIN (priv->frame)) != priv->label)
@@ -1044,18 +1045,24 @@ has_extra_children (GtkStatusbar *statusbar)
     {
       frame = l->data;
 
-      if (frame->widget == priv->frame)
+      if (frame == priv->frame)
 	break;
     }
-  
+
+  gtk_box_query_child_packing (GTK_BOX (statusbar), frame,
+                               NULL, NULL, NULL, &frame_pack_type);
+
   for (l = l->next; l; l = l->next)
     {
       child = l->data;
 
-      if (!gtk_widget_get_visible (child->widget))
+      if (!gtk_widget_get_visible (child))
 	continue;
 
-      if (frame->pack == GTK_PACK_START || child->pack == GTK_PACK_END)
+      gtk_box_query_child_packing (GTK_BOX (statusbar), frame,
+                                   NULL, NULL, NULL, &child_pack_type);
+
+      if (frame_pack_type == GTK_PACK_START || child_pack_type == GTK_PACK_END)
 	return TRUE;
     }
 



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