[evolution-ews/gnome-2-28: 2/6] Add resolve_tzid function back
- From: Chenthill Palanisamy <pchen src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews/gnome-2-28: 2/6] Add resolve_tzid function back
- Date: Thu, 11 Aug 2011 11:01:25 +0000 (UTC)
commit 2b0bfea96c67783a5c945cb78a96f7a92373cf3b
Author: Chenthill Palanisamy <pchenthill novell com>
Date: Thu Aug 11 07:06:50 2011 +0530
Add resolve_tzid function back
src/calendar/e-cal-backend-ews.c | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index ca9b236..56d33d3 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -158,7 +158,7 @@ static ECalBackendClass *parent_class = NULL;
static void ews_cal_sync_items_ready_cb (GObject *obj, GAsyncResult *res, gpointer user_data);
static void ews_cal_component_get_item_id (ECalComponent *comp, gchar **itemid, gchar **changekey);
static gboolean ews_start_sync (gpointer data);
-
+static icaltimezone * resolve_tzid (const gchar *tzid, gpointer user_data);
static void
switch_offline (ECalBackendEws *cbews)
{
@@ -2568,6 +2568,22 @@ exit:
e_data_cal_notify_objects_sent (cal, EDC_ER_CODE(error), NULL, calobj);
}
+/* TODO Do not replicate this in every backend */
+static icaltimezone *
+resolve_tzid (const gchar *tzid, gpointer user_data)
+{
+ icaltimezone *zone;
+
+ zone = (!strcmp (tzid, "UTC"))
+ ? icaltimezone_get_utc_timezone ()
+ : icaltimezone_get_builtin_timezone_from_tzid (tzid);
+
+ if (!zone)
+ zone = e_cal_backend_internal_get_timezone (E_CAL_BACKEND (user_data), tzid);
+
+ return zone;
+ }
+
static void
put_component_to_store (ECalBackendEws *cbews,
ECalComponent *comp)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]