aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-cal-shell-view-actions.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/calendar/e-cal-shell-view-actions.c')
-rw-r--r--modules/calendar/e-cal-shell-view-actions.c17
1 files changed, 2 insertions, 15 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