summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aa0ea87)
raw | patch | inline | side by side (parent: aa0ea87)
author | Max Kellermann <max@duempel.org> | |
Wed, 30 Sep 2009 18:28:30 +0000 (20:28 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Wed, 30 Sep 2009 18:28:30 +0000 (20:28 +0200) |
This function is unused, since we have switched to idle events.
src/screen_browser.c | patch | blob | history | |
src/screen_browser.h | patch | blob | history |
diff --git a/src/screen_browser.c b/src/screen_browser.c
index bce4083af5aab1bde60396e9ca920db953737146..c09497d0eac874588fb28059eec8cb2c2ef12173 100644 (file)
--- a/src/screen_browser.c
+++ b/src/screen_browser.c
#ifndef NCMPC_MINI
-/* clear the highlight flag for all items in the filelist */
-static void
-clear_highlights(struct filelist *fl)
-{
- guint i;
-
- for (i = 0; i < filelist_length(fl); ++i) {
- struct filelist_entry *entry = filelist_get(fl, i);
-
- entry->flags &= ~HIGHLIGHT;
- }
-}
-
-/* change the highlight flag for a song */
-static void
-set_highlight(struct filelist *fl, struct mpd_song *song, int highlight)
-{
- int i = filelist_find_song(fl, song);
- struct filelist_entry *entry;
-
- if (i < 0)
- return;
-
- entry = filelist_get(fl, i);
- if (highlight)
- entry->flags |= HIGHLIGHT;
- else
- entry->flags &= ~HIGHLIGHT;
-}
-
/* sync highlight flags with playlist */
void
sync_highlights(struct mpdclient *c, struct filelist *fl)
}
}
-/* the playlist has been updated -> fix highlights */
-void
-browser_playlist_changed(struct screen_browser *browser, struct mpdclient *c,
- int event, gpointer data)
-{
- if (browser->filelist == NULL)
- return;
-
- switch(event) {
- case PLAYLIST_EVENT_CLEAR:
- clear_highlights(browser->filelist);
- break;
- case PLAYLIST_EVENT_ADD:
- set_highlight(browser->filelist, (struct mpd_song *) data, 1);
- break;
- case PLAYLIST_EVENT_DELETE:
- set_highlight(browser->filelist, (struct mpd_song *) data, 0);
- break;
- case PLAYLIST_EVENT_MOVE:
- break;
- default:
- sync_highlights(c, browser->filelist);
- break;
- }
-}
-
#endif
/* list_window callback */
diff --git a/src/screen_browser.h b/src/screen_browser.h
index 44d1d66b71b6434f0b13543fa490bc455952aeb4..54e94de86ace670ea6fe92386e644492dc1dbb1f 100644 (file)
--- a/src/screen_browser.h
+++ b/src/screen_browser.h
void
sync_highlights(struct mpdclient *c, struct filelist *fl);
-void
-browser_playlist_changed(struct screen_browser *browser, struct mpdclient *c,
- int event, gpointer data);
-
#endif
const char *browser_lw_callback(unsigned index, bool *highlight, char** second_column, void *filelist);