From d48442039ed399c0ba5ae51bc42d56b5b23f1bc4 Mon Sep 17 00:00:00 2001 From: Jörg Hohensohn Date: Wed, 6 Oct 2004 21:37:46 +0000 Subject: patch #978765 by Carsten Tschach, new option for voice filenames: every file may have an optional .talk companion, with a filename clip. While at it, I removed the "on enter" directory talking, nobody used it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5194 a1c6a512-1295-4272-9138-f99709370657 --- apps/settings_menu.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'apps/settings_menu.c') diff --git a/apps/settings_menu.c b/apps/settings_menu.c index 624274520f..4e9ec25d79 100644 --- a/apps/settings_menu.c +++ b/apps/settings_menu.c @@ -898,28 +898,24 @@ static bool voice_menus(void) return ret; } +/* this is used 2 times below, so it saves memory to put it in global scope */ +static const struct opt_items voice_names[] = { + { STR(LANG_OFF) }, + { STR(LANG_VOICE_NUMBER) }, + { STR(LANG_VOICE_SPELL) }, + { STR(LANG_VOICE_DIR_HOVER) } +}; + static bool voice_dirs(void) { - static const struct opt_items names[] = { - { STR(LANG_OFF) }, - { STR(LANG_VOICE_NUMBER) }, - { STR(LANG_VOICE_SPELL) }, - { STR(LANG_VOICE_DIR_ENTER) }, - { STR(LANG_VOICE_DIR_HOVER) } - }; return set_option( str(LANG_VOICE_DIR), - &global_settings.talk_dir, INT, names, 5, NULL); + &global_settings.talk_dir, INT, voice_names, 4, NULL); } static bool voice_files(void) { - static const struct opt_items names[] = { - { STR(LANG_OFF) }, - { STR(LANG_VOICE_NUMBER) }, - { STR(LANG_VOICE_SPELL) } - }; return set_option( str(LANG_VOICE_FILE), - &global_settings.talk_file, INT, names, 3, NULL); + &global_settings.talk_file, INT, voice_names, 4, NULL); } static bool voice_menu(void) -- cgit v1.2.3