diff options
Diffstat (limited to 'apps/onplay.c')
-rw-r--r-- | apps/onplay.c | 60 |
1 files changed, 46 insertions, 14 deletions
diff --git a/apps/onplay.c b/apps/onplay.c index 095a337d6b..7f96246c08 100644 --- a/apps/onplay.c +++ b/apps/onplay.c | |||
@@ -143,7 +143,8 @@ static bool clipboard_clip(struct clipboard *clip, const char *path, | |||
143 | /* ----------------------------------------------------------------------- */ | 143 | /* ----------------------------------------------------------------------- */ |
144 | 144 | ||
145 | static int bookmark_menu_callback(int action, | 145 | static int bookmark_menu_callback(int action, |
146 | const struct menu_item_ex *this_item); | 146 | const struct menu_item_ex *this_item, |
147 | struct gui_synclist *this_list); | ||
147 | MENUITEM_FUNCTION(bookmark_create_menu_item, 0, | 148 | MENUITEM_FUNCTION(bookmark_create_menu_item, 0, |
148 | ID2P(LANG_BOOKMARK_MENU_CREATE), | 149 | ID2P(LANG_BOOKMARK_MENU_CREATE), |
149 | bookmark_create_menu, NULL, | 150 | bookmark_create_menu, NULL, |
@@ -156,8 +157,10 @@ MAKE_ONPLAYMENU(bookmark_menu, ID2P(LANG_BOOKMARK_MENU), | |||
156 | bookmark_menu_callback, Icon_Bookmark, | 157 | bookmark_menu_callback, Icon_Bookmark, |
157 | &bookmark_create_menu_item, &bookmark_load_menu_item); | 158 | &bookmark_create_menu_item, &bookmark_load_menu_item); |
158 | static int bookmark_menu_callback(int action, | 159 | static int bookmark_menu_callback(int action, |
159 | const struct menu_item_ex *this_item) | 160 | const struct menu_item_ex *this_item, |
161 | struct gui_synclist *this_list) | ||
160 | { | 162 | { |
163 | (void) this_list; | ||
161 | switch (action) | 164 | switch (action) |
162 | { | 165 | { |
163 | case ACTION_REQUEST_MENUITEM: | 166 | case ACTION_REQUEST_MENUITEM: |
@@ -574,9 +577,11 @@ static int playlist_queue_func(void *param) | |||
574 | } | 577 | } |
575 | 578 | ||
576 | static int treeplaylist_wplayback_callback(int action, | 579 | static int treeplaylist_wplayback_callback(int action, |
577 | const struct menu_item_ex* this_item) | 580 | const struct menu_item_ex* this_item, |
581 | struct gui_synclist *this_list) | ||
578 | { | 582 | { |
579 | (void)this_item; | 583 | (void)this_item; |
584 | (void)this_list; | ||
580 | switch (action) | 585 | switch (action) |
581 | { | 586 | { |
582 | case ACTION_REQUEST_MENUITEM: | 587 | case ACTION_REQUEST_MENUITEM: |
@@ -590,7 +595,8 @@ static int treeplaylist_wplayback_callback(int action, | |||
590 | } | 595 | } |
591 | 596 | ||
592 | static int treeplaylist_callback(int action, | 597 | static int treeplaylist_callback(int action, |
593 | const struct menu_item_ex *this_item); | 598 | const struct menu_item_ex *this_item, |
599 | struct gui_synclist *this_list); | ||
594 | 600 | ||
595 | /* insert items */ | 601 | /* insert items */ |
596 | MENUITEM_FUNCTION(i_pl_item, MENU_FUNC_USEPARAM, ID2P(LANG_INSERT), | 602 | MENUITEM_FUNCTION(i_pl_item, MENU_FUNC_USEPARAM, ID2P(LANG_INSERT), |
@@ -656,8 +662,10 @@ MAKE_ONPLAYMENU( tree_playlist_menu, ID2P(LANG_CURRENT_PLAYLIST), | |||
656 | &replace_pl_item | 662 | &replace_pl_item |
657 | ); | 663 | ); |
658 | static int treeplaylist_callback(int action, | 664 | static int treeplaylist_callback(int action, |
659 | const struct menu_item_ex *this_item) | 665 | const struct menu_item_ex *this_item, |
666 | struct gui_synclist *this_list) | ||
660 | { | 667 | { |
668 | (void)this_list; | ||
661 | switch (action) | 669 | switch (action) |
662 | { | 670 | { |
663 | case ACTION_REQUEST_MENUITEM: | 671 | case ACTION_REQUEST_MENUITEM: |
@@ -727,7 +735,10 @@ static bool cat_add_to_a_new_playlist(void) | |||
727 | return catalog_add_to_a_playlist(selected_file, selected_file_attr, | 735 | return catalog_add_to_a_playlist(selected_file, selected_file_attr, |
728 | true, NULL); | 736 | true, NULL); |
729 | } | 737 | } |
730 | static int clipboard_callback(int action,const struct menu_item_ex *this_item); | 738 | static int clipboard_callback(int action, |
739 | const struct menu_item_ex *this_item, | ||
740 | struct gui_synclist *this_list); | ||
741 | |||
731 | static bool set_catalogdir(void) | 742 | static bool set_catalogdir(void) |
732 | { | 743 | { |
733 | catalog_set_directory(selected_file); | 744 | catalog_set_directory(selected_file); |
@@ -738,7 +749,9 @@ MENUITEM_FUNCTION(set_catalogdir_item, 0, ID2P(LANG_SET_AS_PLAYLISTCAT_DIR), | |||
738 | set_catalogdir, NULL, clipboard_callback, Icon_Playlist); | 749 | set_catalogdir, NULL, clipboard_callback, Icon_Playlist); |
739 | 750 | ||
740 | static int cat_playlist_callback(int action, | 751 | static int cat_playlist_callback(int action, |
741 | const struct menu_item_ex *this_item); | 752 | const struct menu_item_ex *this_item, |
753 | struct gui_synclist *this_list); | ||
754 | |||
742 | MENUITEM_FUNCTION(cat_add_to_list, 0, ID2P(LANG_CATALOG_ADD_TO), | 755 | MENUITEM_FUNCTION(cat_add_to_list, 0, ID2P(LANG_CATALOG_ADD_TO), |
743 | cat_add_to_a_playlist, 0, NULL, Icon_Playlist); | 756 | cat_add_to_a_playlist, 0, NULL, Icon_Playlist); |
744 | MENUITEM_FUNCTION(cat_add_to_new, 0, ID2P(LANG_CATALOG_ADD_TO_NEW), | 757 | MENUITEM_FUNCTION(cat_add_to_new, 0, ID2P(LANG_CATALOG_ADD_TO_NEW), |
@@ -755,9 +768,11 @@ void onplay_show_playlist_cat_menu(char* track_name) | |||
755 | } | 768 | } |
756 | 769 | ||
757 | static int cat_playlist_callback(int action, | 770 | static int cat_playlist_callback(int action, |
758 | const struct menu_item_ex *this_item) | 771 | const struct menu_item_ex *this_item, |
772 | struct gui_synclist *this_list) | ||
759 | { | 773 | { |
760 | (void)this_item; | 774 | (void)this_item; |
775 | (void)this_list; | ||
761 | if (!selected_file || | 776 | if (!selected_file || |
762 | (((selected_file_attr & FILE_ATTR_MASK) != FILE_ATTR_AUDIO) && | 777 | (((selected_file_attr & FILE_ATTR_MASK) != FILE_ATTR_AUDIO) && |
763 | ((selected_file_attr & FILE_ATTR_MASK) != FILE_ATTR_M3U) && | 778 | ((selected_file_attr & FILE_ATTR_MASK) != FILE_ATTR_M3U) && |
@@ -1394,9 +1409,12 @@ static int set_rating_inline(void) | |||
1394 | splash(HZ*2, ID2P(LANG_ID3_NO_INFO)); | 1409 | splash(HZ*2, ID2P(LANG_ID3_NO_INFO)); |
1395 | return 0; | 1410 | return 0; |
1396 | } | 1411 | } |
1397 | static int ratingitem_callback(int action,const struct menu_item_ex *this_item) | 1412 | static int ratingitem_callback(int action, |
1413 | const struct menu_item_ex *this_item, | ||
1414 | struct gui_synclist *this_list) | ||
1398 | { | 1415 | { |
1399 | (void)this_item; | 1416 | (void)this_item; |
1417 | (void)this_list; | ||
1400 | switch (action) | 1418 | switch (action) |
1401 | { | 1419 | { |
1402 | case ACTION_REQUEST_MENUITEM: | 1420 | case ACTION_REQUEST_MENUITEM: |
@@ -1426,9 +1444,11 @@ static bool view_cue(void) | |||
1426 | return false; | 1444 | return false; |
1427 | } | 1445 | } |
1428 | static int view_cue_item_callback(int action, | 1446 | static int view_cue_item_callback(int action, |
1429 | const struct menu_item_ex *this_item) | 1447 | const struct menu_item_ex *this_item, |
1448 | struct gui_synclist *this_list) | ||
1430 | { | 1449 | { |
1431 | (void)this_item; | 1450 | (void)this_item; |
1451 | (void)this_list; | ||
1432 | struct mp3entry* id3 = audio_current_track(); | 1452 | struct mp3entry* id3 = audio_current_track(); |
1433 | switch (action) | 1453 | switch (action) |
1434 | { | 1454 | { |
@@ -1460,7 +1480,10 @@ MENUITEM_FUNCTION(pitch_screen_item, 0, ID2P(LANG_PITCH), | |||
1460 | #endif | 1480 | #endif |
1461 | 1481 | ||
1462 | /* CONTEXT_[TREE|ID3DB] items */ | 1482 | /* CONTEXT_[TREE|ID3DB] items */ |
1463 | static int clipboard_callback(int action,const struct menu_item_ex *this_item); | 1483 | static int clipboard_callback(int action, |
1484 | const struct menu_item_ex *this_item, | ||
1485 | struct gui_synclist *this_list); | ||
1486 | |||
1464 | MENUITEM_FUNCTION(rename_file_item, 0, ID2P(LANG_RENAME), | 1487 | MENUITEM_FUNCTION(rename_file_item, 0, ID2P(LANG_RENAME), |
1465 | rename_file, NULL, clipboard_callback, Icon_NOICON); | 1488 | rename_file, NULL, clipboard_callback, Icon_NOICON); |
1466 | MENUITEM_FUNCTION(clipboard_cut_item, 0, ID2P(LANG_CUT), | 1489 | MENUITEM_FUNCTION(clipboard_cut_item, 0, ID2P(LANG_CUT), |
@@ -1542,8 +1565,11 @@ static bool set_startdir(void) | |||
1542 | MENUITEM_FUNCTION(set_startdir_item, 0, ID2P(LANG_SET_AS_START_DIR), | 1565 | MENUITEM_FUNCTION(set_startdir_item, 0, ID2P(LANG_SET_AS_START_DIR), |
1543 | set_startdir, NULL, clipboard_callback, Icon_file_view_menu); | 1566 | set_startdir, NULL, clipboard_callback, Icon_file_view_menu); |
1544 | 1567 | ||
1545 | static int clipboard_callback(int action,const struct menu_item_ex *this_item) | 1568 | static int clipboard_callback(int action, |
1569 | const struct menu_item_ex *this_item, | ||
1570 | struct gui_synclist *this_list) | ||
1546 | { | 1571 | { |
1572 | (void)this_list; | ||
1547 | switch (action) | 1573 | switch (action) |
1548 | { | 1574 | { |
1549 | case ACTION_REQUEST_MENUITEM: | 1575 | case ACTION_REQUEST_MENUITEM: |
@@ -1625,7 +1651,10 @@ static int clipboard_callback(int action,const struct menu_item_ex *this_item) | |||
1625 | return action; | 1651 | return action; |
1626 | } | 1652 | } |
1627 | 1653 | ||
1628 | static int onplaymenu_callback(int action,const struct menu_item_ex *this_item); | 1654 | static int onplaymenu_callback(int action, |
1655 | const struct menu_item_ex *this_item, | ||
1656 | struct gui_synclist *this_list); | ||
1657 | |||
1629 | /* used when onplay() is called in the CONTEXT_WPS context */ | 1658 | /* used when onplay() is called in the CONTEXT_WPS context */ |
1630 | MAKE_ONPLAYMENU( wps_onplay_menu, ID2P(LANG_ONPLAY_MENU_TITLE), | 1659 | MAKE_ONPLAYMENU( wps_onplay_menu, ID2P(LANG_ONPLAY_MENU_TITLE), |
1631 | onplaymenu_callback, Icon_Audio, | 1660 | onplaymenu_callback, Icon_Audio, |
@@ -1659,8 +1688,11 @@ MAKE_ONPLAYMENU( tree_onplay_menu, ID2P(LANG_ONPLAY_MENU_TITLE), | |||
1659 | #endif | 1688 | #endif |
1660 | &set_startdir_item, &add_to_faves_item, &file_menu, | 1689 | &set_startdir_item, &add_to_faves_item, &file_menu, |
1661 | ); | 1690 | ); |
1662 | static int onplaymenu_callback(int action,const struct menu_item_ex *this_item) | 1691 | static int onplaymenu_callback(int action, |
1692 | const struct menu_item_ex *this_item, | ||
1693 | struct gui_synclist *this_list) | ||
1663 | { | 1694 | { |
1695 | (void)this_list; | ||
1664 | switch (action) | 1696 | switch (action) |
1665 | { | 1697 | { |
1666 | case ACTION_TREE_STOP: | 1698 | case ACTION_TREE_STOP: |