diff options
| author | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-03-27 00:11:01 +0000 |
|---|---|---|
| committer | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-03-27 00:11:01 +0000 |
| commit | 3aa99e14cdc493a090d810dde163ea76b83d18f2 (patch) | |
| tree | d7cbbab1c8ba039908f11138b34a31c6e75e0b15 /apps/settings_menu.c | |
| parent | a9c645f887947c924226f9570b61572c2d355b55 (diff) | |
| download | rockbox-3aa99e14cdc493a090d810dde163ea76b83d18f2.zip rockbox-3aa99e14cdc493a090d810dde163ea76b83d18f2.tar.gz rockbox-3aa99e14cdc493a090d810dde163ea76b83d18f2.tar.bz2 rockbox-3aa99e14cdc493a090d810dde163ea76b83d18f2.tar.xz | |
Step 4 of voice UI:
- "talkbox" functionality added, but yet without thumbnail recording
- menu under "general settings" to configure voice
- directories and folders can be voiced as a numbers
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4440 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings_menu.c')
| -rw-r--r-- | apps/settings_menu.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/apps/settings_menu.c b/apps/settings_menu.c index 35602f0..a0f039b 100644 --- a/apps/settings_menu.c +++ b/apps/settings_menu.c @@ -876,6 +876,56 @@ static bool language_browse(void) return rockbox_browse(ROCKBOX_DIR LANG_DIR, SHOW_LNG); } +static bool voice_menus(void) +{ + bool ret; + bool temp = global_settings.talk_menu; + /* work on a temp variable first, avoid "life" disabling */ + ret = set_bool( str(LANG_VOICE_MENU), &temp ); + global_settings.talk_menu = temp; + return ret; +} + +static bool voice_dirs(void) +{ + struct opt_items names[] = { + { STR(LANG_OFF) }, + { STR(LANG_VOICE_NUMBER) }, + { STR(LANG_VOICE_DIR_ENTER) }, + { STR(LANG_VOICE_DIR_HOVER) } + }; + return set_option( str(LANG_VOICE_DIR), + &global_settings.talk_dir, INT, names, 4, NULL); +} + +static bool voice_files(void) +{ + struct opt_items names[] = { + { STR(LANG_OFF) }, + { STR(LANG_VOICE_NUMBER) } + }; + return set_option( str(LANG_VOICE_DIR), + &global_settings.talk_file, INT, names, 2, NULL); +} + +static bool voice_menu(void) +{ + int m; + bool result; + + struct menu_item items[] = { + { STR(LANG_VOICE_MENU), voice_menus }, + { STR(LANG_VOICE_DIR), voice_dirs }, + { STR(LANG_VOICE_FILE), voice_files } + }; + + m=menu_init( items, sizeof(items) / sizeof(*items), NULL, + NULL, NULL, NULL); + result = menu_run(m); + menu_exit(m); + return result; +} + #ifdef HAVE_LCD_BITMAP static bool font_browse(void) { @@ -1283,6 +1333,7 @@ bool settings_menu(void) { STR(LANG_SYSTEM), system_settings_menu }, { STR(LANG_BOOKMARK_SETTINGS),bookmark_settings_menu }, { STR(LANG_LANGUAGE), language_browse }, + { STR(LANG_VOICE), voice_menu }, }; m=menu_init( items, sizeof(items) / sizeof(*items), NULL, |