From 4bc7bafc681fbc9cf046d39aaaac41726f7a5fcd Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Sun, 4 Apr 2021 04:37:21 +0200 Subject: Enable QuickScreen in filtered dir modes & playlist viewer Will allow the QuickScreen to be accessed in the playlist catalogue and when editing a playlist using the playlist viewer. Change-Id: I4b7108db6384eb2077ffdccb2992f2e51a39f42f --- apps/playlist_viewer.c | 18 ++++++++++++++++++ apps/tree.c | 12 ++++++------ 2 files changed, 24 insertions(+), 6 deletions(-) (limited to 'apps') diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c index 318bdcd915..e0e2e787cd 100644 --- a/apps/playlist_viewer.c +++ b/apps/playlist_viewer.c @@ -853,6 +853,24 @@ enum playlist_viewer_result playlist_viewer_ex(const char* filename) case ACTION_STD_MENU: ret = PLAYLIST_VIEWER_MAINMENU; goto exit; +#ifdef HAVE_QUICKSCREEN + case ACTION_STD_QUICKSCREEN: + if (!global_settings.shortcuts_replaces_qs) + { + quick_screen_quick(button); + update_playlist(true); + gui_synclist_set_voice_callback(&playlist_lists, + global_settings.talk_file? + &playlist_callback_voice:NULL); + gui_synclist_set_icon_callback(&playlist_lists, + global_settings.playlist_viewer_icons? + &playlist_callback_icons:NULL); + gui_synclist_set_title(&playlist_lists, str(LANG_PLAYLIST), Icon_Playlist); + gui_synclist_draw(&playlist_lists); + gui_synclist_speak_item(&playlist_lists); + break; + } +#endif default: if(default_event_handler(button) == SYS_USB_CONNECTED) { diff --git a/apps/tree.c b/apps/tree.c index 44af918804..9e4aafccfe 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -735,18 +735,18 @@ static int dirbrowse(void) break; #ifdef HAVE_QUICKSCREEN case ACTION_STD_QUICKSCREEN: - /* don't enter f2 from plugin browser */ - if (*tc.dirfilter < NUM_FILTER_MODES) + if (global_settings.shortcuts_replaces_qs) { - if (global_settings.shortcuts_replaces_qs) + if (*tc.dirfilter < NUM_FILTER_MODES) { global_status.last_screen = GO_TO_SHORTCUTMENU; return quick_screen_quick(button); } - else if (quick_screen_quick(button)) - reload_dir = true; - restore = true; + break; } + else if (quick_screen_quick(button)) + reload_dir = true; + restore = true; break; #endif -- cgit v1.2.3