From 193ebb5a36374acbe379fe573317f9b668e65e4f Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Tue, 26 Oct 2021 03:05:50 +0200 Subject: Enable access to Shortcuts Menu from QuickScreen Offers a quick way of switching to the Shortcuts Menu by pressing the 'context menu' button while QuickScreen is active (e.g. long press Select on iPods and some other players) Change-Id: I38292c7070cf093a81e1db688809b1f0d6a8764a --- apps/gui/wps.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'apps/gui/wps.c') diff --git a/apps/gui/wps.c b/apps/gui/wps.c index 2587542b00..5b973a2199 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c @@ -53,6 +53,7 @@ #include "root_menu.h" #include "backdrop.h" #include "quickscreen.h" +#include "shortcuts.h" #include "pitchscreen.h" #include "appevents.h" #include "viewport.h" @@ -839,15 +840,24 @@ long gui_wps_show(void) case ACTION_WPS_QUICKSCREEN: { gwps_leave_wps(); - if (global_settings.shortcuts_replaces_qs) + bool enter_shortcuts_menu = global_settings.shortcuts_replaces_qs; + if (!enter_shortcuts_menu) { - global_status.last_screen = GO_TO_SHORTCUTMENU; int ret = quick_screen_quick(button); + if (ret == QUICKSCREEN_IN_USB) + return GO_TO_ROOT; + else if (ret == QUICKSCREEN_GOTO_SHORTCUTS_MENU) + enter_shortcuts_menu = true; + else + restore = true; + } + + if (enter_shortcuts_menu) + { + global_status.last_screen = GO_TO_SHORTCUTMENU; + int ret = do_shortcut_menu(NULL); return (ret == GO_TO_PREVIOUS ? GO_TO_WPS : ret); } - else if (quick_screen_quick(button) > 0) - return GO_TO_ROOT; - restore = true; } break; #endif /* HAVE_QUICKSCREEN */ -- cgit v1.2.3