[implemented] Make Buttons use the tooltip from the [em_command] definition, when the button's tooltip field is blank
Moderators: petermad, Stefan2, white, Hacker
[implemented] Make Buttons use the tooltip from the [em_command] definition, when the button's tooltip field is blank
It could be desirable, that if the"Tooltip" field for a button is blank, then the text at the menu= line in the [em_command] definition in WCMD_LNG.INI (secondary in usercmd.ini) would be used.
See: viewtopic.php?p=464666#p464666 for more discussion
See: viewtopic.php?p=464666#p464666 for more discussion
License #524 (1994)
Danish Total Commander Translator
TC 11.50rc3 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1385a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.50rc3 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1385a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Make Buttons use the tooltip from the [em_command] definition, when the button's tooltip field is blank
in a bar file, when you add a command from usercmd.ini wcmd_lng.ini, the tooltip is replicated in the menuXXX.
In order to have same tooltip as original file in sync :
- the tooltip should not be replicated automatically
- if empty it should be read from origin file
-Most of the already created button should have original tooltip never updated unless tooltip is removed.
In order to have same tooltip as original file in sync :
- the tooltip should not be replicated automatically
- if empty it should be read from origin file
-Most of the already created button should have original tooltip never updated unless tooltip is removed.
Re: Make Buttons use the tooltip from the [em_command] definition, when the button's tooltip field is blank
2nsp
Exactly my point - for cm_commands it should be read from wcmd_lng.ini - so that it is English if I use wcmd_eng.ini and in German if I use wcmd_deu.ini - provided that both .ini files have the em_command and they both have a tooltip defined for that command (that they have a: menu= line i the .ini file)- if empty it should be read from origin file
License #524 (1994)
Danish Total Commander Translator
TC 11.50rc3 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1385a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.50rc3 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1385a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Make Buttons use the tooltip from the [em_command] definition, when the button's tooltip field is blank
@Petermad
The main difference i how bar file are built, when using a :
- cm_ commmand from command browser, the tooltip is not carried unless you edit it manually.
- With em_ command the tooltip is replicated and so the source is the bar file itself.
So side to the suggested mechanism, a bar updater tool should remove the tooltip of em_cmd if equal or the one defined in usercmd.ini or wcmd_lng.ini
Re: Make Buttons use the tooltip from the [em_command] definition, when the button's tooltip field is blank
Thank you fro implementing thishistory.txt wrote:03.12.24 Added: Button bar, em_command: Read tooltip from em_command definition if none is set for the button itself (32/64)
License #524 (1994)
Danish Total Commander Translator
TC 11.50rc3 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1385a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.50rc3 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1385a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: [implemented] Make Buttons use the tooltip from the [em_command] definition, when the button's tooltip field is blan
Current implementation only takes the menu entry in usercmd.ini if em_cmd is defined in usercmd.ini it is not possible to have translation in wcmd_eng.ini to override it when switching languages.
- ghisler(Author)
- Site Admin
- Posts: 49978
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: [implemented] Make Buttons use the tooltip from the [em_command] definition, when the button's tooltip field is blan
You cannot define an em_command in usercmd.ini if it's already defined in the current language ini, and vice versa. If you put it in the ini manually, the entry in usercmd.ini takes precedence over the one in the language ini.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: [implemented] Make Buttons use the tooltip from the [em_command] definition, when the button's tooltip field is blan
I was just referring of definition in usercmd.ini and a translation for the menu entry only in wcmd_lng.ini to have common definition and then translations of tooltips.ghisler(Author) wrote: 2024-12-05, 07:44 UTC You cannot define an em_command in usercmd.ini if it's already defined in the current language ini, and vice versa. If you put it in the ini manually, the entry in usercmd.ini takes precedence over the one in the language ini.
- ghisler(Author)
- Site Admin
- Posts: 49978
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: [implemented] Make Buttons use the tooltip from the [em_command] definition, when the button's tooltip field is blan
That's an interesting idea, but it could also cause problems. Example: Command em_notepad.
usercmd.ini points to notepad.exe and description "Windows Notepad".
wcmd_fra.ini points to notepad++.exe and description "Éditeur Notepad ++".
With your suggestion, the tooltip would show "Éditeur Notepad ++" but the button would launch notepad.exe.
There are two possible solutions:
1. Always prefer the internal command from the translation - this would break compatibility
or
2. Use the translation from wcmd_fra.ini only if either
- the command is empty, or
- usercmd.ini doesn't contain the command.
usercmd.ini points to notepad.exe and description "Windows Notepad".
wcmd_fra.ini points to notepad++.exe and description "Éditeur Notepad ++".
With your suggestion, the tooltip would show "Éditeur Notepad ++" but the button would launch notepad.exe.
There are two possible solutions:
1. Always prefer the internal command from the translation - this would break compatibility
or
2. Use the translation from wcmd_fra.ini only if either
- the command is empty, or
- usercmd.ini doesn't contain the command.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: [implemented] Make Buttons use the tooltip from the [em_command] definition, when the button's tooltip field is blan
Yes this is exactly what I understand as override translation only if empty menu is dedined on the bar file.ghisler(Author) wrote: 2024-12-06, 09:30 UTC 2. Use the translation from wcmd_fra.ini only if either
- the command is empty, or
- usercmd.ini doesn't contain the command.
Currently if an em_cmdXXX is defined in wcmd_fra.ini this one take precedence over usercmd.ini, by option 2 this will always be the case.
in your case it will launch notepad++ with tooltip in french.
if em_cmdXXX have only menu entry and no command definition in wcmd_fra.ini then it will launch notepad and will have a tooltip in French.
Option 1 will break default behavior of having lng file taking precedence.
Re: [implemented] Make Buttons use the tooltip from the [em_command] definition, when the button's tooltip field is blan
Good idea. What about a third possibility:2. Use the translation from wcmd_fra.ini only if either
- the command is empty, or
- usercmd.ini doesn't contain the command.
- if the command is the same in usercmd.ini and wcmd_fra.ini - then use menu= from wcmd_fra.ini
License #524 (1994)
Danish Total Commander Translator
TC 11.50rc3 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1385a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.50rc3 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1385a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
- ghisler(Author)
- Site Admin
- Posts: 49978
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: [implemented] Make Buttons use the tooltip from the [em_command] definition, when the button's tooltip field is blan
That's a good idea, I will handle that too.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: [implemented] Make Buttons use the tooltip from the [em_command] definition, when the button's tooltip field is blan
Works perfectly in TC 11.50rc2history wrote:08.12.24 Fixed: Button bar, em_command: Prefer tooltip from wcmd_<language>.ini and not usercmd.ini if the same em_command exists in both, and the command is the same or empty in one of the files (32/64)
License #524 (1994)
Danish Total Commander Translator
TC 11.50rc3 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1385a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.50rc3 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1385a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
- ghisler(Author)
- Site Admin
- Posts: 49978
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: [implemented] Make Buttons use the tooltip from the [em_command] definition, when the button's tooltip field is blan
Thanks for suggesting it!
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com