[evolution] Remove cal_shell_sidebar_ref_client_cache().



commit b17432ffbca0b72603ebd0756764a8868f1956b7
Author: Matthew Barnes <mbarnes redhat com>
Date:   Mon Feb 18 15:21:00 2013 -0500

    Remove cal_shell_sidebar_ref_client_cache().
    
    Use e_client_selector_ref_cached_client() for remaining cases.

 modules/calendar/e-cal-shell-sidebar.c |   35 ++++++-------------------------
 1 files changed, 7 insertions(+), 28 deletions(-)
---
diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c
index ea4bec6..a9e2b73 100644
--- a/modules/calendar/e-cal-shell-sidebar.c
+++ b/modules/calendar/e-cal-shell-sidebar.c
@@ -155,22 +155,6 @@ cal_shell_sidebar_emit_status_message (ECalShellSidebar *cal_shell_sidebar,
        g_signal_emit (cal_shell_sidebar, signal_id, 0, status_message);
 }
 
-static EClientCache *
-cal_shell_sidebar_ref_client_cache (ECalShellSidebar *cal_shell_sidebar)
-{
-       EShell *shell;
-       EShellView *shell_view;
-       EShellBackend *shell_backend;
-       EShellSidebar *shell_sidebar;
-
-       shell_sidebar = E_SHELL_SIDEBAR (cal_shell_sidebar);
-       shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
-       shell_backend = e_shell_view_get_shell_backend (shell_view);
-       shell = e_shell_backend_get_shell (shell_backend);
-
-       return g_object_ref (e_shell_get_client_cache (shell));
-}
-
 static void
 cal_shell_sidebar_handle_connect_error (ECalShellSidebar *cal_shell_sidebar,
                                         const gchar *parent_display_name,
@@ -646,7 +630,6 @@ cal_shell_sidebar_check_state (EShellSidebar *shell_sidebar)
        if (source != NULL) {
                EClient *client;
                ESource *collection;
-               EClientCache *client_cache;
 
                has_primary_source = TRUE;
                is_writable = e_source_get_writable (source);
@@ -661,11 +644,8 @@ cal_shell_sidebar_check_state (EShellSidebar *shell_sidebar)
                        g_object_unref (collection);
                }
 
-               client_cache = cal_shell_sidebar_ref_client_cache (
-                       E_CAL_SHELL_SIDEBAR (shell_sidebar));
-               client = e_client_cache_ref_cached_client (
-                       client_cache, source, E_SOURCE_EXTENSION_CALENDAR);
-               g_object_unref (client_cache);
+               client = e_client_selector_ref_cached_client (
+                       E_CLIENT_SELECTOR (selector), source);
 
                if (client != NULL) {
                        refresh_supported =
@@ -912,17 +892,16 @@ void
 e_cal_shell_sidebar_remove_source (ECalShellSidebar *cal_shell_sidebar,
                                    ESource *source)
 {
-       EClientCache *client_cache;
+       ESourceSelector *selector;
        EClient *client;
 
        g_return_if_fail (E_IS_CAL_SHELL_SIDEBAR (cal_shell_sidebar));
        g_return_if_fail (E_IS_SOURCE (source));
 
-       client_cache =
-               cal_shell_sidebar_ref_client_cache (cal_shell_sidebar);
-       client = e_client_cache_ref_cached_client (
-               client_cache, source, E_SOURCE_EXTENSION_CALENDAR);
-       g_object_unref (client_cache);
+       selector = e_cal_shell_sidebar_get_selector (cal_shell_sidebar);
+
+       client = e_client_selector_ref_cached_client (
+               E_CLIENT_SELECTOR (selector), source);
 
        if (client != NULL) {
                cal_shell_sidebar_emit_client_removed (


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