diff options
author | William Wilgus <wilgus.william@gmail.com> | 2021-03-08 21:59:04 -0500 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2021-03-08 22:17:41 -0500 |
commit | 13178d23b82ffde13fdbf8e36cfa0358f22e8dc3 (patch) | |
tree | 624d16646b0c4b19d23aa338fae4c19552de3209 /apps/root_menu.c | |
parent | c9e8d96e77c9ad3e0ff2df3b1afbac77c33fde85 (diff) | |
download | rockbox-13178d23b82ffde13fdbf8e36cfa0358f22e8dc3.tar.gz rockbox-13178d23b82ffde13fdbf8e36cfa0358f22e8dc3.zip |
Shortcuts Menu Update
Change Browser shortcut to the plugin icon
drop back into WPS on opx return
allow same action to exit shortcut menu as entered -- might be problematic
Change-Id: Id7013a514c8e8862ee1da44b033d10b7519e9127
Diffstat (limited to 'apps/root_menu.c')
-rw-r--r-- | apps/root_menu.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/root_menu.c b/apps/root_menu.c index fb7b5218e2..8df9f87d44 100644 --- a/apps/root_menu.c +++ b/apps/root_menu.c | |||
@@ -738,6 +738,7 @@ void root_menu(void) | |||
738 | { | 738 | { |
739 | int previous_browser = GO_TO_FILEBROWSER; | 739 | int previous_browser = GO_TO_FILEBROWSER; |
740 | int selected = 0; | 740 | int selected = 0; |
741 | int shortcut_origin = GO_TO_ROOT; | ||
741 | 742 | ||
742 | push_current_activity(ACTIVITY_MAINMENU); | 743 | push_current_activity(ACTIVITY_MAINMENU); |
743 | 744 | ||
@@ -824,10 +825,12 @@ void root_menu(void) | |||
824 | char *key; | 825 | char *key; |
825 | if (global_status.last_screen == GO_TO_SHORTCUTMENU) | 826 | if (global_status.last_screen == GO_TO_SHORTCUTMENU) |
826 | { | 827 | { |
828 | shortcut_origin = last_screen; | ||
827 | global_status.last_screen = last_screen; | 829 | global_status.last_screen = last_screen; |
828 | key = ID2P(LANG_SHORTCUTS); | 830 | key = ID2P(LANG_SHORTCUTS); |
829 | } | 831 | } |
830 | else | 832 | else |
833 | { | ||
831 | switch (last_screen) | 834 | switch (last_screen) |
832 | { | 835 | { |
833 | case GO_TO_ROOT: | 836 | case GO_TO_ROOT: |
@@ -843,6 +846,7 @@ void root_menu(void) | |||
843 | key = ID2P(LANG_OPEN_PLUGIN); | 846 | key = ID2P(LANG_OPEN_PLUGIN); |
844 | break; | 847 | break; |
845 | } | 848 | } |
849 | } | ||
846 | 850 | ||
847 | open_plugin_get_entry(key, &open_plugin_entry); | 851 | open_plugin_get_entry(key, &open_plugin_entry); |
848 | char *path = open_plugin_entry.path; | 852 | char *path = open_plugin_entry.path; |
@@ -852,6 +856,14 @@ void root_menu(void) | |||
852 | 856 | ||
853 | next_screen = load_plugin_screen(path, param); | 857 | next_screen = load_plugin_screen(path, param); |
854 | 858 | ||
859 | /* shortcuts may take several trips through the GO_TO_PLUGIN case | ||
860 | make sure we preserve and restore the origin */ | ||
861 | if (next_screen == GO_TO_PREVIOUS && shortcut_origin != GO_TO_ROOT) | ||
862 | { | ||
863 | next_screen = shortcut_origin; | ||
864 | shortcut_origin = GO_TO_ROOT; | ||
865 | } | ||
866 | |||
855 | previous_browser = (next_screen != GO_TO_WPS) ? GO_TO_FILEBROWSER : GO_TO_PLUGIN; | 867 | previous_browser = (next_screen != GO_TO_WPS) ? GO_TO_FILEBROWSER : GO_TO_PLUGIN; |
856 | break; | 868 | break; |
857 | } | 869 | } |