mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-05-12 11:43:16 -04:00
Eliminate default browser setting (e881655)
Keeps track of most recently used browser across reboots instead. Change-Id: I0de2c3acc69f827aac68e7dfcfc4af1a4f8c66de
This commit is contained in:
parent
719f0f1a3b
commit
c765addd24
7 changed files with 10 additions and 61 deletions
|
|
@ -16067,16 +16067,16 @@
|
|||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_DEFAULT_BROWSER
|
||||
desc: in Settings
|
||||
desc: deprecated
|
||||
user: core
|
||||
<source>
|
||||
*: "Default Browser"
|
||||
*: ""
|
||||
</source>
|
||||
<dest>
|
||||
*: "Default Browser"
|
||||
*: ""
|
||||
</dest>
|
||||
<voice>
|
||||
*: "Default Browser"
|
||||
*: ""
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
|
|
|
|||
|
|
@ -737,15 +737,12 @@ MENUITEM_FUNCTION(wps_set_context_plugin, 0,
|
|||
/***********************************/
|
||||
/* WPS Settings MENU */
|
||||
|
||||
MENUITEM_SETTING(browser_default,
|
||||
&global_settings.browser_default, NULL);
|
||||
|
||||
#ifdef HAVE_HOTKEY
|
||||
MENUITEM_SETTING(hotkey_wps_item, &global_settings.hotkey_wps, NULL);
|
||||
#endif
|
||||
|
||||
MAKE_MENU(wps_settings, ID2P(LANG_WPS), 0, Icon_Playback_menu
|
||||
,&browser_default
|
||||
#ifdef HAVE_HOTKEY
|
||||
,&hotkey_wps_item
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -931,25 +931,10 @@ static int root_menu_setup_screens(void)
|
|||
return new_screen;
|
||||
}
|
||||
|
||||
static int browser_default(void)
|
||||
{
|
||||
switch (global_settings.browser_default)
|
||||
{
|
||||
#ifdef HAVE_TAGCACHE
|
||||
case BROWSER_DEFAULT_DB:
|
||||
return GO_TO_DBBROWSER;
|
||||
#endif
|
||||
case BROWSER_DEFAULT_PL_CAT:
|
||||
return GO_TO_PLAYLISTS_SCREEN;
|
||||
case BROWSER_DEFAULT_FILES:
|
||||
default:
|
||||
return GO_TO_FILEBROWSER;
|
||||
}
|
||||
}
|
||||
|
||||
void root_menu(void)
|
||||
{
|
||||
int previous_browser = browser_default();
|
||||
int previous_browser = global_status.last_browser;
|
||||
int selected = 0;
|
||||
int shortcut_origin = GO_TO_ROOT;
|
||||
|
||||
|
|
@ -983,7 +968,7 @@ void root_menu(void)
|
|||
#endif
|
||||
case GO_TO_FILEBROWSER:
|
||||
case GO_TO_PLAYLISTS_SCREEN:
|
||||
previous_browser = next_screen;
|
||||
global_status.last_browser = previous_browser = next_screen;
|
||||
goto load_next_screen;
|
||||
break;
|
||||
#if CONFIG_TUNER
|
||||
|
|
@ -1078,8 +1063,8 @@ void root_menu(void)
|
|||
last_screen = GO_TO_PLUGIN;
|
||||
}
|
||||
}
|
||||
previous_browser = (next_screen != GO_TO_WPS) ? browser_default() :
|
||||
GO_TO_PLUGIN;
|
||||
previous_browser = (next_screen == GO_TO_WPS) ?
|
||||
GO_TO_PLUGIN : global_status.last_browser;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -135,15 +135,6 @@ enum
|
|||
QUEUE_SHOW_IN_SUBMENU
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
BROWSER_DEFAULT_FILES = 0,
|
||||
#ifdef HAVE_TAGCACHE
|
||||
BROWSER_DEFAULT_DB,
|
||||
#endif
|
||||
BROWSER_DEFAULT_PL_CAT
|
||||
};
|
||||
|
||||
#ifdef HAVE_ALBUMART
|
||||
enum
|
||||
{
|
||||
|
|
@ -360,6 +351,7 @@ struct system_status
|
|||
relative to MIN_FREQ */
|
||||
#endif
|
||||
int last_screen;
|
||||
int last_browser;
|
||||
int viewer_icon_count;
|
||||
int last_volume_change; /* tick the last volume change happened. skins use this */
|
||||
int font_id[NB_SCREENS]; /* font id of the settings font for each screen */
|
||||
|
|
@ -648,8 +640,6 @@ struct user_settings
|
|||
unsigned char colors_file[MAX_FILENAME+1];
|
||||
#endif
|
||||
|
||||
int browser_default; /* Default browser when accessed from WPS */
|
||||
|
||||
/* playlist/playback settings */
|
||||
int repeat_mode; /* 0=off 1=repeat all 2=repeat one 3=shuffle 4=ab */
|
||||
int next_folder; /* move to next folder */
|
||||
|
|
|
|||
|
|
@ -960,6 +960,7 @@ const struct settings_list settings[] = {
|
|||
SYSTEM_STATUS(0, runtime, 0, "CRT"),
|
||||
SYSTEM_STATUS(0, topruntime, 0, "TRT"),
|
||||
SYSTEM_STATUS(0, last_screen, -1, "PVS"),
|
||||
SYSTEM_STATUS(0, last_browser, 0, "BRS"),
|
||||
/* sound settings */
|
||||
CUSTOM_SETTING(F_NO_WRAP, volume_limit, LANG_VOLUME_LIMIT,
|
||||
NULL, "volume limit",
|
||||
|
|
@ -1989,25 +1990,6 @@ const struct settings_list settings[] = {
|
|||
ID2P(LANG_SET_BOOL_YES),
|
||||
ID2P(LANG_IN_SUBMENU)),
|
||||
|
||||
CHOICE_SETTING(0, browser_default, LANG_DEFAULT_BROWSER, 0,
|
||||
"default browser",
|
||||
#ifdef HAVE_TAGCACHE
|
||||
"files,database,playlists",
|
||||
#else
|
||||
"files,playlists",
|
||||
#endif
|
||||
NULL,
|
||||
#ifdef HAVE_TAGCACHE
|
||||
3
|
||||
#else
|
||||
2
|
||||
#endif
|
||||
,ID2P(LANG_DIR_BROWSER),
|
||||
#ifdef HAVE_TAGCACHE
|
||||
ID2P(LANG_TAGCACHE),
|
||||
#endif
|
||||
ID2P(LANG_PLAYLISTS)),
|
||||
|
||||
#ifdef HAVE_BACKLIGHT
|
||||
CHOICE_SETTING(0, backlight_on_button_hold,
|
||||
LANG_BACKLIGHT_ON_BUTTON_HOLD,
|
||||
|
|
|
|||
|
|
@ -252,7 +252,6 @@
|
|||
tagcache\_ram & on, off & N/A\\
|
||||
database path & path to a directory & N/A\\
|
||||
database scan paths & one or more paths, each separated by a colon & N/A\\
|
||||
default browser & files, database, playlists & N/A\\
|
||||
|
||||
\opt{touchpad}{
|
||||
\opt{GIGABEAT_PAD}{
|
||||
|
|
|
|||
|
|
@ -2,10 +2,6 @@
|
|||
\section{\label{ref:WPSSettings}What's Playing Screen}
|
||||
|
||||
\begin{description}
|
||||
\item[Default Browser.]
|
||||
Decide if you want the \setting{File Browser}, \setting{Database}, or
|
||||
\setting{Playlists} to launch after pressing \ActionWpsBrowse{}
|
||||
on the WPS, when no other browser has recently been used.
|
||||
\opt{hotkey}{
|
||||
\item[WPS Hotkey.] Sets the hotkey function for
|
||||
the WPS (see \reference{ref:Hotkeys}). The
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue