aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen_search.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-18 23:35:12 +0200
committerMax Kellermann <max@duempel.org>2008-09-18 23:35:12 +0200
commit92cf0efffffeb95fbefc57505d778e6fdbd772d4 (patch)
tree153b81b6b0903d1a32a00ab6d4d71816e49b9924 /src/screen_search.c
parentcde030e211b3d9ea517403b5d5547b6d374fc470 (diff)
downloadmpd-92cf0efffffeb95fbefc57505d778e6fdbd772d4.tar.gz
mpd-92cf0efffffeb95fbefc57505d778e6fdbd772d4.tar.xz
mpd-92cf0efffffeb95fbefc57505d778e6fdbd772d4.zip
screen_browser: moved code to browser_playlist_changed()
Merge code from all 3 browser screens into one generic browser function.
Diffstat (limited to '')
-rw-r--r--src/screen_search.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/screen_search.c b/src/screen_search.c
index 365a23c6f..549221e74 100644
--- a/src/screen_search.c
+++ b/src/screen_search.c
@@ -142,19 +142,9 @@ lw_search_help_callback(unsigned idx, mpd_unused int *highlight,
/* the playlist have been updated -> fix highlights */
static void
-playlist_changed_callback(mpdclient_t *c, int event, mpd_unused gpointer data)
+playlist_changed_callback(mpdclient_t *c, int event, gpointer data)
{
- if (browser.filelist == NULL)
- return;
- D("screen_search.c> playlist_callback() [%d]\n", event);
- switch(event) {
- case PLAYLIST_EVENT_CLEAR:
- clear_highlights(browser.filelist);
- break;
- default:
- sync_highlights(c, browser.filelist);
- break;
- }
+ browser_playlist_changed(&browser, c, event, data);
}
/* sanity check search mode value */