evolution-data-server r9024 - branches/gnome-2-22/calendar/backends/file



Author: pohly
Date: Sun Jun 22 11:49:55 2008
New Revision: 9024
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9024&view=rev

Log:
GNOME Bugzilla #52890: improved time zone handling in file backend

Use the new e_cal_check_timezones() to map time zones and handle
conflicting definitions.


Modified:
   branches/gnome-2-22/calendar/backends/file/e-cal-backend-file.c

Modified: branches/gnome-2-22/calendar/backends/file/e-cal-backend-file.c
==============================================================================
--- branches/gnome-2-22/calendar/backends/file/e-cal-backend-file.c	(original)
+++ branches/gnome-2-22/calendar/backends/file/e-cal-backend-file.c	Sun Jun 22 11:49:55 2008
@@ -38,6 +38,7 @@
 #include <libecal/e-cal-recur.h>
 #include <libecal/e-cal-time-util.h>
 #include <libecal/e-cal-util.h>
+#include <libecal/e-cal-check-timezones.h>
 #include <libedata-cal/e-cal-backend-util.h>
 #include <libedata-cal/e-cal-backend-sexp.h>
 #include "e-cal-backend-file-events.h"
@@ -2613,6 +2614,27 @@
 
 	g_list_free (del_comps);
 
+        /* check and patch timezones */
+        {
+            GError *error = NULL;
+            if (!e_cal_check_timezones(toplevel_comp,
+                                       NULL,
+                                       e_cal_tzlookup_icomp,
+                                       priv->icalcomp,
+                                       &error)) {
+                /*
+                 * This makes assumptions about what kind of
+                 * errors can occur inside e_cal_check_timezones().
+                 * We control it, so that should be safe, but
+                 * is the code really identical with the calendar
+                 * status?
+                 */
+                status = error->code;
+                g_clear_error(&error);
+                goto error;
+            }
+        }
+
 	/* Merge the iCalendar components with our existing VCALENDAR,
 	   resolving any conflicting TZIDs. */
 	icalcomponent_merge_component (priv->icalcomp, toplevel_comp);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]