aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-02-19 04:18:07 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-02-19 04:18:07 +0800
commit0e76355bcf8d60d58ac25cc4bd557a2a7dc7e95b (patch)
treeb00104d0f771a76f8cfd6f032936af7d191586da
parentac7c1d3c75d67bfd365af0547e0a63571d6270c9 (diff)
downloadgsoc2013-evolution-0e76355bcf8d60d58ac25cc4bd557a2a7dc7e95b.tar
gsoc2013-evolution-0e76355bcf8d60d58ac25cc4bd557a2a7dc7e95b.tar.gz
gsoc2013-evolution-0e76355bcf8d60d58ac25cc4bd557a2a7dc7e95b.tar.bz2
gsoc2013-evolution-0e76355bcf8d60d58ac25cc4bd557a2a7dc7e95b.tar.lz
gsoc2013-evolution-0e76355bcf8d60d58ac25cc4bd557a2a7dc7e95b.tar.xz
gsoc2013-evolution-0e76355bcf8d60d58ac25cc4bd557a2a7dc7e95b.tar.zst
gsoc2013-evolution-0e76355bcf8d60d58ac25cc4bd557a2a7dc7e95b.zip
ECalShellSidebar: Use EClientSelector to obtain EClient instances.
-rw-r--r--modules/calendar/e-cal-shell-sidebar.c33
1 files changed, 11 insertions, 22 deletions
diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c
index 650b48b0b9..ea4bec63ec 100644
--- a/modules/calendar/e-cal-shell-sidebar.c
+++ b/modules/calendar/e-cal-shell-sidebar.c
@@ -224,8 +224,8 @@ cal_shell_sidebar_client_connect_cb (GObject *source_object,
ConnectClosure *closure = user_data;
GError *error = NULL;
- client = e_client_cache_get_client_finish (
- E_CLIENT_CACHE (source_object), result, &error);
+ client = e_client_selector_get_client_finish (
+ E_CLIENT_SELECTOR (source_object), result, &error);
/* Sanity check. */
g_return_if_fail (
@@ -263,8 +263,8 @@ cal_shell_sidebar_default_connect_cb (GObject *source_object,
priv = E_CAL_SHELL_SIDEBAR_GET_PRIVATE (closure->cal_shell_sidebar);
- client = e_client_cache_get_client_finish (
- E_CLIENT_CACHE (source_object), result, &error);
+ client = e_client_selector_get_client_finish (
+ E_CLIENT_SELECTOR (source_object), result, &error);
/* Sanity check. */
g_return_if_fail (
@@ -310,10 +310,12 @@ cal_shell_sidebar_set_default (ECalShellSidebar *cal_shell_sidebar,
ESource *source)
{
ECalShellSidebarPrivate *priv;
- EClientCache *client_cache;
+ ESourceSelector *selector;
priv = cal_shell_sidebar->priv;
+ selector = e_cal_shell_sidebar_get_selector (cal_shell_sidebar);
+
/* already loading that source as default source */
if (source == priv->connecting_default_source_instance)
return;
@@ -329,17 +331,11 @@ cal_shell_sidebar_set_default (ECalShellSidebar *cal_shell_sidebar,
priv->connecting_default_source_instance = source;
priv->connecting_default_client = g_cancellable_new ();
- client_cache =
- cal_shell_sidebar_ref_client_cache (cal_shell_sidebar);
-
- e_client_cache_get_client (
- client_cache, source,
- E_SOURCE_EXTENSION_CALENDAR,
+ e_client_selector_get_client (
+ E_CLIENT_SELECTOR (selector), source,
priv->connecting_default_client,
cal_shell_sidebar_default_connect_cb,
connect_closure_new (cal_shell_sidebar, source));
-
- g_object_unref (client_cache);
}
static void
@@ -890,7 +886,6 @@ e_cal_shell_sidebar_add_source (ECalShellSidebar *cal_shell_sidebar,
ESource *source)
{
ESourceSelector *selector;
- EClientCache *client_cache;
const gchar *display_name;
gchar *message;
@@ -906,17 +901,11 @@ e_cal_shell_sidebar_add_source (ECalShellSidebar *cal_shell_sidebar,
cal_shell_sidebar_emit_status_message (cal_shell_sidebar, message);
g_free (message);
- client_cache =
- cal_shell_sidebar_ref_client_cache (cal_shell_sidebar);
-
- e_client_cache_get_client (
- client_cache, source,
- E_SOURCE_EXTENSION_CALENDAR,
+ e_client_selector_get_client (
+ E_CLIENT_SELECTOR (selector), source,
cal_shell_sidebar->priv->loading_clients,
cal_shell_sidebar_client_connect_cb,
connect_closure_new (cal_shell_sidebar, source));
-
- g_object_unref (client_cache);
}
void