2009-04-02 Alejandro Pinheiro <apinheiro@igalia.com>
authorAlejandro Piñeiro <apinheiro@igalia.com>
Thu, 2 Apr 2009 13:04:45 +0000 (13:04 +0000)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Thu, 2 Apr 2009 13:04:45 +0000 (13:04 +0000)
* src/hildon-picker-dialog.c: removed HILDON_TOUCH_SELECTOR_HEIGHT
(_hildon_picker_dialog_set_selector): removed call to
gtk_widget_set_size_request
* src/hildon-touch-selector.c
(_create_new_column): change the pannable size request policy

Avoid to use a hardcoded height for the hildon picker dialog. In order
to get that, we needed to change the hildon pannable size request
policy
Fixes: NB#109369 (Hard-coded height in HildonPickerDialog)

ChangeLog
src/hildon-picker-dialog.c
src/hildon-touch-selector.c

index 9516380..c6e6ac9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2009-04-02  Alejandro Pinheiro  <apinheiro@igalia.com>
+
+       * src/hildon-picker-dialog.c: removed HILDON_TOUCH_SELECTOR_HEIGHT
+       (_hildon_picker_dialog_set_selector): removed call to
+       gtk_widget_set_size_request
+       * src/hildon-touch-selector.c
+       (_create_new_column): change the pannable size request policy
+
+       Avoid to use a hardcoded height for the hildon picker dialog. In order
+       to get that, we needed to change the hildon pannable size request
+       policy
+       Fixes: NB#109369 (Hard-coded height in HildonPickerDialog)
+
 2009-04-02  Claudio Saavedra  <csaavedra@igalia.com>
 
        * debian/control: Depend on osso-system-lock localization package.
index 3fa11b3..c5b9217 100644 (file)
@@ -54,8 +54,6 @@
 
 G_DEFINE_TYPE (HildonPickerDialog, hildon_picker_dialog, HILDON_TYPE_DIALOG)
 
-#define HILDON_TOUCH_SELECTOR_HEIGHT            320
-
 struct _HildonPickerDialogPrivate
 {
   GtkWidget *selector;
@@ -585,10 +583,6 @@ _hildon_picker_dialog_set_selector (HildonPickerDialog * dialog,
 
   g_object_unref (selector);
 
-  /* Ensure that the dialog's height is correct */
-  gtk_widget_set_size_request (GTK_WIDGET (dialog->priv->selector), -1,
-                               HILDON_TOUCH_SELECTOR_HEIGHT);
-
   gtk_widget_show (dialog->priv->selector);
 
   prepare_action_area (dialog);
index 1a99397..1e53c6f 100644 (file)
@@ -690,6 +690,9 @@ _create_new_column (HildonTouchSelector * selector,
   g_object_set (G_OBJECT (panarea),
                 "initial-hint", FALSE, NULL);
 
+  hildon_pannable_area_set_size_request_policy (HILDON_PANNABLE_AREA (panarea),
+                                                HILDON_SIZE_REQUEST_CHILDREN);
+
   gtk_container_add (GTK_CONTAINER (panarea), GTK_WIDGET (tv));
 
   new_column->priv->model = model;