diff options
author | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-11-03 19:39:25 +0100 |
---|---|---|
committer | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-11-03 19:39:25 +0100 |
commit | fd71c5952690f419b919eb3bc5facc9d332a98b9 (patch) | |
tree | 307bf5b9f314eef67af22f1275774a51cef979f3 /plugins/gtkui/pltmenu.c | |
parent | 553d1c27fec6e5ef1743f97e2e7c612ec8678ab8 (diff) |
changed action API to be backwards compatible with 0.5 on source level
Diffstat (limited to 'plugins/gtkui/pltmenu.c')
-rw-r--r-- | plugins/gtkui/pltmenu.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/gtkui/pltmenu.c b/plugins/gtkui/pltmenu.c index eb6c4b3d..6fd803a2 100644 --- a/plugins/gtkui/pltmenu.c +++ b/plugins/gtkui/pltmenu.c @@ -105,19 +105,18 @@ static void on_actionitem_activate (GtkMenuItem *menuitem, DB_plugin_action_t *action) { - if (action->flags & DB_ACTION_USING_API_14) { + if (action->callback) { ddb_playlist_t *plt = NULL; if (pltmenu_idx != -1) { plt = deadbeef->plt_get_for_idx (pltmenu_idx); } - typedef int (*action_callback_14_t)(struct DB_plugin_action_s *action, void *userdata); - ((action_callback_14_t)action->callback) (action, plt); + action->callback (action, plt); if (plt) { deadbeef->plt_unref (plt); } } else { - action->callback (action, DDB_ACTION_CTX_PLAYLIST); + action->callback2 (action, DDB_ACTION_CTX_PLAYLIST); } } |