diff options
Diffstat (limited to 'apps/onplay.c')
-rw-r--r-- | apps/onplay.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/apps/onplay.c b/apps/onplay.c index fd956167d3..f2ebd47630 100644 --- a/apps/onplay.c +++ b/apps/onplay.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include "talk.h" | 43 | #include "talk.h" |
44 | #include "onplay.h" | 44 | #include "onplay.h" |
45 | #include "filetypes.h" | 45 | #include "filetypes.h" |
46 | #include "open_plugin.h" | ||
46 | #include "plugin.h" | 47 | #include "plugin.h" |
47 | #include "bookmark.h" | 48 | #include "bookmark.h" |
48 | #include "action.h" | 49 | #include "action.h" |
@@ -1415,10 +1416,8 @@ MENUITEM_FUNCTION(rating_item, 0, ID2P(LANG_MENU_SET_RATING), | |||
1415 | set_rating_inline, NULL, | 1416 | set_rating_inline, NULL, |
1416 | ratingitem_callback, Icon_Questionmark); | 1417 | ratingitem_callback, Icon_Questionmark); |
1417 | #endif | 1418 | #endif |
1418 | #ifdef HAVE_PICTUREFLOW_INTEGRATION | 1419 | MENUITEM_RETURNVALUE(plugin_item, ID2P(LANG_OPEN_PLUGIN), |
1419 | MENUITEM_RETURNVALUE(pictureflow_item, ID2P(LANG_ONPLAY_PICTUREFLOW), | 1420 | GO_TO_PLUGIN, NULL, Icon_Plugin); |
1420 | GO_TO_PICTUREFLOW, NULL, Icon_NOICON); | ||
1421 | #endif | ||
1422 | 1421 | ||
1423 | static bool view_cue(void) | 1422 | static bool view_cue(void) |
1424 | { | 1423 | { |
@@ -1650,9 +1649,7 @@ MAKE_ONPLAYMENU( wps_onplay_menu, ID2P(LANG_ONPLAY_MENU_TITLE), | |||
1650 | &rating_item, | 1649 | &rating_item, |
1651 | #endif | 1650 | #endif |
1652 | &bookmark_menu, | 1651 | &bookmark_menu, |
1653 | #ifdef HAVE_PICTUREFLOW_INTEGRATION | 1652 | &plugin_item, |
1654 | &pictureflow_item, | ||
1655 | #endif | ||
1656 | &browse_id3_item, &list_viewers_item, | 1653 | &browse_id3_item, &list_viewers_item, |
1657 | &delete_file_item, &view_cue_item, | 1654 | &delete_file_item, &view_cue_item, |
1658 | #ifdef HAVE_PITCHCONTROL | 1655 | #ifdef HAVE_PITCHCONTROL |
@@ -1732,6 +1729,11 @@ static int playlist_insert_shuffled(void) | |||
1732 | return ONPLAY_RELOAD_DIR; | 1729 | return ONPLAY_RELOAD_DIR; |
1733 | } | 1730 | } |
1734 | 1731 | ||
1732 | static void hotkey_run_plugin(void) | ||
1733 | { | ||
1734 | open_plugin_run(ID2P(LANG_HOTKEY_WPS)); | ||
1735 | } | ||
1736 | |||
1735 | struct hotkey_assignment { | 1737 | struct hotkey_assignment { |
1736 | int action; /* hotkey_action */ | 1738 | int action; /* hotkey_action */ |
1737 | int lang_id; /* Language ID */ | 1739 | int lang_id; /* Language ID */ |
@@ -1768,11 +1770,9 @@ static struct hotkey_assignment hotkey_items[] = { | |||
1768 | { HOTKEY_INSERT_SHUFFLED, LANG_INSERT_SHUFFLED, | 1770 | { HOTKEY_INSERT_SHUFFLED, LANG_INSERT_SHUFFLED, |
1769 | HOTKEY_FUNC(playlist_insert_shuffled, NULL), | 1771 | HOTKEY_FUNC(playlist_insert_shuffled, NULL), |
1770 | ONPLAY_RELOAD_DIR }, | 1772 | ONPLAY_RELOAD_DIR }, |
1771 | #ifdef HAVE_PICTUREFLOW_INTEGRATION | 1773 | { HOTKEY_PLUGIN, LANG_OPEN_PLUGIN, |
1772 | { HOTKEY_PICTUREFLOW, LANG_ONPLAY_PICTUREFLOW, | 1774 | HOTKEY_FUNC(hotkey_run_plugin, NULL), |
1773 | HOTKEY_FUNC(NULL, NULL), | 1775 | ONPLAY_OK }, |
1774 | ONPLAY_PICTUREFLOW }, | ||
1775 | #endif | ||
1776 | { HOTKEY_BOOKMARK, LANG_BOOKMARK_MENU_CREATE, | 1776 | { HOTKEY_BOOKMARK, LANG_BOOKMARK_MENU_CREATE, |
1777 | HOTKEY_FUNC(bookmark_create_menu, NULL), | 1777 | HOTKEY_FUNC(bookmark_create_menu, NULL), |
1778 | ONPLAY_OK }, | 1778 | ONPLAY_OK }, |
@@ -1861,10 +1861,8 @@ int onplay(char* file, int attr, int from, bool hotkey) | |||
1861 | return ONPLAY_MAINMENU; | 1861 | return ONPLAY_MAINMENU; |
1862 | case GO_TO_PLAYLIST_VIEWER: | 1862 | case GO_TO_PLAYLIST_VIEWER: |
1863 | return ONPLAY_PLAYLIST; | 1863 | return ONPLAY_PLAYLIST; |
1864 | #ifdef HAVE_PICTUREFLOW_INTEGRATION | 1864 | case GO_TO_PLUGIN: |
1865 | case GO_TO_PICTUREFLOW: | 1865 | return ONPLAY_PLUGIN; |
1866 | return ONPLAY_PICTUREFLOW; | ||
1867 | #endif | ||
1868 | default: | 1866 | default: |
1869 | return onplay_result; | 1867 | return onplay_result; |
1870 | } | 1868 | } |