summaryrefslogtreecommitdiff
path: root/plugins/gtkui/gtkplaylist.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-12-30 20:19:00 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-12-30 20:19:00 +0100
commit3c795a6339f5ee1d5b8c6e294e2aec5fee77b45b (patch)
treefec35b257c8fadb2a2894a8a52ae7110aff66d16 /plugins/gtkui/gtkplaylist.c
parentad64707757fda99d212a23b82a65aa37525ad851 (diff)
fixed few keyboard navigation conflicts in search window
Diffstat (limited to 'plugins/gtkui/gtkplaylist.c')
-rw-r--r--plugins/gtkui/gtkplaylist.c26
1 files changed, 3 insertions, 23 deletions
diff --git a/plugins/gtkui/gtkplaylist.c b/plugins/gtkui/gtkplaylist.c
index 097d1c28..1ddd02ea 100644
--- a/plugins/gtkui/gtkplaylist.c
+++ b/plugins/gtkui/gtkplaylist.c
@@ -896,7 +896,7 @@ main_refresh (void) {
}
}
-void
+int
gtkpl_keypress (gtkplaylist_t *ps, int keyval, int state) {
GtkWidget *range = ps->scrollbar;
int prev = deadbeef->pl_get_cursor (ps->iterator);
@@ -954,7 +954,7 @@ gtkpl_keypress (gtkplaylist_t *ps, int keyval, int state) {
search_refresh ();
}
else {
- return;
+ return 0 ;
}
if (state & GDK_SHIFT_MASK) {
if (cursor != prev) {
@@ -992,28 +992,8 @@ gtkpl_keypress (gtkplaylist_t *ps, int keyval, int state) {
else {
shift_sel_anchor = cursor;
gtkpl_set_cursor (ps->iterator, cursor);
-#if 0
- // reset selection, set new single cursor and selection
- if (prev != deadbeef->pl_get_cursor (ps->iterator)) {
- int idx=0;
- for (DB_playItem_t *it = PL_HEAD (ps->iterator); it; it = PL_NEXT(it, ps->iterator), idx++) {
- if (idx == cursor) {
- if (!SELECTED (it)) {
- VSELECT (it, 1);
- }
- }
- else if (SELECTED (it)) {
- VSELECT (it, 0);
- }
- }
- }
-#endif
}
-#if 0
- if (newscroll != ps->scrollpos) {
- gtk_range_set_value (GTK_RANGE (range), newscroll);
- }
-#endif
+ return 1;
}
static int drag_motion_y = -1;