aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/gui/itip-utils.c29
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);