diff options
author | Christian Soffke <christian.soffke@gmail.com> | 2022-11-22 21:03:19 +0100 |
---|---|---|
committer | Christian Soffke <christian.soffke@gmail.com> | 2024-04-24 05:05:42 +0200 |
commit | e8816552f6adc2bb458860759bd15a31b7d9d0d1 (patch) | |
tree | 4363ddcb7b31c084cf0ea090501fa8d7d06741a4 | |
parent | 3ce3b102ddd5b663759ed61bd689b7bbda2ceecd (diff) | |
download | rockbox-e8816552f6.tar.gz rockbox-e8816552f6.zip |
Offer choice of default browsers
The database or playlist catalogue can now be set
as the browser that is launched when pressing
ACTION_WPS_BROWSE on the WPS, unless another browser
has more recently been opened.
Previously you'd always have to exit the File Browser
first, after the player had been restarted, which is
annoying for users who prefer the database.
The playlist catalogue has become part of the MRU
browser list, so pressing ACTION_WPS_BROWSE after
selecting a track from a playlist in the playlist
catalogue will now take you back there.
Settings menus have been slightly restructured.
- Eliminated "Set WPS Context Plugin" and "Hotkey" menus
from the General menu
- Added "What's Playing Screen" menu in Settings-General
with option for setting default browser. The "WPS Hotkey"
and "WPS Context Plugin" menu options have been moved to
this menu.
- "File Browser Hotkey" is now part of the File View menu,
which means it is accessible from the browser's context
menu as well.
Overview of resulting menu structure in Settings->General:
What's Playing Screen
Default Browser
WPS Hotkey
Set WPS Context Plugin
File View
(...)
File Browser Hotkey
Change-Id: Iaa3619a791c20ce3562a1efd2cf90c72933b729a
-rw-r--r-- | apps/lang/english.lang | 28 | ||||
-rw-r--r-- | apps/menus/settings_menu.c | 33 | ||||
-rw-r--r-- | apps/root_menu.c | 26 | ||||
-rw-r--r-- | apps/settings.h | 11 | ||||
-rw-r--r-- | apps/settings_list.c | 19 | ||||
-rw-r--r-- | manual/appendix/config_file_options.tex | 1 | ||||
-rw-r--r-- | manual/configure_rockbox/file_view.tex | 9 | ||||
-rw-r--r-- | manual/configure_rockbox/hotkey_settings.tex | 15 | ||||
-rw-r--r-- | manual/configure_rockbox/main.tex | 3 | ||||
-rw-r--r-- | manual/configure_rockbox/wps.tex | 16 | ||||
-rw-r--r-- | manual/configure_rockbox/wps_context_plugin.tex | 6 | ||||
-rw-r--r-- | manual/rockbox_interface/hotkeys.tex | 7 | ||||
-rw-r--r-- | manual/rockbox_interface/wps.tex | 2 |
13 files changed, 134 insertions, 42 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang index b326d5fec0..b060c8230e 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang @@ -16683,3 +16683,31 @@ *: "Quick (Ignore Directory Cache)" </voice> </phrase> +<phrase> + id: LANG_WPS + desc: in Settings + user: core + <source> + *: "What's Playing Screen" + </source> + <dest> + *: "What's Playing Screen" + </dest> + <voice> + *: "What's Playing Screen" + </voice> +</phrase> +<phrase> + id: LANG_DEFAULT_BROWSER + desc: in Settings + user: core + <source> + *: "Default Browser" + </source> + <dest> + *: "Default Browser" + </dest> + <voice> + *: "Default Browser" + </voice> +</phrase> diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c index a71245cf80..191079deb8 100644 --- a/apps/menus/settings_menu.c +++ b/apps/menus/settings_menu.c @@ -191,6 +191,9 @@ MENUITEM_SETTING(dirfilter, &global_settings.dirfilter, NULL); MENUITEM_SETTING(show_filename_ext, &global_settings.show_filename_ext, NULL); MENUITEM_SETTING(browse_current, &global_settings.browse_current, NULL); MENUITEM_SETTING(show_path_in_browser, &global_settings.show_path_in_browser, NULL); +#ifdef HAVE_HOTKEY +MENUITEM_SETTING(hotkey_tree_item, &global_settings.hotkey_tree, NULL); +#endif static int clear_start_directory(void) { path_append(global_settings.start_directory, PATH_ROOTSTR, @@ -229,6 +232,9 @@ MAKE_MENU(file_menu, ID2P(LANG_FILE), filemenu_callback, Icon_file_view_menu, &dirfilter, &show_filename_ext, &browse_current, &show_path_in_browser, &clear_start_directory_item +#ifdef HAVE_HOTKEY + ,&hotkey_tree_item +#endif ); static int filemenu_callback(int action, const struct menu_item_ex *this_item, @@ -776,14 +782,24 @@ MENUITEM_FUNCTION(wps_set_context_plugin, 0, /***********************************/ /***********************************/ -/* HOTKEY MENU */ +/* 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); -MENUITEM_SETTING(hotkey_tree_item, &global_settings.hotkey_tree, NULL); -MAKE_MENU(hotkey_menu, ID2P(LANG_HOTKEY), 0, Icon_NOICON, - &hotkey_wps_item, &hotkey_tree_item); -#endif /*have_hotkey */ -/* HOTKEY MENU */ +#endif + +MAKE_MENU(wps_settings, ID2P(LANG_WPS), 0, Icon_Playback_menu + ,&browser_default +#ifdef HAVE_HOTKEY + ,&hotkey_wps_item +#endif + ,&wps_set_context_plugin + ); + +/* WPS Settings MENU */ /***********************************/ @@ -797,6 +813,7 @@ MENUITEM_FUNCTION_W_PARAM(browse_langs, 0, ID2P(LANG_LANGUAGE), MAKE_MENU(settings_menu_item, ID2P(LANG_GENERAL_SETTINGS), 0, Icon_General_settings_menu, + &wps_settings, &playlist_settings, &file_menu, #ifdef HAVE_TAGCACHE &tagcache_menu, @@ -808,10 +825,6 @@ MAKE_MENU(settings_menu_item, ID2P(LANG_GENERAL_SETTINGS), 0, &autoresume_menu, #endif &browse_langs, &voice_settings_menu, - &wps_set_context_plugin, -#ifdef HAVE_HOTKEY - &hotkey_menu, -#endif ); /* SETTINGS MENU */ /***********************************/ diff --git a/apps/root_menu.c b/apps/root_menu.c index e606d5cd68..7c75b12586 100644 --- a/apps/root_menu.c +++ b/apps/root_menu.c @@ -900,9 +900,25 @@ 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 = GO_TO_FILEBROWSER; + int previous_browser = browser_default(); int selected = 0; int shortcut_origin = GO_TO_ROOT; @@ -932,12 +948,13 @@ void root_menu(void) last_screen = GO_TO_ROOT; break; #ifdef HAVE_TAGCACHE - case GO_TO_FILEBROWSER: case GO_TO_DBBROWSER: +#endif + case GO_TO_FILEBROWSER: + case GO_TO_PLAYLISTS_SCREEN: previous_browser = next_screen; goto load_next_screen; break; -#endif /* With !HAVE_TAGCACHE previous_browser is always GO_TO_FILEBROWSER */ #if CONFIG_TUNER case GO_TO_WPS: case GO_TO_FM: @@ -1030,7 +1047,8 @@ void root_menu(void) last_screen = GO_TO_PLUGIN; } } - previous_browser = (next_screen != GO_TO_WPS) ? GO_TO_FILEBROWSER : GO_TO_PLUGIN; + previous_browser = (next_screen != GO_TO_WPS) ? browser_default() : + GO_TO_PLUGIN; break; } default: diff --git a/apps/settings.h b/apps/settings.h index ce29e020f7..2277805fec 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -127,6 +127,15 @@ 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 { @@ -608,6 +617,8 @@ 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 */ diff --git a/apps/settings_list.c b/apps/settings_list.c index 7bdb3522c0..dc33c27c95 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c @@ -1852,6 +1852,25 @@ 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_CATALOG)), + #ifdef HAVE_BACKLIGHT CHOICE_SETTING(0, backlight_on_button_hold, LANG_BACKLIGHT_ON_BUTTON_HOLD, diff --git a/manual/appendix/config_file_options.tex b/manual/appendix/config_file_options.tex index 709bc9b2ff..c4318692c4 100644 --- a/manual/appendix/config_file_options.tex +++ b/manual/appendix/config_file_options.tex @@ -251,6 +251,7 @@ dircache & on, off & N/A\\ tagcache\_ram & on, off & N/A\\ database path & path to a directory & N/A\\ + default browser & files, database, playlists & N/A\\ \opt{touchpad}{ \opt{GIGABEAT_PAD}{ diff --git a/manual/configure_rockbox/file_view.tex b/manual/configure_rockbox/file_view.tex index 8b86e71906..112aa4c06f 100644 --- a/manual/configure_rockbox/file_view.tex +++ b/manual/configure_rockbox/file_view.tex @@ -1,5 +1,5 @@ % $Id$ % -\section{File View} +\section{\label{ref:FileView}File View} The File View menu deals with options relating to how the File Browser displays files. % @@ -90,4 +90,11 @@ displays files. \setting{Current Directory Only} or \setting{Full Path}, then the title of each menu will be displayed on the first line in the \setting{Database Browser}. +\opt{hotkey}{ + \nopt{touchscreen}{\item[File Browser Hotkey.] + Sets the hotkey function for the \setting{File Browser}, + \setting{Database} and \setting{Playlist Viewer} (see \reference{ref:Hotkeys}). + The default is \setting{Off}. + } +} \end{description} diff --git a/manual/configure_rockbox/hotkey_settings.tex b/manual/configure_rockbox/hotkey_settings.tex deleted file mode 100644 index de2b3a872a..0000000000 --- a/manual/configure_rockbox/hotkey_settings.tex +++ /dev/null @@ -1,15 +0,0 @@ -% $Id: hotkey_settings.tex 16765 2008-03-23 22:07:09Z nls $ % -\opt{hotkey}{ -\section{\label{ref:HotkeySettings}Hotkey} - - \begin{description} - \item[WPS Hotkey.] \opt{touchscreen}{This options sets the hotkey function for - the WPS (see \reference{ref:Hotkeys}). The - default is \setting{View Playlist}.} - \nopt{touchscreen}{\item[File Browser Hotkey.]} - \end{description} - - \nopt{touchscreen}{These options set the hotkey function for their respective - screens (see \reference{ref:Hotkeys}). The default for the WPS is - \setting{View Playlist}. The File Browser default is \setting{Off}.} -} diff --git a/manual/configure_rockbox/main.tex b/manual/configure_rockbox/main.tex index b0711e5b71..b7d980d918 100644 --- a/manual/configure_rockbox/main.tex +++ b/manual/configure_rockbox/main.tex @@ -9,6 +9,7 @@ \chapter{General Settings} \label{ref:configure_rockbox_general} \input{configure_rockbox/general_settings.tex} + \input{configure_rockbox/wps.tex} \input{configure_rockbox/playlist_options.tex} \input{configure_rockbox/file_view.tex} \input{configure_rockbox/database.tex} @@ -21,8 +22,6 @@ } \input{configure_rockbox/language.tex} \input{configure_rockbox/voice.tex} - \input{configure_rockbox/wps_context_plugin.tex} - \input{configure_rockbox/hotkey_settings.tex} \chapter{Theme Settings} \label{ref:configure_rockbox_themes} diff --git a/manual/configure_rockbox/wps.tex b/manual/configure_rockbox/wps.tex new file mode 100644 index 0000000000..dca27c056b --- /dev/null +++ b/manual/configure_rockbox/wps.tex @@ -0,0 +1,16 @@ + +\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{Playlist Catalogue} 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 + default is \setting{View Playlist}. + } + \item[Set WPS Context Plugin.] + This option will allow you to run a Rockbox plugin from the WPS context menu. + \end{description} diff --git a/manual/configure_rockbox/wps_context_plugin.tex b/manual/configure_rockbox/wps_context_plugin.tex deleted file mode 100644 index 469a0e5ca2..0000000000 --- a/manual/configure_rockbox/wps_context_plugin.tex +++ /dev/null @@ -1,6 +0,0 @@ -\section{\label{ref:SetWPSContextPlugin}Set WPS Context Plugin} - - \begin{description} - \item[Set WPS Context Plugin.] - This option will allow you to run a rockbox plugin from the WPS context menu - \end{description} diff --git a/manual/rockbox_interface/hotkeys.tex b/manual/rockbox_interface/hotkeys.tex index 28c8091a05..8fe07c5cf1 100644 --- a/manual/rockbox_interface/hotkeys.tex +++ b/manual/rockbox_interface/hotkeys.tex @@ -11,10 +11,11 @@ assignment.} If there is no assignment for a given screen, the hotkey is ignored. + The hotkey assignments are changed for the What's Playing Screen (see + \reference{ref:WPSSettings}) and browsers (see \reference{ref:FileView}) + separately. + The default assignment for the \nopt{touchscreen}{File Browser hotkey is \setting{Off}, while the default for the }WPS hotkey is \setting{View Playlist}. - - The hotkey assignments are changed in the Hotkey menu (see - \reference{ref:HotkeySettings}) under \setting{General Settings}. } diff --git a/manual/rockbox_interface/wps.tex b/manual/rockbox_interface/wps.tex index 5f810261fa..c433b76608 100644 --- a/manual/rockbox_interface/wps.tex +++ b/manual/rockbox_interface/wps.tex @@ -61,7 +61,7 @@ your WPS (While Playing Screen). % \ActionWpsBrowse \opt{HAVEREMOTEKEYMAP}{& \ActionRCWpsBrowse} - & Return to the \setting{File Browser} / \setting{Database}.\\ + & Return to the \setting{File Browser} / \setting{Database} / \setting{Playlist Catalogue}.\\ % \ActionWpsContext \opt{HAVEREMOTEKEYMAP}{& \ActionRCWpsContext} |