diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-03-06 00:39:34 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-03-06 00:39:34 +0800 |
commit | 1d88f36d7fd0a5225c3438adb4782618407f320d (patch) | |
tree | 6d7a3c14eb56d9f6b324b62e80e46d361c58cbdb /modules | |
parent | 2836a54dd6d61e35d1446f9a23a628064516a309 (diff) | |
download | gsoc2013-evolution-1d88f36d7fd0a5225c3438adb4782618407f320d.tar gsoc2013-evolution-1d88f36d7fd0a5225c3438adb4782618407f320d.tar.gz gsoc2013-evolution-1d88f36d7fd0a5225c3438adb4782618407f320d.tar.bz2 gsoc2013-evolution-1d88f36d7fd0a5225c3438adb4782618407f320d.tar.lz gsoc2013-evolution-1d88f36d7fd0a5225c3438adb4782618407f320d.tar.xz gsoc2013-evolution-1d88f36d7fd0a5225c3438adb4782618407f320d.tar.zst gsoc2013-evolution-1d88f36d7fd0a5225c3438adb4782618407f320d.zip |
Bug 611873 - Make triple-clicking a shortcut for "Show Only This ..."
Requires e_source_selector_select_exclusive() from libedataserverui.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/calendar/e-cal-shell-view-actions.c | 17 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-view-actions.c | 17 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-view-actions.c | 17 |
3 files changed, 6 insertions, 45 deletions
diff --git a/modules/calendar/e-cal-shell-view-actions.c b/modules/calendar/e-cal-shell-view-actions.c index 4e80a99db2..552e0f99a9 100644 --- a/modules/calendar/e-cal-shell-view-actions.c +++ b/modules/calendar/e-cal-shell-view-actions.c @@ -411,27 +411,14 @@ action_calendar_select_one_cb (GtkAction *action, ECalShellSidebar *cal_shell_sidebar; ESourceSelector *selector; ESource *primary; - GSList *list, *iter; - - /* XXX ESourceSelector should provide a function for this. */ cal_shell_sidebar = cal_shell_view->priv->cal_shell_sidebar; selector = e_cal_shell_sidebar_get_selector (cal_shell_sidebar); + primary = e_source_selector_peek_primary_selection (selector); g_return_if_fail (primary != NULL); - list = e_source_selector_get_selection (selector); - for (iter = list; iter != NULL; iter = iter->next) { - ESource *source = iter->data; - - if (source == primary) - continue; - - e_source_selector_unselect_source (selector, source); - } - e_source_selector_free_selection (list); - - e_source_selector_select_source (selector, primary); + e_source_selector_select_exclusive (selector, primary); } static void diff --git a/modules/calendar/e-memo-shell-view-actions.c b/modules/calendar/e-memo-shell-view-actions.c index f53b8ff406..515118f088 100644 --- a/modules/calendar/e-memo-shell-view-actions.c +++ b/modules/calendar/e-memo-shell-view-actions.c @@ -315,27 +315,14 @@ action_memo_list_select_one_cb (GtkAction *action, EMemoShellSidebar *memo_shell_sidebar; ESourceSelector *selector; ESource *primary; - GSList *list, *iter; - - /* XXX ESourceSelector should provide a function for this. */ memo_shell_sidebar = memo_shell_view->priv->memo_shell_sidebar; selector = e_memo_shell_sidebar_get_selector (memo_shell_sidebar); + primary = e_source_selector_peek_primary_selection (selector); g_return_if_fail (primary != NULL); - list = e_source_selector_get_selection (selector); - for (iter = list; iter != NULL; iter = iter->next) { - ESource *source = iter->data; - - if (source == primary) - continue; - - e_source_selector_unselect_source (selector, source); - } - e_source_selector_free_selection (list); - - e_source_selector_select_source (selector, primary); + e_source_selector_select_exclusive (selector, primary); } static void diff --git a/modules/calendar/e-task-shell-view-actions.c b/modules/calendar/e-task-shell-view-actions.c index 55873dd9f9..6452e57c3a 100644 --- a/modules/calendar/e-task-shell-view-actions.c +++ b/modules/calendar/e-task-shell-view-actions.c @@ -338,27 +338,14 @@ action_task_list_select_one_cb (GtkAction *action, ETaskShellSidebar *task_shell_sidebar; ESourceSelector *selector; ESource *primary; - GSList *list, *iter; - - /* XXX ESourceSelector should provide a function for this. */ task_shell_sidebar = task_shell_view->priv->task_shell_sidebar; selector = e_task_shell_sidebar_get_selector (task_shell_sidebar); + primary = e_source_selector_peek_primary_selection (selector); g_return_if_fail (primary != NULL); - list = e_source_selector_get_selection (selector); - for (iter = list; iter != NULL; iter = iter->next) { - ESource *source = iter->data; - - if (source == primary) - continue; - - e_source_selector_unselect_source (selector, source); - } - e_source_selector_free_selection (list); - - e_source_selector_select_source (selector, primary); + e_source_selector_select_exclusive (selector, primary); } static void |