From f4aa3b9b5c98d5698e80546f07fa67d54ef86f81 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 18 Oct 2009 01:59:28 +0200 Subject: [PATCH] mpdclient: renamed mpdclient_cmd_move() to mpdclient_cmd_swap() That function does not move, it swaps two songs. --- src/mpdclient.c | 2 +- src/mpdclient.h | 2 +- src/screen_queue.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) 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++; -- 2.30.2