Wrong or random menu icons

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Schvenn
Junior Member
Junior Member
Posts: 3
Joined: 2008-01-17, 04:17 UTC
Contact:

Wrong or random menu icons

Post by *Schvenn »

I've just spent the last couple days working with the menus and toolbars, creating the most customized version of TC I've ever used. I redid all the menus and toolbars thanks to reading and using menus from several sources, determining what I felt was useful and eliminating the rest. I'm thrilled with the results, except for one thing:

the icons.

The menus seem to provide random icons, if any, at all.
If I reference icons, TC seems to ignore those recommendations and show none or different ones altogether.
I'm not sure what I'm doing wrong.
Let me provide you with a couple examples.

menu item:

MENUITEM "&Restart", em_restart

ini file:

cmd=%COMMANDER_PATH%\Utilities\Restarter\TinnyTCRestarter.exe
param=0
button=%COMMANDER_PATH%\Utilities\Restarter\TinnyTCRestarter.exe
menu=Restart

From my understanding the default icon for the applications, or no icon should appear.
Instead, for this menu option and a dozen others in my menu, TC seems to randomly choose to display the following icon:

wmicons.dll, 76

Why that one in particular and why does it display that icon for some menu items and not others?
It seems to be completely random.

Any help is appreciated.
[/img]
User avatar
Sombra
Power Member
Power Member
Posts: 815
Joined: 2005-12-27, 22:23 UTC
Location: Zaragoza, Spain

Post by *Sombra »

This happens since tc 8.5 beta3.
Christian added these lines [10000=76 ... 10006=76] to the file WCMICONS.INC. (maybe for testing purposes?)
You can edit the file WCMICONS.INC and delete the last lines.
As note: icon in main menu for first em_command is the ID=10000, second em_xxx ID=10001 and so on.
I can read English, but... I write like Tarzan. (sorry)
User avatar
Schvenn
Junior Member
Junior Member
Posts: 3
Joined: 2008-01-17, 04:17 UTC
Contact:

Thank you!

Post by *Schvenn »

Excellent.
That removed that pseudo-random icon.

Now, I noticed that the "button" definitions seem to be ignored, altogether.
I was using that parameter because I saw it in other menu systems.
I assumed it was a valid way of passing an icon to the relevant menu item, but it doesn't seem to work.
Is there a way to pass a pre-defined icon or am I missing something?

Worse comes to worst, I can deal with having no icons altogether, but it makes for an ugly menu system and I seem to remember a time when it would accept custom icons.
I distinctly remember my TeraCopy menus having icons, previously.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Currently the only way to set icons for user commands in menus is wcmicons.inc items 10000+, TC ignores button parameter for EM-commands here. And, TC assigns icons from wcmicons.inc to EM-commands through all menu file, so another menu file with another set of EM-commands will show wrong icons.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50923
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, these were just for testing purposes. I will remove them in the next beta.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ghisler,
How about an option to use for user commands in menus icons from button parameter?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50923
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately this would slow down the menu too much (virus scanners are a pain).
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ghisler,
I think you can cache EM icons just like you cache buttonbar icons (usercmd.br2 under local settings cache folder).
So, when you show an icon - add it to cache (with e.g. icon path, icon index and icon file date/time)... and next time get it from cache.
This will work as fast as your buttonbars work. But it will be much more usable way to assign icons for EM commands.
User avatar
petermad
Power Member
Power Member
Posts: 16142
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

I think you can cache EM icons just like you cache buttonbar icons (usercmd.br2 under local settings cache folder).
So, when you show an icon - add it to cache (with e.g. icon path, icon index and icon file date/time)... and next time get it from cache.
This will work as fast as your buttonbars work. But it will be much more usable way to assign icons for EM commands.
Big support if tis is doable.
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
Post Reply