From 1edc4f1f1cf5928a20dbd474040107324653a69e Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Tue, 3 Nov 2009 21:49:37 +0100 Subject: [PATCH] use MPD_IDLE_QUEUE instead of deprecated MPD_IDLE_PLAYLIST flag Signed-off-by: Romain Bignon --- src/main.c | 8 ++++---- src/mpdclient.c | 8 ++++---- src/screen_artist.c | 4 ++-- src/screen_file.c | 2 +- src/screen_queue.c | 4 ++-- src/screen_search.c | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/main.c b/src/main.c index 8464035..29c53a8 100644 --- a/src/main.c +++ b/src/main.c @@ -1,17 +1,17 @@ /* ncmpc (Ncurses MPD Client) * (c) 2004-2009 The Music Player Daemon Project * Project homepage: http://musicpd.org - + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -55,7 +55,7 @@ #include #endif -/* time between mpd updates [s] */ +/* time between mpd updates [ms] */ static const guint update_interval = 500; #define BUFSIZE 1024 diff --git a/src/mpdclient.c b/src/mpdclient.c index 059a6ee..ca7a7b6 100644 --- a/src/mpdclient.c +++ b/src/mpdclient.c @@ -218,7 +218,7 @@ mpdclient_update(struct mpdclient *c) bool retval; if (c->source == NULL) - c->events |= MPD_IDLE_PLAYLIST; + c->events |= MPD_IDLE_QUEUE; if (!playlist_is_empty(&c->playlist)) retval = mpdclient_playlist_update_changes(c); @@ -441,7 +441,7 @@ mpdclient_cmd_add(struct mpdclient *c, const struct mpd_song *song) !mpd_response_next(connection)) return mpdclient_handle_error(c); - c->events |= MPD_IDLE_PLAYLIST; + c->events |= MPD_IDLE_QUEUE; status = mpdclient_recv_status(c); if (status == NULL) @@ -500,7 +500,7 @@ mpdclient_cmd_delete(struct mpdclient *c, gint idx) !mpd_command_list_end(connection)) return mpdclient_handle_error(c); - c->events |= MPD_IDLE_PLAYLIST; + c->events |= MPD_IDLE_QUEUE; status = mpdclient_recv_status(c); if (status == NULL) @@ -582,7 +582,7 @@ mpdclient_cmd_delete_range(struct mpdclient *c, unsigned start, unsigned end) !mpd_command_list_end(connection)) return mpdclient_handle_error(c); - c->events |= MPD_IDLE_PLAYLIST; + c->events |= MPD_IDLE_QUEUE; status = mpdclient_recv_status(c); if (status == NULL) diff --git a/src/screen_artist.c b/src/screen_artist.c index 9bd1b3e..d6011a7 100644 --- a/src/screen_artist.c +++ b/src/screen_artist.c @@ -394,12 +394,12 @@ screen_artist_update(struct mpdclient *c) /* the db has changed -> update the list */ reload_lists(c); - if (c->events & (MPD_IDLE_DATABASE | MPD_IDLE_PLAYLIST)) + if (c->events & (MPD_IDLE_DATABASE | MPD_IDLE_QUEUE)) screen_browser_sync_highlights(browser.filelist, &c->playlist); if (c->events & (MPD_IDLE_DATABASE #ifndef NCMPC_MINI - | MPD_IDLE_PLAYLIST + | MPD_IDLE_QUEUE #endif )) artist_repaint(); diff --git a/src/screen_file.c b/src/screen_file.c index 25a86d1..c6effe4 100644 --- a/src/screen_file.c +++ b/src/screen_file.c @@ -323,7 +323,7 @@ screen_file_update(struct mpdclient *c) if (c->events & (MPD_IDLE_DATABASE | MPD_IDLE_STORED_PLAYLIST #ifndef NCMPC_MINI - | MPD_IDLE_PLAYLIST + | MPD_IDLE_QUEUE #endif )) { screen_browser_sync_highlights(browser.filelist, &c->playlist); diff --git a/src/screen_queue.c b/src/screen_queue.c index 79a112b..f3ca21a 100644 --- a/src/screen_queue.c +++ b/src/screen_queue.c @@ -551,12 +551,12 @@ screen_queue_paint(void) static void screen_queue_update(struct mpdclient *c) { - if (c->events & MPD_IDLE_PLAYLIST) + if (c->events & MPD_IDLE_QUEUE) screen_queue_restore_selection(); if (((c->events & MPD_IDLE_PLAYER) != 0 && screen_queue_song_change(c->status)) || - c->events & MPD_IDLE_PLAYLIST) + c->events & MPD_IDLE_QUEUE) /* the queue or the current song has changed, we must paint the new version */ screen_queue_repaint(); diff --git a/src/screen_search.c b/src/screen_search.c index 5ca210d..0561ae3 100644 --- a/src/screen_search.c +++ b/src/screen_search.c @@ -426,7 +426,7 @@ screen_search_get_title(char *str, size_t size) static void screen_search_update(struct mpdclient *c) { - if (browser.filelist != NULL && c->events & MPD_IDLE_PLAYLIST) { + if (browser.filelist != NULL && c->events & MPD_IDLE_QUEUE) { screen_browser_sync_highlights(browser.filelist, &c->playlist); search_repaint(); } -- 2.30.2