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/menus/playlist_menu.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'apps/menus') diff --git a/apps/menus/playlist_menu.c b/apps/menus/playlist_menu.c index 87a61a9b83..aa4a0604ba 100644 --- a/apps/menus/playlist_menu.c +++ b/apps/menus/playlist_menu.c @@ -60,10 +60,16 @@ int save_playlist_screen(struct playlist_info* playlist) return 0; } + +static int playlist_view_(void) +{ + return GO_TO_PLAYLIST_VIEWER; +} + MENUITEM_FUNCTION(create_playlist_item, 0, ID2P(LANG_CREATE_PLAYLIST), (int(*)(void))create_playlist, NULL, NULL, Icon_NOICON); -MENUITEM_FUNCTION(view_playlist, 0, ID2P(LANG_VIEW_DYNAMIC_PLAYLIST), - (int(*)(void))playlist_viewer, NULL, NULL, Icon_NOICON); +MENUITEM_FUNCTION(view_cur_playlist, MENU_FUNC_CHECK_RETVAL, ID2P(LANG_VIEW_DYNAMIC_PLAYLIST), + (int(*)(void))playlist_view_, NULL, NULL, Icon_NOICON); MENUITEM_FUNCTION(save_playlist, MENU_FUNC_USEPARAM, ID2P(LANG_SAVE_DYNAMIC_PLAYLIST), (int(*)(void*))save_playlist_screen, NULL, NULL, Icon_NOICON); @@ -78,5 +84,5 @@ MAKE_MENU(playlist_settings, ID2P(LANG_PLAYLISTS), NULL, &recursive_dir_insert, &warn_on_erase); MAKE_MENU(playlist_options, ID2P(LANG_PLAYLISTS), NULL, Icon_Playlist, - &create_playlist_item, &view_playlist, &save_playlist, &catalog); + &create_playlist_item, &view_cur_playlist, &save_playlist, &catalog); -- cgit v1.2.3