diff options
| author | Jonathan Gordon <rockbox@jdgordon.info> | 2011-07-20 14:11:15 +0000 |
|---|---|---|
| committer | Jonathan Gordon <rockbox@jdgordon.info> | 2011-07-20 14:11:15 +0000 |
| commit | 97a4c1efa473e40b4dd7287571f3b1c9caaba97d (patch) | |
| tree | 384bb5b81d5c4c5b6098bff835af9a7cc75161de /apps/root_menu.c | |
| parent | 4983d052a0d73340d09086a796b4ccbb45dfd88b (diff) | |
| download | rockbox-97a4c1efa473e40b4dd7287571f3b1c9caaba97d.zip rockbox-97a4c1efa473e40b4dd7287571f3b1c9caaba97d.tar.gz rockbox-97a4c1efa473e40b4dd7287571f3b1c9caaba97d.tar.bz2 rockbox-97a4c1efa473e40b4dd7287571f3b1c9caaba97d.tar.xz | |
FS#11808 - Major playlist handling changes (on disk playlists)
* Playlists are treated similar to directories in the browser, they now open in the viewer when selected instead of automatically starting the playlist.
* Make the "Playlists" main menu item useful, it now displays the playlist catalog (and has been renamed accordingly)
* Default to storing playlists in the catalog
* Add a UI to move the catalog directory
(other minor stuff too)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30177 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/root_menu.c')
| -rw-r--r-- | apps/root_menu.c | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/apps/root_menu.c b/apps/root_menu.c index 3e53bd9..573ea94 100644 --- a/apps/root_menu.c +++ b/apps/root_menu.c @@ -60,6 +60,7 @@ #include "bookmark.h" #include "playlist.h" #include "playlist_viewer.h" +#include "playlist_catalog.h" #include "menus/exported_menus.h" #ifdef HAVE_RTC_ALARM #include "rtc.h" @@ -335,7 +336,21 @@ static int miscscrn(void * param) return GO_TO_ROOT; } } - + + +static int playlist_view_catalog(void * param) +{ + /* kludge untill catalog_view_playlists() returns something useful */ + int old_playstatus = audio_status(); + (void)param; + push_current_activity(ACTIVITY_PLAYLISTBROWSER); + catalog_view_playlists(); + pop_current_activity(); + if (!old_playstatus && audio_status()) + return GO_TO_WPS; + return GO_TO_PREVIOUS; +} + static int playlist_view(void * param) { (void)param; @@ -397,9 +412,9 @@ static const struct root_items items[] = { [GO_TO_RECENTBMARKS] = { load_bmarks, NULL, &bookmark_settings_menu }, [GO_TO_BROWSEPLUGINS] = { miscscrn, &plugin_menu, NULL }, - [GO_TO_PLAYLISTS_SCREEN] = { miscscrn, &playlist_options, - &playlist_settings }, - [GO_TO_PLAYLIST_VIEWER] = { playlist_view, NULL, NULL }, + [GO_TO_PLAYLISTS_SCREEN] = { playlist_view_catalog, NULL, + &playlist_options }, + [GO_TO_PLAYLIST_VIEWER] = { playlist_view, NULL, &playlist_options }, [GO_TO_SYSTEM_SCREEN] = { miscscrn, &info_menu, &system_menu }, }; @@ -415,6 +430,10 @@ MENUITEM_RETURNVALUE(db_browser, ID2P(LANG_TAGCACHE), GO_TO_DBBROWSER, #endif MENUITEM_RETURNVALUE(rocks_browser, ID2P(LANG_PLUGINS), GO_TO_BROWSEPLUGINS, NULL, Icon_Plugin); + +MENUITEM_RETURNVALUE(playlist_browser, ID2P(LANG_CATALOG), GO_TO_PLAYLIST_VIEWER, + NULL, Icon_Playlist); + static char *get_wps_item_name(int selected_item, void * data, char *buffer) { (void)selected_item; (void)data; (void)buffer; @@ -437,7 +456,7 @@ MENUITEM_RETURNVALUE(menu_, ID2P(LANG_SETTINGS), GO_TO_MAINMENU, MENUITEM_RETURNVALUE(bookmarks, ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS), GO_TO_RECENTBMARKS, item_callback, Icon_Bookmark); -MENUITEM_RETURNVALUE(playlists, ID2P(LANG_PLAYLISTS), GO_TO_PLAYLISTS_SCREEN, +MENUITEM_RETURNVALUE(playlists, ID2P(LANG_CATALOG), GO_TO_PLAYLISTS_SCREEN, NULL, Icon_Playlist); MENUITEM_RETURNVALUE(system_menu_, ID2P(LANG_SYSTEM), GO_TO_SYSTEM_SCREEN, NULL, Icon_System_menu); |