From 07dacea3edab82eecc1cd487c493edc0ca65da6a Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Mon, 2 Jul 2001 21:46:36 +0000 Subject: Support for repeat/duration properties in alarm components. 2001-07-02 Federico Mena Quintero Support for repeat/duration properties in alarm components. * cal-util/cal-component.h (CalAlarmRepeat): New structure that pairs the repeat/duration values of an alarm component, which must be set both together or not set at all. * cal-util/cal-component.c (CalComponentAlarm): Added fields for the repeat and duration properties. (scan_alarm_property): Scan the DURATION and REPEAT properties. (make_alarm): Nullify/initialize all the fields in the alarm. (cal_component_alarm_get_repeat): New function. (cal_component_alarm_set_repeat): New function. * gui/dialogs/alarm-page.glade: Changed the label of display alarms from "Show a dialog" to "Display a message". svn path=/trunk/; revision=10706 --- calendar/cal-util/cal-component.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'calendar/cal-util/cal-component.h') diff --git a/calendar/cal-util/cal-component.h b/calendar/cal-util/cal-component.h index c8f21963b4..54f9c03a33 100644 --- a/calendar/cal-util/cal-component.h +++ b/calendar/cal-util/cal-component.h @@ -406,6 +406,14 @@ typedef struct { } u; } CalAlarmTrigger; +typedef struct { + /* Number of extra repetitions, zero for none */ + int repetitions; + + /* Interval between repetitions */ + struct icaldurationtype duration; +} CalAlarmRepeat; + gboolean cal_component_has_alarms (CalComponent *comp); void cal_component_add_alarm (CalComponent *comp, CalComponentAlarm *alarm); void cal_component_remove_alarm (CalComponent *comp, const char *auid); @@ -427,6 +435,9 @@ void cal_component_alarm_set_action (CalComponentAlarm *alarm, CalAlarmAction ac void cal_component_alarm_get_trigger (CalComponentAlarm *alarm, CalAlarmTrigger *trigger); void cal_component_alarm_set_trigger (CalComponentAlarm *alarm, CalAlarmTrigger trigger); +void cal_component_alarm_get_repeat (CalComponentAlarm *alarm, CalAlarmRepeat *repeat); +void cal_component_alarm_set_repeat (CalComponentAlarm *alarm, CalAlarmRepeat repeat); + void cal_component_alarm_free (CalComponentAlarm *alarm); -- cgit v1.2.3