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/root_menu.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'apps/root_menu.c') diff --git a/apps/root_menu.c b/apps/root_menu.c index 01ba3a072d..5124375490 100644 --- a/apps/root_menu.c +++ b/apps/root_menu.c @@ -60,6 +60,7 @@ #include "wps.h" #include "bookmark.h" #include "playlist.h" +#include "playlist_viewer.h" #include "menus/exported_menus.h" #ifdef HAVE_RTC_ALARM #include "rtc.h" @@ -313,6 +314,20 @@ static int radio(void* param) } #endif +static int playlist_view(void * param) +{ + (void)param; + switch (playlist_viewer()) + { + case PLAYLIST_VIEWER_MAINMENU: + case PLAYLIST_VIEWER_USB: + return GO_TO_ROOT; + case PLAYLIST_VIEWER_OK: + return GO_TO_PREVIOUS; + } + return GO_TO_PREVIOUS; +} + static int load_bmarks(void* param) { (void)param; @@ -381,7 +396,8 @@ static const struct root_items items[] = { #endif [GO_TO_RECENTBMARKS] = { load_bmarks, NULL, &bookmark_settings_menu }, - [GO_TO_BROWSEPLUGINS] = { plugins_menu, NULL, NULL }, + [GO_TO_BROWSEPLUGINS] = { plugins_menu, NULL, NULL }, + [GO_TO_PLAYLIST_VIEWER] = { playlist_view, NULL, NULL }, }; static const int nb_items = sizeof(items)/sizeof(*items); -- cgit v1.2.3