summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/lang/english.lang24
-rw-r--r--apps/tree.c53
2 files changed, 65 insertions, 12 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang
index 4c6e38d912..78322662d6 100644
--- a/apps/lang/english.lang
+++ b/apps/lang/english.lang
@@ -2649,15 +2649,15 @@
2649 user: core 2649 user: core
2650 <source> 2650 <source>
2651 *: none 2651 *: none
2652 lcd_bitmap: "Browse Fonts" 2652 lcd_bitmap: "Font"
2653 </source> 2653 </source>
2654 <dest> 2654 <dest>
2655 *: none 2655 *: none
2656 lcd_bitmap: "Browse Fonts" 2656 lcd_bitmap: "Font"
2657 </dest> 2657 </dest>
2658 <voice> 2658 <voice>
2659 *: none 2659 *: none
2660 lcd_bitmap: "Browse Fonts" 2660 lcd_bitmap: "Font"
2661 </voice> 2661 </voice>
2662</phrase> 2662</phrase>
2663<phrase> 2663<phrase>
@@ -2665,13 +2665,13 @@
2665 desc: in settings_menu() 2665 desc: in settings_menu()
2666 user: core 2666 user: core
2667 <source> 2667 <source>
2668 *: "Browse .wps files" 2668 *: "While Playing Screen"
2669 </source> 2669 </source>
2670 <dest> 2670 <dest>
2671 *: "Browse .wps files" 2671 *: "While Playing Screen"
2672 </dest> 2672 </dest>
2673 <voice> 2673 <voice>
2674 *: "Browse while-playing-screen files" 2674 *: "While playing screen"
2675 </voice> 2675 </voice>
2676</phrase> 2676</phrase>
2677<phrase> 2677<phrase>
@@ -2680,15 +2680,15 @@
2680 user: core 2680 user: core
2681 <source> 2681 <source>
2682 *: none 2682 *: none
2683 remote: "Browse .rwps files" 2683 remote: "Remote While Playing Screen"
2684 </source> 2684 </source>
2685 <dest> 2685 <dest>
2686 *: none 2686 *: none
2687 remote: "Browse .rwps files" 2687 remote: "Remote While Playing Screen"
2688 </dest> 2688 </dest>
2689 <voice> 2689 <voice>
2690 *: none 2690 *: none
2691 remote: "Browse remote while-playing-screen files" 2691 remote: "Remote While Playing Screen"
2692 </voice> 2692 </voice>
2693</phrase> 2693</phrase>
2694<phrase> 2694<phrase>
@@ -5187,13 +5187,13 @@
5187 desc: in the main menu 5187 desc: in the main menu
5188 user: core 5188 user: core
5189 <source> 5189 <source>
5190 *: "Browse Themes" 5190 *: "Browse Theme Files"
5191 </source> 5191 </source>
5192 <dest> 5192 <dest>
5193 *: "Browse Themes" 5193 *: "Browse Theme Files"
5194 </dest> 5194 </dest>
5195 <voice> 5195 <voice>
5196 *: "Browse Themes" 5196 *: "Browse Theme Files"
5197 </voice> 5197 </voice>
5198</phrase> 5198</phrase>
5199<phrase> 5199<phrase>
diff --git a/apps/tree.c b/apps/tree.c
index 84224efa85..d1d0ec3b27 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -904,6 +904,7 @@ int rockbox_browse(const char *root, int dirfilter)
904 if (dirfilter >= NUM_FILTER_MODES) 904 if (dirfilter >= NUM_FILTER_MODES)
905 { 905 {
906 static struct tree_context backup; 906 static struct tree_context backup;
907 char current[MAX_PATH];
907 int last_context; 908 int last_context;
908 909
909 backup = tc; 910 backup = tc;
@@ -913,6 +914,58 @@ int rockbox_browse(const char *root, int dirfilter)
913 start_wps = false; 914 start_wps = false;
914 last_context = curr_context; 915 last_context = curr_context;
915 916
917 /* Center on the currently loaded language when browsing languages. */
918 if (dirfilter == SHOW_LNG)
919 {
920 if (global_settings.lang_file[0])
921 {
922 snprintf(current, sizeof(current), LANG_DIR "/%s.lng",
923 global_settings.lang_file);
924 }
925 else
926 {
927 strncpy(current, LANG_DIR "/english.lng", sizeof(current));
928 }
929 }
930 /* Center on currently loaded WPS */
931 else if (dirfilter == SHOW_WPS)
932 {
933 snprintf(current, sizeof(current), WPS_DIR "/%s.wps",
934 global_settings.wps_file);
935 }
936#ifdef HAVE_REMOTE_LCD
937 /* Center on currently loaded RWPS */
938 else if (dirfilter == SHOW_RWPS)
939 {
940 snprintf(current, sizeof(current), WPS_DIR "/%s.rwps",
941 global_settings.rwps_file);
942 }
943#endif
944#ifdef HAVE_LCD_BITMAP
945 /* Center on the currently loaded font when browsing fonts */
946 else if (dirfilter == SHOW_FONT)
947 {
948 snprintf(current, sizeof(current), FONT_DIR "/%s.fnt",
949 global_settings.font_file);
950 }
951#endif
952#if CONFIG_TUNER
953 /* Center on the currently loaded FM preset when browsing those */
954 else if (dirfilter == SHOW_FMR)
955 {
956 snprintf(current, sizeof(current), FMPRESET_PATH "/%s.fmr",
957 global_settings.fmr_file);
958 }
959#endif
960
961 /* If we've found a file to center on, do it */
962 if (current[0] == '/')
963 {
964 set_current_file(current);
965 /* set_current_file changes dirlevel, change it back */
966 tc.dirlevel = 0;
967 }
968
916 ret_val = dirbrowse(); 969 ret_val = dirbrowse();
917 tc = backup; 970 tc = backup;
918 curr_context = last_context; 971 curr_context = last_context;