From c19e53654b857227e2be224d451037d432529299 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Sat, 20 Feb 2010 19:06:39 +0000 Subject: Playlist Viewer Changes to bring consistency: - combine its two context menus to one and - make the ACTION_STD_MENU go to the main menu as it does in all other screens - call playlist_viewer() via root_menu to reduce call depth and to be consistent with other screens (and for the above changes to be more flexible w.r.t to the following screen) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24791 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/wps.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'apps/gui') diff --git a/apps/gui/wps.c b/apps/gui/wps.c index fb70306..6afed43 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c @@ -859,11 +859,14 @@ long gui_wps_show(void) case ACTION_WPS_CONTEXT: { gwps_leave_wps(); + int retval = onplay(wps_state.id3->path, + FILE_ATTR_AUDIO, CONTEXT_WPS); /* if music is stopped in the context menu we want to exit the wps */ - if (onplay(wps_state.id3->path, - FILE_ATTR_AUDIO, CONTEXT_WPS) == ONPLAY_MAINMENU + if (retval == ONPLAY_MAINMENU || !audio_status()) return GO_TO_ROOT; + else if (retval == ONPLAY_PLAYLIST) + return GO_TO_PLAYLIST_VIEWER; restore = true; } break; @@ -1150,9 +1153,7 @@ long gui_wps_show(void) break; case ACTION_WPS_VIEW_PLAYLIST: gwps_leave_wps(); - if (playlist_viewer()) /* true if USB connected */ - return GO_TO_ROOT; - restore = true; + return GO_TO_PLAYLIST_VIEWER; break; default: if(default_event_handler(button) == SYS_USB_CONNECTED) -- cgit v1.1