From: Max Kellermann Date: Tue, 29 Sep 2009 18:36:04 +0000 (+0200) Subject: mpdclient: removed the "need_update" flag X-Git-Tag: release-0.16~311 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=821b6804e545b1565ae35f29ecd6ae8d7dcce610;p=ncmpc.git mpdclient: removed the "need_update" flag It's set, but never read. --- diff --git a/src/mpdclient.c b/src/mpdclient.c index 0b28edf..1728303 100644 --- a/src/mpdclient.c +++ b/src/mpdclient.c @@ -214,7 +214,6 @@ mpdclient_connect(struct mpdclient *c, mpd_send_password(c->connection, password); retval = mpdclient_finish_command(c); } - c->need_update = TRUE; return retval; } @@ -258,8 +257,6 @@ mpdclient_update(struct mpdclient *c) c->song = playlist_get_song(c, mpd_status_get_song_pos(c->status)); } - c->need_update = FALSE; - return retval; } @@ -281,7 +278,6 @@ mpdclient_cmd_play(struct mpdclient *c, gint idx) else mpd_send_play(c->connection); - c->need_update = TRUE; return mpdclient_finish_command(c); } @@ -347,7 +343,6 @@ mpdclient_cmd_next(struct mpdclient *c) return -1; mpd_send_next(c->connection); - c->need_update = TRUE; return mpdclient_finish_command(c); } @@ -358,7 +353,6 @@ mpdclient_cmd_prev(struct mpdclient *c) return -1; mpd_send_previous(c->connection); - c->need_update = TRUE; return mpdclient_finish_command(c); } @@ -379,7 +373,6 @@ mpdclient_cmd_shuffle(struct mpdclient *c) return -1; mpd_send_shuffle(c->connection); - c->need_update = TRUE; return mpdclient_finish_command(c); } @@ -387,7 +380,6 @@ gint mpdclient_cmd_shuffle_range(struct mpdclient *c, guint start, guint end) { mpd_send_shuffle_range(c->connection, start, end); - c->need_update = TRUE; return mpdclient_finish_command(c); } @@ -403,7 +395,6 @@ mpdclient_cmd_clear(struct mpdclient *c) retval = mpdclient_finish_command(c); /* call playlist updated callback */ mpdclient_playlist_callback(c, PLAYLIST_EVENT_CLEAR, NULL); - c->need_update = TRUE; return retval; } @@ -558,8 +549,6 @@ mpdclient_cmd_add(struct mpdclient *c, const struct mpd_song *song) /* call playlist updated callback */ mpdclient_playlist_callback(c, PLAYLIST_EVENT_ADD, (gpointer) song); -#else - c->need_update = TRUE; #endif return 0; @@ -595,15 +584,10 @@ mpdclient_cmd_delete(struct mpdclient *c, gint idx) mpdclient_playlist_callback(c, PLAYLIST_EVENT_DELETE, (gpointer) song); /* remove references to the song */ - if (c->song == song) { + if (c->song == song) c->song = NULL; - c->need_update = TRUE; - } mpd_song_free(song); - -#else - c->need_update = TRUE; #endif return 0; @@ -637,9 +621,6 @@ mpdclient_cmd_move(struct mpdclient *c, gint old_index, gint new_index) /* increment the playlist id, so we don't retrieve a new playlist */ c->playlist.id++; - -#else - c->need_update = TRUE; #endif /* call playlist updated callback */ @@ -669,7 +650,6 @@ mpdclient_cmd_load_playlist(struct mpdclient *c, const gchar *filename_utf8) return -1; mpd_send_load(c->connection, filename_utf8); - c->need_update = TRUE; return mpdclient_finish_command(c); } diff --git a/src/mpdclient.h b/src/mpdclient.h index 37c3681..10fc226 100644 --- a/src/mpdclient.h +++ b/src/mpdclient.h @@ -20,8 +20,6 @@ struct mpdclient { struct mpd_status *status; struct mpd_song *song; - gboolean need_update; - int volume; unsigned updatingdb; };