summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c804e41)
raw | patch | inline | side by side (parent: c804e41)
author | Max Kellermann <max@duempel.org> | |
Sat, 17 Oct 2009 23:59:28 +0000 (01:59 +0200) | ||
committer | Max 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 | patch | blob | history | |
src/mpdclient.h | patch | blob | history | |
src/screen_queue.c | patch | blob | history |
diff --git a/src/mpdclient.c b/src/mpdclient.c
index 0d8c2baa3bed341708e043edf4a2fc97b89582ab..ab2a79b56492d28cf554c5b5bf3697c4bdad8edf 100644 (file)
--- a/src/mpdclient.c
+++ b/src/mpdclient.c
}
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 9f22d268cc046e05b1c8279b0459231590e77a23..e73bd8a8f498e9739e3e45c19b98f76bb5996950 100644 (file)
--- a/src/mpdclient.h
+++ b/src/mpdclient.h
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 01305203e7c91001508b3f9ab403b8b197251dca..7d915ebf9b242496175727962c2794f1503631f2 100644 (file)
--- a/src/screen_queue.c
+++ b/src/screen_queue.c
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--;
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++;