[gtk+/wip/otte/queue-resize: 10/32] sizegroup: Move container function into its only caller



commit ff40f5e137680a5b76ddf0cab82758730d0225e8
Author: Benjamin Otte <otte redhat com>
Date:   Tue Sep 15 21:57:49 2015 +0200

    sizegroup: Move container function into its only caller

 gtk/gtkcontainer.c        |   40 +---------------------------------------
 gtk/gtkcontainerprivate.h |    2 +-
 gtk/gtksizegroup.c        |   29 ++++++++++++++++++++++++++++-
 3 files changed, 30 insertions(+), 41 deletions(-)
---
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index d601258..cf86524 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -2068,7 +2068,7 @@ _gtk_container_stop_idle_sizer (GtkContainer *container)
   container->priv->resize_clock = NULL;
 }
 
-static void
+void
 gtk_container_queue_resize_handler (GtkContainer *container)
 {
   GtkWidget *widget;
@@ -2121,44 +2121,6 @@ _gtk_container_queue_restyle (GtkContainer *container)
   priv->restyle_pending = TRUE;
 }
 
-/**
- * _gtk_container_queue_resize:
- * @container: a #GtkContainer
- *
- * Determines the “resize container” in the hierarchy above this container
- * (typically the toplevel, but other containers can be set as resize
- * containers with gtk_container_set_resize_mode()), marks the container
- * and all parents up to and including the resize container as needing
- * to have sizes recomputed, and if necessary adds the resize container
- * to the queue of containers that will be resized out at idle.
- */
-void
-_gtk_container_queue_resize (GtkContainer *container)
-{
-  GtkWidget *widget;
-
-  g_return_if_fail (GTK_IS_CONTAINER (container));
-
-  widget = GTK_WIDGET (container);
-
-  do
-    {
-      _gtk_widget_set_alloc_needed (widget, TRUE);
-      _gtk_size_request_cache_clear (_gtk_widget_peek_request_cache (widget));
-
-      G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
-      if (GTK_IS_RESIZE_CONTAINER (widget))
-        break;
-      G_GNUC_END_IGNORE_DEPRECATIONS;
-
-      widget = gtk_widget_get_parent (widget);
-    }
-  while (widget);
-
-  if (widget)
-    gtk_container_queue_resize_handler (GTK_CONTAINER (widget));
-}
-
 void
 _gtk_container_maybe_start_idle_sizer (GtkContainer *container)
 {
diff --git a/gtk/gtkcontainerprivate.h b/gtk/gtkcontainerprivate.h
index 244054f..78ee99c 100644
--- a/gtk/gtkcontainerprivate.h
+++ b/gtk/gtkcontainerprivate.h
@@ -25,7 +25,7 @@
 G_BEGIN_DECLS
 
 
-void     _gtk_container_queue_resize           (GtkContainer *container);
+void     gtk_container_queue_resize_handler    (GtkContainer *container);
 void     _gtk_container_queue_restyle          (GtkContainer *container);
 void     _gtk_container_clear_resize_widgets   (GtkContainer *container);
 gchar*   _gtk_container_child_composite_name   (GtkContainer *container,
diff --git a/gtk/gtksizegroup.c b/gtk/gtksizegroup.c
index 0136c11..84a0ee9 100644
--- a/gtk/gtksizegroup.c
+++ b/gtk/gtksizegroup.c
@@ -204,6 +204,33 @@ _gtk_size_group_get_widget_peers (GtkWidget      *for_widget,
 }
 
 static void
+gtk_container_queue_resize (GtkContainer *container)
+{
+  GtkWidget *widget;
+
+  g_return_if_fail (GTK_IS_CONTAINER (container));
+
+  widget = GTK_WIDGET (container);
+
+  do
+    {
+      _gtk_widget_set_alloc_needed (widget, TRUE);
+      _gtk_size_request_cache_clear (_gtk_widget_peek_request_cache (widget));
+
+      G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
+      if (GTK_IS_RESIZE_CONTAINER (widget))
+        break;
+      G_GNUC_END_IGNORE_DEPRECATIONS;
+
+      widget = gtk_widget_get_parent (widget);
+    }
+  while (widget);
+
+  if (widget)
+    gtk_container_queue_resize_handler (GTK_CONTAINER (widget));
+}
+
+static void
 real_queue_resize (GtkWidget *widget)
 {
   GtkWidget *container;
@@ -218,7 +245,7 @@ real_queue_resize (GtkWidget *widget)
 
   if (container)
     {
-      _gtk_container_queue_resize (GTK_CONTAINER (container));
+      gtk_container_queue_resize (GTK_CONTAINER (container));
     }
 }
 


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