summaryrefslogtreecommitdiff
path: root/apps/onplay.c
diff options
context:
space:
mode:
authorTeruaki Kawashima <teru@rockbox.org>2010-02-21 12:01:14 +0000
committerTeruaki Kawashima <teru@rockbox.org>2010-02-21 12:01:14 +0000
commit993376cb6790f032a80c21945869f4d30fcde14d (patch)
tree705f1e8b9c2f5a04a404a51cdadc49a58b2f6cba /apps/onplay.c
parenteca85ac32740089245c92fd3d89299127be65a8f (diff)
FS#11017: add Playlist Catalog and Properties item to database's context menu.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24804 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/onplay.c')
-rw-r--r--apps/onplay.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/apps/onplay.c b/apps/onplay.c
index 8bff92f760..f9c75ab253 100644
--- a/apps/onplay.c
+++ b/apps/onplay.c
@@ -420,6 +420,13 @@ static int cat_playlist_callback(int action,
{
return ACTION_EXIT_MENUITEM;
}
+#ifdef HAVE_TAGCACHE
+ if (context == CONTEXT_ID3DB &&
+ ((selected_file_attr & FILE_ATTR_MASK) != FILE_ATTR_AUDIO))
+ {
+ return ACTION_EXIT_MENUITEM;
+ }
+#endif
switch (action)
{
@@ -428,9 +435,8 @@ static int cat_playlist_callback(int action,
{
return action;
}
- else if (((audio_status() & AUDIO_STATUS_PLAY &&
- context == CONTEXT_WPS) ||
- context == CONTEXT_TREE))
+ else if ((audio_status() & AUDIO_STATUS_PLAY) ||
+ context != CONTEXT_WPS)
{
return action;
}
@@ -1062,7 +1068,13 @@ static int clipboard_callback(int action,const struct menu_item_ex *this_item)
#endif
#ifdef HAVE_TAGCACHE
if (context == CONTEXT_ID3DB)
+ {
+ if (((selected_file_attr & FILE_ATTR_MASK) ==
+ FILE_ATTR_AUDIO) &&
+ this_item == &properties_item)
+ return action;
return ACTION_EXIT_MENUITEM;
+ }
#endif
if (this_item == &clipboard_paste_item)
{ /* visible if there is something to paste */