summaryrefslogtreecommitdiff
path: root/apps/root_menu.c
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2022-11-22 21:03:19 +0100
committerChristian Soffke <christian.soffke@gmail.com>2024-04-24 05:05:42 +0200
commite8816552f6adc2bb458860759bd15a31b7d9d0d1 (patch)
tree4363ddcb7b31c084cf0ea090501fa8d7d06741a4 /apps/root_menu.c
parent3ce3b102ddd5b663759ed61bd689b7bbda2ceecd (diff)
downloadrockbox-e8816552f6adc2bb458860759bd15a31b7d9d0d1.tar.gz
rockbox-e8816552f6adc2bb458860759bd15a31b7d9d0d1.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
Diffstat (limited to 'apps/root_menu.c')
-rw-r--r--apps/root_menu.c26
1 files changed, 22 insertions, 4 deletions
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)
900 return new_screen; 900 return new_screen;
901} 901}
902 902
903static int browser_default(void)
904{
905 switch (global_settings.browser_default)
906 {
907#ifdef HAVE_TAGCACHE
908 case BROWSER_DEFAULT_DB:
909 return GO_TO_DBBROWSER;
910#endif
911 case BROWSER_DEFAULT_PL_CAT:
912 return GO_TO_PLAYLISTS_SCREEN;
913 case BROWSER_DEFAULT_FILES:
914 default:
915 return GO_TO_FILEBROWSER;
916 }
917}
918
903void root_menu(void) 919void root_menu(void)
904{ 920{
905 int previous_browser = GO_TO_FILEBROWSER; 921 int previous_browser = browser_default();
906 int selected = 0; 922 int selected = 0;
907 int shortcut_origin = GO_TO_ROOT; 923 int shortcut_origin = GO_TO_ROOT;
908 924
@@ -932,12 +948,13 @@ void root_menu(void)
932 last_screen = GO_TO_ROOT; 948 last_screen = GO_TO_ROOT;
933 break; 949 break;
934#ifdef HAVE_TAGCACHE 950#ifdef HAVE_TAGCACHE
935 case GO_TO_FILEBROWSER:
936 case GO_TO_DBBROWSER: 951 case GO_TO_DBBROWSER:
952#endif
953 case GO_TO_FILEBROWSER:
954 case GO_TO_PLAYLISTS_SCREEN:
937 previous_browser = next_screen; 955 previous_browser = next_screen;
938 goto load_next_screen; 956 goto load_next_screen;
939 break; 957 break;
940#endif /* With !HAVE_TAGCACHE previous_browser is always GO_TO_FILEBROWSER */
941#if CONFIG_TUNER 958#if CONFIG_TUNER
942 case GO_TO_WPS: 959 case GO_TO_WPS:
943 case GO_TO_FM: 960 case GO_TO_FM:
@@ -1030,7 +1047,8 @@ void root_menu(void)
1030 last_screen = GO_TO_PLUGIN; 1047 last_screen = GO_TO_PLUGIN;
1031 } 1048 }
1032 } 1049 }
1033 previous_browser = (next_screen != GO_TO_WPS) ? GO_TO_FILEBROWSER : GO_TO_PLUGIN; 1050 previous_browser = (next_screen != GO_TO_WPS) ? browser_default() :
1051 GO_TO_PLUGIN;
1034 break; 1052 break;
1035 } 1053 }
1036 default: 1054 default: