[gtk+/native-layout] Removed casing of GTK_IS_EXTENDED_LAYOUT() from GtkViewport.



commit 8413f22d9034e0cde3d9bd11f786e09d0dcb8313
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Sat Apr 3 20:36:13 2010 -0400

    Removed casing of GTK_IS_EXTENDED_LAYOUT() from GtkViewport.

 gtk/gtkviewport.c |   24 +++++++-----------------
 1 files changed, 7 insertions(+), 17 deletions(-)
---
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index 3f3d346..2890b61 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -418,23 +418,13 @@ viewport_set_vadjustment_values (GtkViewport *viewport,
 
   if (bin->child && gtk_widget_get_visible (bin->child))
     {
-      if (GTK_IS_EXTENDED_LAYOUT (bin->child))
-        {
-          gint natural_height;
-
-          gtk_extended_layout_get_height_for_width (GTK_EXTENDED_LAYOUT (bin->child),
-                                                    view_allocation.width,
-                                                    NULL,
-                                                    &natural_height);
-          vadjustment->upper = MAX (natural_height, view_allocation.height);
-        }
-      else
-        {
-          GtkRequisition child_requisition;
-
-          gtk_widget_get_child_requisition (bin->child, &child_requisition);
-          vadjustment->upper = MAX (child_requisition.height, view_allocation.height);
-        }
+      gint natural_height;
+      
+      gtk_extended_layout_get_height_for_width (GTK_EXTENDED_LAYOUT (bin->child),
+						view_allocation.width,
+						NULL,
+						&natural_height);
+      vadjustment->upper = MAX (natural_height, view_allocation.height);
     }
   else
     vadjustment->upper = view_allocation.height;



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