summaryrefslogtreecommitdiffstats
path: root/apps/alarm_menu.c
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2009-10-17 18:02:48 +0000
committerNils Wallménius <nils@rockbox.org>2009-10-17 18:02:48 +0000
commitf34a841b0cc5d1a605375209e1b013b388f741bc (patch)
tree90c780494fa42ffe34e3504d6fe3dc026a91d457 /apps/alarm_menu.c
parent5ca76ab9c4af0759f1bcf75ce24c47ccd38fc962 (diff)
downloadrockbox-f34a841b0cc5d1a605375209e1b013b388f741bc.tar.gz
rockbox-f34a841b0cc5d1a605375209e1b013b388f741bc.tar.bz2
rockbox-f34a841b0cc5d1a605375209e1b013b388f741bc.zip
Revise r23225 a bit, removing the debug_printf function and implementing more generic lcd_(remote)_putsf function(s) instead and use those in more places
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23233 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/alarm_menu.c')
-rw-r--r--apps/alarm_menu.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/apps/alarm_menu.c b/apps/alarm_menu.c
index 413d176c7e..6473bbab82 100644
--- a/apps/alarm_menu.c
+++ b/apps/alarm_menu.c
@@ -41,14 +41,14 @@
#include "splash.h"
#include "viewport.h"
-static void speak_time(int hours, int minutes, bool speak_hours)
+static void speak_time(int hours, int minutes, bool speak_hours, bool enqueue)
{
if (global_settings.talk_menu){
if(speak_hours) {
- talk_value(hours, UNIT_HOUR, false);
+ talk_value(hours, UNIT_HOUR, enqueue);
talk_value(minutes, UNIT_MIN, true);
} else {
- talk_value(minutes, UNIT_MIN, false);
+ talk_value(minutes, UNIT_MIN, enqueue);
}
}
}
@@ -56,8 +56,7 @@ static void speak_time(int hours, int minutes, bool speak_hours)
bool alarm_screen(void)
{
int h, m;
- bool done=false;
- char buf[32];
+ bool done = false;
struct tm *tm;
int togo;
int button;
@@ -90,19 +89,14 @@ bool alarm_screen(void)
screens[i].puts(0, 3, str(LANG_ALARM_MOD_KEYS));
}
/* Talk when entering the wakeup screen */
- if (global_settings.talk_menu)
- {
- talk_value(h, UNIT_HOUR, true);
- talk_value(m, UNIT_MIN, true);
- }
+ speak_time(h, m, true, true);
update = false;
}
- snprintf(buf, 32, str(LANG_ALARM_MOD_TIME), h, m);
FOR_NB_SCREENS(i)
{
screens[i].set_viewport(&vp[i]);
- screens[i].puts(0, 1, buf);
+ screens[i].putsf(0, 1, str(LANG_ALARM_MOD_TIME), h, m);
screens[i].update_viewport();
screens[i].set_viewport(NULL);
}
@@ -147,7 +141,7 @@ bool alarm_screen(void)
if (h == 24)
h = 0;
- speak_time(h, m, hour_wrapped);
+ speak_time(h, m, hour_wrapped, false);
break;
/* dec(m) */
@@ -162,7 +156,7 @@ bool alarm_screen(void)
if (h == -1)
h = 23;
- speak_time(h, m, hour_wrapped);
+ speak_time(h, m, hour_wrapped, false);
break;
/* inc(h) */