Commands with parameters and WCICONEX.DLL

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
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Commands with parameters and WCICONEX.DLL

Post by *fenix_productions »

Recently I've been working on my own TC icons library (WCICONEX.DLL) and I noticed that it is impossible to assign icons for commands which can take parameters.


When I have a command described in TOTALCMD.INC:

Code: Select all

cm_SrcComments=300;Source: Show comments
I can use its numeric representation and write in WCICONEX.INC:

Code: Select all

300=21
where 21 is, of course, the number of the icon taken from WCICONEX.DLL file.

Unfortunately, this does not work for commands with parameters.

When I try to follow:

Code: Select all

OPENTABS <filename>=-3;Open tabs from saved .tab file
using

Code: Select all

-3=100
nothing happens.

This neither work for other negative values.
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, this is a missing feature, not a bug. Currently this feature isn't planned.
Author of Total Commander
https://www.ghisler.com
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

ghisler(Author) wrote:Currently this feature isn't planned.
Can you explain, please, what does it have with "planning"? Isn't it just adding 8 more numbers to check for wciconex handling procedure?

I thought that TC builds the list of cmdNumber=icon elements according to wciconex.inc and uses it anywhere else (menus, "Change button bar" dialogue). No proper item - no icon. Am I wrong at this point?
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Commands with parameters aren't handled via numbers, because numeric commands cannot have any parameters. Commands with parameters are similar to programs, which are handled via strings. Therefore the negative indexes aren't available when checking for icons, and it would require considerable changes to make them available.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Currently existing block [mappings] is only for icons in wcmdicons.dll. I think it will be good if we add a new block into WCMICONS.inc:
[external_mappings]
<cmd_number_or_string_name>=<library_name>[,<icon_number>]

So, we will have possibility to: 1. bind icons for any kind of commands; 2. to bind icons for commands w/o resource editing.
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

I agree with MVV about adding external mapping block but I don't think it's the most important thing to implement. Maybe for 8.0 :)
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
Post Reply