From 107a638a25358ffa10a1634ed5baa4bd547a8410 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Thu, 8 Aug 2002 13:51:02 +0000 Subject: Fixes #15710 2002-08-08 Rodrigo Moya Fixes #15710 * cal-util/cal-component.[ch] (cal_component_alarm_get_icalcomponent): new function for getting the icalcomponent from a CalComponentAlarm. * gui/comp-util.c (cal_comp_event_new_with_defaults): added X-EVOLUTION-NEEDS-DESCRIPTION property to the default reminder alarm, so that we can identify it when saving the component. * gui/dialogs/alarm-page.c (alarm_page_fill_component): if the alarm has the X-EVOLUTION-NEEDS-DESCRIPTION property, set the description to be the same as of the component. svn path=/trunk/; revision=17744 --- calendar/cal-util/cal-component.c | 15 +++++++++++++++ calendar/cal-util/cal-component.h | 2 ++ 2 files changed, 17 insertions(+) (limited to 'calendar/cal-util') diff --git a/calendar/cal-util/cal-component.c b/calendar/cal-util/cal-component.c index 6101c3cd63..2f5c88e4ca 100644 --- a/calendar/cal-util/cal-component.c +++ b/calendar/cal-util/cal-component.c @@ -5150,6 +5150,21 @@ cal_component_alarm_set_trigger (CalComponentAlarm *alarm, CalAlarmTrigger trigg } } +/** + * cal_component_alarm_get_icalcomponent + * @alarm: An alarm. + * + * Get the icalcomponent associated with the given #CalComponentAlarm. + * + * Returns: the icalcomponent. + */ +icalcomponent * +cal_component_alarm_get_icalcomponent (CalComponentAlarm *alarm) +{ + g_return_val_if_fail (alarm != NULL, NULL); + return alarm->icalcomp; +} + /* Returns TRUE if both strings match, i.e. they are both NULL or the strings are equal. */ static gboolean diff --git a/calendar/cal-util/cal-component.h b/calendar/cal-util/cal-component.h index 888f65ccbe..3e9c505b46 100644 --- a/calendar/cal-util/cal-component.h +++ b/calendar/cal-util/cal-component.h @@ -433,6 +433,8 @@ void cal_component_alarm_set_repeat (CalComponentAlarm *alarm, CalAlarmRepeat re void cal_component_alarm_get_trigger (CalComponentAlarm *alarm, CalAlarmTrigger *trigger); void cal_component_alarm_set_trigger (CalComponentAlarm *alarm, CalAlarmTrigger trigger); +icalcomponent *cal_component_alarm_get_icalcomponent (CalComponentAlarm *alarm); + END_GNOME_DECLS -- cgit v1.2.3