Edit linked button bar V.S. OPENBAR

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Edit linked button bar V.S. OPENBAR

Post by *MVV »

E.g. I have a button:

Code: Select all

Command: OPENBAR %COMMANDER_PATH%\Bars\Elevated.bar
It works if I click it. But if I do right-click and choose 'Edit linked button bar', TC tries to edit buttonbar OPENBAR E:\TOTALCMD\Bars\Elevated.bar which of course doesn't exist.

Possible solutions:
A: TC should resolve correct buttonbar path in case of OPENBAR.
B: TC shouldn't show menu item 'Edit linked button bar' for OPENBAR if it doesn't work.
User avatar
karlchen
Power Member
Power Member
Posts: 4601
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hello, MVV.

If you add a button which opens a subbar using the T.C. config menu then T.C. will not prefix the command OPENBAR to the button command. Instead it will solely enter the fully qualified name of the buttonbar file. Selecting "Edit linked buttonbar ..." works as expected.

Nonetheless I will not mind if T.C. handles the case that you report as expected, too, and "Edit linked buttonbar ..." strips "openbar " before trying to open the buttonbar file.

Cheers,
Karl
MX Linux 21.3 64-bit xfce, Total Commander 10.52 64-bit
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet's Song
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

You're right, OPENBAR command is not inserted by TC, but only bu user. Anyway TC should process such case in a right way.

BTW if I enclose path to bar with double quotes, TC doesn't show 'Edit linked button bar' menu item at all.

It seems that TC simply checks that command ends with .bar but it is not correct in some cases:
1. User uses OPENBAR command.
2. User uses ANY command that accepts .bar file as a parameter.


So I think TC should split command line into array of parameters (removing quotes) and take first one if it is the one and second one if OPENBAR is the first. In any other case TC shouldn't show 'Edit linked button bar' menu item and 'Show as menu' checkbox in a button's properties.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Indeed OPENBAR isn't meant for button bars because it works without it! But since I cannot prevent users from adding it, I will add some code to detect and remove it.
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 »

Nice, works fine in b24. :)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
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