summaryrefslogtreecommitdiffstats
path: root/apps/root_menu.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-02-20 19:06:39 +0000
committerThomas Martitz <kugel@rockbox.org>2010-02-20 19:06:39 +0000
commitc19e53654b857227e2be224d451037d432529299 (patch)
tree18437a610ce91fe55bcca601cc0dbd21887bd839 /apps/root_menu.c
parentabb3dd4ec2876fa84c1cbf18825ece1c33fc6500 (diff)
downloadrockbox-c19e53654b857227e2be224d451037d432529299.tar.gz
rockbox-c19e53654b857227e2be224d451037d432529299.tar.bz2
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/root_menu.c')
-rw-r--r--apps/root_menu.c18
1 files changed, 17 insertions, 1 deletions
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);