summaryrefslogtreecommitdiff
path: root/plugins/gtkui/mainplaylist.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-18 12:02:53 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-18 12:02:53 +0200
commit78bf582fb29151a916d2c93e9f056d9464d1f997 (patch)
tree3f496d985eb4108dc4e3f8a12b3e3ee0557eb8f9 /plugins/gtkui/mainplaylist.c
parent9d08630aea8485c5e22efc0745a5cbca1f5bf9e4 (diff)
dragndrop move/copy action selection
Diffstat (limited to 'plugins/gtkui/mainplaylist.c')
-rw-r--r--plugins/gtkui/mainplaylist.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/gtkui/mainplaylist.c b/plugins/gtkui/mainplaylist.c
index 4e8ddd93..f360fecf 100644
--- a/plugins/gtkui/mainplaylist.c
+++ b/plugins/gtkui/mainplaylist.c
@@ -98,14 +98,15 @@ int main_get_idx (DdbListviewIter it) {
return idx;
}
-void main_drag_n_drop (DdbListviewIter before, int playlist, uint32_t *indices, int length) {
+void
+main_drag_n_drop (DdbListviewIter before, int from_playlist, uint32_t *indices, int length, int copy) {
deadbeef->plt_lock ();
int curr = deadbeef->plt_get_curr ();
- if (playlist == curr) {
- deadbeef->pl_move_items (PL_MAIN, (DB_playItem_t *)before, indices, length);
+ if (copy) {
+ deadbeef->pl_copy_items (PL_MAIN, from_playlist, (DB_playItem_t *)before, indices, length);
}
else {
- deadbeef->pl_copy_items (PL_MAIN, playlist, (DB_playItem_t *)before, indices, length);
+ deadbeef->pl_move_items (PL_MAIN, from_playlist, (DB_playItem_t *)before, indices, length);
}
deadbeef->plt_unlock ();
}