diff options
author | Thomas Martitz <kugel@rockbox.org> | 2010-02-20 19:06:39 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2010-02-20 19:06:39 +0000 |
commit | c19e53654b857227e2be224d451037d432529299 (patch) | |
tree | 18437a610ce91fe55bcca601cc0dbd21887bd839 /apps/gui/wps.c | |
parent | abb3dd4ec2876fa84c1cbf18825ece1c33fc6500 (diff) | |
download | rockbox-c19e53654b857227e2be224d451037d432529299.tar.gz rockbox-c19e53654b857227e2be224d451037d432529299.zip |
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
Diffstat (limited to 'apps/gui/wps.c')
-rw-r--r-- | apps/gui/wps.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/gui/wps.c b/apps/gui/wps.c index fb703062cd..6afed43213 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c | |||
@@ -859,11 +859,14 @@ long gui_wps_show(void) | |||
859 | case ACTION_WPS_CONTEXT: | 859 | case ACTION_WPS_CONTEXT: |
860 | { | 860 | { |
861 | gwps_leave_wps(); | 861 | gwps_leave_wps(); |
862 | int retval = onplay(wps_state.id3->path, | ||
863 | FILE_ATTR_AUDIO, CONTEXT_WPS); | ||
862 | /* if music is stopped in the context menu we want to exit the wps */ | 864 | /* if music is stopped in the context menu we want to exit the wps */ |
863 | if (onplay(wps_state.id3->path, | 865 | if (retval == ONPLAY_MAINMENU |
864 | FILE_ATTR_AUDIO, CONTEXT_WPS) == ONPLAY_MAINMENU | ||
865 | || !audio_status()) | 866 | || !audio_status()) |
866 | return GO_TO_ROOT; | 867 | return GO_TO_ROOT; |
868 | else if (retval == ONPLAY_PLAYLIST) | ||
869 | return GO_TO_PLAYLIST_VIEWER; | ||
867 | restore = true; | 870 | restore = true; |
868 | } | 871 | } |
869 | break; | 872 | break; |
@@ -1150,9 +1153,7 @@ long gui_wps_show(void) | |||
1150 | break; | 1153 | break; |
1151 | case ACTION_WPS_VIEW_PLAYLIST: | 1154 | case ACTION_WPS_VIEW_PLAYLIST: |
1152 | gwps_leave_wps(); | 1155 | gwps_leave_wps(); |
1153 | if (playlist_viewer()) /* true if USB connected */ | 1156 | return GO_TO_PLAYLIST_VIEWER; |
1154 | return GO_TO_ROOT; | ||
1155 | restore = true; | ||
1156 | break; | 1157 | break; |
1157 | default: | 1158 | default: |
1158 | if(default_event_handler(button) == SYS_USB_CONNECTED) | 1159 | if(default_event_handler(button) == SYS_USB_CONNECTED) |