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



commit 3c14ae32fe27e548d86926ab23633f1749cb25a3
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sat Jun 1 09:34:30 2013 -0400

    Minor efficiency tweak in task_shell_view_model_row_appended_cb().
    
    Call e_task_shell_sidebar_add_client() instead of add_source().
    
    No point asynchronously obtaining the client if we already have it.
    
    (cherry picked from commit 52feeacf8d8da8ec169efbe40b4e75385a9bb7fe)

 modules/calendar/e-task-shell-view-private.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/modules/calendar/e-task-shell-view-private.c b/modules/calendar/e-task-shell-view-private.c
index 6a64a8d..2e8e6dd 100644
--- a/modules/calendar/e-task-shell-view-private.c
+++ b/modules/calendar/e-task-shell-view-private.c
@@ -33,15 +33,13 @@ task_shell_view_model_row_appended_cb (ETaskShellView *task_shell_view,
 {
        ETaskShellSidebar *task_shell_sidebar;
        ECalClient *client;
-       ESource *source;
 
        /* This is the "Click to Add" handler. */
 
        client = e_cal_model_ref_default_client (model);
-       source = e_client_get_source (E_CLIENT (client));
 
        task_shell_sidebar = task_shell_view->priv->task_shell_sidebar;
-       e_task_shell_sidebar_add_source (task_shell_sidebar, source);
+       e_task_shell_sidebar_add_client (task_shell_sidebar, E_CLIENT (client));
 
        g_object_unref (client);
 }


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