From 402a0639d83e69067e1e8009db8b384556c58b68 Mon Sep 17 00:00:00 2001 From: Claudio Saavedra Date: Tue, 9 Jun 2009 15:29:17 +0300 Subject: [PATCH] Use hildon_touch_selector_set/get_text_column() in the touchselector widgets * hildon/hildon-date-selector.c: (hildon_date_selector_construct_ui): * hildon/hildon-time-selector.c: (hildon_time_selector_constructor): * hildon/hildon-touch-selector-entry.c: (hildon_touch_selector_entry_set_text_column), (hildon_touch_selector_entry_get_text_column): * hildon/hildon-touch-selector.c: (_default_print_func), (hildon_touch_selector_new_text): Use hildon_touch_selector_set/get_text_column() instead of setting/getting the "text-column" property. --- ChangeLog | 14 ++++++++++++++ hildon/hildon-date-selector.c | 6 +++--- hildon/hildon-time-selector.c | 5 ++--- hildon/hildon-touch-selector-entry.c | 4 ++-- hildon/hildon-touch-selector.c | 6 +++--- 5 files changed, 24 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 88b8bd1..90b619e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,19 @@ 2009-06-09 Claudio Saavedra + * hildon/hildon-date-selector.c: + (hildon_date_selector_construct_ui): + * hildon/hildon-time-selector.c: + (hildon_time_selector_constructor): + * hildon/hildon-touch-selector-entry.c: + (hildon_touch_selector_entry_set_text_column), + (hildon_touch_selector_entry_get_text_column): + * hildon/hildon-touch-selector.c: (_default_print_func), + (hildon_touch_selector_new_text): Use + hildon_touch_selector_set/get_text_column() instead of + setting/getting the "text-column" property. + +2009-06-09 Claudio Saavedra + * doc/hildon-sections.txt: Add the new public methods below. * examples/hildon-picker-button-multicolumn-example.c: diff --git a/hildon/hildon-date-selector.c b/hildon/hildon-date-selector.c index c2e0f96..ba5ef33 100644 --- a/hildon/hildon-date-selector.c +++ b/hildon/hildon-date-selector.c @@ -318,17 +318,17 @@ hildon_date_selector_construct_ui (HildonDateSelector *selector) case DAY: column = hildon_touch_selector_append_text_column (HILDON_TOUCH_SELECTOR (selector), selector->priv->day_model, TRUE); - g_object_set (G_OBJECT (column), "text-column", 0, NULL); + hildon_touch_selector_column_set_text_column (column, 0); break; case MONTH: column = hildon_touch_selector_append_text_column (HILDON_TOUCH_SELECTOR (selector), selector->priv->month_model, TRUE); - g_object_set (G_OBJECT (column), "text-column", 0, NULL); + hildon_touch_selector_column_set_text_column (column, 0); break; case YEAR: column = hildon_touch_selector_append_text_column (HILDON_TOUCH_SELECTOR (selector), selector->priv->year_model, TRUE); - g_object_set (G_OBJECT (column), "text-column", 0, NULL); + hildon_touch_selector_column_set_text_column (column, 0); break; default: g_error ("Current column order incorrect"); diff --git a/hildon/hildon-time-selector.c b/hildon/hildon-time-selector.c index e6a855f..e64d375 100644 --- a/hildon/hildon-time-selector.c +++ b/hildon/hildon-time-selector.c @@ -214,8 +214,7 @@ hildon_time_selector_constructor (GType type, column = hildon_touch_selector_append_text_column (HILDON_TOUCH_SELECTOR (selector), selector->priv->hours_model, TRUE); - g_object_set (column, "text-column", 0, NULL); - + hildon_touch_selector_column_set_text_column (column, 0); /* we need initialization parameters in order to create minute models*/ selector->priv->minutes_step = selector->priv->minutes_step ? selector->priv->minutes_step : 1; @@ -224,7 +223,7 @@ hildon_time_selector_constructor (GType type, column = hildon_touch_selector_append_text_column (HILDON_TOUCH_SELECTOR (selector), selector->priv->minutes_model, TRUE); - g_object_set (column, "text-column", 0, NULL); + hildon_touch_selector_column_set_text_column (column, 0); if (selector->priv->ampm_format) { selector->priv->ampm_model = _create_ampm_model (selector); diff --git a/hildon/hildon-touch-selector-entry.c b/hildon/hildon-touch-selector-entry.c index 18a1bbf..af2f3fc 100644 --- a/hildon/hildon-touch-selector-entry.c +++ b/hildon/hildon-touch-selector-entry.c @@ -289,7 +289,7 @@ hildon_touch_selector_entry_set_text_column (HildonTouchSelectorEntry *selector, column = hildon_touch_selector_get_column (HILDON_TOUCH_SELECTOR (selector), 0); - g_object_set (G_OBJECT (column), "text-column", text_column, NULL); + hildon_touch_selector_column_set_text_column (column, text_column); } /** @@ -313,7 +313,7 @@ hildon_touch_selector_entry_get_text_column (HildonTouchSelectorEntry *selector) column = hildon_touch_selector_get_column (HILDON_TOUCH_SELECTOR (selector), 0); - g_object_get (G_OBJECT (column), "text-column", &text_column, NULL); + text_column = hildon_touch_selector_column_get_text_column (column); return text_column; } diff --git a/hildon/hildon-touch-selector.c b/hildon/hildon-touch-selector.c index fd38265..d93ab73 100644 --- a/hildon/hildon-touch-selector.c +++ b/hildon/hildon-touch-selector.c @@ -597,7 +597,7 @@ _default_print_func (HildonTouchSelector * selector, gpointer user_data) selected_rows = hildon_touch_selector_get_selected_rows (selector, 0); model = hildon_touch_selector_get_model (selector, 0); column = hildon_touch_selector_get_column (selector, 0); - g_object_get (G_OBJECT(column), "text-column", &text_column, NULL); + text_column = hildon_touch_selector_column_get_text_column (column); result = g_strdup_printf ("("); i = 0; @@ -641,7 +641,7 @@ _default_print_func (HildonTouchSelector * selector, gpointer user_data) for (i = initial_value; i < num_columns; i++) { model = hildon_touch_selector_get_model (selector, i); column = hildon_touch_selector_get_column (selector, i); - g_object_get (G_OBJECT(column), "text-column", &text_column, NULL); + text_column = hildon_touch_selector_column_get_text_column (column); if (hildon_touch_selector_get_selected (selector, i, &iter)) { if (text_column == -1 ) { @@ -1074,7 +1074,7 @@ hildon_touch_selector_new_text (void) column = hildon_touch_selector_append_text_column (HILDON_TOUCH_SELECTOR (selector), GTK_TREE_MODEL (store), TRUE); - g_object_set (G_OBJECT (column), "text-column", 0, NULL); + hildon_touch_selector_column_set_text_column (column, 0); return selector; } -- 1.7.9.5