diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/menu.c | 1 | ||||
-rw-r--r-- | apps/root_menu.c | 12 | ||||
-rw-r--r-- | apps/shortcuts.c | 4 |
3 files changed, 16 insertions, 1 deletions
diff --git a/apps/menu.c b/apps/menu.c index 30a098f331..a7d52896a6 100644 --- a/apps/menu.c +++ b/apps/menu.c | |||
@@ -431,6 +431,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected, | |||
431 | { | 431 | { |
432 | global_status.last_screen = GO_TO_SHORTCUTMENU; | 432 | global_status.last_screen = GO_TO_SHORTCUTMENU; |
433 | ret = quick_screen_quick(action); | 433 | ret = quick_screen_quick(action); |
434 | done = true; | ||
434 | } | 435 | } |
435 | else | 436 | else |
436 | quick_screen_quick(action); | 437 | quick_screen_quick(action); |
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 | } |
diff --git a/apps/shortcuts.c b/apps/shortcuts.c index 70f140d42e..5322447b46 100644 --- a/apps/shortcuts.c +++ b/apps/shortcuts.c | |||
@@ -425,6 +425,8 @@ static int shortcut_menu_get_action(int action, struct gui_synclist *lists) | |||
425 | (void)lists; | 425 | (void)lists; |
426 | if (action == ACTION_STD_OK) | 426 | if (action == ACTION_STD_OK) |
427 | return ACTION_STD_CANCEL; | 427 | return ACTION_STD_CANCEL; |
428 | else if (action == ACTION_STD_QUICKSCREEN && action != ACTION_STD_CONTEXT) | ||
429 | return ACTION_STD_CANCEL; | ||
428 | else if (action == ACTION_STD_CONTEXT) | 430 | else if (action == ACTION_STD_CONTEXT) |
429 | { | 431 | { |
430 | int selection = gui_synclist_get_sel_pos(lists); | 432 | int selection = gui_synclist_get_sel_pos(lists); |
@@ -459,7 +461,7 @@ static enum themable_icons shortcut_menu_get_icon(int selected_item, void * data | |||
459 | case SHORTCUT_FILE: | 461 | case SHORTCUT_FILE: |
460 | return filetype_get_icon(filetype_get_attr(sc->u.path)); | 462 | return filetype_get_icon(filetype_get_attr(sc->u.path)); |
461 | case SHORTCUT_BROWSER: | 463 | case SHORTCUT_BROWSER: |
462 | return Icon_Folder; | 464 | return Icon_Plugin; |
463 | case SHORTCUT_SETTING: | 465 | case SHORTCUT_SETTING: |
464 | return Icon_Menu_setting; | 466 | return Icon_Menu_setting; |
465 | case SHORTCUT_DEBUGITEM: | 467 | case SHORTCUT_DEBUGITEM: |