From 9ca8674d1d460338b0e85e605d9431fd57ece094 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alejandro=20Pi=C3=B1eiro?= Date: Thu, 13 Nov 2008 15:50:09 +0000 Subject: [PATCH] 2008-11-13 Alejandro Pinheiro * src/hildon-touch-selector.c: (hildon_touch_selector_set_column_selection_mode): Used of GTK_SELECTION_BROWSE instead of GTK_SELECTION_SINGLE gtk tree selection mode setting HILDON_TOUCH_SELECTOR_SELECTION_MODE_SINGLE. Added a check to avoid re-seting the same selection mode. Fixes: NB#91863 (hildon_touch_selector_set_column_selection_mode() breaks HildonPickerDialog) --- ChangeLog | 11 +++++++++++ src/hildon-touch-selector.c | 11 +++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 57820f9..9ab2b76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2008-11-13 Alejandro Pinheiro + + * src/hildon-touch-selector.c: + (hildon_touch_selector_set_column_selection_mode): Used of + GTK_SELECTION_BROWSE instead of GTK_SELECTION_SINGLE gtk tree selection + mode setting HILDON_TOUCH_SELECTOR_SELECTION_MODE_SINGLE. Added a check + to avoid re-seting the same selection mode. + + Fixes: NB#91863 (hildon_touch_selector_set_column_selection_mode() + breaks HildonPickerDialog) + 2008-11-13 Alejandro G. Castro * examples/Makefile.am: Fixed problem with the USE_MAEMO_GTK diff --git a/src/hildon-touch-selector.c b/src/hildon-touch-selector.c index 8321fba..b755492 100644 --- a/src/hildon-touch-selector.c +++ b/src/hildon-touch-selector.c @@ -1159,7 +1159,7 @@ hildon_touch_selector_get_column_selection_mode (HildonTouchSelector * selector) { HildonTouchSelectorSelectionMode result = HILDON_TOUCH_SELECTOR_SELECTION_MODE_SINGLE; - GtkSelectionMode treeview_mode = GTK_SELECTION_SINGLE; + GtkSelectionMode treeview_mode = GTK_SELECTION_BROWSE; HildonTouchSelectorColumn *column = NULL; GtkTreeSelection *selection = NULL; @@ -1198,17 +1198,24 @@ hildon_touch_selector_set_column_selection_mode (HildonTouchSelector * selector, GtkTreeSelection *selection = NULL; GtkSelectionMode treeview_mode = GTK_SELECTION_MULTIPLE; GtkTreeIter iter; + HildonTouchSelectorSelectionMode current_mode; g_return_if_fail (HILDON_IS_TOUCH_SELECTOR (selector)); g_return_if_fail (hildon_touch_selector_get_num_columns (selector) > 0); + current_mode = hildon_touch_selector_get_column_selection_mode (selector); + + if (current_mode == mode) { + return; + } + column = HILDON_TOUCH_SELECTOR_COLUMN ((g_slist_nth (selector->priv->columns, 0))->data); tv = column->priv->tree_view; if (tv) { switch (mode) { case HILDON_TOUCH_SELECTOR_SELECTION_MODE_SINGLE: - treeview_mode = GTK_SELECTION_SINGLE; + treeview_mode = GTK_SELECTION_BROWSE; break; case HILDON_TOUCH_SELECTOR_SELECTION_MODE_MULTIPLE: treeview_mode = GTK_SELECTION_MULTIPLE; -- 1.7.9.5