From 3b59224e6f092157978560686037d37a08158aab Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Wed, 6 Mar 2002 12:07:26 +0000 Subject: reverted my last change of adding the METHOD property to the incoming 2002-03-05 Rodrigo Moya * gui/e-itip-control.c (e_itip_control_set_data): reverted my last change of adding the METHOD property to the incoming request. * gui/itip-utils.c (comp_string): added extra X-MICROSOFT-CDO-REPLYTIME property for broken Outlook. Should fix #20783. svn path=/trunk/; revision=15940 --- calendar/gui/e-itip-control.c | 2 -- calendar/gui/itip-utils.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) (limited to 'calendar/gui') diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c index b0e9ce81bc..cac16500cf 100644 --- a/calendar/gui/e-itip-control.c +++ b/calendar/gui/e-itip-control.c @@ -1237,8 +1237,6 @@ e_itip_control_set_data (EItipControl *itip, const gchar *text) } priv->method = icalproperty_get_method (prop); - prop = icalproperty_new_method (priv->method); - icalcomponent_add_property (priv->top_level, prop); tz_iter = icalcomponent_begin_component (priv->main_comp, ICAL_VTIMEZONE_COMPONENT); while ((tz_comp = icalcompiter_deref (&tz_iter)) != NULL) { diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c index ee4566c42f..ee0d78b0b6 100644 --- a/calendar/gui/itip-utils.c +++ b/calendar/gui/itip-utils.c @@ -430,6 +430,34 @@ comp_string (CalComponentItipMethod method, CalComponent *comp, CalClient *clien icalcomponent_add_property (top_level, prop); icomp = cal_component_get_icalcomponent (comp); + + if (method == CAL_COMPONENT_METHOD_REPLY) { + struct icaltimetype dtstamp; + gboolean add_it = FALSE; + + /* workaround for Outlook expecting a X-MICROSOFT-CDO-REPLYTIME + on every METHOD=REPLY message. If the component has any of + the X-MICROSOFT-* properties, we add the REPLYTIME one */ + prop = icalcomponent_get_first_property (icomp, ICAL_X_PROPERTY); + while (prop) { + const char *x_name; + + x_name = icalproperty_get_x_name (prop); + if (!strncmp (x_name, "X-MICROSOFT-", strlen ("X-MICROSOFT-"))) { + add_it = TRUE; + break; + } + prop = icalcomponent_get_next_property (icomp, ICAL_X_PROPERTY); + } + + if (add_it) { + dtstamp = icaltime_from_timet_with_zone ( + time (NULL), 0, icaltimezone_get_utc_timezone ()); + prop = icalproperty_new_x (icaltime_as_ical_string (dtstamp)); + icalproperty_set_x_name (prop, "X-MICROSOFT-CDO-REPLYTIME"); + icalcomponent_add_property (icomp, prop); + } + } /* Add the timezones */ tz_data.tzids = g_hash_table_new (g_str_hash, g_str_equal); -- cgit