[evolution-data-server/libgdata-port: 5/5] Fixed event time periods and added more error handling
- From: Philip Withnall <pwithnall src gnome org>
- To: svn-commits-list gnome org
- Subject: [evolution-data-server/libgdata-port: 5/5] Fixed event time periods and added more error handling
- Date: Thu, 23 Apr 2009 16:49:07 -0400 (EDT)
commit a5e3f0cd6d27c653c04d203607a0fb490b1847c6
Author: Philip Withnall <philip tecnocode co uk>
Date: Thu Apr 23 21:21:44 2009 +0100
Fixed event time periods and added more error handling
Fixed call to gdata_gd_when_new and added more error handling around
the query.
---
.../backends/google/e-cal-backend-google-utils.c | 14 ++++++++++++--
configure.in | 2 +-
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/calendar/backends/google/e-cal-backend-google-utils.c b/calendar/backends/google/e-cal-backend-google-utils.c
index b1e7646..12dedd3 100644
--- a/calendar/backends/google/e-cal-backend-google-utils.c
+++ b/calendar/backends/google/e-cal-backend-google-utils.c
@@ -175,6 +175,7 @@ e_cal_backend_google_utils_update (gpointer handle)
ECalBackendGoogle *cbgo;
ECalBackendGooglePrivate *priv;
EGoItem *item;
+ GError *error = NULL;
ECalBackendCache *cache;
@@ -202,7 +203,15 @@ e_cal_backend_google_utils_update (gpointer handle)
service = GDATA_SERVICE (e_cal_backend_google_get_service (cbgo));
uri = e_cal_backend_google_get_uri (cbgo);
- item->feed = gdata_service_query (GDATA_SERVICE(service), uri, NULL, GDATA_TYPE_CALENDAR_EVENT, NULL, NULL, NULL, NULL);
+ item->feed = gdata_service_query (GDATA_SERVICE(service), uri, NULL, GDATA_TYPE_CALENDAR_EVENT, NULL, NULL, NULL, &error);
+
+ if (item->feed == NULL) {
+ g_warning ("Error querying Google Calendar %s: %s", uri, error->message);
+ g_error_free (error);
+ g_static_mutex_unlock (&updating);
+ return NULL;
+ }
+
entries_list = gdata_feed_get_entries (item->feed);
cache_keys = e_cal_backend_cache_get_keys (cache);
kind = e_cal_backend_get_kind (E_CAL_BACKEND (cbgo));
@@ -599,7 +608,8 @@ e_go_item_from_cal_component (ECalBackendGoogle *cbgo, ECalComponent *comp)
dt.value = &itt;
get_timeval (dt, &timeval2);
- when = gdata_gd_when_new (&timeval, &timeval2, NULL, NULL);
+ /* TODO: deal with pure dates */
+ when = gdata_gd_when_new (&timeval, &timeval2, FALSE, NULL, NULL);
gdata_calendar_event_add_time (entry, when);
/* Content / Description */
diff --git a/configure.in b/configure.in
index 7b6a3bc..787d118 100644
--- a/configure.in
+++ b/configure.in
@@ -30,7 +30,7 @@ m4_define([libglade_minimum_version], [2.0.0]) # XXX Just a Guess
m4_define([libgnome_minimum_version], [2.0.0]) # XXX Just a Guess
m4_define([libxml_minimum_version], [2.0.0]) # XXX Just a Guess
m4_define([libsoup_minimum_version], [2.3.0])
-m4_define([libgdata_minimum_version], [0.1.1])
+m4_define([libgdata_minimum_version], [0.2.0])
m4_define([gnome_keyring_minimum_version], [2.20.1])
m4_define([sqlite_minimum_version], [3.5])
m4_define([gweather_minimum_version], [2.25.4])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]