diff options
author | JP Rosevear <jpr@ximian.com> | 2001-09-17 13:56:16 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2001-09-17 13:56:16 +0800 |
commit | d99aeae7edf0e639c866389d537ea33a11b3cd45 (patch) | |
tree | 5ed41294bcdd51ac63d9512025876c1c89f25680 /calendar/gui/itip-utils.c | |
parent | 169d9ae19a0eb165edc757eca753a757a02f60f7 (diff) | |
download | gsoc2013-evolution-d99aeae7edf0e639c866389d537ea33a11b3cd45.tar.gz gsoc2013-evolution-d99aeae7edf0e639c866389d537ea33a11b3cd45.tar.zst gsoc2013-evolution-d99aeae7edf0e639c866389d537ea33a11b3cd45.zip |
for each call back, removes the alarms (cal_component_remove_all_alarms):
2001-09-17 JP Rosevear <jpr@ximian.com>
* cal-util/cal-component.c (for_each_remove_all_alarms): for each
call back, removes the alarms
(cal_component_remove_all_alarms): remove all alarms from the
component
* cal-util/cal-component.h: new proto
* gui/e-itip-control.c (write_error_html): writes error messages
rather than normal html
* gui/itip-utils.c (itip_send_comp): remove all alarms if the
method warrants it
svn path=/trunk/; revision=12897
Diffstat (limited to 'calendar/gui/itip-utils.c')
-rw-r--r-- | calendar/gui/itip-utils.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c index 459f6e1a9e..8811db3487 100644 --- a/calendar/gui/itip-utils.c +++ b/calendar/gui/itip-utils.c @@ -389,7 +389,8 @@ itip_send_comp (CalComponentItipMethod method, CalComponent *comp) /* Create a top level component, and add our component */ { - icalcomponent *icomp, *clone; + CalComponent *clone; + icalcomponent *icomp, *iclone; icalproperty *prop; icalvalue *value; gchar *ical_string; @@ -401,10 +402,18 @@ itip_send_comp (CalComponentItipMethod method, CalComponent *comp) icalproperty_set_value (prop, value); icalcomponent_add_property (icomp, prop); - clone = icalcomponent_new_clone (cal_component_get_icalcomponent (comp)); - icalcomponent_add_component (icomp, clone); + /* Strip alarms if necessary */ + clone = cal_component_clone (comp); + if (method == CAL_COMPONENT_METHOD_REPLY + || method == CAL_COMPONENT_METHOD_CANCEL + || method == CAL_COMPONENT_METHOD_REFRESH + || method == CAL_COMPONENT_METHOD_DECLINECOUNTER) + cal_component_remove_all_alarms (clone); + + iclone = cal_component_get_icalcomponent (clone); + icalcomponent_add_component (icomp, iclone); - icalcomponent_foreach_tzid (clone, foreach_tzid_callback, icomp); + icalcomponent_foreach_tzid (iclone, foreach_tzid_callback, icomp); ical_string = icalcomponent_as_ical_string (icomp); attach_data = GNOME_Evolution_Composer_AttachmentData__alloc (); |