From 215c8e04d10ade25d87ffbc71ba65fc5dd1f039e Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Sat, 23 Nov 2013 21:25:27 +0100 Subject: gtkui: cleanup songchanged_cb; prevent auto-switching playlists because of cursor follows playback; added plt_deselect_all API --- playlist.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'playlist.c') diff --git a/playlist.c b/playlist.c index 83f1d4c7..eb6268cc 100644 --- a/playlist.c +++ b/playlist.c @@ -4129,3 +4129,12 @@ plt_add_files_end (playlist_t *plt, int visibility) { l->callback_end (&d, l->user_data); } } + +void +plt_deselect_all (playlist_t *playlist) { + LOCK; + for (playItem_t *it = playlist->head[PL_MAIN]; it; it = it->next[PL_MAIN]) { + it->selected = 0; + } + UNLOCK; +} -- cgit v1.2.3