summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJörg Hohensohn <hohensoh@rockbox.org>2004-03-21 11:46:31 +0000
committerJörg Hohensohn <hohensoh@rockbox.org>2004-03-21 11:46:31 +0000
commit4ec88db24370570c62ffe9acd2059c8cc2658891 (patch)
tree9a4561278efaa45c0ea32a8582f4b9d82791d02f /apps
parent48d3d3aa617bc0a23f7eb1446bab3e8f07faabff (diff)
voice for the sleep timer setting
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4419 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/sleeptimer.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/apps/sleeptimer.c b/apps/sleeptimer.c
index 15a2f7c656..1a6e3ec844 100644
--- a/apps/sleeptimer.c
+++ b/apps/sleeptimer.c
@@ -30,6 +30,7 @@
#include "powermgmt.h"
#include "status.h"
#include "debug.h"
+#include "talk.h"
#include "lang.h"
@@ -52,6 +53,7 @@ bool sleeptimer_screen(void)
int amount = 0;
int org_timer=get_sleep_timer();
bool changed=false;
+ bool sayit = true;
#ifdef HAVE_LCD_BITMAP
lcd_setfont(FONT_UI);
@@ -107,7 +109,7 @@ bool sleeptimer_screen(void)
if(newtime > MAX_TIME)
newtime = MAX_TIME;
- changed=true;
+ changed = sayit = true;
set_sleep_timer(newtime);
break;
@@ -126,7 +128,7 @@ bool sleeptimer_screen(void)
if(newtime < 0)
newtime = 0;
- changed=true;
+ changed = sayit = true;
set_sleep_timer(newtime);
break;
}
@@ -141,10 +143,32 @@ bool sleeptimer_screen(void)
snprintf(buf, 32, "%d:%02d",
hours, minutes);
lcd_puts(0, 1, buf);
+
+ if (sayit)
+ {
+ bool enqueue = false; /* first one should not ne queued */
+
+ if (hours)
+ {
+ talk_value(hours, UNIT_HOUR, enqueue);
+ enqueue = true; /* queue any following */
+ }
+ if (minutes)
+ {
+ talk_value(minutes, UNIT_MIN, enqueue);
+ }
+
+ sayit = false;
+ }
}
else
{
lcd_puts(0, 1, str(LANG_OFF));
+ if (sayit)
+ {
+ talk_id(LANG_OFF, false);
+ sayit = false;
+ }
}
status_draw(true);