aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-06-01 21:29:02 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-06-01 22:33:11 +0800
commit4c40e438d358cf4c966951c8c3b26fd768e2f06a (patch)
tree82fba7989e20975861cd6da46be42c7eafe3ff66 /modules
parenta02dba5e8cb5d2d41d7dc3d5b45453deca836b82 (diff)
downloadgsoc2013-evolution-4c40e438d358cf4c966951c8c3b26fd768e2f06a.tar
gsoc2013-evolution-4c40e438d358cf4c966951c8c3b26fd768e2f06a.tar.gz
gsoc2013-evolution-4c40e438d358cf4c966951c8c3b26fd768e2f06a.tar.bz2
gsoc2013-evolution-4c40e438d358cf4c966951c8c3b26fd768e2f06a.tar.lz
gsoc2013-evolution-4c40e438d358cf4c966951c8c3b26fd768e2f06a.tar.xz
gsoc2013-evolution-4c40e438d358cf4c966951c8c3b26fd768e2f06a.tar.zst
gsoc2013-evolution-4c40e438d358cf4c966951c8c3b26fd768e2f06a.zip
Minor efficiency tweak in cal_shell_view_user_created_cb().
Call e_cal_shell_sidebar_add_client() instead of add_source(). No point asynchronously obtaining the client if we already have it. (cherry picked from commit 585745a2bf46d08ff55c9c16b3dd8d83ad8cb335)
Diffstat (limited to 'modules')
-rw-r--r--modules/calendar/e-cal-shell-view-private.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c
index 7e578b7384..dc99ff3ff2 100644
--- a/modules/calendar/e-cal-shell-view-private.c
+++ b/modules/calendar/e-cal-shell-view-private.c
@@ -376,18 +376,14 @@ cal_shell_view_taskpad_popup_event_cb (EShellView *shell_view,
static void
cal_shell_view_user_created_cb (ECalShellView *cal_shell_view,
- ECalClient *where_was_created,
+ ECalClient *client,
ECalendarView *calendar_view)
{
ECalShellSidebar *cal_shell_sidebar;
- ESource *source;
-
- g_return_if_fail (where_was_created != NULL);
-
- source = e_client_get_source (E_CLIENT (where_was_created));
cal_shell_sidebar = cal_shell_view->priv->cal_shell_sidebar;
- e_cal_shell_sidebar_add_source (cal_shell_sidebar, source);
+
+ e_cal_shell_sidebar_add_client (cal_shell_sidebar, E_CLIENT (client));
}
static void