HildonTouchSelector::optimal_size_request need to manage any extra widget added
authorAlejandro Piñeiro <apinheiro@igalia.com>
Tue, 2 Jun 2009 11:56:44 +0000 (13:56 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Tue, 2 Jun 2009 11:56:44 +0000 (13:56 +0200)
internally

* hildon/hildon-touch-selector.c:
(hildon_touch_selector_optimal_size_request): use the current requisition
as the base, in order to include any possible extra widget, like the
hildon entry on HildonTouchSelectorEntry

Fixes: NB#119805 (Merge conflict picker dialogs are too small)

ChangeLog
hildon/hildon-touch-selector.c

index a228fd2..9b48374 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-06-02  Alejandro Pinheiro  <apinheiro@igalia.com>
+
+       * hildon/hildon-touch-selector.c:
+       (hildon_touch_selector_optimal_size_request): use the current requisition
+       as the base, in order to include any possible extra widget, like the
+       hildon entry on HildonTouchSelectorEntry
+
+       Fixes: NB#119805 (Merge conflict picker dialogs are too small)
+
 2009-05-29  Claudio Saavedra  <csaavedra@igalia.com>
 
        * configure.ac: post release version bump
index 896f3b7..d727f54 100644 (file)
@@ -2195,6 +2195,7 @@ hildon_touch_selector_optimal_size_request      (HildonTouchSelector *selector,
 {
   GSList *iter = NULL;
   gint height = 0;
+  gint base_height = 0;
 
   g_return_if_fail (HILDON_IS_TOUCH_SELECTOR (selector));
 
@@ -2206,9 +2207,13 @@ hildon_touch_selector_optimal_size_request      (HildonTouchSelector *selector,
 
   if (iter == NULL) {
     height = requisition->height;
+  } else {
+    /* we use the normal requisition as base, as the touch selector can has
+       extra widgets, not only the columns (ie: HildonTouchSelectorEntry) */
+    base_height = requisition->height;
   }
 
-  /* Compute optimal height */
+  /* Compute optimal height for the columns */
   while (iter) {
     HildonTouchSelectorColumn *column;
     GtkWidget *child;
@@ -2224,6 +2229,6 @@ hildon_touch_selector_optimal_size_request      (HildonTouchSelector *selector,
     iter = g_slist_next (iter);
   }
 
-  requisition->height = height;
+  requisition->height = base_height + height;
 }