This forum uses cookies. Click X button to hide this message. What is stored? / Privacy
Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

no confirmation in drag'n'drop to desktop windows

 
Post new topic   Reply to topic    Total Commander Forum Index -> TC8.5x bug reports (English) Printable version
View previous topic :: View next topic  
Author Message
Michael REMY
Member
Member


Joined: 12 Dec 2010
Posts: 193
Location: Amiens

PostPosted: Mon Jun 06, 2016 8:47 am    Post subject: no confirmation in drag'n'drop to desktop windows Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 8001
Location: Russian Federation

PostPosted: Mon Jun 06, 2016 10:25 am    Post subject: Reply with quote

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.
_________________
TCFS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…


Last edited by MVV on Mon Jun 06, 2016 10:37 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
elgonzo
Senior Member
Senior Member


Joined: 04 Sep 2013
Posts: 377

PostPosted: Mon Jun 06, 2016 10:36 am    Post subject: Reply with quote

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... Smile

EDIT: MVV was faster. Anyway, two same answers are twice as strong, right? Very Happy
_________________
Windows 7 Pro x64 SP1


Last edited by elgonzo on Mon Jun 06, 2016 10:43 am; edited 3 times in total
Back to top
View user's profile Send private message
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 8001
Location: Russian Federation

PostPosted: Mon Jun 06, 2016 10:40 am    Post subject: Reply with quote

Quote:
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. Very Happy
_________________
TCFS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…


Last edited by MVV on Mon Jun 06, 2016 10:41 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Michael REMY
Member
Member


Joined: 12 Dec 2010
Posts: 193
Location: Amiens

PostPosted: Mon Jun 06, 2016 10:40 am    Post subject: Reply with quote

Quote:
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.
Back to top
View user's profile Send private message Visit poster's website
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 8001
Location: Russian Federation

PostPosted: Mon Jun 06, 2016 10:45 am    Post subject: Reply with quote

As elgonzo stated,
Quote:
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
_________________
TCFS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…


Last edited by MVV on Mon Jun 06, 2016 10:46 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
elgonzo
Senior Member
Senior Member


Joined: 04 Sep 2013
Posts: 377

PostPosted: Mon Jun 06, 2016 10:45 am    Post subject: Reply with quote

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... Wink

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... Sad
_________________
Windows 7 Pro x64 SP1


Last edited by elgonzo on Mon Jun 06, 2016 1:24 pm; edited 22 times in total
Back to top
View user's profile Send private message
elgonzo
Senior Member
Senior Member


Joined: 04 Sep 2013
Posts: 377

PostPosted: Mon Jun 06, 2016 10:49 am    Post subject: Reply with quote

MVV wrote:
As elgonzo stated,
Quote:
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...
_________________
Windows 7 Pro x64 SP1
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> TC8.5x bug reports (English) All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Imprint/Impressum: This site is maintained by Ghisler Software GmbH
Privacy Policy | Datenschutzerklärung | Politique de Confidentialité

Using phpBB © phpBB Group