diff options
| author | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-03-21 11:46:31 +0000 |
|---|---|---|
| committer | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-03-21 11:46:31 +0000 |
| commit | 4ec88db24370570c62ffe9acd2059c8cc2658891 (patch) | |
| tree | 9a4561278efaa45c0ea32a8582f4b9d82791d02f | |
| parent | 48d3d3aa617bc0a23f7eb1446bab3e8f07faabff (diff) | |
| download | rockbox-4ec88db24370570c62ffe9acd2059c8cc2658891.zip rockbox-4ec88db24370570c62ffe9acd2059c8cc2658891.tar.gz rockbox-4ec88db24370570c62ffe9acd2059c8cc2658891.tar.bz2 rockbox-4ec88db24370570c62ffe9acd2059c8cc2658891.tar.xz | |
voice for the sleep timer setting
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4419 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/sleeptimer.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/apps/sleeptimer.c b/apps/sleeptimer.c index 15a2f7c..1a6e3ec 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); |