summaryrefslogtreecommitdiff
path: root/apps/tree.c
diff options
context:
space:
mode:
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 8875cb9c27..53aca47d49 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -722,9 +722,19 @@ static int dirbrowse()
722 DEBUGF("Playing directory thumbnail: %s", currdir); 722 DEBUGF("Playing directory thumbnail: %s", currdir);
723 res = ft_play_dirname(name); 723 res = ft_play_dirname(name);
724 if (res < 0) /* failed, not existing */ 724 if (res < 0) /* failed, not existing */
725 { /* say the number instead, as a fallback */ 725 {
726 talk_id(VOICE_DIR, false); 726 /* say the number or spell if required as a fallback */
727 talk_number(lasti+1, true); 727 switch (global_settings.talk_dir)
728 {
729 case 1: /* dirs as numbers */
730 talk_id(VOICE_DIR, false);
731 talk_number(lasti+1, true);
732 break;
733
734 case 2: /* dirs spelled */
735 talk_spell(name, false);
736 break;
737 }
728 } 738 }
729 } 739 }
730 else 740 else
@@ -847,8 +857,14 @@ static int dirbrowse()
847 /* Directory? */ 857 /* Directory? */
848 if (attr & ATTR_DIRECTORY) 858 if (attr & ATTR_DIRECTORY)
849 { 859 {
850 /* play directory thumbnail */ 860 /* schedule thumbnail playback if required */
851 switch (global_settings.talk_dir) { 861 if (global_settings.talk_dir_clip)
862 thumbnail_time = current_tick + HOVER_DELAY;
863 else
864 {
865 /* talk directly */
866 switch (global_settings.talk_dir)
867 {
852 case 1: /* dirs as numbers */ 868 case 1: /* dirs as numbers */
853 talk_id(VOICE_DIR, false); 869 talk_id(VOICE_DIR, false);
854 talk_number(tc.selected_item+1, true); 870 talk_number(tc.selected_item+1, true);
@@ -857,20 +873,19 @@ static int dirbrowse()
857 case 2: /* dirs spelled */ 873 case 2: /* dirs spelled */
858 talk_spell(name, false); 874 talk_spell(name, false);
859 break; 875 break;
860 876 }
861 case 3: /* thumbnail clip */
862 /* "schedule" a thumbnail, to have a little
863 delay */
864 thumbnail_time = current_tick + HOVER_DELAY;
865 break;
866
867 default:
868 break;
869 } 877 }
870 } 878 }
871 else /* file */ 879 else /* file */
872 { 880 {
873 switch (global_settings.talk_file) { 881 /* schedule thumbnail playback if required */
882 if (global_settings.talk_file_clip && (attr & FILE_ATTR_THUMBNAIL))
883 thumbnail_time = current_tick + HOVER_DELAY;
884 else
885 {
886 /* talk directly */
887 switch (global_settings.talk_file)
888 {
874 case 1: /* files as numbers */ 889 case 1: /* files as numbers */
875 ft_play_filenumber( 890 ft_play_filenumber(
876 tc.selected_item-tc.dirsindir+1, 891 tc.selected_item-tc.dirsindir+1,
@@ -880,19 +895,7 @@ static int dirbrowse()
880 case 2: /* files spelled */ 895 case 2: /* files spelled */
881 talk_spell(name, false); 896 talk_spell(name, false);
882 break; 897 break;
883 898 }
884 case 3: /* thumbnail clip */
885 /* "schedule" a thumbnail, to have a little
886 delay */
887 if (attr & FILE_ATTR_THUMBNAIL)
888 thumbnail_time = current_tick + HOVER_DELAY;
889 else
890 /* spell the number as fallback */
891 talk_spell(name, false);
892 break;
893
894 default:
895 break;
896 } 899 }
897 } 900 }
898 } 901 }