[evolution/gnome-3-8] Minor efficiency tweak in cal_shell_view_user_created_cb().



commit 4c40e438d358cf4c966951c8c3b26fd768e2f06a
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sat Jun 1 09:29:02 2013 -0400

    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)

 modules/calendar/e-cal-shell-view-private.c |   10 +++-------
 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 7e578b7..dc99ff3 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]