2009-02-13 Claudio Saavedra <csaavedra@igalia.com>
authorClaudio Saavedra <csaavedra@igalia.com>
Fri, 13 Feb 2009 12:47:18 +0000 (12:47 +0000)
committerClaudio Saavedra <csaavedra@igalia.com>
Fri, 13 Feb 2009 12:47:18 +0000 (12:47 +0000)
* src/hildon-date-selector.c (hildon_date_selector_construct_ui),
(hildon_date_selector_constructor): Do not select the current
date until we are handle the "changed" signal, to avoid having bogus
elements in the days model.

ChangeLog
src/hildon-date-selector.c

index 47346d2..71dad2a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2009-02-13  Claudio Saavedra  <csaavedra@igalia.com>
 
+       * src/hildon-date-selector.c (hildon_date_selector_construct_ui),
+       (hildon_date_selector_constructor): Do not select the current
+       date until we are handle the "changed" signal, to avoid having bogus
+       elements in the days model.
+
+2009-02-13  Claudio Saavedra  <csaavedra@igalia.com>
+
        * src/hildon-date-selector.c (_update_day_model): Use a gint variable
        for num_days, since _month_days() can return a negative value.
 
index 19ac4ff..94de680 100644 (file)
@@ -334,10 +334,6 @@ hildon_date_selector_construct_ui (HildonDateSelector *selector)
       break;
     }
   }
-  /* By default we should select the current day */
-  hildon_date_selector_select_current_date (selector, selector->priv->creation_year,
-                                            selector->priv->creation_month,
-                                            selector->priv->creation_day);
 }
 
 static GObject *
@@ -346,14 +342,22 @@ hildon_date_selector_constructor (GType                  type,
                                   GObjectConstructParam *construct_properties)
 {
   GObject *object;
+  HildonDateSelector *selector;
 
   object = G_OBJECT_CLASS (hildon_date_selector_parent_class)->constructor
     (type, n_construct_properties, construct_properties);
 
-  hildon_date_selector_construct_ui (HILDON_DATE_SELECTOR (object));
+  selector = HILDON_DATE_SELECTOR (object);
+
+  hildon_date_selector_construct_ui (selector);
 
   g_signal_connect (object, "changed", G_CALLBACK (_manage_selector_change_cb), NULL);
 
+  /* By default we should select the current day */
+  hildon_date_selector_select_current_date (selector, selector->priv->creation_year,
+                                            selector->priv->creation_month,
+                                            selector->priv->creation_day);
+
   return object;
 }