diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-02-19 04:37:50 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-02-19 04:38:26 +0800 |
commit | 046af4407a681a361b83340b5aba6cba7d3c9501 (patch) | |
tree | 2d9f16ba0769ae0ca347bac9a0160e306d765325 | |
parent | 223d47142c7d32c26090068215364a0579a5ca55 (diff) | |
download | gsoc2013-evolution-046af4407a681a361b83340b5aba6cba7d3c9501.tar gsoc2013-evolution-046af4407a681a361b83340b5aba6cba7d3c9501.tar.gz gsoc2013-evolution-046af4407a681a361b83340b5aba6cba7d3c9501.tar.bz2 gsoc2013-evolution-046af4407a681a361b83340b5aba6cba7d3c9501.tar.lz gsoc2013-evolution-046af4407a681a361b83340b5aba6cba7d3c9501.tar.xz gsoc2013-evolution-046af4407a681a361b83340b5aba6cba7d3c9501.tar.zst gsoc2013-evolution-046af4407a681a361b83340b5aba6cba7d3c9501.zip |
ETaskShellSidebar: Use EClientSelector to obtain EClient instances.
-rw-r--r-- | modules/calendar/e-task-shell-sidebar.c | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/modules/calendar/e-task-shell-sidebar.c b/modules/calendar/e-task-shell-sidebar.c index 143f59ac6a..3d7c354bbc 100644 --- a/modules/calendar/e-task-shell-sidebar.c +++ b/modules/calendar/e-task-shell-sidebar.c @@ -221,8 +221,8 @@ task_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 ( @@ -260,8 +260,8 @@ task_shell_sidebar_default_connect_cb (GObject *source_object, priv = E_TASK_SHELL_SIDEBAR_GET_PRIVATE (closure->task_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 ( @@ -307,10 +307,12 @@ task_shell_sidebar_set_default (ETaskShellSidebar *task_shell_sidebar, ESource *source) { ETaskShellSidebarPrivate *priv; - EClientCache *client_cache; + ESourceSelector *selector; priv = task_shell_sidebar->priv; + selector = e_task_shell_sidebar_get_selector (task_shell_sidebar); + /* already loading that source as default source */ if (source == priv->connecting_default_source_instance) return; @@ -326,17 +328,11 @@ task_shell_sidebar_set_default (ETaskShellSidebar *task_shell_sidebar, priv->connecting_default_source_instance = source; priv->connecting_default_client = g_cancellable_new (); - client_cache = - task_shell_sidebar_ref_client_cache (task_shell_sidebar); - - e_client_cache_get_client ( - client_cache, source, - E_SOURCE_EXTENSION_TASK_LIST, + e_client_selector_get_client ( + E_CLIENT_SELECTOR (selector), source, priv->connecting_default_client, task_shell_sidebar_default_connect_cb, connect_closure_new (task_shell_sidebar, source)); - - g_object_unref (client_cache); } static void @@ -777,7 +773,6 @@ e_task_shell_sidebar_add_source (ETaskShellSidebar *task_shell_sidebar, ESource *source) { ESourceSelector *selector; - EClientCache *client_cache; const gchar *display_name; gchar *message; @@ -793,17 +788,11 @@ e_task_shell_sidebar_add_source (ETaskShellSidebar *task_shell_sidebar, task_shell_sidebar_emit_status_message (task_shell_sidebar, message); g_free (message); - client_cache = - task_shell_sidebar_ref_client_cache (task_shell_sidebar); - - e_client_cache_get_client ( - client_cache, source, - E_SOURCE_EXTENSION_TASK_LIST, + e_client_selector_get_client ( + E_CLIENT_SELECTOR (selector), source, task_shell_sidebar->priv->loading_clients, task_shell_sidebar_client_connect_cb, connect_closure_new (task_shell_sidebar, source)); - - g_object_unref (client_cache); } void |