aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/caldav
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-06-14 14:54:20 +0800
committerMilan Crha <mcrha@redhat.com>2011-06-14 14:54:20 +0800
commit38790d8478e906a5c59d0c4a5216f297f305bfeb (patch)
tree0f9a96db2765901f2a27b68c84815a491214ecc1 /plugins/caldav
parent08af0d1f81a4e983bb49d8fb8fe74e670adbb8f6 (diff)
downloadgsoc2013-evolution-38790d8478e906a5c59d0c4a5216f297f305bfeb.tar.gz
gsoc2013-evolution-38790d8478e906a5c59d0c4a5216f297f305bfeb.tar.zst
gsoc2013-evolution-38790d8478e906a5c59d0c4a5216f297f305bfeb.zip
Do not use deprecated EBook/ECal API
Diffstat (limited to 'plugins/caldav')
-rw-r--r--plugins/caldav/caldav-browse-server.c8
-rw-r--r--plugins/caldav/caldav-source.c19
2 files changed, 15 insertions, 12 deletions
diff --git a/plugins/caldav/caldav-browse-server.c b/plugins/caldav/caldav-browse-server.c
index 3a78217b1a..d169dda8f8 100644
--- a/plugins/caldav/caldav-browse-server.c
+++ b/plugins/caldav/caldav-browse-server.c
@@ -32,7 +32,7 @@
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
-#include <libecal/e-cal.h>
+#include <libecal/e-cal-client.h>
#include <libedataserver/e-proxy.h>
#include <libedataserverui/e-cell-renderer-color.h>
#include <libedataserverui/e-passwords.h>
@@ -1369,13 +1369,13 @@ init_dialog (GtkDialog *dialog, GtkWidget **new_url_entry, GtkWidget **new_userm
switch (source_type) {
default:
- case E_CAL_SOURCE_TYPE_EVENT:
+ case E_CAL_CLIENT_SOURCE_TYPE_EVENTS:
source_type_str = "VEVENT";
break;
- case E_CAL_SOURCE_TYPE_TODO:
+ case E_CAL_CLIENT_SOURCE_TYPE_TASKS:
source_type_str = "VTODO";
break;
- case E_CAL_SOURCE_TYPE_JOURNAL:
+ case E_CAL_CLIENT_SOURCE_TYPE_MEMOS:
source_type_str = "VJOURNAL";
break;
}
diff --git a/plugins/caldav/caldav-source.c b/plugins/caldav/caldav-source.c
index 11c651f7d9..41cebef760 100644
--- a/plugins/caldav/caldav-source.c
+++ b/plugins/caldav/caldav-source.c
@@ -33,7 +33,7 @@
#include <e-util/e-plugin-util.h>
#include <calendar/gui/e-cal-config.h>
#include <libedataserver/e-account-list.h>
-#include <libecal/e-cal.h>
+#include <libecal/e-cal-client.h>
#include <string.h>
@@ -53,12 +53,15 @@ GtkWidget * oge_caldav (EPlugin *epl,
/* plugin intialization */
static void
-ensure_caldav_source_group (ECalSourceType source_type)
+ensure_caldav_source_group (ECalClientSourceType source_type)
{
- ESourceList *slist;
+ ESourceList *slist;
+ GError *error = NULL;
- if (!e_cal_get_sources (&slist, source_type, NULL)) {
- g_warning ("Could not get calendar source list from GConf!");
+ if (!e_cal_client_get_sources (&slist, source_type, &error)) {
+ g_warning ("Could not get calendar sources: %s", error ? error->message : "Unknown error");
+ if (error)
+ g_error_free (error);
return;
}
@@ -72,9 +75,9 @@ e_plugin_lib_enable (EPlugin *ep, gint enable)
if (enable) {
d(g_print ("CalDAV Eplugin starting up ...\n"));
- ensure_caldav_source_group (E_CAL_SOURCE_TYPE_EVENT);
- ensure_caldav_source_group (E_CAL_SOURCE_TYPE_TODO);
- ensure_caldav_source_group (E_CAL_SOURCE_TYPE_JOURNAL);
+ ensure_caldav_source_group (E_CAL_CLIENT_SOURCE_TYPE_EVENTS);
+ ensure_caldav_source_group (E_CAL_CLIENT_SOURCE_TYPE_TASKS);
+ ensure_caldav_source_group (E_CAL_CLIENT_SOURCE_TYPE_MEMOS);
}
return 0;