summaryrefslogtreecommitdiff
path: root/plugins/shellexec
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-11-03 19:39:25 +0100
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-11-03 19:39:25 +0100
commitfd71c5952690f419b919eb3bc5facc9d332a98b9 (patch)
tree307bf5b9f314eef67af22f1275774a51cef979f3 /plugins/shellexec
parent553d1c27fec6e5ef1743f97e2e7c612ec8678ab8 (diff)
changed action API to be backwards compatible with 0.5 on source level
Diffstat (limited to 'plugins/shellexec')
-rw-r--r--plugins/shellexec/shellexec.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/shellexec/shellexec.c b/plugins/shellexec/shellexec.c
index b76cd365..329b9d9e 100644
--- a/plugins/shellexec/shellexec.c
+++ b/plugins/shellexec/shellexec.c
@@ -89,7 +89,7 @@ static int shx_exec_track_cmd (Shx_action_t *action, DB_playItem_t *it) {
}
strcat (cmd, "&");
trace ("%s\n", cmd);
- system (cmd);
+ res = system (cmd);
}
static int
@@ -99,7 +99,7 @@ shx_callback (Shx_action_t *action, int ctx)
switch (ctx) {
case DDB_ACTION_CTX_MAIN:
trace ("%s\n", action->shcommand);
- system (action->shcommand);
+ int res = system (action->shcommand);
break;
case DDB_ACTION_CTX_SELECTION:
{
@@ -255,7 +255,7 @@ shx_save_actions (void)
}
Shx_action_t*
-shx_get_actions (DB_plugin_action_callback_t callback)
+shx_get_actions (DB_plugin_action_callback2_t callback)
{
Shx_action_t *action_list = NULL;
Shx_action_t *prev = NULL;
@@ -303,7 +303,7 @@ shx_get_actions (DB_plugin_action_callback_t callback)
action->parent.title = strdup (title);
action->parent.name = strdup (name);
action->shcommand = strdup (command);
- action->parent.callback = callback;
+ action->parent.callback2 = callback;
action->parent.next = NULL;
action->parent.flags |= DB_ACTION_ADD_MENU;
@@ -339,7 +339,7 @@ shx_get_actions (DB_plugin_action_callback_t callback)
Shx_action_t*
shx_action_add (void) {
Shx_action_t *a = calloc (sizeof (Shx_action_t), 1);
- a->parent.callback = (DB_plugin_action_callback_t)shx_callback;
+ a->parent.callback2 = (DB_plugin_action_callback2_t)shx_callback;
if (!actions) {
actions = a;
}
@@ -389,7 +389,7 @@ shx_action_remove (Shx_action_t *action) {
static int
shx_start ()
{
- actions = shx_get_actions((DB_plugin_action_callback_t)shx_callback);
+ actions = shx_get_actions((DB_plugin_action_callback2_t)shx_callback);
return 0;
}