Icon Indexes

Things you’d like to miss in the future...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

:info: Please include the following information:
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
jupe
Posts: 3462
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Icon Indexes

Post 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.

admin
Site Admin
Posts: 66582
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Icon Indexes

Post by admin »

Confirmed and fixed. :tup:

Added. :cup:

daniel_m
Posts: 234
Joined: 11 Apr 2010 11:47
Location: Windows 10 Pro 22H2, scaling 100%

Re: Icon Indexes

Post 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.
XYplorer x64 (often the latest beta), Windows 10 Pro 22H2, 3840x2160 scaling 100%

admin
Site Admin
Posts: 66582
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Icon Indexes

Post by admin »

Where is folder_icons.dll located?

daniel_m
Posts: 234
Joined: 11 Apr 2010 11:47
Location: Windows 10 Pro 22H2, scaling 100%

Re: Icon Indexes

Post 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.
XYplorer x64 (often the latest beta), Windows 10 Pro 22H2, 3840x2160 scaling 100%

admin
Site Admin
Posts: 66582
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Icon Indexes

Post by admin »

But the default location for icons is the "Icons" subfolder of that folder.

daniel_m
Posts: 234
Joined: 11 Apr 2010 11:47
Location: Windows 10 Pro 22H2, scaling 100%

Re: Icon Indexes

Post 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 :biggrin:. The icons and dll were in the Icons subfolder (\XYplorer\Data\Icons\folder_icons.dll).
XYplorer x64 (often the latest beta), Windows 10 Pro 22H2, 3840x2160 scaling 100%

admin
Site Admin
Posts: 66582
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Icon Indexes

Post by admin »

Can you post or send me that folder_icons.dll?

daniel_m
Posts: 234
Joined: 11 Apr 2010 11:47
Location: Windows 10 Pro 22H2, scaling 100%

Re: Icon Indexes

Post 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.
XYplorer x64 (often the latest beta), Windows 10 Pro 22H2, 3840x2160 scaling 100%

admin
Site Admin
Posts: 66582
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Icon Indexes

Post 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. :bug: :bug:

daniel_m
Posts: 234
Joined: 11 Apr 2010 11:47
Location: Windows 10 Pro 22H2, scaling 100%

Re: Icon Indexes

Post by daniel_m »

Great! And thanks for implementing Content-Based Folder Icons in the first place :)
XYplorer x64 (often the latest beta), Windows 10 Pro 22H2, 3840x2160 scaling 100%

jupe
Posts: 3462
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Icon Indexes

Post 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
To see the attached files, you need to log into the forum.

admin
Site Admin
Posts: 66582
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Icon Indexes

Post 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. :tup:

jupe
Posts: 3462
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Icon Indexes

Post by jupe »

Cool thanks for fixing that. :D 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.

admin
Site Admin
Posts: 66582
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Icon Indexes

Post by admin »

jupe wrote: 12 Jun 2023 17:01 Cool thanks for fixing that. :D 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?! :oops:

Post Reply