From: Max Kellermann Date: Sat, 17 Oct 2009 23:59:28 +0000 (+0200) Subject: mpdclient: renamed mpdclient_cmd_move() to mpdclient_cmd_swap() X-Git-Tag: release-0.16~86 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f4aa3b9b5c98d5698e80546f07fa67d54ef86f81;p=ncmpc.git mpdclient: renamed mpdclient_cmd_move() to mpdclient_cmd_swap() That function does not move, it swaps two songs. --- diff --git a/src/mpdclient.c b/src/mpdclient.c index 0d8c2ba..ab2a79b 100644 --- a/src/mpdclient.c +++ b/src/mpdclient.c @@ -619,7 +619,7 @@ mpdclient_cmd_delete_range(struct mpdclient *c, unsigned start, unsigned end) } bool -mpdclient_cmd_move(struct mpdclient *c, gint old_index, gint new_index) +mpdclient_cmd_swap(struct mpdclient *c, gint old_index, gint new_index) { struct mpd_connection *connection = mpdclient_get_connection(c); const struct mpd_song *song1, *song2; diff --git a/src/mpdclient.h b/src/mpdclient.h index 9f22d26..e73bd8a 100644 --- a/src/mpdclient.h +++ b/src/mpdclient.h @@ -120,7 +120,7 @@ bool mpdclient_cmd_delete_range(struct mpdclient *c, unsigned start, unsigned end); bool -mpdclient_cmd_move(struct mpdclient *c, gint old_index, gint new_index); +mpdclient_cmd_swap(struct mpdclient *c, gint old_index, gint new_index); /*** playlist functions **************************************************/ diff --git a/src/screen_queue.c b/src/screen_queue.c index 0130520..7d915eb 100644 --- a/src/screen_queue.c +++ b/src/screen_queue.c @@ -786,7 +786,7 @@ screen_queue_cmd(struct mpdclient *c, command_t cmd) return false; for (unsigned i = range.start; i < range.end; ++i) - mpdclient_cmd_move(c, i, i - 1); + mpdclient_cmd_swap(c, i, i - 1); lw->selected--; lw->range_base--; @@ -800,7 +800,7 @@ screen_queue_cmd(struct mpdclient *c, command_t cmd) return false; for (int i = range.end - 1; i >= (int)range.start; --i) - mpdclient_cmd_move(c, i, i + 1); + mpdclient_cmd_swap(c, i, i + 1); lw->selected++; lw->range_base++;