TC80ß7x32 deletes without inquiry

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

2JOUBE

VistaDelete is not meant as a switch to follow Windows settings, but a as workaround for a unlucky behavior of the used system delete operation in vista and windows 7, resulting into a huge memory consumption and a very slow operation of the whole windows system.

It's fine that you've found this context between the activation of this previous experimental switch and a (imho) rarely used windows settings, but could you please calm down?
I guess the proposed modification would not change anything for you between the behavior of TC7.56a and TC8.0 final.

Regards
Holger
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

I would prefer to get the confimation dialog by default regardless of the Windows setting. Why? Because it has always been the default to confirm such operations in TC.
Use Windows setting or disable the confirmation could be options.

A custom UI handler for this Windows operation would be the best solution but I fear there is currently no way to achieve this :-(
Last edited by Lefteous on 2011-10-31, 12:59 UTC, edited 2 times in total.
User avatar
petermad
Power Member
Power Member
Posts: 14810
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

I could simply assume that VistaDelete=0 if fNoConfirmRecycle is set.
I don't understand that - just because people has chosen not to be bothered to confirm that they want to delete to recycle bin, doesn't imply that they don't want the fast deletion of VistaDelete=1 in TC - I don't see the connection. :?

What could be interestiong is if TC could detect whether the recycle bin is enabled for the current drive - If not TC can assume VistaDelete=0 for that drive.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ghisler(Author) wrote:I could simply assume that VistaDelete=0 if fNoConfirmRecycle is set.
What do you think?
Christian, I think theese functions shouldn't be dependent (they are like dog and table). It would be better to use TC internal question dialog and then use FOF_NOCONFIRMATION to prevent displaying Explorer delete dialog (actually my Virtual Panel works this way - it asks user to delete and then calls SHFileOperation with this flag to prevent additional confirmations). In such case TC will ask confirmation independently of system settings. But you may add an option (disabled by default!) to use Explorer's confirmation instead of TC one for people who want to remove files w/o confirmations.
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

2MVV

Afair TC does not use SHFileOperation with VistaDelete=1, but IFileOperation.
This is done because SHFileOperation seems to create a single thread for each call (OS >= Vista).
IFileOperation performs faster by using less resources, but is only available in newer OS.
"using less resources" is the primary reason for this switch, being faster is imho only a welcome side effect.

This solution has a drawback: The delete confirmation dialog is the system dialog called from inside IFileOperation::PerformOperations!

You may have noticed the difference between "Do you really want to delete..?" and "Are you sure you want to move .. to the Recycle Bin?" in case you use <Del>, while <Shift+Del> or VistaDelete=0 always ask for "Do you really want to delete..?" (TCs own dialog).

I looks like this system "Delete Confirmation Dialog" depends on the system setting for delete confirmation.

Regards
Holger
JOUBE
Power Member
Power Member
Posts: 1478
Joined: 2004-07-08, 08:58 UTC

Post by *JOUBE »

Lefteous wrote:I would prefer to get the confimation dialog by default regardless of the Windows setting. Why? Because it has always been the default to confirm such operations in TC.
Use Windows setting or disable the confirmation could be settings.
Exact.
Last edited by JOUBE on 2011-10-31, 11:09 UTC, edited 1 time in total.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

As I see, there is a 'method' IFileOperation::SetOperationFlags that allows to set flag FOF_NOCONFIRMATION in case of using IFileOperation interface. So it seems that it is possible to prevent delete confirmations with this interface too.
Remarks

Set these flags before you call IFileOperation::PerformOperations to define the parameters for whatever operations are being performed, such as copy, delete, or rename.
So TC will ask for deletion (and not Explorer!) regardless of delete method and then perform deletion directly or to recycle bin using SHFileOperation or IFileOperation, it doesn't matter.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

NO confirm with Windows, A confirm with Tc [1].
This is unfortunately impossible with Explorer method or VistaDelete=1 - both use the Windows settings without giving the developer the option to override it.

That's why I suggested to turn off VistaDelete if the user has disabled recycle bin. The downside is that in Windows 8, the confirmation is off by default, so TC's delete function would again be very slow. :(
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Christian, do you have an option to prevent Explorer confirmations (like ones that I wrote above)? If you do, you may ask confirmation yourself and then call shell delete function w/o confirmations - no problem at all here.
User avatar
nursoda
Junior Member
Junior Member
Posts: 8
Joined: 2003-02-06, 16:01 UTC
Location: Emmendingen, Germany

Post by *nursoda »

Lefteous wrote:I would prefer to get the confimation dialog by default regardless of the Windows setting.
I second that. I was VERY distracted when I found out that I need to switch on WINDOWS delete confirmation to have a delete confirmation in TC!

Apart from that, with the RC7 behaviour, the switch "confirm upon deleting NON EMPTY directories" doesn't make sense any more.
___

PARTLY OFF TOPIC side note upon deletion / maybe RFE: Windows does delete to TRASH on local drives, which leads to an option to recover accidentally deleted files. This, no confirmation is OK for me. However, in mounted network drives, Windows does NOT delete to TRASH, so confirmation would be nice. I'd like to see TC giving me an option to reflect this distiction.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Christian, do you have an option to prevent Explorer confirmations (like ones that I wrote above)? If you do, you may ask confirmation yourself and then call shell delete function w/o confirmations - no problem at all here.
I could - but I would really prefer to let the system show the confirmations. Why? There is no way to determine whether the system would really delete to recycle bin or not. It depends on many factors, like free space, user settings per drive, and drive type. The function does know what it does, though, and shows the right dialog...
I would prefer to get the confimation dialog by default regardless of the Windows setting.
I would prefer that too, but it's not possible. There is a flag FOF_NOCONFIRMATION to turn OFF confirmations, but there is no flag to turn them ON for the case where the user has turned them off. :(
Author of Total Commander
https://www.ghisler.com
JOUBE
Power Member
Power Member
Posts: 1478
Joined: 2004-07-08, 08:58 UTC

Post by *JOUBE »

Code: Select all

Beta8:
01.11.11 Fixed: Make VistaDelete=1 the default ONLY if the user hasn't disabled delete confirmation dialogs in Recycle bin properties (32/64)
The way to handle it, is ok now.

I haven't tested this solution while installation process yet.

JOUBE
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks!
Author of Total Commander
https://www.ghisler.com
User avatar
karlchen
Power Member
Power Member
Posts: 4603
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Code: Select all

01.11.11 Fixed: Make VistaDelete=1 the default ONLY if the user hasn't disabled delete confirmation dialogs in Recycle bin properties (32/64)
Have tested this approach by switching off the recycle bin confirmation and removing VistaDelete from wincmd.ini alltogether or by using an empty INI file on Windows versions Vista, Windows 7 and Server 2008.
And I can confirm that with recycle bin confirmation being off Total Commander reverts back to VistaDelete=0 automatically.

So from my point of view this thread might be moved to the Fixed Bugs section.

Environments:
Windows Vista, Windows 7, Server 2008
Total Commander 8.0ß9 32-bit / 64-bit

Karl
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks!
Author of Total Commander
https://www.ghisler.com
Post Reply