diff options
author | Benjamin Otte <otte@redhat.com> | 2015-09-18 04:04:21 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2015-10-28 19:44:28 +0100 |
commit | 58d506fb115596beaeb8383e2ed3af3febd6934d (patch) | |
tree | f307023d698d4ac1f9a905f06b68445ee6ced815 | |
parent | 85ab8ad00128fc095fdfb3d62142e58556ad5ee7 (diff) | |
download | gtk+-58d506fb115596beaeb8383e2ed3af3febd6934d.tar.gz |
sizegroup: Merge function into only caller
Both functions were running the same loop. Just running the loop once
seems advantageous.
-rw-r--r-- | gtk/gtksizegroup.c | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/gtk/gtksizegroup.c b/gtk/gtksizegroup.c index ef29358c96..11f050c624 100644 --- a/gtk/gtksizegroup.c +++ b/gtk/gtksizegroup.c @@ -204,27 +204,6 @@ _gtk_size_group_get_widget_peers (GtkWidget *for_widget, } static void -real_queue_resize (GtkWidget *widget) -{ - 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)) - { - gtk_container_queue_resize_handler (GTK_CONTAINER (widget)); - break; - } - G_GNUC_END_IGNORE_DEPRECATIONS; - - widget = gtk_widget_get_parent (widget); - } - while (widget); -} - -static void queue_resize_on_widget (GtkWidget *widget, gboolean check_siblings) { @@ -239,8 +218,8 @@ queue_resize_on_widget (GtkWidget *widget, do { - if (widget == parent) - real_queue_resize (widget); + _gtk_widget_set_alloc_needed (parent, TRUE); + _gtk_size_request_cache_clear (_gtk_widget_peek_request_cache (parent)); if (!check_siblings || _gtk_widget_get_sizegroups (parent) == NULL) { @@ -273,7 +252,10 @@ queue_resize_on_widget (GtkWidget *widget, G_GNUC_BEGIN_IGNORE_DEPRECATIONS; if (GTK_IS_RESIZE_CONTAINER (parent)) - break; + { + gtk_container_queue_resize_handler (GTK_CONTAINER (parent)); + break; + } G_GNUC_END_IGNORE_DEPRECATIONS; parent = _gtk_widget_get_parent (parent); |