Index: apps/tree.c
===================================================================
--- apps/tree.c (revision 13533)
+++ apps/tree.c (working copy)
@@ -722,9 +722,19 @@
DEBUGF("Playing directory thumbnail: %s", currdir);
res = ft_play_dirname(name);
if (res < 0) /* failed, not existing */
- { /* say the number instead, as a fallback */
- talk_id(VOICE_DIR, false);
- talk_number(lasti+1, true);
+ {
+ /* say the number or spell if required as a fallback */
+ switch (global_settings.talk_dir)
+ {
+ case 1: /* dirs as numbers */
+ talk_id(VOICE_DIR, false);
+ talk_number(lasti+1, true);
+ break;
+
+ case 2: /* dirs spelled */
+ talk_spell(name, false);
+ break;
+ }
}
}
else
@@ -847,8 +857,14 @@
/* Directory? */
if (attr & ATTR_DIRECTORY)
{
- /* play directory thumbnail */
- switch (global_settings.talk_dir) {
+ /* schedule thumbnail playback if required */
+ if (global_settings.talk_dir_clip)
+ thumbnail_time = current_tick + HOVER_DELAY;
+ else
+ {
+ /* talk directly */
+ switch (global_settings.talk_dir)
+ {
case 1: /* dirs as numbers */
talk_id(VOICE_DIR, false);
talk_number(tc.selected_item+1, true);
@@ -857,20 +873,19 @@
case 2: /* dirs spelled */
talk_spell(name, false);
break;
-
- case 3: /* thumbnail clip */
- /* "schedule" a thumbnail, to have a little
- delay */
- thumbnail_time = current_tick + HOVER_DELAY;
- break;
-
- default:
- break;
+ }
}
}
else /* file */
{
- switch (global_settings.talk_file) {
+ /* schedule thumbnail playback if required */
+ if (global_settings.talk_file_clip && (attr & FILE_ATTR_THUMBNAIL))
+ thumbnail_time = current_tick + HOVER_DELAY;
+ else
+ {
+ /* talk directly */
+ switch (global_settings.talk_file)
+ {
case 1: /* files as numbers */
ft_play_filenumber(
tc.selected_item-tc.dirsindir+1,
@@ -880,19 +895,7 @@
case 2: /* files spelled */
talk_spell(name, false);
break;
-
- case 3: /* thumbnail clip */
- /* "schedule" a thumbnail, to have a little
- delay */
- if (attr & FILE_ATTR_THUMBNAIL)
- thumbnail_time = current_tick + HOVER_DELAY;
- else
- /* spell the number as fallback */
- talk_spell(name, false);
- break;
-
- default:
- break;
+ }
}
}
}
Index: apps/lang/english.lang
===================================================================
--- apps/lang/english.lang (revision 13533)
+++ apps/lang/english.lang (working copy)
@@ -2535,7 +2535,7 @@
id: LANG_VOICE_DIR
- desc: item of voice menu, set the "talkbox" mode for directories
+ desc: item of voice menu, set the voice mode for directories
user:
*: "Voice Directories"
@@ -2549,7 +2549,7 @@
id: LANG_VOICE_FILE
- desc: item of voice menu, set the voive mode for files
+ desc: item of voice menu, set the voice mode for files
user:
*: "Voice Filenames"
@@ -10980,3 +10980,31 @@
*: "List Acceleration Speed"
+
+ id: LANG_VOICE_DIR_TALK
+ desc: Item of voice menu, whether to use directory .talk clips
+ user:
+
+ *: "Use Directory .talk Clips"
+
+
+ *: "Use Directory .talk Clips"
+
+
+ *: "Use Directory .talk Clips"
+
+
+
+ id: LANG_VOICE_FILE_TALK
+ desc: Item of voice menu, whether to use file .talk clips
+ user:
+
+ *: "Use File .talk Clips"
+
+
+ *: "Use File .talk Clips"
+
+
+ *: "Use File .talk Clips"
+
+
Index: apps/settings.h
===================================================================
--- apps/settings.h (revision 13533)
+++ apps/settings.h (working copy)
@@ -524,8 +524,10 @@
/* voice UI settings */
bool talk_menu; /* enable voice UI */
- int talk_dir; /* talkbox mode: 0=off 1=number 2=clip@enter 3=clip@hover */
- int talk_file; /* voice filename mode: 0=off, 1=number, other t.b.d. */
+ int talk_dir; /* voiced directories mode: 0=off 1=number 2=spell */
+ bool talk_dir_clip; /* use directory .talk clips */
+ int talk_file; /* voice file mode: 0=off, 1=number, 2=spell */
+ bool talk_file_clip; /* use file .talk clips */
/* file browser sorting */
int sort_file; /* 0=alpha, 1=date, 2=date (new first), 3=type */
Index: apps/menus/settings_menu.c
===================================================================
--- apps/menus/settings_menu.c (revision 13533)
+++ apps/menus/settings_menu.c (working copy)
@@ -397,25 +397,28 @@
/***********************************/
/* VOICE MENU */
static int talk_callback(int action,const struct menu_item_ex *this_item);
-MENUITEM_SETTING(talk_menu, &global_settings.talk_menu, NULL);
-MENUITEM_SETTING(talk_dir, &global_settings.talk_dir, talk_callback);
-MENUITEM_SETTING(talk_file_item, &global_settings.talk_file, talk_callback);
+MENUITEM_SETTING(talk_menu_item, &global_settings.talk_menu, NULL);
+MENUITEM_SETTING(talk_dir_item, &global_settings.talk_dir, NULL);
+MENUITEM_SETTING(talk_dir_clip_item, &global_settings.talk_dir_clip, talk_callback);
+MENUITEM_SETTING(talk_file_item, &global_settings.talk_file, NULL);
+MENUITEM_SETTING(talk_file_clip_item, &global_settings.talk_file_clip, talk_callback);
static int talk_callback(int action,const struct menu_item_ex *this_item)
{
static int oldval = 0;
switch (action)
{
case ACTION_ENTER_MENUITEM:
- oldval = global_settings.talk_file;
+ oldval = global_settings.talk_file_clip;
break;
case ACTION_EXIT_MENUITEM:
#if CONFIG_CODEC == SWCODEC
audio_set_crossfade(global_settings.crossfade);
#endif
- if (this_item == &talk_dir)
+ if (this_item == &talk_dir_clip_item)
break;
- if (oldval != 3 && global_settings.talk_file == 3)
- { /* force reload if newly talking thumbnails,
+ if (!oldval && global_settings.talk_file_clip)
+ {
+ /* force reload if newly talking thumbnails,
because the clip presence is cached only if enabled */
reload_directory();
}
@@ -424,7 +427,8 @@
return action;
}
MAKE_MENU(voice_settings_menu, ID2P(LANG_VOICE), 0, Icon_Voice,
- &talk_menu, &talk_dir, &talk_file_item);
+ &talk_menu_item, &talk_dir_item, &talk_dir_clip_item,
+ &talk_file_item, &talk_file_clip_item);
/* VOICE MENU */
/***********************************/
Index: apps/talk.c
===================================================================
--- apps/talk.c (revision 13533)
+++ apps/talk.c (working copy)
@@ -539,8 +539,8 @@
bool talk_voice_required(void)
{
return (voicefile_size != 0) /* Voice file is available */
- || (global_settings.talk_dir == 3) /* Thumbnail clips are required */
- || (global_settings.talk_file == 3);
+ || (global_settings.talk_dir_clip) /* Thumbnail clips are required */
+ || (global_settings.talk_file_clip);
}
#endif
Index: apps/settings_list.c
===================================================================
--- apps/settings_list.c (revision 13533)
+++ apps/settings_list.c (working copy)
@@ -50,7 +50,7 @@
/* some sets of values which are used more than once, to save memory */
static const char off_on[] = "off,on";
static const char off_on_ask[] = "off,on,ask";
-static const char off_number_spell_hover[] = "off,number,spell,hover";
+static const char off_number_spell[] = "off,number,spell";
#ifdef HAVE_LCD_BITMAP
static const char graphic_numeric[] = "graphic,numeric";
#endif
@@ -708,15 +708,17 @@
OFFON_SETTING(0,line_in,LANG_LINE_IN,false,"line in",NULL),
#endif
/* voice */
+ OFFON_SETTING(F_TEMPVAR, talk_menu, LANG_VOICE_MENU, true, "talk menu", NULL),
CHOICE_SETTING(0, talk_dir, LANG_VOICE_DIR, 0,
- "talk dir", off_number_spell_hover, NULL, 4,
+ "talk dir", off_number_spell, NULL, 3,
ID2P(LANG_OFF), ID2P(LANG_VOICE_NUMBER),
- ID2P(LANG_VOICE_SPELL), ID2P(LANG_VOICE_DIR_HOVER)),
+ ID2P(LANG_VOICE_SPELL)),
+ OFFON_SETTING(F_TEMPVAR, talk_dir_clip, LANG_VOICE_DIR_TALK, true, "talk dir clip", NULL),
CHOICE_SETTING(0, talk_file, LANG_VOICE_FILE, 0,
- "talk file", off_number_spell_hover, NULL, 4,
+ "talk file", off_number_spell, NULL, 3,
ID2P(LANG_OFF), ID2P(LANG_VOICE_NUMBER),
- ID2P(LANG_VOICE_SPELL), ID2P(LANG_VOICE_DIR_HOVER)),
- OFFON_SETTING(F_TEMPVAR, talk_menu, LANG_VOICE_MENU, true, "talk menu", NULL),
+ ID2P(LANG_VOICE_SPELL)),
+ OFFON_SETTING(F_TEMPVAR, talk_file_clip, LANG_VOICE_FILE_TALK, true, "talk file clip", NULL),
/* file sorting */
CHOICE_SETTING(0, sort_file, LANG_SORT_FILE, 0 ,