[TC 11.03] No icon in Start menu in specific case

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

Moderators: Hacker, petermad, Stefan2, white

User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

[TC 11.03] No icon in Start menu in specific case

Post by *jonathanpoulin »

Hi,

I found a bug in TC 11.03 about items in Start menu.

When the Command is a TC command (i.e. cm_ / em_) *AND* there is no parameter specified, the icon is not diplayed.

The icon index is properly specified in .INC as (pointing to an actual icon in .DLL) :

Code: Select all

701=<index>
As a workaround, I found that if I specify "%" in the Parameters field, then the icon is displayed.

If the Command is a program (e.g. notepad.exe), everything works as expected.
Thanks,
Jonathan Poulin
User avatar
white
Power Member
Power Member
Posts: 5964
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.03] No icon in Start menu in specific case

Post by *white »

I've tried cm_SrcThumbs, but that seems to work. Can you give more info and can you try with a clean ini?
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: [TC 11.03] No icon in Start menu in specific case

Post by *jonathanpoulin »

Hi,

Yes, you're right, it works when this is a cm_ command. Sorry. But, it does not when this is an em_.

For example:

wincmd.ini

Code: Select all

[user]
menu1=Notepad
cmd1=em_notepad
param1=%
usercmd.ini

Code: Select all

[em_notepad]
cmd=%windir%\notepad.exe
WCICONEX.INC

Code: Select all

[mappings];
701=101
Of course, icon index 101 must exists in WCICONEX.DLL.

So, if you remove line

Code: Select all

param1=%
from wincmd.ini and restart TC (or run cm_ReloadBarIcons), you will lose the icon in Start menu.
Thanks,
Jonathan Poulin
User avatar
petermad
Power Member
Power Member
Posts: 16098
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.03] No icon in Start menu in specific case

Post by *petermad »

2jonathanpoulin

Command 701 in your example does not have an entry in the standard wcmicons.inc file.

If I add for exampe

Code: Select all

701=1
to wcmicons.inc then icon 1 is shown in the Start menu for command 701 (with or without parameters) as expected.

Could you maybe please provide your default icon library (.dll) file and the corresponding .inc file.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
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: 5964
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.03] No icon in Start menu in specific case

Post by *white »

Issue confirmed. Perhaps is was supposed to work the other way around, that the icon is displayed unless there is a parameter.
User avatar
petermad
Power Member
Power Member
Posts: 16098
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.03] No icon in Start menu in specific case

Post by *petermad »

2jonathanpoulin
Yes, you're right, it works when this is a cm_ command. Sorry. But, it does not when this is an em_.
I can confirm that it does not work for an em_command.

But I cannot find anywhere in the Help or the History.txt that it is supposed to work for em_commands or .exe files by just assigning icons to the commands 701-899 in the .inc file. It should only work if the command in the start menu is 701.

I think you simply found a undocumented feature, which might not even be intended by the author.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: [TC 11.03] No icon in Start menu in specific case

Post by *jonathanpoulin »

Great that at least it's confirmed by you guys! I'm not alone! :wink:

But, this is not big deal of a problem! LOL
Thanks,
Jonathan Poulin
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: [TC 11.03] No icon in Start menu in specific case

Post by *jonathanpoulin »

petermad wrote: 2024-07-05, 13:06 UTC But I cannot find anywhere in the Help or the History.txt that it is supposed to work for em_commands or .exe files by just assigning icons to the commands 701-899 in the .inc file. It should only work if the command in the start menu is 701.
I'm not sure to fully understand when you say: "by just assigning icons to the commands 701-899 in the .inc file".
Thanks,
Jonathan Poulin
User avatar
petermad
Power Member
Power Member
Posts: 16098
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.03] No icon in Start menu in specific case

Post by *petermad »

t sure to fully understand when you say: "by just assigning icons to the commands 701-899 in the .inc file".
I mean that I am in doubt whether it is supposed work when using em_commands or executables in the command fields of the Start menu. It should only work if the command in the command field is actually one of the commands 701-899.

Can you find anywhere where it says something like: Assigning the commands 701 to 899 to an icon (index) via the icon library's .inc file will show that icon in the Start menu, if the command field in the Start menu is not a cm_command that is already assigned to a command.

Actually, it is more like a bug. If I for example assign 701=0 in the .inc file, and I make this my first item in the Start menu:

Code: Select all

menu1=SyncChangeDir
cmd1=cm_SyncChangeDir
Then the icon shown in the the Start menu for the first item is the icon for cm_SyncChangeDir (2600=75 in the default wcmicons.inc ) as expected.

If I change the first Start menu item to:

Code: Select all

menu1=SyncChangeDir
cmd1=cm_SyncChangeDir
param1=%
then the icon shown in the the Start menu for the first item is icon 0 in the icon library - highly unexpected
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
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: 5964
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.03] No icon in Start menu in specific case

Post by *white »

petermad wrote: 2024-07-05, 13:49 UTC Actually, it is more like a bug. If I for example assign 701=0 in the .inc file, and I make this my first item in the Start menu:

Code: Select all

menu1=SyncChangeDir
cmd1=cm_SyncChangeDir
Then the icon shown in the the Start menu for the first item is the icon for cm_SyncChangeDir (2600=75 in the default wcmicons.inc ) as expected.

If I change the first Start menu item to:

Code: Select all

menu1=SyncChangeDir
cmd1=cm_SyncChangeDir
param1=%
then the icon shown in the the Start menu for the first item is icon 0 in the icon library - highly unexpected
Kinda makes sense, since you modified the command by adding a parameter.
But it would be better if the icon defined in the em_ command was used for the menu.
User avatar
petermad
Power Member
Power Member
Posts: 16098
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.03] No icon in Start menu in specific case

Post by *petermad »

I think this "feature" came with the ability to enter parameters in the Parameters field for cm_commands.
Before TC 11.00 the Parameter field was not read if the command was a cm_command.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: [TC 11.03] No icon in Start menu in specific case

Post by *jonathanpoulin »

white wrote: 2024-07-05, 14:50 UTC Kinda makes sense, since you modified the command by adding a parameter.
It makes sense yes and no. :?
Last edited by jonathanpoulin on 2024-07-06, 16:53 UTC, edited 1 time in total.
Thanks,
Jonathan Poulin
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: [TC 11.03] No icon in Start menu in specific case

Post by *jonathanpoulin »

petermad wrote: 2024-07-05, 23:14 UTC I think this "feature" came with the ability to enter parameters in the Parameters field for cm_commands.
Before TC 11.00 the Parameter field was not read if the command was a cm_command.
Yes, you're probably right.
Thanks,
Jonathan Poulin
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: [TC 11.03] No icon in Start menu in specific case

Post by *jonathanpoulin »

So, I think it's a bug that should be fixed.

When a start menu entry is set to an em_command (that needs no param), we should be able to leave the Parameters field blank and have the icon loaded. Again, the current workaround is to set "%" in the Parameters field of "Change start menu" dialog for the particular item.

Does it make sense to assume it's a bug?
Thanks,
Jonathan Poulin
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50817
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.03] No icon in Start menu in specific case

Post by *ghisler(Author) »

This should be fixed and enhanced in Total Commander 11.50 beta 1, please check it!
16.07.24 Added: Menu "Start": Use icon defined in em_command, but only from wcmicons.dll or .ico files, not from arbitrary exe or dll files (speed reasons) (32/64)
16.07.24 Fixed: Menu "Start": Show icons also for em_ commands without parameters, when defined in WCMICONS.INC, e.g. 710=81 sets icon index 81 for the 10th menu item, unless a custom icon was set for em_command itself (32/64)
16.07.24 Fixed: Menu "Start": Show icons also for cm_ commands with parameters, the same as without parameters (32/64)
Author of Total Commander
https://www.ghisler.com
Post Reply