From 540d673a1a511623580539282fbc33770eb10066 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Wed, 19 Jan 2005 16:28:34 +0000 Subject: use receive_objects method instead of individually updating objects. Set 2005-01-19 Rodrigo Moya * importers/icalendar-importer.c (update_objects): use receive_objects method instead of individually updating objects. Set the method on the VCALENDAR object we create. svn path=/trunk/; revision=28450 --- calendar/importers/icalendar-importer.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'calendar/importers') diff --git a/calendar/importers/icalendar-importer.c b/calendar/importers/icalendar-importer.c index d7fae2eb1d..2e17d39f59 100644 --- a/calendar/importers/icalendar-importer.c +++ b/calendar/importers/icalendar-importer.c @@ -194,9 +194,15 @@ update_objects (ECal *client, icalcomponent *icalcomp) kind = icalcomponent_isa (icalcomp); if (kind == ICAL_VTODO_COMPONENT || kind == ICAL_VEVENT_COMPONENT) { vcal = e_cal_util_new_top_level (); + if (icalcomponent_get_method (icalcomp) == ICAL_METHOD_CANCEL) + icalcomponent_set_method (vcal, ICAL_METHOD_CANCEL); + else + icalcomponent_set_method (vcal, ICAL_METHOD_PUBLISH); icalcomponent_add_component (vcal, icalcomponent_new_clone (icalcomp)); } else if (kind == ICAL_VCALENDAR_COMPONENT) { vcal = icalcomponent_new_clone (icalcomp); + if (!icalcomponent_get_first_property (vcal, ICAL_METHOD_PROPERTY)) + icalcomponent_set_method (vcal, ICAL_METHOD_PUBLISH); } else return FALSE; -- cgit v1.2.3