summaryrefslogtreecommitdiff
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
parenteca85ac32740089245c92fd3d89299127be65a8f (diff)
downloadrockbox-993376cb6790f032a80c21945869f4d30fcde14d.tar.gz
rockbox-993376cb6790f032a80c21945869f4d30fcde14d.zip
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
-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,
420 { 420 {
421 return ACTION_EXIT_MENUITEM; 421 return ACTION_EXIT_MENUITEM;
422 } 422 }
423#ifdef HAVE_TAGCACHE
424 if (context == CONTEXT_ID3DB &&
425 ((selected_file_attr & FILE_ATTR_MASK) != FILE_ATTR_AUDIO))
426 {
427 return ACTION_EXIT_MENUITEM;
428 }
429#endif
423 430
424 switch (action) 431 switch (action)
425 { 432 {
@@ -428,9 +435,8 @@ static int cat_playlist_callback(int action,
428 { 435 {
429 return action; 436 return action;
430 } 437 }
431 else if (((audio_status() & AUDIO_STATUS_PLAY && 438 else if ((audio_status() & AUDIO_STATUS_PLAY) ||
432 context == CONTEXT_WPS) || 439 context != CONTEXT_WPS)
433 context == CONTEXT_TREE))
434 { 440 {
435 return action; 441 return action;
436 } 442 }
@@ -1062,7 +1068,13 @@ static int clipboard_callback(int action,const struct menu_item_ex *this_item)
1062#endif 1068#endif
1063#ifdef HAVE_TAGCACHE 1069#ifdef HAVE_TAGCACHE
1064 if (context == CONTEXT_ID3DB) 1070 if (context == CONTEXT_ID3DB)
1071 {
1072 if (((selected_file_attr & FILE_ATTR_MASK) ==
1073 FILE_ATTR_AUDIO) &&
1074 this_item == &properties_item)
1075 return action;
1065 return ACTION_EXIT_MENUITEM; 1076 return ACTION_EXIT_MENUITEM;
1077 }
1066#endif 1078#endif
1067 if (this_item == &clipboard_paste_item) 1079 if (this_item == &clipboard_paste_item)
1068 { /* visible if there is something to paste */ 1080 { /* visible if there is something to paste */