diff options
author | Jonas Häggqvist <rasher@rasher.dk> | 2009-06-22 17:37:36 +0000 |
---|---|---|
committer | Jonas Häggqvist <rasher@rasher.dk> | 2009-06-22 17:37:36 +0000 |
commit | 4b831753e799f969b473b0b0fb48317722d7b98e (patch) | |
tree | e974b3dfd5fcd08fd82340c5d3a1e3a22a189c99 | |
parent | c99ab564b0f3a2656521139df6d9524d6b197fe8 (diff) | |
download | rockbox-4b831753e799f969b473b0b0fb48317722d7b98e.tar.gz rockbox-4b831753e799f969b473b0b0fb48317722d7b98e.zip |
Center the list on the currently loaded file in the following screens (FS#10093):
- Font selection
- FM preset selection
- WPS/RWPS selection
- Language selection
Modify the menu wording to make them seem more like a setting and update the manual accordingly.
The code could possibly be more compact - any help on that would be appreciated.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21464 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/lang/english.lang | 24 | ||||
-rw-r--r-- | apps/tree.c | 53 | ||||
-rw-r--r-- | manual/advanced_topics/main.tex | 6 | ||||
-rw-r--r-- | manual/configure_rockbox/theme_settings.tex | 8 |
4 files changed, 72 insertions, 19 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; |
diff --git a/manual/advanced_topics/main.tex b/manual/advanced_topics/main.tex index 41c0ba4adb..f6ba4ae52a 100644 --- a/manual/advanced_topics/main.tex +++ b/manual/advanced_topics/main.tex | |||
@@ -15,7 +15,7 @@ in the font package at \url{http://www.rockbox.org/daily.shtml}.} | |||
15 | be loaded automatically every time you start up, it must be located in the | 15 | be loaded automatically every time you start up, it must be located in the |
16 | \fname{/.rockbox/fonts} directory and the filename must be at most 24 characters | 16 | \fname{/.rockbox/fonts} directory and the filename must be at most 24 characters |
17 | long. You can browse the fonts in \fname{/.rockbox/fonts} under | 17 | long. You can browse the fonts in \fname{/.rockbox/fonts} under |
18 | \setting{Settings $\rightarrow$ Theme Settings $\rightarrow$ Browse Fonts} | 18 | \setting{Settings $\rightarrow$ Theme Settings $\rightarrow$ Font} |
19 | in the \setting{Main Menu}. | 19 | in the \setting{Main Menu}. |
20 | \note{Advanced Users Only: Any BDF font file up to 16 pixels high should | 20 | \note{Advanced Users Only: Any BDF font file up to 16 pixels high should |
21 | be usable with Rockbox. To convert from \fname{.bdf} to \fname{.fnt}, use | 21 | be usable with Rockbox. To convert from \fname{.bdf} to \fname{.fnt}, use |
@@ -96,7 +96,7 @@ file find the instructions on the Rockbox website: | |||
96 | \fname{/.rockbox/themes} directory and then activate the config file | 96 | \fname{/.rockbox/themes} directory and then activate the config file |
97 | from the menu as normal | 97 | from the menu as normal |
98 | (\setting{Settings} $\rightarrow$ \setting{Theme Settings}% | 98 | (\setting{Settings} $\rightarrow$ \setting{Theme Settings}% |
99 | $\rightarrow$ \setting{Browse Themes}). | 99 | $\rightarrow$ \setting{Browse Theme Files}). |
100 | 100 | ||
101 | \subsubsection{Editing} | 101 | \subsubsection{Editing} |
102 | The built-in \setting{Text Editor} (see \reference{sec:text_editor}) | 102 | The built-in \setting{Text Editor} (see \reference{sec:text_editor}) |
@@ -142,7 +142,7 @@ file find the instructions on the Rockbox website: | |||
142 | displaying Track name, Artist, Album etc. in the default font as a purely | 142 | displaying Track name, Artist, Album etc. in the default font as a purely |
143 | text based layout. There are a number of WPS files included in Rockbox, and | 143 | text based layout. There are a number of WPS files included in Rockbox, and |
144 | you can load one of these at any time by selecting it in | 144 | you can load one of these at any time by selecting it in |
145 | \setting{Settings $\rightarrow$ Theme Settings $\rightarrow$ Browse .wps files}. | 145 | \setting{Settings $\rightarrow$ Theme Settings $\rightarrow$ While Playing Screen}. |
146 | \opt{HAVE_REMOTE_LCD}{There is a related option to browse \fname{.rwps} | 146 | \opt{HAVE_REMOTE_LCD}{There is a related option to browse \fname{.rwps} |
147 | files for \daps{} with LCD remote controls installed. This will load a | 147 | files for \daps{} with LCD remote controls installed. This will load a |
148 | similar WPS screen for the remote.} | 148 | similar WPS screen for the remote.} |
diff --git a/manual/configure_rockbox/theme_settings.tex b/manual/configure_rockbox/theme_settings.tex index 0273fe02ea..ffd437f418 100644 --- a/manual/configure_rockbox/theme_settings.tex +++ b/manual/configure_rockbox/theme_settings.tex | |||
@@ -3,7 +3,7 @@ The \setting{Theme Settings} menu offers options that you can change to | |||
3 | customize the visual apperance of Rockbox. | 3 | customize the visual apperance of Rockbox. |
4 | 4 | ||
5 | \begin{description} | 5 | \begin{description} |
6 | \item[Browse Themes.] | 6 | \item[Browse Theme Files.] |
7 | This option will display all the currently installed themes on the \dap{}, | 7 | This option will display all the currently installed themes on the \dap{}, |
8 | press \ActionTreeEnter{} to load the chosen theme and apply it. | 8 | press \ActionTreeEnter{} to load the chosen theme and apply it. |
9 | 9 | ||
@@ -31,12 +31,12 @@ customize the visual apperance of Rockbox. | |||
31 | \reference{ref:CreateYourOwnWPS} for more details.} | 31 | \reference{ref:CreateYourOwnWPS} for more details.} |
32 | 32 | ||
33 | \opt{lcd_bitmap}{ | 33 | \opt{lcd_bitmap}{ |
34 | \item[Browse Fonts.] | 34 | \item[Font.] |
35 | Browse the installed fonts on your \dap{}. Selecting one will activate it. | 35 | Browse the installed fonts on your \dap{}. Selecting one will activate it. |
36 | See \reference{ref:Loadingfonts} for further details about fonts. | 36 | See \reference{ref:Loadingfonts} for further details about fonts. |
37 | } % \nopt{player} | 37 | } % \nopt{player} |
38 | 38 | ||
39 | \item[Browse WPS files.] | 39 | \item[While Playing Screen.] |
40 | Opens the \setting{File Browser} in the \fname{/.rockbox/wps} directory and | 40 | Opens the \setting{File Browser} in the \fname{/.rockbox/wps} directory and |
41 | displays all \fname{.wps} files. Selecting one will activate it, stop will | 41 | displays all \fname{.wps} files. Selecting one will activate it, stop will |
42 | exit back to the menu. For further information about the WPS see | 42 | exit back to the menu. For further information about the WPS see |
@@ -44,7 +44,7 @@ customize the visual apperance of Rockbox. | |||
44 | \reference{ref:ConfiguringtheWPS}. | 44 | \reference{ref:ConfiguringtheWPS}. |
45 | 45 | ||
46 | \opt{HAVE_REMOTE_LCD}{ | 46 | \opt{HAVE_REMOTE_LCD}{ |
47 | \item[Browse RWPS files.] | 47 | \item[Remote While Playing Screen.] |
48 | Opens the \setting{File Browser} in the \fname{/.rockbox/wps} directory and | 48 | Opens the \setting{File Browser} in the \fname{/.rockbox/wps} directory and |
49 | displays all \fname{.rwps} files. Selecting one will activate it, stop will | 49 | displays all \fname{.rwps} files. Selecting one will activate it, stop will |
50 | exit back to the menu. | 50 | exit back to the menu. |