[gtk+/native-layout] Various updates to follow new gtk_extended_layout_get_desired_size added argument.



commit 4ed5e6d5266ab214f23e35a9c11572f8fb46bb1a
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Tue Apr 20 01:30:56 2010 -0400

    Various updates to follow new gtk_extended_layout_get_desired_size added argument.

 gtk/gtkcombobox.c |    4 +++-
 gtk/gtkplug.c     |    2 +-
 gtk/gtktreeview.c |    2 +-
 gtk/gtkwidget.c   |    8 ++++----
 4 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index 6062907..5a5f3b9 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -5895,7 +5895,7 @@ gtk_combo_box_get_desired_size (GtkExtendedLayout *layout,
   child = gtk_bin_get_child (GTK_BIN (layout));
  
   /* common */
-  gtk_extended_layout_get_desired_size (GTK_EXTENDED_LAYOUT (child), &bin_req, &bin_nat_req);
+  gtk_extended_layout_get_desired_size (GTK_EXTENDED_LAYOUT (child), FALSE, &bin_req, &bin_nat_req);
   gtk_combo_box_remeasure (combo_box);
 
   bin_req.width      = MAX (bin_req.width,      priv->minimum_size.width);
@@ -5958,6 +5958,7 @@ gtk_combo_box_get_desired_size (GtkExtendedLayout *layout,
           GtkRequisition but_req, but_nat_req;
 
           gtk_extended_layout_get_desired_size (GTK_EXTENDED_LAYOUT (priv->button), 
+						FALSE, 
 						&but_req, &but_nat_req);
 
           minimum_size->width  = bin_req.width + but_req.width;
@@ -5999,6 +6000,7 @@ gtk_combo_box_get_desired_size (GtkExtendedLayout *layout,
 
       /* the button */
       gtk_extended_layout_get_desired_size (GTK_EXTENDED_LAYOUT (priv->button), 
+					    FALSE, 
 					    &button_req, &button_nat_req);
 
       minimum_size->width += button_req.width;
diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c
index 362725d..340bcb2 100644
--- a/gtk/gtkplug.c
+++ b/gtk/gtkplug.c
@@ -782,7 +782,7 @@ gtk_plug_size_allocate (GtkWidget     *widget,
     }
 
   gtk_extended_layout_get_desired_size (GTK_EXTENDED_LAYOUT (bin->child),
-					NULL, &natural_size);
+					TRUE, NULL, &natural_size);
   _gtk_plug_windowing_publish_natural_size (GTK_PLUG (widget), &natural_size);
 }
 
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index b42c5b2..95d0e1a 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -2153,7 +2153,7 @@ gtk_tree_view_get_real_natural_width_from_column (GtkTreeView       *tree_view,
   if (GTK_TREE_VIEW_FLAG_SET (tree_view, GTK_TREE_VIEW_HEADERS_VISIBLE))
     {
       gtk_extended_layout_get_desired_size (GTK_EXTENDED_LAYOUT (column->button),
-					    NULL, &button_natural_size);
+					    TRUE, NULL, &button_natural_size);
 
       column_natural_width = MAX (column_natural_width, button_natural_size.width);
     }
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 2407c77..f5c575e 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -3894,7 +3894,7 @@ gtk_widget_size_request (GtkWidget	*widget,
                "to widget->requisition. gtk_widget_set_usize() may not work properly.");
 #endif /* G_ENABLE_DEBUG */
 
-  gtk_extended_layout_get_desired_size (GTK_EXTENDED_LAYOUT (widget), requisition, NULL);
+  gtk_extended_layout_get_desired_size (GTK_EXTENDED_LAYOUT (widget), FALSE, requisition, NULL);
 }
 
 /**
@@ -3928,7 +3928,7 @@ void
 gtk_widget_get_child_requisition (GtkWidget	 *widget,
 				  GtkRequisition *requisition)
 {
-  gtk_extended_layout_get_desired_size (GTK_EXTENDED_LAYOUT (widget), requisition, NULL);
+  gtk_extended_layout_get_desired_size (GTK_EXTENDED_LAYOUT (widget), FALSE, requisition, NULL);
 }
 
 static gboolean
@@ -7874,8 +7874,8 @@ gtk_widget_set_usize_internal (GtkWidget *widget,
       aux_info->height = height;
       changed = TRUE;
     }
-  
-  if (gtk_widget_get_visible (widget) && changed)
+
+  if (changed && gtk_widget_get_visible (widget))
     gtk_widget_queue_resize (widget);
 
   g_object_thaw_notify (G_OBJECT (widget));



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