summaryrefslogtreecommitdiff
path: root/search.c
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2009-08-09 16:44:44 +0200
committerGravatar waker <wakeroid@gmail.com>2009-08-09 16:44:44 +0200
commit0a4f45531cd0ae567f343434624436368dbdf080 (patch)
treef1c27cf32000adbfed8d3388049c0cdaef094392 /search.c
parentbbfb79b3b6d82c88417f868fc897ad7c40d8b6c3 (diff)
added search window refresh on some of playlist changes
Diffstat (limited to 'search.c')
-rw-r--r--search.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/search.c b/search.c
index 6c2cafcf..7bbfa76d 100644
--- a/search.c
+++ b/search.c
@@ -86,11 +86,21 @@ on_searchentry_changed (GtkEditable *editable,
extern gtkplaylist_t search_playlist;
gtkplaylist_t *ps = &search_playlist;
gtkps_setup_scrollbar (ps);
+ if (ps->row >= search_count) {
+ ps->row = search_count-1;
+ }
memset (ps->fmtcache, 0, sizeof (int16_t) * 3 * ps_ncolumns * ps->nvisiblerows);
gtkps_draw_playlist (ps, 0, 0, ps->playlist->allocation.width, ps->playlist->allocation.height);
gtkps_expose (ps, 0, 0, ps->playlist->allocation.width, ps->playlist->allocation.height);
}
+void
+search_refresh (void) {
+ if (searchwin) {
+ on_searchentry_changed (GTK_EDITABLE (lookup_widget (searchwin, "searchentry")), NULL);
+ }
+}
+
///////// searchwin header handlers
gboolean