Index: trunk/apps/menus/settings_menu.c
===================================================================
--- trunk.orig/apps/menus/settings_menu.c
+++ trunk/apps/menus/settings_menu.c
@@ -419,6 +419,7 @@ MENUITEM_SETTING(talk_dir_item, &global_
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);
+MENUITEM_SETTING(talk_filetype_item, &global_settings.talk_filetype, NULL);
static int talk_callback(int action,const struct menu_item_ex *this_item)
{
static int oldval = 0;
@@ -445,7 +446,8 @@ static int talk_callback(int action,cons
}
MAKE_MENU(voice_settings_menu, ID2P(LANG_VOICE), 0, Icon_Voice,
&talk_menu_item, &talk_dir_item, &talk_dir_clip_item,
- &talk_file_item, &talk_file_clip_item);
+ &talk_file_item, &talk_file_clip_item,
+ &talk_filetype_item);
/* VOICE MENU */
/***********************************/
Index: trunk/apps/settings.h
===================================================================
--- trunk.orig/apps/settings.h
+++ trunk/apps/settings.h
@@ -538,6 +538,7 @@ struct user_settings
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 */
+ bool talk_filetype; /* say file type */
/* file browser sorting */
int sort_file; /* 0=alpha, 1=date, 2=date (new first), 3=type */
Index: trunk/apps/settings_list.c
===================================================================
--- trunk.orig/apps/settings_list.c
+++ trunk/apps/settings_list.c
@@ -747,6 +747,7 @@ const struct settings_list settings[] =
ID2P(LANG_OFF), ID2P(LANG_VOICE_NUMBER),
ID2P(LANG_VOICE_SPELL)),
OFFON_SETTING(F_TEMPVAR, talk_file_clip, LANG_VOICE_FILE_TALK, false, "talk file clip", NULL),
+ OFFON_SETTING(F_TEMPVAR, talk_filetype, LANG_VOICE_FILETYPE, false, "talk filetype", NULL),
/* file sorting */
CHOICE_SETTING(0, sort_file, LANG_SORT_FILE, 0 ,
Index: trunk/apps/tree.c
===================================================================
--- trunk.orig/apps/tree.c
+++ trunk/apps/tree.c
@@ -272,7 +272,14 @@ static int tree_voice_cb(int selected_it
say_filetype(attr);
break;
case 2: /* spelled */
- talk_spell(name, false);
+ shutup();
+ if(global_settings.talk_filetype)
+ {
+ if(is_dir)
+ talk_id(VOICE_DIR, true);
+ else say_filetype(attr);
+ }
+ talk_spell(name, true);
break;
}
}
@@ -1205,6 +1212,8 @@ static int ft_play_dirname(char* name)
DEBUGF("Found: %s\n", dirname_mp3_filename);
talk_file(dirname_mp3_filename, false);
+ if(global_settings.talk_filetype)
+ talk_id(VOICE_DIR, true);
return 1;
}
@@ -1224,6 +1233,8 @@ static void ft_play_filename(char *dir,
"%s/%s%s", dir, file, file_thumbnail_ext);
talk_file(name_mp3_filename, false);
+ /* We could have saved the attribute to say the filetype, but
+ it seems best to just let the .talk clip say the extension. */
}
else
{ /* it already is a .talk file, play this directly */
Index: trunk/apps/lang/english.lang
===================================================================
--- trunk.orig/apps/lang/english.lang
+++ trunk/apps/lang/english.lang
@@ -11275,12 +11275,26 @@
desc: spoken only, when a list dialog contains no elements
user:
*: ""
*: ""
*: "Empty list"
+
+ id: LANG_VOICE_FILETYPE
+ desc: voice settings menu
+ user:
+
+ *: "Say file type"
+
+
+ *: "Say file type"
+
+
+ *: "Say file type"
+
+