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
This commit is contained in:
Christian Soffke 2021-04-04 04:37:21 +02:00
parent 4f374b3862
commit 4bc7bafc68
2 changed files with 24 additions and 6 deletions

View file

@ -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)
{

View file

@ -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