diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2007-02-12 05:02:42 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2007-02-12 05:02:42 +0000 |
commit | ce584280ab74aadf8496d73dd8374328e24542f7 (patch) | |
tree | f7808d381f644e752d42b29e5b8d022010287707 /apps/playlist_viewer.c | |
parent | ecd83376b1650039a87967f397a2da51b5184611 (diff) |
Remove the File Options menu from the playlist viewer, but put the
playlist catalog options in. Fixes FS#6577
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12283 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playlist_viewer.c')
-rw-r--r-- | apps/playlist_viewer.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c index 96614d1c9a..b41d69f776 100644 --- a/apps/playlist_viewer.c +++ b/apps/playlist_viewer.c @@ -43,6 +43,7 @@ #include "lang.h" #include "playlist_viewer.h" +#include "playlist_catalog.h" #include "icon.h" #include "list.h" #include "statusbar.h" @@ -425,7 +426,7 @@ static bool update_playlist(bool force) changed. */ static int onplay_menu(int index) { - struct menu_item items[3]; /* increase this if you add entries! */ + struct menu_item items[4]; /* increase this if you add entries! */ int m, i=0, result, ret = 0; struct playlist_entry * current_track= playlist_buffer_get_track(&viewer.buffer, index); @@ -437,13 +438,18 @@ static int onplay_menu(int index) items[i].desc = ID2P(LANG_MOVE); i++; - items[i].desc = ID2P(LANG_FILE_OPTIONS); + items[i].desc = ID2P(LANG_CATALOG_ADD_TO); + i++; + + items[i].desc = ID2P(LANG_CATALOG_ADD_TO_NEW); i++; m = menu_init(items, i, NULL, NULL, NULL, NULL); result = menu_show(m); if (result == MENU_ATTACHED_USB) + { ret = -1; + } else if (result >= 0) { /* Abort current move */ @@ -482,16 +488,13 @@ static int onplay_menu(int index) viewer.move_track = current_track->index; ret = 0; break; - case 2: - { - onplay(current_track->name, TREE_ATTR_MPA, CONTEXT_TREE); - - if (!viewer.playlist) - ret = 1; - else - ret = 0; + case 2: /* add to catalog */ + case 3: /* add to a new one */ + catalog_add_to_a_playlist(current_track->name, + TREE_ATTR_MPA, + result==3 ); + ret = 0; break; - } } } menu_exit(m); |