diff options
author | JP Rosevear <jpr@ximian.com> | 2001-08-23 05:34:33 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2001-08-23 05:34:33 +0800 |
commit | 050cf4e61fd7036aed9f0a17e4599e0203eefb57 (patch) | |
tree | 73f69fa3ae7dbc2de3e4841e16ee9a2260e948b8 | |
parent | b6463ef46a23c91329700454c53afc9a9609b331 (diff) | |
download | gsoc2013-evolution-050cf4e61fd7036aed9f0a17e4599e0203eefb57.tar gsoc2013-evolution-050cf4e61fd7036aed9f0a17e4599e0203eefb57.tar.gz gsoc2013-evolution-050cf4e61fd7036aed9f0a17e4599e0203eefb57.tar.bz2 gsoc2013-evolution-050cf4e61fd7036aed9f0a17e4599e0203eefb57.tar.lz gsoc2013-evolution-050cf4e61fd7036aed9f0a17e4599e0203eefb57.tar.xz gsoc2013-evolution-050cf4e61fd7036aed9f0a17e4599e0203eefb57.tar.zst gsoc2013-evolution-050cf4e61fd7036aed9f0a17e4599e0203eefb57.zip |
call back to add timezones to the top level (itip_send_comp): call
2001-08-22 JP Rosevear <jpr@ximian.com>
* gui/itip-utils.c (foreach_tzid_callback): call back to add
timezones to the top level
(itip_send_comp): call icalcomponent_foreach_tzid
svn path=/trunk/; revision=12396
-rw-r--r-- | calendar/ChangeLog | 6 | ||||
-rw-r--r-- | calendar/gui/itip-utils.c | 29 |
2 files changed, 34 insertions, 1 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 8d53325150..87ed928311 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +2001-08-22 JP Rosevear <jpr@ximian.com> + + * gui/itip-utils.c (foreach_tzid_callback): call back to add + timezones to the top level + (itip_send_comp): call icalcomponent_foreach_tzid + 2001-08-22 Dan Winship <danw@ximian.com> * gui/gnome-cal.c: #include <libgnomevfs/gnome-vfs-types.h> so diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c index 8b2e008a2a..828ee05aed 100644 --- a/calendar/gui/itip-utils.c +++ b/calendar/gui/itip-utils.c @@ -167,6 +167,32 @@ itip_strip_mailto (const gchar *address) return address; } +static void +foreach_tzid_callback (icalparameter *param, gpointer data) +{ + icalcomponent *icomp = data; + const char *tzid; + icaltimezone *zone; + icalcomponent *vtimezone_comp; + + /* Get the TZID string from the parameter. */ + tzid = icalparameter_get_tzid (param); + if (!tzid) + return; + + /* Check if it is a builtin timezone. If it isn't, return. */ + zone = icaltimezone_get_builtin_timezone_from_tzid (tzid); + if (!zone) + return; + + /* Convert it to a string and add it to the hash. */ + vtimezone_comp = icaltimezone_get_component (zone); + if (!vtimezone_comp) + return; + + icalcomponent_add_component (icomp, icalcomponent_new_clone (vtimezone_comp)); +} + void itip_send_comp (CalComponentItipMethod method, CalComponent *comp) { @@ -207,7 +233,6 @@ itip_send_comp (CalComponentItipMethod method, CalComponent *comp) for (cntr = 0, l = attendees; cntr < len; cntr++, l = l->next) { CalComponentAttendee *att = l->data; - gchar *real; recipient = &(to_list->_buffer[cntr]); if (att->cn) @@ -293,6 +318,8 @@ itip_send_comp (CalComponentItipMethod method, CalComponent *comp) clone = icalcomponent_new_clone (cal_component_get_icalcomponent (comp)); icalcomponent_add_component (icomp, clone); + icalcomponent_foreach_tzid (clone, foreach_tzid_callback, icomp); + ical_string = icalcomponent_as_ical_string (icomp); attach_data = GNOME_Evolution_Composer_AttachmentData__alloc (); attach_data->_maximum = attach_data->_length = strlen (ical_string); |