[gtk+/wip/otte/queue-resize: 15/33] sizegroup: Remove special case before loop
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/queue-resize: 15/33] sizegroup: Remove special case before loop
- Date: Thu, 1 Oct 2015 21:55:46 +0000 (UTC)
commit 2423bf23b0f582d15e9dc82b9d1028fb8a35af9f
Author: Benjamin Otte <otte redhat com>
Date: Tue Sep 15 22:11:35 2015 +0200
sizegroup: Remove special case before loop
The loop actually does the right thing already. There's no need to
complicate things.
gtk/gtksizegroup.c | 37 +++++++++++--------------------------
1 files changed, 11 insertions(+), 26 deletions(-)
---
diff --git a/gtk/gtksizegroup.c b/gtk/gtksizegroup.c
index 798b571..a0167ec 100644
--- a/gtk/gtksizegroup.c
+++ b/gtk/gtksizegroup.c
@@ -206,37 +206,22 @@ _gtk_size_group_get_widget_peers (GtkWidget *for_widget,
static void
real_queue_resize (GtkWidget *widget)
{
- GtkWidget *container;
-
- _gtk_widget_set_alloc_needed (widget, TRUE);
- _gtk_size_request_cache_clear (_gtk_widget_peek_request_cache (widget));
-
- container = _gtk_widget_get_parent (widget);
- if (!container &&
- _gtk_widget_is_toplevel (widget) && GTK_IS_CONTAINER (widget))
- container = widget;
-
- if (container)
+ do
{
- widget = container;
+ _gtk_widget_set_alloc_needed (widget, TRUE);
+ _gtk_size_request_cache_clear (_gtk_widget_peek_request_cache (widget));
- do
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
+ if (GTK_IS_RESIZE_CONTAINER (widget))
{
- _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);
+ gtk_container_queue_resize_handler (GTK_CONTAINER (widget));
+ break;
}
- while (widget);
+ G_GNUC_END_IGNORE_DEPRECATIONS;
+
+ widget = gtk_widget_get_parent (widget);
}
+ while (widget);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]