summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/onplay.c31
-rw-r--r--manual/rockbox_interface/browsing_and_playing.tex2
2 files changed, 17 insertions, 16 deletions
diff --git a/apps/onplay.c b/apps/onplay.c
index a777807b9f..35d9a82bfd 100644
--- a/apps/onplay.c
+++ b/apps/onplay.c
@@ -644,17 +644,10 @@ MENUITEM_FUNCTION(replace_pl_item, MENU_FUNC_USEPARAM, ID2P(LANG_CLEAR_LIST_AND_
644 playlist_insert_func, (intptr_t*)PLAYLIST_REPLACE, 644 playlist_insert_func, (intptr_t*)PLAYLIST_REPLACE,
645 NULL, Icon_Playlist); 645 NULL, Icon_Playlist);
646 646
647/* others */
648MENUITEM_FUNCTION(view_playlist_item, 0, ID2P(LANG_VIEW),
649 view_playlist, NULL,
650 treeplaylist_callback, Icon_Playlist);
651 647
652MAKE_ONPLAYMENU( tree_playlist_menu, ID2P(LANG_CURRENT_PLAYLIST), 648MAKE_ONPLAYMENU( tree_playlist_menu, ID2P(LANG_CURRENT_PLAYLIST),
653 treeplaylist_callback, Icon_Playlist, 649 treeplaylist_callback, Icon_Playlist,
654 650
655 /* view */
656 &view_playlist_item,
657
658 /* insert */ 651 /* insert */
659 &i_pl_item, &i_first_pl_item, &i_last_pl_item, 652 &i_pl_item, &i_first_pl_item, &i_last_pl_item,
660 &i_shuf_pl_item, &i_last_shuf_pl_item, 653 &i_shuf_pl_item, &i_last_shuf_pl_item,
@@ -684,14 +677,6 @@ static int treeplaylist_callback(int action,
684 return action; 677 return action;
685 } 678 }
686 } 679 }
687 else if (this_item == &view_playlist_item)
688 {
689 if ((selected_file_attr & FILE_ATTR_MASK) == FILE_ATTR_M3U &&
690 context == CONTEXT_TREE)
691 {
692 return action;
693 }
694 }
695 else if (this_item == &i_pl_item) 680 else if (this_item == &i_pl_item)
696 { 681 {
697 if (global_status.resume_index != -1) 682 if (global_status.resume_index != -1)
@@ -1679,10 +1664,15 @@ MAKE_ONPLAYMENU( wps_onplay_menu, ID2P(LANG_ONPLAY_MENU_TITLE),
1679 &pitch_screen_item, 1664 &pitch_screen_item,
1680#endif 1665#endif
1681 ); 1666 );
1667
1668MENUITEM_FUNCTION(view_playlist_item, 0, ID2P(LANG_VIEW),
1669 view_playlist, NULL,
1670 onplaymenu_callback, Icon_Playlist);
1671
1682/* used when onplay() is not called in the CONTEXT_WPS context */ 1672/* used when onplay() is not called in the CONTEXT_WPS context */
1683MAKE_ONPLAYMENU( tree_onplay_menu, ID2P(LANG_ONPLAY_MENU_TITLE), 1673MAKE_ONPLAYMENU( tree_onplay_menu, ID2P(LANG_ONPLAY_MENU_TITLE),
1684 onplaymenu_callback, Icon_file_view_menu, 1674 onplaymenu_callback, Icon_file_view_menu,
1685 &tree_playlist_menu, &cat_playlist_menu, 1675 &view_playlist_item, &tree_playlist_menu, &cat_playlist_menu,
1686 &rename_file_item, &clipboard_cut_item, &clipboard_copy_item, 1676 &rename_file_item, &clipboard_cut_item, &clipboard_copy_item,
1687 &clipboard_paste_item, &delete_file_item, &delete_dir_item, 1677 &clipboard_paste_item, &delete_file_item, &delete_dir_item,
1688#if LCD_DEPTH > 1 1678#if LCD_DEPTH > 1
@@ -1708,6 +1698,15 @@ static int onplaymenu_callback(int action,
1708 return ACTION_STD_CANCEL; 1698 return ACTION_STD_CANCEL;
1709 } 1699 }
1710 break; 1700 break;
1701 case ACTION_REQUEST_MENUITEM:
1702 if (this_item == &view_playlist_item)
1703 {
1704 if ((selected_file_attr & FILE_ATTR_MASK) == FILE_ATTR_M3U &&
1705 context == CONTEXT_TREE)
1706 return action;
1707 }
1708 return ACTION_EXIT_MENUITEM;
1709 break;
1711 case ACTION_EXIT_MENUITEM: 1710 case ACTION_EXIT_MENUITEM:
1712 return ACTION_EXIT_AFTER_THIS_MENUITEM; 1711 return ACTION_EXIT_AFTER_THIS_MENUITEM;
1713 break; 1712 break;
diff --git a/manual/rockbox_interface/browsing_and_playing.tex b/manual/rockbox_interface/browsing_and_playing.tex
index 8a7c844059..1c8e6ed5d2 100644
--- a/manual/rockbox_interface/browsing_and_playing.tex
+++ b/manual/rockbox_interface/browsing_and_playing.tex
@@ -119,6 +119,8 @@ The \setting{Context Menu} contains the following options (unless otherwise note
119each option pertains both to files and directories): 119each option pertains both to files and directories):
120 120
121\begin{description} 121\begin{description}
122\item [View.]
123 Displays the contents of the selected playlist file.
122\item [Current Playlist.] 124\item [Current Playlist.]
123 Enters the \setting{Current Playlist Submenu} (see \reference{ref:currentplaylist_submenu}). 125 Enters the \setting{Current Playlist Submenu} (see \reference{ref:currentplaylist_submenu}).
124\item [Playlist Catalogue.] 126\item [Playlist Catalogue.]