aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs/cal-backend.c
diff options
context:
space:
mode:
authorDamon Chaplin <damon@ximian.com>2001-07-03 14:06:18 +0800
committerDamon Chaplin <damon@src.gnome.org>2001-07-03 14:06:18 +0800
commit2c95c4d8e9f237bc2428b05d976d01241d3394ba (patch)
treeb6f880580e7fef54fb777c1981cad63f463c530c /calendar/pcs/cal-backend.c
parenteb52ee5a862b132e6c0655cd44b5887d64ead3ca (diff)
downloadgsoc2013-evolution-2c95c4d8e9f237bc2428b05d976d01241d3394ba.tar
gsoc2013-evolution-2c95c4d8e9f237bc2428b05d976d01241d3394ba.tar.gz
gsoc2013-evolution-2c95c4d8e9f237bc2428b05d976d01241d3394ba.tar.bz2
gsoc2013-evolution-2c95c4d8e9f237bc2428b05d976d01241d3394ba.tar.lz
gsoc2013-evolution-2c95c4d8e9f237bc2428b05d976d01241d3394ba.tar.xz
gsoc2013-evolution-2c95c4d8e9f237bc2428b05d976d01241d3394ba.tar.zst
gsoc2013-evolution-2c95c4d8e9f237bc2428b05d976d01241d3394ba.zip
added virtual method to get a VTIMEZONE component given a TZID. We need
2001-07-03 Damon Chaplin <damon@ximian.com> * pcs/cal-backend.[hc]: added virtual method to get a VTIMEZONE component given a TZID. We need this to resolve TZIDs when expanding an event using cal_recur_generate_instances() in query.c. * pcs/cal-backend-file.c (cal_backend_file_get_timezone): implemented virtual method. (cal_backend_file_update_object): fixed bug, kind -> child_kind. * pcs/query.c (func_occur_in_time_range): use the virtual method for resolving TZIDs. The other way didn't work anyway, as we didn't have the entire VCALENDAR with VTIMEZONEs in it. * gui/dialogs/recurrence-page.c (init_widgets): (make_ending_until_special): moved the call to e_date_edit_set_get_time_callback() from init_widgets to make_ending_until_special(), since that is where the widget gets created. * gui/e-timezone-entry.c (e_timezone_entry_set_timezone): handle zone being NULL. svn path=/trunk/; revision=10732
Diffstat (limited to 'calendar/pcs/cal-backend.c')
-rw-r--r--calendar/pcs/cal-backend.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/calendar/pcs/cal-backend.c b/calendar/pcs/cal-backend.c
index a9eae9f212..1ca13028a9 100644
--- a/calendar/pcs/cal-backend.c
+++ b/calendar/pcs/cal-backend.c
@@ -588,3 +588,28 @@ cal_backend_obj_removed (CalBackend *backend, const char *uid)
gtk_signal_emit (GTK_OBJECT (backend), cal_backend_signals[OBJ_REMOVED],
uid);
}
+
+
+/**
+ * cal_backend_get_timezone:
+ * @backend: A calendar backend.
+ * @tzid: Unique identifier of a VTIMEZONE object. Note that this must not be
+ * NULL.
+ *
+ * Returns the icaltimezone* corresponding to the TZID, or NULL if the TZID
+ * can't be found.
+ *
+ * Return value: TRUE on success, FALSE on being passed an UID for an object
+ * that does not exist in the backend.
+ **/
+icaltimezone*
+cal_backend_get_timezone (CalBackend *backend, const char *tzid)
+{
+ g_return_val_if_fail (backend != NULL, NULL);
+ g_return_val_if_fail (IS_CAL_BACKEND (backend), NULL);
+ g_return_val_if_fail (tzid != NULL, NULL);
+
+ g_assert (CLASS (backend)->get_timezone != NULL);
+ return (* CLASS (backend)->get_timezone) (backend, tzid);
+}
+