no confirmation in drag'n'drop to desktop windows

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Michael REMY
Senior Member
Senior Member
Posts: 202
Joined: 2010-12-12, 10:05 UTC
Location: Amiens

no confirmation in drag'n'drop to desktop windows

Post by *Michael REMY »

hi,

when you drag a file from TC side to drop it to Windows's desktop, the file is move (not a copy one)

but when you do the reverse, so drag a file from the destop to a TC's side, then there is a copy (not a move) and there is a confirmation dialog window.

i think it would be more userful to have a confirmation window during the MOVE operation (drag from TC to desktop).
And that the reverse operation would be a MOVE one too, and not a copy one.

best regards
i'm an old long user of TC since the windows 3.11 release !, for the history, i came to tc when i migrate from amiga commodore to PC where they are diskmanager and directory opus there.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Problem here is that drop target application decides what to do with files.

In first case drop target application is Explorer which moves by default when source and destination paths have same drive letter (Alt, Ctrl or Shift may change action), and it doesn't show any confirmations.
In second case drop target application is TC which always copies by default regarding of drive letters (much better consistent behaviour; Shift may change action to move), and it does show confirmations.

Since TC can't change Explorer behaviour and it is a bad idea to change TC own behaviour, I think it is better to leave it as is. Just keep this difference in mind and remember that drop icon shows which action will be performed: if it has a plus sign, files will be copied, if it has link sign, links will be made, otherwise files will be moved.
Last edited by MVV on 2016-06-06, 16:37 UTC, edited 1 time in total.
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Post by *gdpr deleted 6 »

It is the target of the drag'n'drop operation, which is responsible for asking (or not asking) for confirmation.

If you think about it, this makes sense. The source of the drag'n'drop operation doesn't know what the target will eventually do with the data associated with the drag'n'drop operation.

Also, the source cannot in any sane way say or decide what the target should do or not do. That means, the source just initiates the drag. But the target processes the drop; the source is not involved with processing the drop.

With regard to your issue, it is explorer.exe (the target, your desktop shell) that is not asking for confirmation. TC (the source) has nothing to do with and cannot do anything about how a drag'n'drop target handles business. That is by design of the Windows OS...


With regard to Move vs. Copy. The action taking place during a drop is decided by the drop target.
If TC is the drop target, TC always default to a copy operation (hold down shift to move).

If explorer.exe is the drop target (like the desktop or a Windows explorer window), it does the "explorer thing", i.e. explorer tries to be smart but more often than not will be stupid about what drop action should be the default (based on whether source and target directory are on the same partition or not).

Not sure whether you are asking that TC should behave as "smart"/stupid, but i find TC's behaviour as a drop target much better. The behavior is sane, it is consistent and does not depend on environmental factors (such as where/what the location of the drag souce is). Explorer's "smart"/stupid drop behaviour always requires you to pay close attention from where to where you drag'n'drop stuff, because otherwise you just move stuff you did not want to be moved. But that's just my opinion. I just want to have things which i can get use in "auto-pilot" mode without worrying about whether the behaviour of these things change in whatever particular situation... :)

EDIT: MVV was faster. Anyway, two same answers are twice as strong, right? :D
Last edited by gdpr deleted 6 on 2016-06-06, 16:43 UTC, edited 3 times in total.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

explorer tries to be smart about what drop action should be the default (based on whether source and target directory are on the same partition or not)
Actually Explorer simply compares drive letters in source and destination paths, but not partitions. Real partitions depend on reparse points in paths but Explorer doesn't resolve them. So I wouldn't call Explorer smart. :D
Last edited by MVV on 2016-06-06, 16:41 UTC, edited 1 time in total.
Michael REMY
Senior Member
Senior Member
Posts: 202
Joined: 2010-12-12, 10:05 UTC
Location: Amiens

Post by *Michael REMY »

Not sure whether you are asking that TC should behave as smart as explorer
i just wanted both have the same behaviour, whatever it is.
both have the same operation (copy or move - you define, not me) and both have the confirmation window (whatever the operation will be).


At least, if TC would ask (confirmation window) to confirm the drag (from tc to explorer/desktop) it would be perfect because a move have more critical important effect than a copy operation.
ps : And often (quick mouse and touchpad), i do move (drag'n'drop from tc2dk). that why, confirmation would be perfect at least.
i'm an old long user of TC since the windows 3.11 release !, for the history, i came to tc when i migrate from amiga commodore to PC where they are diskmanager and directory opus there.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

As elgonzo stated,
the source cannot in any sane way say or decide what the target should do or not do
In fact, TC even doesn't know which application is a drag target, it communicates with all of them via generic interface.

So you should be careful if you drop files to desktop. Just wait a second before dropping and look if drop cursor have plus sign. :wink:
Last edited by MVV on 2016-06-06, 16:46 UTC, edited 1 time in total.
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Post by *gdpr deleted 6 »

Michael REMY wrote: At least, if TC would ask (confirmation window) to confirm the drag (from tc to explorer/desktop) it would be perfect [...]
Hold on for a moment. Try to visualize for yourself how this should work.
You aim for a file in TC, then click-hold on it, and then you start moving the mouse, and then...

Oh damn, the cat just spilled my coffee, and i just lost my thought... ;)

P.S.
In case you don't understand my silly attempts in humor: TC, like any other application, only does the initialization for a d'n'd operation. This initialization is more or less just a call to a Windows system function passing some payload data associated with the d'n'd operation. This function call usually happens right when you start dragging (i.e. start moving your mouse while click-holding something).

From there on, Windows takes over and TC has nothing to with the d'n'd operation anymore. When you release the mouse button, Windows will identify the UI element underneath the mouse. If this UI element is a viable drop target, Windows will pass the payload data of the d'n'd operation (in your case a path to a file or directory; or a collection thereof) to this UI element, and the UI element finishes the drop operation. If the UI element is not a viable drop target, the payload data is simply discarded. (There is a little more to the whole she-bang, like managing different mouse cursor shapes and stuff, but let's not get side-tracked...) TC is not involved in all of this. And nowhere in the whole procedure can TC intervene and ask for some confirmation -- unless TC itself is also the drop target. But in your case, TC is only the source and explorer is the target; no can do...

Thus, the only time TC could intervene and ask for confirmation is right when you start dragging the mouse. This is not really going to work in any scenario.

But let's just be silly for a second and pretend it is going to work. Somehow... All that TC could actually ask would be something like "Do you really want to drop?". Remember, TC does not know who/what the drop target is, and what the target will actually do with the payload.

Also remember that not all drag'n'drop actions are file copy/move operations. You might d'n'd an image file into Photoshop. You might d'n'd a diagram into a MS Word document. You might want to d'n'd a PDF onto printer. etc... TC would not know any of this. All TC could do (assuming it would be possible -- which it is not, as explained above), is asking
"Do you want to drop the file?" when you d'n'd a file onto the desktop,
"Do you want to drop the file?" when you d'n'd a PDF file onto the printer.
"Do you want to drop the file?" when you d'n'd a file with a graphic into a Word document.
That would be a rather useless confirmation dialog. Anyway, this is just talking about hypotheticals, since in reality TC and any other application is not able to ask for a confirmation during the drag phase (nor during the drop unless it is also the drop target).

As much as i understand your wish, there is nothing TC can do about it, unfortunately... :(
Last edited by gdpr deleted 6 on 2016-06-06, 19:24 UTC, edited 22 times in total.
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Post by *gdpr deleted 6 »

MVV wrote:As elgonzo stated,
the source cannot in any sane way say or decide what the target should do or not do
In fact, TC even doesn't know which application is a drag target, it communicates with all of them via generic interface.
I was not specifically speaking about TC here when i said "source". There might be ways to mess with the OS in an irresponsible manner through hooking or something, i don't know; but it certainly is not sane to mess with the OS in such ways. But generally you are right, an application does not know what other application will receive the drop event and what that other application will do...
Post Reply