summaryrefslogtreecommitdiffstats
path: root/apps/main_menu.c
diff options
context:
space:
mode:
authorJörg Hohensohn <hohensoh@rockbox.org>2004-04-12 12:29:44 +0000
committerJörg Hohensohn <hohensoh@rockbox.org>2004-04-12 12:29:44 +0000
commitf2d8b0e97585b71b9d66e5b1e536f9ca5dc22b3b (patch)
treeb9fc4fd2dfd2e5aad655cdfec67fa16990dd3530 /apps/main_menu.c
parent716fd7419d35c5c5a3d3d9260e049f74bb43743d (diff)
downloadrockbox-f2d8b0e97585b71b9d66e5b1e536f9ca5dc22b3b.tar.gz
rockbox-f2d8b0e97585b71b9d66e5b1e536f9ca5dc22b3b.zip
voice UI updates: nicer month setting, bookmark browser, Rockbox info screen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4487 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/main_menu.c')
-rw-r--r--apps/main_menu.c39
1 files changed, 34 insertions, 5 deletions
diff --git a/apps/main_menu.c b/apps/main_menu.c
index dc6e84d626..8e1b7871c1 100644
--- a/apps/main_menu.c
+++ b/apps/main_menu.c
@@ -16,6 +16,7 @@
* KIND, either express or implied.
*
****************************************************************************/
+#include <timefuncs.h>
#include "config.h"
#include "options.h"
@@ -154,6 +155,39 @@ bool show_info(void)
bool done = false;
int key;
int state = 1;
+ unsigned int size, free;
+
+ fat_size( &size, &free );
+ size /= 1024;
+ free /= 1024;
+
+ if (global_settings.talk_menu)
+ { /* say whatever is reasonable, no real connection to the screen */
+ struct tm* tm;
+
+ if (battery_level() >= 0)
+ {
+ talk_id(LANG_BATTERY_TIME, true);
+ talk_value(battery_level(), UNIT_PERCENT, true);
+ }
+
+ talk_id(LANG_DISK_FREE_STAT, false);
+ talk_number(free / 1024, true);
+ decimal = free % 1024 / 100;
+ talk_id(VOICE_POINT, true);
+ talk_value(decimal, UNIT_GB, true);
+
+#ifdef HAVE_RTC
+ tm = get_time();
+ talk_id(VOICE_CURRENT_TIME, true);
+ talk_value(tm->tm_hour, UNIT_HOUR, true);
+ talk_value(tm->tm_min, UNIT_MIN, true);
+ talk_value(tm->tm_sec, UNIT_SEC, true);
+ talk_id(LANG_MONTH_JANUARY + tm->tm_mon, true);
+ talk_number(tm->tm_mday, true);
+ talk_number(1900 + tm->tm_year, true);
+#endif
+ }
while(!done)
{
@@ -195,16 +229,11 @@ bool show_info(void)
}
if (state & 2) {
- unsigned int size, free;
- fat_size( &size, &free );
-
- size /= 1024;
integer = size / 1024;
decimal = size % 1024 / 100;
snprintf(s, sizeof s, str(LANG_DISK_STAT), integer, decimal);
lcd_puts(0, y++, s);
- free /= 1024;
integer = free / 1024;
decimal = free % 1024 / 100;
snprintf(s, sizeof s, str(LANG_DISK_FREE_STAT), integer, decimal);