summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-12-28 22:01:06 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-12-28 22:01:06 +0100
commitc6d490fb6674263dbefe3cfb493cf5f230cde32c (patch)
treed85f29aa42845f7aa23ad41d079bba7e2e06ced6 /plugins
parent0a230ab204c7e3372ebd53bf79e7ca518a515838 (diff)
fixed enter key handler regression in search window
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gtkui/search.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/gtkui/search.c b/plugins/gtkui/search.c
index 1fe382af..0c45125d 100644
--- a/plugins/gtkui/search.c
+++ b/plugins/gtkui/search.c
@@ -49,7 +49,6 @@ extern DB_functions_t *deadbeef; // defined in gtkui.c
extern GtkWidget *searchwin;
struct playItem_s *search_current = NULL;
-int search_count = 0;
void
search_restore_attrs (void) {
@@ -181,7 +180,7 @@ on_searchwin_key_press_event (GtkWidget *widget,
else if (event->keyval == GDK_Return) {
extern gtkplaylist_t search_playlist;
gtkplaylist_t *ps = &search_playlist;
- if (search_count > 0) {
+ if (deadbeef->pl_getcount (ps->iterator) > 0) {
int row = deadbeef->pl_get_cursor (ps->iterator);
DB_playItem_t *it = deadbeef->pl_get_for_idx_and_iter (max (row, 0), ps->iterator);
if (it) {