[TC 11.51rc4] Internal associations: Setting icon to %1 does not always show system association icon

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

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
white
Power Member
Power Member
Posts: 5743
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

[TC 11.51rc4] Internal associations: Setting icon to %1 does not always show system association icon

Post by *white »

Define an internal association for *.sfv files as follows:

Open command: notepad.exe "%1"
Icon file: %1

TC shows its own icon for this file type instead of the system association icon.
The same happens for other extensions, like *.tbr and *.zip (note that overriding opening of archives can only be done by assigning internal commands, and only since TC version 11.51rc4).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50383
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.51rc4] Internal associations: Setting icon to %1 does not always show system association icon

Post by *ghisler(Author) »

%1 would mean that the icon should be extracted from the *.sfv file. However, sfv files do not contain any icons! If you define an internal association for .ico files, %1 would show the icon stored in that .ico file (only if this is working also without internal association).
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5743
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.51rc4] Internal associations: Setting icon to %1 does not always show system association icon

Post by *white »

I see that it indeed works if .sfv is associated with a program in Windows. But in my opinion, if there is no Windows association, the blank icon should be shown as in Windows. I think it should not fall back to the icon of TC's internal function which is overridden by the internal association.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50383
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.51rc4] Internal associations: Setting icon to %1 does not always show system association icon

Post by *ghisler(Author) »

Sorry, I prefer to keep it as it is now. When using internal associations, leaving the icon empty always meant to leave the icon unchanged.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5743
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.51rc4] Internal associations: Setting icon to %1 does not always show system association icon

Post by *white »

ghisler(Author) wrote: 2025-02-06, 11:06 UTC Sorry, I prefer to keep it as it is now. When using internal associations, leaving the icon empty always meant to leave the icon unchanged.
I'm not sure what you are talking about. The report is about when using %1, not about when not specifying an icon. If no icon is specified, the icon of Notepad is used in this case, not the icon of TC's internal function.

It does not seem logical for users to create an internal association to change TC's behavior, and then explicitly specify %1 to revert to TC's internal icon. This goes against the clear intent of %1, which is to use the Windows system association icon. In this case, it would be more logical for users to specify the icon in TC's exe file or one of TC's resource files.
JOUBE
Power Member
Power Member
Posts: 1664
Joined: 2004-07-08, 08:58 UTC

Re: [TC 11.51rc4] Internal associations: Setting icon to %1 does not always show system association icon

Post by *JOUBE »

white wrote: 2025-02-05, 14:50 UTC Define an internal association for *.sfv files as follows:
Open command: notepad.exe "%1"
Icon file: %1
That's telling: Anyone who knows what he's talking about will not write it like that. They will of course choose a suitable, sensible icon. It's definitely not a mistake. Even as a suggestion it's superfluous, so off to the English forum.
User avatar
petermad
Power Member
Power Member
Posts: 15997
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.51rc4] Internal associations: Setting icon to %1 does not always show system association icon

Post by *petermad »

The Help says:
Help wrote:Change icon
Define the icon shown in Total Commander to the left of the associated file. Leave the field for the icon's filename empty to use the icon from the "Open" action, or set it to %1 or ** to use the icon from the system association.
So it is ligit to expect that %1 will use the icon associated in the System for the file type - and if there is no icon associated, the blank icon should be used.

I assume that the Help (the author) know's what it/he is talking about.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50383
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.51rc4] Internal associations: Setting icon to %1 does not always show system association icon

Post by *ghisler(Author) »

2JOUBE
Please stop being rude. I receive several complaints about your comment. Each sentence in your last comment is derogatory. Different people have different expectations. For me %1 means an icon from the file itself, e.g. it's used to show the icon store in an .ico or .exe file. Other users may expect the icon from the associated program (notepad in this case), or even from the original association (which I personally don't see as an option here).

2petermad
Why do you think that? Where else does %1 represent the system default icon?
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 15997
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.51rc4] Internal associations: Setting icon to %1 does not always show system association icon

Post by *petermad »

2ghisler(Author)
I expect it because that is what the Help says:
Help wrote:set it to %1 or ** to use the icon from the system association.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
white
Power Member
Power Member
Posts: 5743
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.51rc4] Internal associations: Setting icon to %1 does not always show system association icon

Post by *white »

ghisler(Author) wrote: 2025-02-07, 09:40 UTC Why do you think that? Where else does %1 represent the system default icon?
petermad wrote: 2025-02-07, 09:51 UTC I expect it because that is what the Help says:
Help wrote:set it to %1 or ** to use the icon from the system association.
Indeed. Although this information was lacking from the English Help for a long time, Ghisler stated this in the German help from the beginning when he added internal associations to version TC 7.50. The German help stated:
Geben Sie als Symbolnamen %1 an, um das Standardsymbol des Systems für diesen Dateityp anzuzeigen.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50383
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.51rc4] Internal associations: Setting icon to %1 does not always show system association icon

Post by *ghisler(Author) »

I see, so the help is wrong. It should say "use the icon which is shown when there is no internal association".
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5743
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.51rc4] Internal associations: Setting icon to %1 does not always show system association icon

Post by *white »

ghisler(Author) wrote: 2025-02-09, 09:40 UTC I see, so the help is wrong. It should say "use the icon which is shown when there is no internal association".
That is how it seems to work.
Regarding that sentence, I think it would be better to use "that" instead of "which," or simply say "use the icon shown when there is no internal association."
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50383
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.51rc4] Internal associations: Setting icon to %1 does not always show system association icon

Post by *ghisler(Author) »

This should be corrected in the help in RC5, please test!
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5743
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.51rc4] Internal associations: Setting icon to %1 does not always show system association icon

Post by *white »

ghisler(Author) wrote: 2025-02-12, 14:00 UTC This should be corrected in the help in RC5, please test!
Tested OK using TC 11.51rc5, English and German help.

Moderator message from: white » 2025-02-12, 14:31 UTC

Moved topic
» from TC11.x bug reports (English) to TC Fixed bugs
Post Reply