summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-07-29 06:51:15 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-07-29 06:51:15 +0200
commitc27c2b5cc332cd615b2ade47c92acbd2780e6eea (patch)
tree8e1e26bc9ab2fe4965f89253b476ffd070fd5c98 /plugins
parentd2fa3b7e96c74e929cc846c55317879e1aebfa10 (diff)
several typo/warning fixes in actions/shellexec and related code
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gtkui/actions.c2
-rw-r--r--plugins/hotkeys/hotkeys.c7
-rw-r--r--plugins/lastfm/lastfm.c2
-rw-r--r--plugins/shellexec/shellexec.c10
4 files changed, 11 insertions, 10 deletions
diff --git a/plugins/gtkui/actions.c b/plugins/gtkui/actions.c
index 96ee0085..4f6b977b 100644
--- a/plugins/gtkui/actions.c
+++ b/plugins/gtkui/actions.c
@@ -22,6 +22,7 @@
#include "gtkui.h"
#include "../../deadbeef.h"
+#include "support.h"
#define trace(...) { fprintf(stderr, __VA_ARGS__); }
//#define trace(fmt,...)
@@ -30,7 +31,6 @@ static void
on_actionitem_activate (GtkMenuItem *menuitem,
DB_plugin_action_t *action)
{
-// action->callback (NULL, action->data);
action->callback (action, NULL);
}
diff --git a/plugins/hotkeys/hotkeys.c b/plugins/hotkeys/hotkeys.c
index b201bfd4..77e66f19 100644
--- a/plugins/hotkeys/hotkeys.c
+++ b/plugins/hotkeys/hotkeys.c
@@ -48,8 +48,6 @@ static const xkey_t keys[] = {
#include "keysyms.inc"
};
-//typedef void (*command_func_t) (void *command);
-
typedef struct command_s {
int keycode;
int modifier;
@@ -179,7 +177,7 @@ cmd_invoke_plugin_command (command_t *command)
action->callback (action, NULL);
return;
}
- //Now we're checking af action is applicable:
+ //Now we're checking if action is applicable:
if (selected_count == 0)
{
@@ -225,6 +223,9 @@ get_command (const char* command)
but I assume we use cdecl convention so actual
parameters count doesn't matter.
*/
+ // +waker:
+ // TODO: export all this commands as standard plugin actions
+ // ignore typecast warnings for now
if (!strcasecmp (command, "toggle_pause"))
return deadbeef->playback_pause;
diff --git a/plugins/lastfm/lastfm.c b/plugins/lastfm/lastfm.c
index 75e2505d..0427b44c 100644
--- a/plugins/lastfm/lastfm.c
+++ b/plugins/lastfm/lastfm.c
@@ -865,7 +865,7 @@ static DB_plugin_action_t love_action = {
};
static DB_plugin_action_t lookup_action = {
- .title = "Lookup at Last.fm",
+ .title = "Lookup on Last.fm",
.name = "lfm_lookup",
.flags = DB_ACTION_SINGLE_TRACK,
.callback = lfm_action_lookup,
diff --git a/plugins/shellexec/shellexec.c b/plugins/shellexec/shellexec.c
index 8adbb246..142004c0 100644
--- a/plugins/shellexec/shellexec.c
+++ b/plugins/shellexec/shellexec.c
@@ -198,8 +198,8 @@ shx_callback (Shx_action_t *action, DB_playItem_t *it)
static DB_plugin_action_t *
shx_get_actions (DB_playItem_t *it)
{
- Shx_action_t *action = actions;
- for (action = actions; action; action = action->parent.next)
+ Shx_action_t *action;
+ for (action = actions; action; action = (Shx_action_t *)action->parent.next)
{
if (((action->shx_flags & SHX_ACTION_LOCAL_ONLY) && !deadbeef->is_local_file (it->fname)) ||
((action->shx_flags & SHX_ACTION_REMOTE_ONLY) && deadbeef->is_local_file (it->fname)))
@@ -207,7 +207,7 @@ shx_get_actions (DB_playItem_t *it)
else
action->parent.flags &= ~DB_ACTION_DISABLED;
}
- return actions;
+ return (DB_plugin_action_t *)actions;
}
static int
@@ -271,7 +271,7 @@ shx_start ()
action->parent.title = strdup (title);
action->parent.name = strdup (name);
action->shcommand = strdup (command);
- action->parent.callback = shx_callback;
+ action->parent.callback = (DB_plugin_action_callback_t)shx_callback;
action->parent.flags = DB_ACTION_SINGLE_TRACK;
action->parent.next = NULL;
@@ -287,7 +287,7 @@ shx_start ()
action->parent.flags |= DB_ACTION_ALLOW_MULTIPLE_TRACKS;
if (prev)
- prev->parent.next = action;
+ prev->parent.next = (DB_plugin_action_t *)action;
prev = action;
if (!actions)