summaryrefslogtreecommitdiff
path: root/apps/onplay.c
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2022-04-10 06:29:01 +0200
committerWilliam Wilgus <me.theuser@yahoo.com>2022-05-09 09:44:23 -0400
commitf3358eb20a9a07b6788fd9cf9d58cffb0e072342 (patch)
treeb794a89829cabffc1358365997f374925033ecd6 /apps/onplay.c
parent4b293285ea04df6c8ca04ec01f1b4729d285d379 (diff)
downloadrockbox-f3358eb20a9a07b6788fd9cf9d58cffb0e072342.tar.gz
rockbox-f3358eb20a9a07b6788fd9cf9d58cffb0e072342.zip
Properties plugin: Eliminate redundant Track Info code
When opening an audio file from the file browser or database using the Properties plugin, it will now use existing code from the Show Track Info screen for displaying metadata. The menu option has been renamed accordingly. Change-Id: I5a824865b9f980151b91aff3c3c18ec45830a12c
Diffstat (limited to 'apps/onplay.c')
-rw-r--r--apps/onplay.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/onplay.c b/apps/onplay.c
index 7245ac2016..a78cf7ceac 100644
--- a/apps/onplay.c
+++ b/apps/onplay.c
@@ -1595,6 +1595,9 @@ MENUITEM_FUNCTION(list_viewers_item, 0, ID2P(LANG_ONPLAY_OPEN_WITH),
1595MENUITEM_FUNCTION(properties_item, MENU_FUNC_USEPARAM, ID2P(LANG_PROPERTIES), 1595MENUITEM_FUNCTION(properties_item, MENU_FUNC_USEPARAM, ID2P(LANG_PROPERTIES),
1596 onplay_load_plugin, (void *)"properties", 1596 onplay_load_plugin, (void *)"properties",
1597 clipboard_callback, Icon_NOICON); 1597 clipboard_callback, Icon_NOICON);
1598MENUITEM_FUNCTION(track_info_item, MENU_FUNC_USEPARAM, ID2P(LANG_MENU_SHOW_ID3_INFO),
1599 onplay_load_plugin, (void *)"properties",
1600 clipboard_callback, Icon_NOICON);
1598#ifdef HAVE_TAGCACHE 1601#ifdef HAVE_TAGCACHE
1599MENUITEM_FUNCTION(pictureflow_item, MENU_FUNC_USEPARAM, ID2P(LANG_ONPLAY_PICTUREFLOW), 1602MENUITEM_FUNCTION(pictureflow_item, MENU_FUNC_USEPARAM, ID2P(LANG_ONPLAY_PICTUREFLOW),
1600 onplay_load_plugin, (void *)"pictureflow", 1603 onplay_load_plugin, (void *)"pictureflow",
@@ -1666,7 +1669,7 @@ static int clipboard_callback(int action,
1666 { 1669 {
1667 if (((selected_file_attr & FILE_ATTR_MASK) == 1670 if (((selected_file_attr & FILE_ATTR_MASK) ==
1668 FILE_ATTR_AUDIO) && 1671 FILE_ATTR_AUDIO) &&
1669 (this_item == &properties_item || 1672 (this_item == &track_info_item ||
1670 this_item == &pictureflow_item)) 1673 this_item == &pictureflow_item))
1671 return action; 1674 return action;
1672 return ACTION_EXIT_MENUITEM; 1675 return ACTION_EXIT_MENUITEM;
@@ -1688,7 +1691,10 @@ static int clipboard_callback(int action,
1688 if (this_item == &rename_file_item || 1691 if (this_item == &rename_file_item ||
1689 this_item == &clipboard_cut_item || 1692 this_item == &clipboard_cut_item ||
1690 this_item == &clipboard_copy_item || 1693 this_item == &clipboard_copy_item ||
1691 this_item == &properties_item || 1694 (this_item == &track_info_item &&
1695 (selected_file_attr & FILE_ATTR_MASK) == FILE_ATTR_AUDIO) ||
1696 (this_item == &properties_item &&
1697 (selected_file_attr & FILE_ATTR_MASK) != FILE_ATTR_AUDIO) ||
1692 this_item == &add_to_faves_item) 1698 this_item == &add_to_faves_item)
1693 { 1699 {
1694 return action; 1700 return action;
@@ -1765,7 +1771,7 @@ MAKE_ONPLAYMENU( tree_onplay_menu, ID2P(LANG_ONPLAY_MENU_TITLE),
1765#if LCD_DEPTH > 1 1771#if LCD_DEPTH > 1
1766 &set_backdrop_item, 1772 &set_backdrop_item,
1767#endif 1773#endif
1768 &list_viewers_item, &create_dir_item, &properties_item, 1774 &list_viewers_item, &create_dir_item, &properties_item, &track_info_item,
1769#ifdef HAVE_TAGCACHE 1775#ifdef HAVE_TAGCACHE
1770 &pictureflow_item, 1776 &pictureflow_item,
1771#endif 1777#endif