This forum uses cookies. Click X button to hide this message. What is stored? 
Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Incorrect .inc when use custom icon library for toolbar.

 
Post new topic   Reply to topic    Total Commander Forum Index -> TC Behaviour which will not be changed Printable version
View previous topic :: View next topic  
Author Message
mantis4d
Junior Member
Junior Member


Joined: 13 May 2014
Posts: 9

PostPosted: Mon Mar 20, 2017 4:12 am    Post subject: Incorrect .inc when use custom icon library for toolbar. Reply with quote

If I use "set default icon library" set the default icon library to a custom dll(and inc) file, the button in toolbar may load incorrect .inc file.

For example, there are three dll icon library files.
wcmicons.dll old style icon.
wcmicon1.dll tc 9 new icon.
wcmicon2.dll my custom icon.
with each inc files.

Now I use "set default icon library" set the default icon library to wcmicon2.dll .
Then add a button in toolbar, set command to "cm_RereadSource", and set icon file to "wcmicons.dll".
The command "cm_RereadSource" use icon 0 in both wcmicons.dll and wcmicon1.dll , but use icon 55 in wcmicon2.dll (wcmicon2.inc).
the problem is, when I set icon file to "wcmicons.dll", tc9 use wcmicon2.dll instead of wcmicons.dll but still use wcmicons.inc, so the button icon set to the incorrect icon 0 in wcmicon2.dll.
Back to top
View user's profile Send private message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 34649
Location: Switzerland

PostPosted: Mon Mar 20, 2017 8:37 am    Post subject: Reply with quote

Sorry, you cannot avoid that. TC will always look for the index in the default icon dll inc file.
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
petermad
Power Member
Power Member


Joined: 05 Feb 2003
Posts: 7307
Location: Valsted, Denmark

PostPosted: Mon Mar 20, 2017 11:31 am    Post subject: Reply with quote

2mantis4d
Just use another name than wcmicon2.dll - that name is handled speciallly in TC, because TC is shipped with a wcmicon2.dll (that's wy Ghisler answers as he does).

But, you can use any other name that starts with wcmicon - like wcmicon3.dll and wcmicon3.inc - that should work.

Notice that the dll file must have a correct and unique filinfo description inside the file to be recognized by TC.

But anyway you CAN use wcmicon2.dll together with wcmicon2.inc - see: http://ghisler.ch/board/viewtopic.php?p=321185#321185 - but I recommend not to use wcmicon2.dll as the name for your own icons - since TC handles this name a little special - for example will wcmicon2.dll always show up as alternative icon library ALSO if there is NO fileinfo description inside the dll file.

Sometimes when changing the .inc file, you have to restart TC to see the effect.
_________________
#524
Danish Total Commander Translator
TC 9.10b1 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 64bit. TC 2.81b8 on Android 6.0

Get Extended Total Commander Menus
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mantis4d
Junior Member
Junior Member


Joined: 13 May 2014
Posts: 9

PostPosted: Mon Mar 20, 2017 9:11 pm    Post subject: Reply with quote

ghisler(Author) wrote:
Sorry, you cannot avoid that. TC will always look for the index in the default icon dll inc file.


Isn't that a bug?

After set default icon library, TC look for new default icon dll, but look for old default icon inc?

So that I can't Set a default icon library with more than icons wcmicons?
because those icons are not indexed in wcmicons.inc?
Back to top
View user's profile Send private message
mantis4d
Junior Member
Junior Member


Joined: 13 May 2014
Posts: 9

PostPosted: Mon Mar 20, 2017 9:18 pm    Post subject: Reply with quote

petermad wrote:
2mantis4d
Just use another name than wcmicon2.dll - that name is handled speciallly in TC, because TC is shipped with a wcmicon2.dll (that's wy Ghisler answers as he does).

..............
Sometimes when changing the .inc file, you have to restart TC to see the effect.


Well, I tried rename it to wcmicon3.dll, or wcmicon4.dll, it still has the same problem.

And that lead to another problem, if the dll file is not wcmicons.dll or wcmicon2.dll, it will not show in "set default icon library" . the new icon dll file is downloaded from net, I don't know it missed something or what.
Back to top
View user's profile Send private message
mantis4d
Junior Member
Junior Member


Joined: 13 May 2014
Posts: 9

PostPosted: Tue Mar 21, 2017 1:11 am    Post subject: Reply with quote

Well I rename it to wcmicon3.dll, rename TC9 new icon back to wcmicon2.dll, It's still has the same problem.

Here is a example.

I make 4 buttons with command "cm_RereadSource", use different icons.
button 1 use %COMMANDER_PATH%\wcmicons.dll , the oldstyle icon.
button 2 use wcmicon2.dll, the newstyle icon.
button 3 use wcmicon3.dll, my custom icon.
button 4 use wcmicons.dll, which will change when I set default icon library.

here is the image.
Image: https://s6.postimg.org/mnme1d61d/iconb1.png


Now I set default icon library to different dll file, the button 4 change it's icon .
set default icon library to wcmicons.dll, button 4 icon same as button 1.
set default icon library to wcmicon2.dll, button 4 icon same as button 2.
set default icon library to wcmicon3.dll, button 4 icon should be same as button 3, but it change to another icon, wrong icon id in wcmicon3.dll.
here is the image.
Image: https://s6.postimg.org/3wp24y0up/iconb2.png

that is what I mean.
Back to top
View user's profile Send private message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 34649
Location: Switzerland

PostPosted: Tue Mar 21, 2017 2:19 am    Post subject: Reply with quote

But you can choose the icon yourself from the list? The inc is only for picking an icon when you choose a command.
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
petermad
Power Member
Power Member


Joined: 05 Feb 2003
Posts: 7307
Location: Valsted, Denmark

PostPosted: Tue Mar 21, 2017 12:40 pm    Post subject: Reply with quote

Quote:
And that lead to another problem, if the dll file is not wcmicons.dll or wcmicon2.dll, it will not show in "set default icon library"


Then the dll. file does NOT have a fileinfo description inside.

Could you give a link to the file, so we can check whether it is made correctly?
_________________
#524
Danish Total Commander Translator
TC 9.10b1 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 64bit. TC 2.81b8 on Android 6.0

Get Extended Total Commander Menus
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mantis4d
Junior Member
Junior Member


Joined: 13 May 2014
Posts: 9

PostPosted: Tue Mar 21, 2017 9:46 pm    Post subject: Reply with quote

ghisler(Author) wrote:
But you can choose the icon yourself from the list? The inc is only for picking an icon when you choose a command.


That is the problem, if I set default icon library to wcmicon3.dll, when I choose a command, the icon picked by inc is incorrect!
because the inc is not the one matched the dll file!

So after I choose a command, I had to find the correct icon manually!? Shocked

You had not notice that because the wcmicons.inc is as same as wcmicon2.inc , so if you set default icon library to wcmicon2.dll, it looks like TC load the correct inc(but it's not).
Back to top
View user's profile Send private message
mantis4d
Junior Member
Junior Member


Joined: 13 May 2014
Posts: 9

PostPosted: Tue Mar 21, 2017 9:51 pm    Post subject: Reply with quote

petermad wrote:

Then the dll. file does NOT have a fileinfo description inside.

Could you give a link to the file, so we can check whether it is made correctly?


here is the dll and inc

http://ul.to/0i1ljcps

by the way, why don't use icl instead of dll?
Back to top
View user's profile Send private message
petermad
Power Member
Power Member


Joined: 05 Feb 2003
Posts: 7307
Location: Valsted, Denmark

PostPosted: Wed Mar 22, 2017 3:51 am    Post subject: Reply with quote

2mantis4d

The wcmicon3.dll file did not have the required fileinfo. I have now added it (naming it "Iconset 3") - you can download it here http://madsenworld.dk/tcmd/wcmicon3a.zip

Using this set it will now turn up in: "Set default icon library".
_________________
#524
Danish Total Commander Translator
TC 9.10b1 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 64bit. TC 2.81b8 on Android 6.0

Get Extended Total Commander Menus
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> TC Behaviour which will not be changed All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Impressum: This site is maintained by Ghisler Software GmbH

Using phpBB © 2001-2005 phpBB Group