diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-10-23 20:03:41 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-10-23 20:03:41 +0900 |
commit | ed63ae2bd36fe414de4cbeb3a3bd4f3fa7e85d3d (patch) | |
tree | 88787349048b8c62b0c6526b76cfb3078223e912 /gtk/gtksizerequest.c | |
parent | 0dd5eb4b61bc1cc6715300da8457bd3cff077d39 (diff) | |
download | gtk+-ed63ae2bd36fe414de4cbeb3a3bd4f3fa7e85d3d.tar.gz |
Fixed push/pop_recursion_check() to not fire warnings for expected code.
I.e. Since we are now calling get_preferred_width() to ensure a good 'for_size'
for get_height_for_width() we need to avoid warning about this internal expected
recursion.
Diffstat (limited to 'gtk/gtksizerequest.c')
-rw-r--r-- | gtk/gtksizerequest.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gtk/gtksizerequest.c b/gtk/gtksizerequest.c index da91d0c13c..f214f9d431 100644 --- a/gtk/gtksizerequest.c +++ b/gtk/gtksizerequest.c @@ -220,14 +220,15 @@ compute_size_for_orientation (GtkWidget *request, /* Unconditional size request runs but is often unhandled. */ do_size_request (widget, &requisition); - push_recursion_check (request, orientation, for_size); if (orientation == GTK_SIZE_GROUP_HORIZONTAL) { requisition_size = requisition.width; if (for_size < 0) { + push_recursion_check (request, orientation, for_size); GTK_WIDGET_GET_CLASS (request)->get_preferred_width (request, &min_size, &nat_size); + pop_recursion_check (request, orientation); } else { @@ -245,8 +246,10 @@ compute_size_for_orientation (GtkWidget *request, &ignored_position, &for_size); + push_recursion_check (request, orientation, for_size); GTK_WIDGET_GET_CLASS (request)->get_preferred_width_for_height (request, for_size, &min_size, &nat_size); + pop_recursion_check (request, orientation); } } else @@ -255,7 +258,9 @@ compute_size_for_orientation (GtkWidget *request, if (for_size < 0) { + push_recursion_check (request, orientation, for_size); GTK_WIDGET_GET_CLASS (request)->get_preferred_height (request, &min_size, &nat_size); + pop_recursion_check (request, orientation); } else { @@ -273,11 +278,12 @@ compute_size_for_orientation (GtkWidget *request, &ignored_position, &for_size); + push_recursion_check (request, orientation, for_size); GTK_WIDGET_GET_CLASS (request)->get_preferred_height_for_width (request, for_size, &min_size, &nat_size); + pop_recursion_check (request, orientation); } } - pop_recursion_check (request, orientation); if (min_size > nat_size) { |