Code

mpdclient: renamed mpdclient_cmd_move() to mpdclient_cmd_swap()
authorMax Kellermann <max@duempel.org>
Sat, 17 Oct 2009 23:59:28 +0000 (01:59 +0200)
committerMax Kellermann <max@duempel.org>
Sat, 17 Oct 2009 23:59:28 +0000 (01:59 +0200)
That function does not move, it swaps two songs.

src/mpdclient.c
src/mpdclient.h
src/screen_queue.c

index 0d8c2baa3bed341708e043edf4a2fc97b89582ab..ab2a79b56492d28cf554c5b5bf3697c4bdad8edf 100644 (file)
@@ -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;
index 9f22d268cc046e05b1c8279b0459231590e77a23..e73bd8a8f498e9739e3e45c19b98f76bb5996950 100644 (file)
@@ -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  **************************************************/
 
index 01305203e7c91001508b3f9ab403b8b197251dca..7d915ebf9b242496175727962c2794f1503631f2 100644 (file)
@@ -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++;