[gtk+] Fixed push/pop_recursion_check() to not fire warnings for expected code.
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Fixed push/pop_recursion_check() to not fire warnings for expected code.
- Date: Sat, 23 Oct 2010 11:00:46 +0000 (UTC)
commit ed63ae2bd36fe414de4cbeb3a3bd4f3fa7e85d3d
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Sat Oct 23 20:03:41 2010 +0900
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.
gtk/gtksizerequest.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtksizerequest.c b/gtk/gtksizerequest.c
index da91d0c..f214f9d 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)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]