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
This commit is contained in:
parent
c99ab564b0
commit
4b831753e7
4 changed files with 72 additions and 19 deletions
|
@ -2649,15 +2649,15 @@
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: none
|
*: none
|
||||||
lcd_bitmap: "Browse Fonts"
|
lcd_bitmap: "Font"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: none
|
*: none
|
||||||
lcd_bitmap: "Browse Fonts"
|
lcd_bitmap: "Font"
|
||||||
</dest>
|
</dest>
|
||||||
<voice>
|
<voice>
|
||||||
*: none
|
*: none
|
||||||
lcd_bitmap: "Browse Fonts"
|
lcd_bitmap: "Font"
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
|
@ -2665,13 +2665,13 @@
|
||||||
desc: in settings_menu()
|
desc: in settings_menu()
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Browse .wps files"
|
*: "While Playing Screen"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Browse .wps files"
|
*: "While Playing Screen"
|
||||||
</dest>
|
</dest>
|
||||||
<voice>
|
<voice>
|
||||||
*: "Browse while-playing-screen files"
|
*: "While playing screen"
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
|
@ -2680,15 +2680,15 @@
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: none
|
*: none
|
||||||
remote: "Browse .rwps files"
|
remote: "Remote While Playing Screen"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: none
|
*: none
|
||||||
remote: "Browse .rwps files"
|
remote: "Remote While Playing Screen"
|
||||||
</dest>
|
</dest>
|
||||||
<voice>
|
<voice>
|
||||||
*: none
|
*: none
|
||||||
remote: "Browse remote while-playing-screen files"
|
remote: "Remote While Playing Screen"
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
|
@ -5187,13 +5187,13 @@
|
||||||
desc: in the main menu
|
desc: in the main menu
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Browse Themes"
|
*: "Browse Theme Files"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Browse Themes"
|
*: "Browse Theme Files"
|
||||||
</dest>
|
</dest>
|
||||||
<voice>
|
<voice>
|
||||||
*: "Browse Themes"
|
*: "Browse Theme Files"
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
|
|
53
apps/tree.c
53
apps/tree.c
|
@ -904,6 +904,7 @@ int rockbox_browse(const char *root, int dirfilter)
|
||||||
if (dirfilter >= NUM_FILTER_MODES)
|
if (dirfilter >= NUM_FILTER_MODES)
|
||||||
{
|
{
|
||||||
static struct tree_context backup;
|
static struct tree_context backup;
|
||||||
|
char current[MAX_PATH];
|
||||||
int last_context;
|
int last_context;
|
||||||
|
|
||||||
backup = tc;
|
backup = tc;
|
||||||
|
@ -913,6 +914,58 @@ int rockbox_browse(const char *root, int dirfilter)
|
||||||
start_wps = false;
|
start_wps = false;
|
||||||
last_context = curr_context;
|
last_context = curr_context;
|
||||||
|
|
||||||
|
/* Center on the currently loaded language when browsing languages. */
|
||||||
|
if (dirfilter == SHOW_LNG)
|
||||||
|
{
|
||||||
|
if (global_settings.lang_file[0])
|
||||||
|
{
|
||||||
|
snprintf(current, sizeof(current), LANG_DIR "/%s.lng",
|
||||||
|
global_settings.lang_file);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
strncpy(current, LANG_DIR "/english.lng", sizeof(current));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* Center on currently loaded WPS */
|
||||||
|
else if (dirfilter == SHOW_WPS)
|
||||||
|
{
|
||||||
|
snprintf(current, sizeof(current), WPS_DIR "/%s.wps",
|
||||||
|
global_settings.wps_file);
|
||||||
|
}
|
||||||
|
#ifdef HAVE_REMOTE_LCD
|
||||||
|
/* Center on currently loaded RWPS */
|
||||||
|
else if (dirfilter == SHOW_RWPS)
|
||||||
|
{
|
||||||
|
snprintf(current, sizeof(current), WPS_DIR "/%s.rwps",
|
||||||
|
global_settings.rwps_file);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
/* Center on the currently loaded font when browsing fonts */
|
||||||
|
else if (dirfilter == SHOW_FONT)
|
||||||
|
{
|
||||||
|
snprintf(current, sizeof(current), FONT_DIR "/%s.fnt",
|
||||||
|
global_settings.font_file);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#if CONFIG_TUNER
|
||||||
|
/* Center on the currently loaded FM preset when browsing those */
|
||||||
|
else if (dirfilter == SHOW_FMR)
|
||||||
|
{
|
||||||
|
snprintf(current, sizeof(current), FMPRESET_PATH "/%s.fmr",
|
||||||
|
global_settings.fmr_file);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* If we've found a file to center on, do it */
|
||||||
|
if (current[0] == '/')
|
||||||
|
{
|
||||||
|
set_current_file(current);
|
||||||
|
/* set_current_file changes dirlevel, change it back */
|
||||||
|
tc.dirlevel = 0;
|
||||||
|
}
|
||||||
|
|
||||||
ret_val = dirbrowse();
|
ret_val = dirbrowse();
|
||||||
tc = backup;
|
tc = backup;
|
||||||
curr_context = last_context;
|
curr_context = last_context;
|
||||||
|
|
|
@ -15,7 +15,7 @@ in the font package at \url{http://www.rockbox.org/daily.shtml}.}
|
||||||
be loaded automatically every time you start up, it must be located in the
|
be loaded automatically every time you start up, it must be located in the
|
||||||
\fname{/.rockbox/fonts} directory and the filename must be at most 24 characters
|
\fname{/.rockbox/fonts} directory and the filename must be at most 24 characters
|
||||||
long. You can browse the fonts in \fname{/.rockbox/fonts} under
|
long. You can browse the fonts in \fname{/.rockbox/fonts} under
|
||||||
\setting{Settings $\rightarrow$ Theme Settings $\rightarrow$ Browse Fonts}
|
\setting{Settings $\rightarrow$ Theme Settings $\rightarrow$ Font}
|
||||||
in the \setting{Main Menu}.
|
in the \setting{Main Menu}.
|
||||||
\note{Advanced Users Only: Any BDF font file up to 16 pixels high should
|
\note{Advanced Users Only: Any BDF font file up to 16 pixels high should
|
||||||
be usable with Rockbox. To convert from \fname{.bdf} to \fname{.fnt}, use
|
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:
|
||||||
\fname{/.rockbox/themes} directory and then activate the config file
|
\fname{/.rockbox/themes} directory and then activate the config file
|
||||||
from the menu as normal
|
from the menu as normal
|
||||||
(\setting{Settings} $\rightarrow$ \setting{Theme Settings}%
|
(\setting{Settings} $\rightarrow$ \setting{Theme Settings}%
|
||||||
$\rightarrow$ \setting{Browse Themes}).
|
$\rightarrow$ \setting{Browse Theme Files}).
|
||||||
|
|
||||||
\subsubsection{Editing}
|
\subsubsection{Editing}
|
||||||
The built-in \setting{Text Editor} (see \reference{sec:text_editor})
|
The built-in \setting{Text Editor} (see \reference{sec:text_editor})
|
||||||
|
@ -142,7 +142,7 @@ file find the instructions on the Rockbox website:
|
||||||
displaying Track name, Artist, Album etc. in the default font as a purely
|
displaying Track name, Artist, Album etc. in the default font as a purely
|
||||||
text based layout. There are a number of WPS files included in Rockbox, and
|
text based layout. There are a number of WPS files included in Rockbox, and
|
||||||
you can load one of these at any time by selecting it in
|
you can load one of these at any time by selecting it in
|
||||||
\setting{Settings $\rightarrow$ Theme Settings $\rightarrow$ Browse .wps files}.
|
\setting{Settings $\rightarrow$ Theme Settings $\rightarrow$ While Playing Screen}.
|
||||||
\opt{HAVE_REMOTE_LCD}{There is a related option to browse \fname{.rwps}
|
\opt{HAVE_REMOTE_LCD}{There is a related option to browse \fname{.rwps}
|
||||||
files for \daps{} with LCD remote controls installed. This will load a
|
files for \daps{} with LCD remote controls installed. This will load a
|
||||||
similar WPS screen for the remote.}
|
similar WPS screen for the remote.}
|
||||||
|
|
|
@ -3,7 +3,7 @@ The \setting{Theme Settings} menu offers options that you can change to
|
||||||
customize the visual apperance of Rockbox.
|
customize the visual apperance of Rockbox.
|
||||||
|
|
||||||
\begin{description}
|
\begin{description}
|
||||||
\item[Browse Themes.]
|
\item[Browse Theme Files.]
|
||||||
This option will display all the currently installed themes on the \dap{},
|
This option will display all the currently installed themes on the \dap{},
|
||||||
press \ActionTreeEnter{} to load the chosen theme and apply it.
|
press \ActionTreeEnter{} to load the chosen theme and apply it.
|
||||||
|
|
||||||
|
@ -31,12 +31,12 @@ customize the visual apperance of Rockbox.
|
||||||
\reference{ref:CreateYourOwnWPS} for more details.}
|
\reference{ref:CreateYourOwnWPS} for more details.}
|
||||||
|
|
||||||
\opt{lcd_bitmap}{
|
\opt{lcd_bitmap}{
|
||||||
\item[Browse Fonts.]
|
\item[Font.]
|
||||||
Browse the installed fonts on your \dap{}. Selecting one will activate it.
|
Browse the installed fonts on your \dap{}. Selecting one will activate it.
|
||||||
See \reference{ref:Loadingfonts} for further details about fonts.
|
See \reference{ref:Loadingfonts} for further details about fonts.
|
||||||
} % \nopt{player}
|
} % \nopt{player}
|
||||||
|
|
||||||
\item[Browse WPS files.]
|
\item[While Playing Screen.]
|
||||||
Opens the \setting{File Browser} in the \fname{/.rockbox/wps} directory and
|
Opens the \setting{File Browser} in the \fname{/.rockbox/wps} directory and
|
||||||
displays all \fname{.wps} files. Selecting one will activate it, stop will
|
displays all \fname{.wps} files. Selecting one will activate it, stop will
|
||||||
exit back to the menu. For further information about the WPS see
|
exit back to the menu. For further information about the WPS see
|
||||||
|
@ -44,7 +44,7 @@ customize the visual apperance of Rockbox.
|
||||||
\reference{ref:ConfiguringtheWPS}.
|
\reference{ref:ConfiguringtheWPS}.
|
||||||
|
|
||||||
\opt{HAVE_REMOTE_LCD}{
|
\opt{HAVE_REMOTE_LCD}{
|
||||||
\item[Browse RWPS files.]
|
\item[Remote While Playing Screen.]
|
||||||
Opens the \setting{File Browser} in the \fname{/.rockbox/wps} directory and
|
Opens the \setting{File Browser} in the \fname{/.rockbox/wps} directory and
|
||||||
displays all \fname{.rwps} files. Selecting one will activate it, stop will
|
displays all \fname{.rwps} files. Selecting one will activate it, stop will
|
||||||
exit back to the menu.
|
exit back to the menu.
|
||||||
|
|
Loading…
Reference in a new issue