forked from len0rd/rockbox
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
This commit is contained in:
parent
ecd83376b1
commit
ce584280ab
1 changed files with 14 additions and 11 deletions
|
@ -43,6 +43,7 @@
|
||||||
#include "lang.h"
|
#include "lang.h"
|
||||||
|
|
||||||
#include "playlist_viewer.h"
|
#include "playlist_viewer.h"
|
||||||
|
#include "playlist_catalog.h"
|
||||||
#include "icon.h"
|
#include "icon.h"
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
#include "statusbar.h"
|
#include "statusbar.h"
|
||||||
|
@ -425,7 +426,7 @@ static bool update_playlist(bool force)
|
||||||
changed. */
|
changed. */
|
||||||
static int onplay_menu(int index)
|
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;
|
int m, i=0, result, ret = 0;
|
||||||
struct playlist_entry * current_track=
|
struct playlist_entry * current_track=
|
||||||
playlist_buffer_get_track(&viewer.buffer, index);
|
playlist_buffer_get_track(&viewer.buffer, index);
|
||||||
|
@ -437,13 +438,18 @@ static int onplay_menu(int index)
|
||||||
items[i].desc = ID2P(LANG_MOVE);
|
items[i].desc = ID2P(LANG_MOVE);
|
||||||
i++;
|
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++;
|
i++;
|
||||||
|
|
||||||
m = menu_init(items, i, NULL, NULL, NULL, NULL);
|
m = menu_init(items, i, NULL, NULL, NULL, NULL);
|
||||||
result = menu_show(m);
|
result = menu_show(m);
|
||||||
if (result == MENU_ATTACHED_USB)
|
if (result == MENU_ATTACHED_USB)
|
||||||
|
{
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
}
|
||||||
else if (result >= 0)
|
else if (result >= 0)
|
||||||
{
|
{
|
||||||
/* Abort current move */
|
/* Abort current move */
|
||||||
|
@ -482,16 +488,13 @@ static int onplay_menu(int index)
|
||||||
viewer.move_track = current_track->index;
|
viewer.move_track = current_track->index;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2: /* add to catalog */
|
||||||
{
|
case 3: /* add to a new one */
|
||||||
onplay(current_track->name, TREE_ATTR_MPA, CONTEXT_TREE);
|
catalog_add_to_a_playlist(current_track->name,
|
||||||
|
TREE_ATTR_MPA,
|
||||||
if (!viewer.playlist)
|
result==3 );
|
||||||
ret = 1;
|
ret = 0;
|
||||||
else
|
|
||||||
ret = 0;
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
menu_exit(m);
|
menu_exit(m);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue