aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog5
-rw-r--r--calendar/importers/icalendar-importer.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index e64e540ea5..f1de8c504b 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,7 +1,8 @@
2005-01-19 Rodrigo Moya <rodrigo@novell.com>
- * importers/icalendar-imporer.c (update_objects): use receive_objects
- method instead of individually updating objects.
+ * importers/icalendar-importer.c (update_objects): use receive_objects
+ method instead of individually updating objects. Set the method on the
+ VCALENDAR object we create.
2005-01-18 Rodrigo Moya <rodrigo@novell.com>
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;