+2008-09-03 Alejandro Pinheiro <apinheiro@igalia.com>
+
+ * src/hildon-touch-selector.c
+ (hildon_date_touch_selector_get_selected): fix the selection mode check,
+ in order to allow use this function on multiple row selection mode if
+ the column is different that the first one
+ Fixes: NB#88047
+
2008-09-03 Claudio Saavedra <csaavedra@igalia.com>
* src/hildon-time-selector.c: (_custom_print_func): Change the logical ids
* @column: the column number we want to get the element
* @iter: #GtkTreeIter currently selected
*
- * Sets @iter to the currently selected node on the nth-column, if selection is set to
- * %HILDON_TOUCH_SELECTOR_SINGLE. @iter may be %NULL if you just want to test if selection
- * has any selected items.
+ * Sets @iter to the currently selected node on the nth-column, if selection is
+ * set to %HILDON_TOUCH_SELECTOR_SINGLE or %HILDON_TOUCH_SELECTOR_MULTIPLE with
+ * a column different that the first one. @iter may be %NULL if you just want to
+ * test if selection has any selected items.
*
* This function will not work if selection is in
- * %HILDON_TOUCH_SELECTOR_MULTIPLE mode.
+ * %HILDON_TOUCH_SELECTOR_MULTIPLE mode and the column is the first one.
*
* See gtk_tree_selection_get_selected() for more information.
*
{
GtkTreeSelection *selection = NULL;
SelectorColumn *current_column = NULL;
+ HildonTouchSelectorSelectionMode mode;
g_return_val_if_fail (HILDON_IS_TOUCH_SELECTOR (selector), FALSE);
- g_return_val_if_fail (hildon_touch_selector_get_column_selection_mode (selector)
- == HILDON_TOUCH_SELECTOR_SELECTION_MODE_SINGLE, FALSE);
g_return_val_if_fail (column < hildon_touch_selector_get_num_columns (selector),
FALSE);
+ mode = hildon_touch_selector_get_column_selection_mode (selector);
+ g_return_val_if_fail
+ ((mode == HILDON_TOUCH_SELECTOR_SELECTION_MODE_SINGLE) ||
+ ((mode == HILDON_TOUCH_SELECTOR_SELECTION_MODE_MULTIPLE)&&(column>0)),
+ FALSE);
current_column = g_slist_nth_data (selector->priv->columns, column);