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/onplay.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'apps/onplay.c') diff --git a/apps/onplay.c b/apps/onplay.c index da3900ddc8..8bff92f760 100644 --- a/apps/onplay.c +++ b/apps/onplay.c @@ -137,15 +137,13 @@ static bool shuffle_playlist(void) return false; } - static bool save_playlist(void) { save_playlist_screen(NULL); return false; } -MENUITEM_FUNCTION(playlist_viewer_item, 0, ID2P(LANG_VIEW_DYNAMIC_PLAYLIST), - playlist_viewer, NULL, NULL, Icon_Playlist); +extern struct menu_item_ex view_cur_playlist; /* from playlist_menu.c */ MENUITEM_FUNCTION(search_playlist_item, 0, ID2P(LANG_SEARCH_IN_PLAYLIST), search_playlist, NULL, NULL, Icon_Playlist); MENUITEM_FUNCTION(playlist_save_item, 0, ID2P(LANG_SAVE_DYNAMIC_PLAYLIST), @@ -154,7 +152,7 @@ MENUITEM_FUNCTION(reshuffle_item, 0, ID2P(LANG_SHUFFLE_PLAYLIST), shuffle_playlist, NULL, NULL, Icon_Playlist); MAKE_ONPLAYMENU( wps_playlist_menu, ID2P(LANG_PLAYLIST), NULL, Icon_Playlist, - &playlist_viewer_item, &search_playlist_item, + &view_cur_playlist, &search_playlist_item, &playlist_save_item, &reshuffle_item ); @@ -1188,6 +1186,8 @@ int onplay(char* file, int attr, int from) case GO_TO_ROOT: case GO_TO_MAINMENU: return ONPLAY_MAINMENU; + case GO_TO_PLAYLIST_VIEWER: + return ONPLAY_PLAYLIST; default: return onplay_result; } -- cgit v1.2.3