[gtk+] sizegroup: Merge function into only caller



commit 4fa74e68e9a73a1e0e169be89a3aba282d0fdbe4
Author: Benjamin Otte <otte redhat com>
Date:   Mon Sep 28 21:17:21 2015 +0200

    sizegroup: Merge function into only caller

 gtk/gtksizegroup.c |   82 +++++++++++++++++++++------------------------------
 1 files changed, 34 insertions(+), 48 deletions(-)
---
diff --git a/gtk/gtksizegroup.c b/gtk/gtksizegroup.c
index e1c9f46..a30ab87 100644
--- a/gtk/gtksizegroup.c
+++ b/gtk/gtksizegroup.c
@@ -215,53 +215,6 @@ queue_resize_on_group (GtkSizeGroup *size_group)
 }
 
 static void
-queue_resize_on_widget (GtkWidget *widget,
-                       gboolean   check_siblings)
-{
-  GtkWidget *parent;
-
-  parent = widget;
-
-  do
-    {
-      if (gtk_widget_get_resize_needed (parent))
-        return;
-
-      gtk_widget_queue_resize_on_widget (parent);
-
-      if (!check_siblings)
-       {
-          check_siblings = TRUE;
-       }
-      else
-        {
-          GSList *groups, *l;
-
-          groups = _gtk_widget_get_sizegroups (parent);
-
-          for (l = groups; l; l = l->next)
-          {
-            if (((GtkSizeGroup *) (l->data))->priv->ignore_hidden && !gtk_widget_is_visible (widget))
-              continue;
-
-            queue_resize_on_group (l->data);
-         }
-        }
-
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
-      if (GTK_IS_RESIZE_CONTAINER (parent))
-        {
-          gtk_container_queue_resize_handler (GTK_CONTAINER (parent));
-          break;
-        }
-G_GNUC_END_IGNORE_DEPRECATIONS;
-
-      parent = _gtk_widget_get_parent (parent);
-    }
-  while (parent);
-}
-
-static void
 gtk_size_group_class_init (GtkSizeGroupClass *klass)
 {
   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
@@ -575,7 +528,40 @@ gtk_size_group_get_widgets (GtkSizeGroup *size_group)
 void
 _gtk_size_group_queue_resize (GtkWidget *widget)
 {
-  queue_resize_on_widget (widget, TRUE);
+  GtkWidget *parent;
+  GSList *groups, *l;
+
+  parent = widget;
+
+  do
+    {
+      if (gtk_widget_get_resize_needed (parent))
+        return;
+
+      gtk_widget_queue_resize_on_widget (parent);
+
+
+      groups = _gtk_widget_get_sizegroups (parent);
+
+      for (l = groups; l; l = l->next)
+      {
+        if (((GtkSizeGroup *) (l->data))->priv->ignore_hidden && !gtk_widget_is_visible (widget))
+          continue;
+
+        queue_resize_on_group (l->data);
+      }
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
+      if (GTK_IS_RESIZE_CONTAINER (parent))
+        {
+          gtk_container_queue_resize_handler (GTK_CONTAINER (parent));
+          break;
+        }
+G_GNUC_END_IGNORE_DEPRECATIONS;
+
+      parent = _gtk_widget_get_parent (parent);
+    }
+  while (parent);
 }
 
 typedef struct {


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