[TC all versions] em_command with OPENBAR can not open as menu

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

[TC all versions] em_command with OPENBAR can not open as menu

Post by *petermad »

If I define an em_command like this:

https://madsenworld.dk/tcmd/openbar.png

or

Code: Select all

[em_mybar]
cmd=OPENBAR my.bar
iconic=1
menu=Open my.bar as menu
button=wcmicons.dll,14
and I use that command in a button in the buttonbar, then my.bar is not opened as a menu as expected, even though the option "Show as menu" is selected (iconic=1).
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC all versions] em_command with OPENBAR can not open as menu

Post by *ghisler(Author) »

bar files inside of em_xy commands always open as a button bar, not as a menu. That's because you can't set the "Show as menu" option for em_xy command, you can only set it for bar files directly in the button bar. The problem is that em_xy commands can be executed also from other places like the start menu, command line, or via a hotkey. Where should the bar as menu be shown then? The same happens when you put OPENBAR barfilename.bar in the start menu directly.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC all versions] em_command with OPENBAR can not open as menu

Post by *petermad »

I am aware that the it can not open as a menu if not in a button bar, but why should that prevent TC form opening it as a meny WHEN the command is used in a button.

If you are not going to change this, I suggest that you disable the shift you see when editing and em_command in the "Change single button" dialog when opened from the "Choose Command" dialog . Here the option "Run minimized" is shifted to "Show as menu", when either OPENBAR or xxx.bar is entered in the Command field - and that is misleading if "Show as menu" is not supported for em_commands.

That's because you can't set the "Show as menu" option for em_xy command
That is not quite true - see https://madsenworld.dk/tcmd/openbar.png - here the "Show as menu" is available in the em_command editor opened from the "Choose Command" dialog. The "Change single button" in the image at https://madsenworld.dk/tcmd/openbar.png is NOT opened from a buttonbar
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC all versions] em_command with OPENBAR can not open as menu

Post by *ghisler(Author) »

Because at the point the em_command is called, it doesn't 'know' how it was called. It may be even a nested command inside another em_command.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC all versions] em_command with OPENBAR can not open as menu

Post by *petermad »

2ghisler(Author)
Because at the point the em_command is called, it doesn't 'know' how it was called
Aha - then it makes sense.

But if on the other hand the "Change single button" dialog knows whether it is opened from a button bar or from the "Choose Command" dialog, then it should at least be possible to avoid showing the option "Show as menu" when it is opened from the latter.

ALSO: The dialog title "Change single button" is misleading when the dialog is opened from the "Choose Command" dialog - if it is possible in a future version it ought to be named something like "Edit user-defined command" (I know it will involve the translators - hence future version).
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply