OPENBAR doesn't set ButtonBar=1 in [Layout]

Please report only one bug per message!

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

OPENBAR doesn't set ButtonBar=1 in [Layout]

Post by *MVV »

Is it error or by design? When I switch buttonbar using cm_VisButtonbar, TC sets ButtonBar parameter immediately. But if buttonbar is disabled, ButtonBar parameter still keeps value 0 after calling OPENBAR.
User avatar
petermad
Power Member
Power Member
Posts: 14807
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

OPENBAR is only for loading a .bar file temporarily - Next time you start TC, the buttonbar that is selected as default ([Buttonbar] Buttonbar=path) is still selected (not the bar you opened with the BUTTONBAR command), and if displaying the buttonbar wasn't chosen in Layout, it is still not chosen.
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 »

I think it may confuse user (as it has confused me and some other people from Russian board) - if he sees buttonbar, he thinks that it is enabled (and checkbox in configuration dialog says that it is enabled), but really it is disabled...

It would be useful to have some parameter for this command (or maybe a key in wincmd.ini) to change this behaviour to expected one.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

OPENBAR is indeed meant to switch between multiple button bars, not to set a new default button bar. It's like when you have a button with a .bar file as the command: It also just switches the bar without setting a new default.
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, I understand that OPENBAR doesn't set new bar as default bar. But it is strange that it doesn't set 'button bar enabled' parameter to 'true' when enables buttonbar. It causes TC to start with disabled buttonbar in cases when it was enabled on last TC close (if it was enabled via OPENBAR).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The idea is that people who normally don't use a button bar can still use one temporarily.
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 »

Ok, I've got the reason. But maybe you can add some command that will work in other way?
Post Reply