[Button Bar Icons] X-Qute 1.60

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Rein de Jong
Senior Member
Senior Member
Posts: 393
Joined: 2005-01-30, 20:26 UTC
Location: NL
Contact:

Re: Version 1.51 released

Post by *Rein de Jong »

X-Byte wrote:X-Qute icons converted to 32-bit DLL.

No new icons this time as I'm pretty busy in my real life recently. Expect more in late december.
Thanks a lot. And real life is the most important one! :D Take care!
Groetjes/
______/Rein

--- Moderator NL-forum ---
zie ook: https://www.reindejong.nl/totcmd
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2X-Byte
What about creating an INC file to support the new capabilities in TC 7?
User avatar
X-Byte
Member
Member
Posts: 173
Joined: 2004-11-29, 09:34 UTC
Location: Hessen, Germany

Post by *X-Byte »

@Lefteous
I wasn't aware of that possibility in TC7 - I highly appreciate it though!
I created an INC file for mapping the commands to the icons. But it seems like there's something wrong with either my icons DLL or the mapping function.

The mapping works correctly with many icons but some get mapped wrong.

Try the following after a plain TC7 installation:
Configurations -> Button Bar... -> Change icon file for cm_CopyFullNamesToClip from wcmicons.dll to X-Qute.dll

Instead of mapping icon #68 as declared in X-Qute.INC, icon #45 gets mapped to this command.

This also happens with cm_ExchangeSelection but I haven't tested all of my icons yet.

Now try this:
Configurations -> Button Bar... -> Change icon file for cm_CopyFullNamesToClip from wcmicons.dll to an EMPTY FIELD
change focus to another field like "Command", so the icon gets updated with a blank icon.
Then change back to the "Icon file" field, insert X-Qute.dll again. Now the mapping is correct, icon #68 gets mapped.

Even when you Add a new command to the buttonbar, wcmicons.dll is used by default. After changing the icon file to X-Qute the same thing as described above happens.

After trying around a bit it seems like TC7 doesn't update the mapping after changing to another icon library in some cases.
The mapping for cm_ExchangeSelection using wcmicons.dll is icon #11. When changing to X-Qute.dll the mapping remains at icon #11, even though the X-Qute.INC says to map icon #58.
Blanking out the icon file and updating the icon seems to make TC7 forget about the mapping. After reinserting X-Qute.dll in the icon file, the mapping is correct.

Can others confirm this?

Here's my X-Qute.INC file for testing: http://www.totalcmd.net/files/X-Qute.inc.zip
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2X-Byte
Thanks for creating an inc file!
Configurations -> Button Bar... -> Change icon file for cm_CopyFullNamesToClip from wcmicons.dll to X-Qute.dll
It works fine here.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

I cannot confirm that too, changing from wcmicons.dll to X-Qute.dll or X-Qute.icl results in correct mapping.

The only annoyance I find when switching the library by just pasting its name. In this case a mouse click in the icons field can result in a wrong icon to be chosen because the control already reacts on the first mouse click. In this case it's better to use a TAB press to activate autoselection or to make sure that you only hit the scroll bar...

Icfu
This account is for sale
User avatar
X-Byte
Member
Member
Posts: 173
Joined: 2004-11-29, 09:34 UTC
Location: Hessen, Germany

Post by *X-Byte »

Very very strange.

I've just set up a clean Windows XP virtual machine, installed TC7 PB1, default .ini, copied X-Qute.dll and X-Qute.inc to C:\totalcmd\ and tried the same thing there.
The "misbehaviour" also perstists there.

The EXACT protocol of what I did:
- Open TC 7
- Configuration->Button bar
- Click on 3rd last Button (cm_CopyFullNamesToClip)
- Click on icon file -> [>>] (Open file dialog)
- Selecting C:\totalcmd\X-Qute.dll -> [Open]
-> Wrong icon #45 (would have been correct when using wcmicons.dll) gets mapped/selected

Canceling the Button bar dialog and repeating the above protocol results in the same mismapping again.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

You need to select the dll BEFORE choosing the command. TC will not look in the inc if you just choose the dll, only when you choose the command.

Edit: Sorry, I was wrong, it seems to work when the icon dll changes.
Author of Total Commander
https://www.ghisler.com
User avatar
[Yustas.NeO]
Junior Member
Junior Member
Posts: 36
Joined: 2006-11-22, 15:38 UTC

X-Qute 1.52 and earlier

Post by *[Yustas.NeO] »

Middle (24x24) icons for PACK ARCHIVE and UNPACK ARCHIVE are mixed by places.

[img]http://img153.imageshack.us/img153/7016/xqute152vb3.th.png[/img]
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2X-Byte
During the private beta 1.x tests we found out that your icon library cannot be loaded using LoadLibrary and LoadImage. These are the operations used to display the menu icons. It would be great if you could provide a proper working library. How did you compile your library?

I just recompiled your library using Microsoft Visual Studio. It works ok.
http://www.lefteous.de/tc/cmdlibs/x-quote.sqx
( Will remove this - it's just for testing )


Another hint (to all command icon library designers):
07.11.06 Added: When both files wciconex.dll and wciconex.inc exist in the Total Commander directory, TC will use these for new buttons instead of wcmicons.dll
That means if you would provide a library called wciconex.dll it would work out of the box. Unfortunately the default icon library name cannot be configured.
User avatar
X-Byte
Member
Member
Posts: 173
Joined: 2004-11-29, 09:34 UTC
Location: Hessen, Germany

Post by *X-Byte »

@[Yustas.NeO]
Thanks, it will be corrected in the next release

@Lefteous
I also noticed this but thought this might be caused by the beta state of TC7.
I used GConvert mentioned by nsp to convert the ICL to a DLL. Seems like the resulting DLL doesn't meet all the needs for TC7.
Could you point me a way on how to easily compile my icons using Visual Studio?
Thanks for the wciconex hint, I already wondered how I could change the default iconset.

@Christian Ghisler
Right, the mapping works when changing the icon library, except in some cases - at least for me, as described above. I still wonder why this can't be reproduced by others. I tried it on 3 different machines (one VM), the same result everytime.

Request: We have myriads of possible entries for wincmd.ini. Would it be such a big thing if there would exist an entry to reference the Default icon library?
Would be much easier to handle, especially when having more than one additional icon library. Instead of copying/renaming around the .dll and .inc file, just change one ini entry.
Additionally, the icon libraries could be moved to a subdirectory then, preventing the TC root directory from getting cluttered with files more and more.

At last, a minor wish:
In TC7 PB2 you added the possibility to display icons in the menus, giving various options for the layout of this.
So my suggestion for an additional layout is "MS Office XP/2003 style" where the background for the icons has a greyish color, like in the screenshot

[img]http://img228.imageshack.us/img228/3718/snap1yk8.th.png[/img]
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2X-Byte
TC loads your DLL with LoadLibraryEx with paramerter "as data file". If this fails, TC calls LoadLibrary. It then loads the individual icons via LoadImage - this seems to be the only reliable way to load the icons in the exact size 16x16, 24x24 or 32x32...
Author of Total Commander
https://www.ghisler.com
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

Using the current implementation of icons in menus in TC this is non trivial to add. Another flexibility problem of such approach.


As I see it, TC must somehow determine when the first item is to be drawn in handler for WM_DRAWITEM message. Then it should draw a background picture first, after that everything else normaly. To be able to draw a picture that will look nice, tc must either know the exact size of the menu, or without it, it should tile the base bitmap (by height)
Habemus majkam!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC can actually try a background for the icon, try mode 2 or 18! Other modes can be added if needed.
Author of Total Commander
https://www.ghisler.com
User avatar
X-Byte
Member
Member
Posts: 173
Joined: 2004-11-29, 09:34 UTC
Location: Hessen, Germany

Post by *X-Byte »

@Christian Ghisler
Thanks, I already tried all the available modes. Mode 2 and 18 provide a background for the icon itself only, giving them a pretty old fashioned win9x button look.
I'd prefer an additional mode with a completely colored vertical icon column, just like in the screenshot above 8)

BTW: What about the ini entry for DefaultIcons?
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2X-Byte
Here are intructions for Visual Studio 2003

1. Create a new DLL project
2. Change the linker option (Linker/Advanced) "resource Only DLL" to yes.
3. Add your ICO files (icons sorted in the same order as the existing library) to the project as resources (menu Project/Add existing item).
4. Store the project and close the program.
5. All ICO files were copied by Visual Studio to the project directory. Overwrite these files with the original icons.
6. Now reopen the project and compile the library.

Steps 4 and 5 are necessary because Visual Studio converts these files incorrectly if they contain alpha channel when importing. Maybe this bug is fixed in Visual Studio 2005?
Post Reply