diff options
author | Russell Steinthal <steintr@src.gnome.org> | 1999-11-03 10:36:31 +0800 |
---|---|---|
committer | Russell Steinthal <steintr@src.gnome.org> | 1999-11-03 10:36:31 +0800 |
commit | a6c4b535334a6da5c8d1622b11a0893d0c55abee (patch) | |
tree | 40922f9ada769d340c6fdbf9fd18b22eb5a1d1f2 /calendar/cal-util/calobj.c | |
parent | 510e8547bba307dc1e7dd72bd1484faa27db1a4f (diff) | |
download | gsoc2013-evolution-a6c4b535334a6da5c8d1622b11a0893d0c55abee.tar gsoc2013-evolution-a6c4b535334a6da5c8d1622b11a0893d0c55abee.tar.gz gsoc2013-evolution-a6c4b535334a6da5c8d1622b11a0893d0c55abee.tar.bz2 gsoc2013-evolution-a6c4b535334a6da5c8d1622b11a0893d0c55abee.tar.lz gsoc2013-evolution-a6c4b535334a6da5c8d1622b11a0893d0c55abee.tar.xz gsoc2013-evolution-a6c4b535334a6da5c8d1622b11a0893d0c55abee.tar.zst gsoc2013-evolution-a6c4b535334a6da5c8d1622b11a0893d0c55abee.zip |
Add default alarm support, Beep on display alarms option
Since there are now some calls from prop.c into previously static functions in
eventedit.c, the code in those files should probably be reorganized. Perhaps a
new alarm-utils.c file? In any case, this commits working code to the
repository before we reorganize.
svn path=/trunk/; revision=1366
Diffstat (limited to 'calendar/cal-util/calobj.c')
-rw-r--r-- | calendar/cal-util/calobj.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/calendar/cal-util/calobj.c b/calendar/cal-util/calobj.c index 806c27d8ff..f3004ddb13 100644 --- a/calendar/cal-util/calobj.c +++ b/calendar/cal-util/calobj.c @@ -15,6 +15,8 @@ #include "timeutil.h" #include "../libversit/vcc.h" +extern CalendarAlarm alarm_defaults[4]; + static char * ical_gen_uid (void) { @@ -62,19 +64,12 @@ ical_object_new (void) static void default_alarm (iCalObject *ical, CalendarAlarm *alarm, char *def_mail, enum AlarmType type) { - alarm->enabled = 0; - alarm->type = type; - - if (type != ALARM_MAIL){ - alarm->count = 15; - alarm->units = ALARM_MINUTES; - } else { - alarm->count = 1; - alarm->units = ALARM_DAYS; - } - - if (type == ALARM_MAIL) - alarm->data = g_strdup (def_mail); + alarm->type = type; + alarm->enabled = alarm_defaults[type].enabled; + alarm->count = alarm_defaults[type].count; + alarm->units = alarm_defaults[type].units; + if (alarm_defaults[type].data) + alarm->data = g_strdup (alarm_defaults[type].data); else alarm->data = g_strdup (""); } |