aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar
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:08:23 +0800
commit585745a2bf46d08ff55c9c16b3dd8d83ad8cb335 (patch)
tree8bfd92b345ee0300a7c1ea8dd4bdff1bc2646d31 /modules/calendar
parent2aa759bc58ea8e14dd1d28a9d7f23e2f5f627c3f (diff)
downloadgsoc2013-evolution-585745a2bf46d08ff55c9c16b3dd8d83ad8cb335.tar
gsoc2013-evolution-585745a2bf46d08ff55c9c16b3dd8d83ad8cb335.tar.gz
gsoc2013-evolution-585745a2bf46d08ff55c9c16b3dd8d83ad8cb335.tar.bz2
gsoc2013-evolution-585745a2bf46d08ff55c9c16b3dd8d83ad8cb335.tar.lz
gsoc2013-evolution-585745a2bf46d08ff55c9c16b3dd8d83ad8cb335.tar.xz
gsoc2013-evolution-585745a2bf46d08ff55c9c16b3dd8d83ad8cb335.tar.zst
gsoc2013-evolution-585745a2bf46d08ff55c9c16b3dd8d83ad8cb335.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.
Diffstat (limited to 'modules/calendar')
-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 5322ad07b8..99de61c4ee 100644
--- a/modules/calendar/e-cal-shell-view-private.c
+++ b/modules/calendar/e-cal-shell-view-private.c
@@ -377,18 +377,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