summaryrefslogtreecommitdiff
path: root/apps/tree.c
diff options
context:
space:
mode:
authorSteve Bavin <pondlife@pondlife.me>2007-06-07 09:24:53 +0000
committerSteve Bavin <pondlife@pondlife.me>2007-06-07 09:24:53 +0000
commit6fd10bacceb576ee39e7ecfa32510ae8c97815ba (patch)
treed7a55ab832c6943fb469c34bd85d15e0fc7e2f2c /apps/tree.c
parent44034055500509b3b2b85b6df66172abbf77399c (diff)
downloadrockbox-6fd10bacceb576ee39e7ecfa32510ae8c97815ba.zip
rockbox-6fd10bacceb576ee39e7ecfa32510ae8c97815ba.tar.gz
rockbox-6fd10bacceb576ee39e7ecfa32510ae8c97815ba.tar.bz2
rockbox-6fd10bacceb576ee39e7ecfa32510ae8c97815ba.tar.xz
Separate out voice options for .talk clips (FS #7249). This removes the assumptions about what to speak if a .talk clip is not available for a particular file or directory,
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13584 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tree.c')
-rw-r--r--apps/tree.c59
1 files changed, 31 insertions, 28 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 8875cb9..53aca47 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -722,9 +722,19 @@ static int dirbrowse()
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 @@ static int dirbrowse()
/* 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 @@ static int dirbrowse()
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 @@ static int dirbrowse()
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;
+ }
}
}
}