aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/main.c
diff options
context:
space:
mode:
authorRussell Steinthal <steintr@src.gnome.org>1999-11-13 01:11:02 +0800
committerRussell Steinthal <steintr@src.gnome.org>1999-11-13 01:11:02 +0800
commitdded739f636bb8f75a6779bc31673e4f8b994225 (patch)
treea408cbad0fd52bb85c2a7e72d96631d17e9c4297 /calendar/main.c
parent43fd06f8ec06257cbd135b03c5e203dfcd134fd4 (diff)
downloadgsoc2013-evolution-dded739f636bb8f75a6779bc31673e4f8b994225.tar
gsoc2013-evolution-dded739f636bb8f75a6779bc31673e4f8b994225.tar.gz
gsoc2013-evolution-dded739f636bb8f75a6779bc31673e4f8b994225.tar.bz2
gsoc2013-evolution-dded739f636bb8f75a6779bc31673e4f8b994225.tar.lz
gsoc2013-evolution-dded739f636bb8f75a6779bc31673e4f8b994225.tar.xz
gsoc2013-evolution-dded739f636bb8f75a6779bc31673e4f8b994225.tar.zst
gsoc2013-evolution-dded739f636bb8f75a6779bc31673e4f8b994225.zip
The long-awaited audio alarm timeout patch. Implements wishlist bug #3089.
Note: Per discussion on calendar-list, checks to see that timeout value is reasonable, i.e. between 1 and MAX_AALARM_TIMEOUT (set to 3600 seconds). Check is enforced by GtkSpinButton in property box and the patch when loading from disk. svn path=/trunk/; revision=1384
Diffstat (limited to 'calendar/main.c')
-rw-r--r--calendar/main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/calendar/main.c b/calendar/main.c
index 391e5535ff..b41b9a6d63 100644
--- a/calendar/main.c
+++ b/calendar/main.c
@@ -86,6 +86,12 @@ static int show_todo;
/* If set, beep on display alarms */
gboolean beep_on_display = 0;
+/* If true, timeout the beeper on audio alarms */
+
+gboolean enable_aalarm_timeout = 0;
+guint audio_alarm_timeout = 0;
+const guint MAX_AALARM_TIMEOUT = 3600;
+
/* Default values for alarms */
CalendarAlarm alarm_defaults[4] = {
{ ALARM_MAIL, 0, 15, ALARM_MINUTES },
@@ -212,6 +218,12 @@ init_calendar (void)
/* read alarm settings */
beep_on_display = gnome_config_get_bool ("/calendar/alarms/beep_on_display=FALSE");
+ enable_aalarm_timeout = gnome_config_get_bool ("/calendar/alarms/enable_audio_timeout=FALSE");
+ audio_alarm_timeout = gnome_config_get_int ("/calendar/alarms/audio_alarm_timeout=60");
+ if (audio_alarm_timeout < 1)
+ audio_alarm_timeout = 1;
+ if (audio_alarm_timeout > MAX_AALARM_TIMEOUT)
+ audio_alarm_timeout = MAX_AALARM_TIMEOUT;
init_default_alarms ();