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.
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 *
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;
}