1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Jonathan Gordon 2011-07-20 14:11:15 +00:00
parent 4983d052a0
commit 97a4c1efa4
12 changed files with 235 additions and 82 deletions

View file

@ -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);