aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-02-19 04:21:00 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-02-19 04:38:26 +0800
commitb17432ffbca0b72603ebd0756764a8868f1956b7 (patch)
tree764dc5ebb6c9cfe6af13566cd3a7c9796cea2e7b /modules/calendar
parent046af4407a681a361b83340b5aba6cba7d3c9501 (diff)
downloadgsoc2013-evolution-b17432ffbca0b72603ebd0756764a8868f1956b7.tar.gz
gsoc2013-evolution-b17432ffbca0b72603ebd0756764a8868f1956b7.tar.zst
gsoc2013-evolution-b17432ffbca0b72603ebd0756764a8868f1956b7.zip
Remove cal_shell_sidebar_ref_client_cache().
Use e_client_selector_ref_cached_client() for remaining cases.
Diffstat (limited to 'modules/calendar')
-rw-r--r--modules/calendar/e-cal-shell-sidebar.c35
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 ea4bec63ec..a9e2b73254 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 (