aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-02-28 02:56:53 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-02-28 02:56:53 +0800
commitd0d713e84617d07ece224c5eee5abd3769ccfec3 (patch)
treeb6422342849e742e988f8c82b6644ce0b2edb9b7 /modules
parent927fd2f6f6f807ab978ecc9bcbd8e89910620338 (diff)
downloadgsoc2013-evolution-d0d713e84617d07ece224c5eee5abd3769ccfec3.tar
gsoc2013-evolution-d0d713e84617d07ece224c5eee5abd3769ccfec3.tar.gz
gsoc2013-evolution-d0d713e84617d07ece224c5eee5abd3769ccfec3.tar.bz2
gsoc2013-evolution-d0d713e84617d07ece224c5eee5abd3769ccfec3.tar.lz
gsoc2013-evolution-d0d713e84617d07ece224c5eee5abd3769ccfec3.tar.xz
gsoc2013-evolution-d0d713e84617d07ece224c5eee5abd3769ccfec3.tar.zst
gsoc2013-evolution-d0d713e84617d07ece224c5eee5abd3769ccfec3.zip
ItipView: Use EClientCache to obtain calendar clients.
Diffstat (limited to 'modules')
-rw-r--r--modules/itip-formatter/itip-view.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/modules/itip-formatter/itip-view.c b/modules/itip-formatter/itip-view.c
index 22621fe1da..77a3349efe 100644
--- a/modules/itip-formatter/itip-view.c
+++ b/modules/itip-formatter/itip-view.c
@@ -3545,7 +3545,8 @@ cal_opened_cb (GObject *source_object,
const gchar *uid;
GError *error = NULL;
- client = e_cal_client_connect_finish (result, &error);
+ client = e_client_cache_get_client_finish (
+ E_CLIENT_CACHE (source_object), result, &error);
/* Sanity check. */
g_return_if_fail (
@@ -3607,6 +3608,8 @@ start_calendar_server (EMailPartItip *pitip,
gpointer data)
{
ECalClient *client;
+ EClientCache *client_cache;
+ const gchar *extension_name = NULL;
g_return_if_fail (source != NULL);
@@ -3622,7 +3625,25 @@ start_calendar_server (EMailPartItip *pitip,
return;
}
- e_cal_client_connect (source, type, pitip->cancellable, func, data);
+ switch (type) {
+ case E_CAL_CLIENT_SOURCE_TYPE_EVENTS:
+ extension_name = E_SOURCE_EXTENSION_CALENDAR;
+ break;
+ case E_CAL_CLIENT_SOURCE_TYPE_MEMOS:
+ extension_name = E_SOURCE_EXTENSION_MEMO_LIST;
+ break;
+ case E_CAL_CLIENT_SOURCE_TYPE_TASKS:
+ extension_name = E_SOURCE_EXTENSION_TASK_LIST;
+ break;
+ default:
+ g_return_if_reached ();
+ }
+
+ client_cache = itip_view_get_client_cache (view);
+
+ e_client_cache_get_client (
+ client_cache, source, extension_name,
+ pitip->cancellable, func, data);
}
static void
@@ -4022,7 +4043,8 @@ find_cal_opened_cb (GObject *source_object,
const gchar *uid;
GError *error = NULL;
- client = e_cal_client_connect_finish (result, &error);
+ client = e_client_cache_get_client_finish (
+ E_CLIENT_CACHE (source_object), result, &error);
/* Sanity check. */
g_return_if_fail (