diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/onplay.c | 31 |
1 files changed, 15 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 */ | ||
648 | MENUITEM_FUNCTION(view_playlist_item, 0, ID2P(LANG_VIEW), | ||
649 | view_playlist, NULL, | ||
650 | treeplaylist_callback, Icon_Playlist); | ||
651 | 647 | ||
652 | MAKE_ONPLAYMENU( tree_playlist_menu, ID2P(LANG_CURRENT_PLAYLIST), | 648 | MAKE_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 | |||
1668 | MENUITEM_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 */ |
1683 | MAKE_ONPLAYMENU( tree_onplay_menu, ID2P(LANG_ONPLAY_MENU_TITLE), | 1673 | MAKE_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; |