[TC 11.00b6] cm_OpenDriveByIndex doesn't work as stated

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Fla$her
Power Member
Power Member
Posts: 2382
Joined: 2020-01-18, 04:03 UTC

[TC 11.00b6] cm_OpenDriveByIndex doesn't work as stated

Post by *Fla$her »

07.06.23 Added: cm_OpenDriveByIndex can now accept negative numbers below -100, where -101 would be the last button instead of the last drive (-1) (32/64)
1. The result is the opposite: parameter -1 switches to the last button, while -101 switches to the last drive.
2. It's logical to make the operation of positive parameters similar: 1-100 for drive letters, 101+ for buttons.
Last edited by Fla$her on 2023-06-07, 17:41 UTC, edited 1 time in total.
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 14898
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.00b6] cm_OpenDriveByIndex doesn't work as stated

Post by *petermad »

1. The result is the opposite: parameter -1 switches to the last button, while -101 switches to the last disk.
Confirmed. Furthermore -101 etc. does NOT work when the Drive button bar is visible in 64bit TC.

Also:
Eith drive button bar disabled:
-1 goes to the last drive letter, but -101 goes to \\Network
-2 goes to the second last drive letter, but -102 goes to cd "%USERPROFILE%\Documents" as expected

With drive buttons enabled:
-1 goes to \\Network, but -101 does nothing in 64bit TC and goes to last drive letter in 32bit TC
-2 goes to goes to the last drive letter, and -102 does nothing in 64bit TC and goes to second last drive letter in32bit TC.

U1, U2 etc. drives are neglected.

I would expect values below -100 to do the same whether the drive button bar is enabled or not.
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
ghisler(Author)
Site Admin
Site Admin
Posts: 48203
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.00b6] cm_OpenDriveByIndex doesn't work as stated

Post by *ghisler(Author) »

I can confirm that it's broken when drive button bars are enabled. I will fix it.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2382
Joined: 2020-01-18, 04:03 UTC

Re: [TC 11.00b6] cm_OpenDriveByIndex doesn't work as stated

Post by *Fla$her »

1. Fixed in b7.
2. Consistency with positive values (1+/101+ for drives/buttons) is still broken.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48203
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.00b6] cm_OpenDriveByIndex doesn't work as stated

Post by *ghisler(Author) »

1. Thanks for confirming the fix!
2. Since buttons always start with drive letters, this is not needed.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2382
Joined: 2020-01-18, 04:03 UTC

Re: [TC 11.00b6] cm_OpenDriveByIndex doesn't work as stated

Post by *Fla$her »

ghisler(Author) wrote: 2023-06-14, 21:49 UTC 2. Since buttons always start with drive letters, this is not needed.
This is required not for the first buttons, but for the last ones:
Fla$her wrote: 2023-06-07, 15:10 UTC But I also meant positive values. I.e. I don't want to call cm_OpenNetwork when the conditional Ctrl/Shift + 6/7/etc is accidentally pressed. How to deal with this?
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 14898
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.00b6] cm_OpenDriveByIndex doesn't work as stated

Post by *petermad »

history.txt wrote:07.06.23 Fixed: cm_OpenDriveByIndex didn't work as described with negative numbers when drive buttonbars were enabled (32/64)
Confirmed fixed in TC 11.00B7 :-)

May I suggest to expand the Help about negative parameters to:
Negative numbers count from the end, with two cases:
Numbers below -100 count from the last button, so -101 would be the last button, -102 the second-last etc.
Numbers below -1 but above -100 count from the last drive letter.
If the Drive button bar is disabled, numbers below -100 count from the last item in the drive combobox, so -101 is "Network", -102 is "Documents (directory)" etc.
Last edited by petermad on 2023-06-15, 10:02 UTC, edited 1 time in total.
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
ghisler(Author)
Site Admin
Site Admin
Posts: 48203
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.00b6] cm_OpenDriveByIndex doesn't work as stated

Post by *ghisler(Author) »

OK, added, thanks for the suggestion.
Author of Total Commander
https://www.ghisler.com
Post Reply