diff options
author | Alexey Yakovenko <waker@users.sourceforge.net> | 2014-07-10 20:02:13 +0200 |
---|---|---|
committer | Alexey Yakovenko <waker@users.sourceforge.net> | 2014-07-10 20:02:13 +0200 |
commit | d1748031d9a296056f92f9aadc8abe76ae74e7bd (patch) | |
tree | 0f49dcb732b32cce6945c47168f39dec063b5873 /plugins | |
parent | c8938c7bf2dbcbbc68c92140d6dd4b3c566e7d3e (diff) |
fixed "play" action when nothing is selected and playback is stopped (bug #1148)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/gtkui/callbacks.c | 3 | ||||
-rw-r--r-- | plugins/hotkeys/hotkeys.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/plugins/gtkui/callbacks.c b/plugins/gtkui/callbacks.c index 913a17fb..981e2a63 100644 --- a/plugins/gtkui/callbacks.c +++ b/plugins/gtkui/callbacks.c @@ -153,6 +153,9 @@ on_playbtn_clicked (GtkButton *button, cur = deadbeef->plt_get_cursor (plt, PL_MAIN); deadbeef->plt_unref (plt); } + if (cur == -1) { + cur = 0; + } deadbeef->sendmessage (DB_EV_PLAY_NUM, 0, cur, 0); } } diff --git a/plugins/hotkeys/hotkeys.c b/plugins/hotkeys/hotkeys.c index db270d1c..230c01b9 100644 --- a/plugins/hotkeys/hotkeys.c +++ b/plugins/hotkeys/hotkeys.c @@ -620,6 +620,9 @@ action_play_cb (struct DB_plugin_action_s *action, int ctx) { cur = deadbeef->plt_get_cursor (plt, PL_MAIN); deadbeef->plt_unref (plt); } + if (cur == -1) { + cur = 0; + } deadbeef->sendmessage (DB_EV_PLAY_NUM, 0, cur, 0); } return 0; |