aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@novell.com>2005-01-20 00:28:34 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2005-01-20 00:28:34 +0800
commit540d673a1a511623580539282fbc33770eb10066 (patch)
treec43fafdee5a0e1b2611730b1903e5ecde81973bd /calendar
parentc73a9949e7a93e1d60b39b4ad208ff1f0f245199 (diff)
downloadgsoc2013-evolution-540d673a1a511623580539282fbc33770eb10066.tar.gz
gsoc2013-evolution-540d673a1a511623580539282fbc33770eb10066.tar.zst
gsoc2013-evolution-540d673a1a511623580539282fbc33770eb10066.zip
use receive_objects method instead of individually updating objects. Set
2005-01-19 Rodrigo Moya <rodrigo@novell.com> * 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
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;