From 92cf0efffffeb95fbefc57505d778e6fdbd772d4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 18 Sep 2008 23:35:12 +0200 Subject: screen_browser: moved code to browser_playlist_changed() Merge code from all 3 browser screens into one generic browser function. --- src/screen_file.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'src/screen_file.c') diff --git a/src/screen_file.c b/src/screen_file.c index 801c61f9f..ea20f9506 100644 --- a/src/screen_file.c +++ b/src/screen_file.c @@ -53,23 +53,7 @@ file_changed_callback(mpdclient_t *c, mpd_unused int event, static void playlist_changed_callback(mpdclient_t *c, int event, gpointer data) { - D("screen_file.c> playlist_callback() [%d]\n", event); - switch(event) { - case PLAYLIST_EVENT_CLEAR: - clear_highlights(browser.filelist); - break; - case PLAYLIST_EVENT_ADD: - set_highlight(browser.filelist, (mpd_Song *) data, 1); - break; - case PLAYLIST_EVENT_DELETE: - set_highlight(browser.filelist, (mpd_Song *) data, 0); - break; - case PLAYLIST_EVENT_MOVE: - break; - default: - sync_highlights(c, browser.filelist); - break; - } + browser_playlist_changed(&browser, c, event, data); } static int -- cgit v1.2.3