diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2009-12-30 20:29:01 +0100 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2009-12-30 20:29:01 +0100 |
commit | 9ffb5924be3a78c5c0e5512b2616d1307ee35944 (patch) | |
tree | b8842d7ddb0784803e3a56a8e1e6c075ac6b902e /plugins | |
parent | 3c795a6339f5ee1d5b8c6e294e2aec5fee77b45b (diff) |
fixed regression in delete_selected handler
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/gtkui/gtkplaylist.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/plugins/gtkui/gtkplaylist.c b/plugins/gtkui/gtkplaylist.c index 1ddd02ea..e7860565 100644 --- a/plugins/gtkui/gtkplaylist.c +++ b/plugins/gtkui/gtkplaylist.c @@ -938,17 +938,9 @@ gtkpl_keypress (gtkplaylist_t *ps, int keyval, int state) { cursor = 0; } else if (keyval == GDK_Delete) { - GtkWidget *widget = ps->playlist; - int row = deadbeef->pl_delete_selected (); - if (row >= ps->get_count ()) { - row = ps->get_count ()-1; - } - deadbeef->pl_set_cursor (ps->iterator, row); - if (row != -1) { - DB_playItem_t *it = deadbeef->pl_get_for_idx (row); - if (it) { - deadbeef->pl_set_selected (it, 1); - } + cursor = deadbeef->pl_delete_selected (); + if (cursor >= ps->get_count ()) { + cursor = ps->get_count ()-1; } main_refresh (); search_refresh (); |