Page 1 of 2
Icon Indexes
Posted: 10 Jun 2023 18:46
by jupe
Where you have added support for icon indexes in XY they don't seem to support *.cpl/.acm/.ocx, as far as I was aware those types were already supported, but I can't get it to work. I haven't got samples of other formats like wcx/icl etc to test, or I would have, but may be worth checking those too. Script for testing if helpful:
$f = "%WINSYSDIR%\joy.cpl /0"; seticons("+exe>$f"); goto <xy>; tab("rename", "|$f");
PS: Not a bug, but I guess a suggestion, icon index for all filetypes doesn't work in the list for icon custom columns, not sure if that is easily possible.
Re: Icon Indexes
Posted: 11 Jun 2023 09:46
by admin
Confirmed and fixed.
Added.

Re: Icon Indexes
Posted: 11 Jun 2023 16:59
by daniel_m
Is it also fixed for the new "Folder Icons Based On Content"?
I tried
Code: Select all
*\ /e>folder_icons.dll /6 //matches all empty folders
Code: Select all
*\ /e>"folder_icons.dll /6" //matches all empty folders
but XYplorer just showed the default folder icon instead.
Re: Icon Indexes
Posted: 11 Jun 2023 17:01
by admin
Where is folder_icons.dll located?
Re: Icon Indexes
Posted: 11 Jun 2023 17:05
by daniel_m
admin wrote: ↑11 Jun 2023 17:01
Where is folder_icons.dll located?
It's located in the Data subfolder of XYplorer (\XYplorer\Data\folder_icons.dll). I verified that the location is correct by using an ICO instead of a DLL.
Re: Icon Indexes
Posted: 11 Jun 2023 17:08
by admin
But the default location for icons is the "Icons" subfolder of that folder.
Re: Icon Indexes
Posted: 11 Jun 2023 17:14
by daniel_m
admin wrote: ↑11 Jun 2023 17:08
But the default location for icons is the "Icons" subfolder of that folder.
Damn it, sorry for the confusion

. The icons and dll were in the Icons subfolder (\XYplorer\Data\Icons\folder_icons.dll).
Re: Icon Indexes
Posted: 11 Jun 2023 17:17
by admin
Can you post or send me that folder_icons.dll?
Re: Icon Indexes
Posted: 11 Jun 2023 17:30
by daniel_m
Sure, they are on Github:
https://github.com/ABS96/coloured-folde ... /icons.dll
I'll try another DLL now ...
Edit: I tried it with a copy of shell32.dll, and it didn't work either.
Re: Icon Indexes
Posted: 11 Jun 2023 19:51
by admin
I think the bug here is that for Content-Based Folder Icons not the first but the
last match (in the Custom File Icons list) won. Fix on the way.
PS: No, there is another bug (the relative path led to problems). Double kill.

Re: Icon Indexes
Posted: 11 Jun 2023 23:21
by daniel_m
Great! And thanks for implementing Content-Based Folder Icons in the first place

Re: Icon Indexes
Posted: 11 Jun 2023 23:25
by jupe
I was testing out the new custom column support, and I have had issues with the whole XY window getting drawn wrong. After testing, it seems colorfilters are related (they make the issue appear easier), everything seems ok in fresh until after I enable them, then play around with icon column width and scroll, eventually the icons disappear, at that point main/ctx menus are blank, and breadcrumb dropdowns silent close XY, things generally go haywire. I received this weird looking error dialog:
2023-06-12_071419.png
If necessary here is the column I created for testing:
Code: Select all
Snip: CustomColumn 1
XYplorer 24.50.0009, 12/6/23 7:03:39 AM
Action
ConfigureColumn
Caption
Icon Resources
Type
3
Definition
$c = get("counticons", <cc_item>);
if ($c) {
set $ret;
while ($i++ < $c) {
$ret .= "<cc_item> /$i<crlf>";
}
return $ret;
}
Format
7
Trigger
1
Item Type
0
Item Filter
exe;dll;cpl;ocx;scr;icl;bpl;wlx;wfx;wcx;wdx;acm
Re: Icon Indexes
Posted: 12 Jun 2023 09:01
by admin
Wooow. Next beta:
Code: Select all
! Icons extracted from icon resources: Since v24.50.0008, a leak in GDI objects caused
a fast application meltdown when displaying extracted icons. Fixed.
Nice column by the way.

Re: Icon Indexes
Posted: 12 Jun 2023 17:01
by jupe
Cool thanks for fixing that.

I got slightly worried the feature might need to be withdrawn for not playing nicely with other list features.
Another thing I noticed is that the icon indexes used in sysicon are off, they start at 0 not 1, so the last icon is missing. I probably shouldn't have used it in my orig post.
Re: Icon Indexes
Posted: 12 Jun 2023 17:57
by admin
jupe wrote: ↑12 Jun 2023 17:01
Cool thanks for fixing that.

I got slightly worried the feature might need to be withdrawn for not playing nicely with other list features.
Another thing I noticed is that the icon indexes used in sysicon are off, they start at 0 not 1, so the last icon is missing. I probably shouldn't have used it in my orig post.
It works well now. I'm actually surprised how fast it is. There is no caching at all involved, so each time the column is repainted (and that's many times when you resize it) all the icons are freshly extracted and re-drawn.
Gosh, how did I not see this?!
