From d726fd50a2e6620f4f9df0a4a74b23cc61e53cf9 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Sat, 8 Aug 2009 19:36:27 +0000 Subject: [PATCH] When picking file destinations via the slow context popup, also do the copy vs move check based on device. Fixes ticket 4202. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32210 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/tracker/ContainerWindow.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/kits/tracker/ContainerWindow.cpp b/src/kits/tracker/ContainerWindow.cpp index 652d79c8a5..3cf26f5a0c 100644 --- a/src/kits/tracker/ContainerWindow.cpp +++ b/src/kits/tracker/ContainerWindow.cpp @@ -1587,9 +1587,20 @@ BContainerWindow::MessageReceived(BMessage *message) entry.GetRef(&targetref); // if they don't match, move/copy - if (targetref != parentref) + if (targetref != parentref) { + uint32 moveMode = kMoveSelectionTo; + node_ref targetNode; + node_ref parentNode; + if (entry.GetNodeRef(&targetNode) == B_OK + && itemparent.GetNodeRef(&parentNode) + == B_OK) { + if (targetNode.device == parentNode.device) + moveMode = kCopySelectionTo; + } // copy drag contents to target ref in message - FSMoveToFolder(list, new BEntry(entry), kMoveSelectionTo); + FSMoveToFolder(list, new BEntry(entry), + moveMode); + } } else { // current message sent to apps is only B_REFS_RECEIVED