diff options
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 35602f001b..a0f039b9a0 100644 --- a/apps/settings_menu.c +++ b/apps/settings_menu.c | |||
@@ -876,6 +876,56 @@ static bool language_browse(void) | |||
876 | return rockbox_browse(ROCKBOX_DIR LANG_DIR, SHOW_LNG); | 876 | return rockbox_browse(ROCKBOX_DIR LANG_DIR, SHOW_LNG); |
877 | } | 877 | } |
878 | 878 | ||
879 | static bool voice_menus(void) | ||
880 | { | ||
881 | bool ret; | ||
882 | bool temp = global_settings.talk_menu; | ||
883 | /* work on a temp variable first, avoid "life" disabling */ | ||
884 | ret = set_bool( str(LANG_VOICE_MENU), &temp ); | ||
885 | global_settings.talk_menu = temp; | ||
886 | return ret; | ||
887 | } | ||
888 | |||
889 | static bool voice_dirs(void) | ||
890 | { | ||
891 | struct opt_items names[] = { | ||
892 | { STR(LANG_OFF) }, | ||
893 | { STR(LANG_VOICE_NUMBER) }, | ||
894 | { STR(LANG_VOICE_DIR_ENTER) }, | ||
895 | { STR(LANG_VOICE_DIR_HOVER) } | ||
896 | }; | ||
897 | return set_option( str(LANG_VOICE_DIR), | ||
898 | &global_settings.talk_dir, INT, names, 4, NULL); | ||
899 | } | ||
900 | |||
901 | static bool voice_files(void) | ||
902 | { | ||
903 | struct opt_items names[] = { | ||
904 | { STR(LANG_OFF) }, | ||
905 | { STR(LANG_VOICE_NUMBER) } | ||
906 | }; | ||
907 | return set_option( str(LANG_VOICE_DIR), | ||
908 | &global_settings.talk_file, INT, names, 2, NULL); | ||
909 | } | ||
910 | |||
911 | static bool voice_menu(void) | ||
912 | { | ||
913 | int m; | ||
914 | bool result; | ||
915 | |||
916 | struct menu_item items[] = { | ||
917 | { STR(LANG_VOICE_MENU), voice_menus }, | ||
918 | { STR(LANG_VOICE_DIR), voice_dirs }, | ||
919 | { STR(LANG_VOICE_FILE), voice_files } | ||
920 | }; | ||
921 | |||
922 | m=menu_init( items, sizeof(items) / sizeof(*items), NULL, | ||
923 | NULL, NULL, NULL); | ||
924 | result = menu_run(m); | ||
925 | menu_exit(m); | ||
926 | return result; | ||
927 | } | ||
928 | |||
879 | #ifdef HAVE_LCD_BITMAP | 929 | #ifdef HAVE_LCD_BITMAP |
880 | static bool font_browse(void) | 930 | static bool font_browse(void) |
881 | { | 931 | { |
@@ -1283,6 +1333,7 @@ bool settings_menu(void) | |||
1283 | { STR(LANG_SYSTEM), system_settings_menu }, | 1333 | { STR(LANG_SYSTEM), system_settings_menu }, |
1284 | { STR(LANG_BOOKMARK_SETTINGS),bookmark_settings_menu }, | 1334 | { STR(LANG_BOOKMARK_SETTINGS),bookmark_settings_menu }, |
1285 | { STR(LANG_LANGUAGE), language_browse }, | 1335 | { STR(LANG_LANGUAGE), language_browse }, |
1336 | { STR(LANG_VOICE), voice_menu }, | ||
1286 | }; | 1337 | }; |
1287 | 1338 | ||
1288 | m=menu_init( items, sizeof(items) / sizeof(*items), NULL, | 1339 | m=menu_init( items, sizeof(items) / sizeof(*items), NULL, |