Page 1 of 1
CFI: Customize File Icons support icon index
Posted: 19 Feb 2022 06:38
by jupe
For me (and I assume many others) it would be very useful for CFI to support referencing icons by an icon index in eg,. dll, exe etc. because personally I use many inbuilt Windows icons, and having to individually extract them all just to use them becomes time consuming, and since XY already has this ability in other contexts (so I assume the bulk of the coding is done) it would be great if CFI could too.
Re: CFI: Customize File Icons support icon index
Posted: 05 Apr 2022 09:48
by admin
I had tried that almost 10 years ago, and it almost worked well. There was just a small insurmountable problem: Whenever you change such an icon definition the new icon is added to the process-owned system image list again, so when you use jpg>C:\WINDOWS\system32\shell32.dll /163, then change it to jpg>C:\WINDOWS\system32\shell32.dll /162, then change it back to jpg>C:\WINDOWS\system32\shell32.dll /163, the #163 will be in that system image list 2 times. I'll admit it's a minor issue and an app restart quickly removes it, but it's put me off adding the feature.
Well, I'll add it anyway, the pros probably outweigh the cons.
Re: CFI: Customize File Icons support icon index
Posted: 05 Apr 2022 13:02
by WirlyWirly
Not a completely unrelated icon idea: The ability to have icon filenames be parsed for their corresponding extensions.
For example, lets say in <xyicons> there's a special folder titled "_cfi_"
Inside that folder I have an icon file called "mp3|flac|ac3.ico". Well that filename would be parsed and the extensions automatically added to the list of CFI, hidden or otherwise.
It would save literally hundreds of lines in my CFI edit screen, since I use CFI for a LOT of filetypes.
Having subfolders for organization in that special directory and being able to support directory icons would be neat too.
Re: CFI: Customize File Icons support icon index
Posted: 05 Apr 2022 13:09
by admin
You know that you can combine extensions like this?:
mp3;flac;ac3>some.ico
Re: CFI: Customize File Icons support icon index
Posted: 05 Apr 2022 13:20
by WirlyWirly
Yeah, I do that all the time, I just thought it would be useful to put filenames to work. The batch of VSCode icons I downloaded are all named by the extensions they correspond to, so it just made sense.
Re: CFI: Customize File Icons support icon index
Posted: 05 Apr 2022 13:23
by admin
I think the current ways are sufficient.
Re: CFI: Customize File Icons support icon index
Posted: 07 Apr 2022 23:18
by jupe
If I am understanding you properly, I don't see that as a big downside, since it will probably only be for an occasional session, but I did notice a couple things that are possibly related, I just got around to testing it, and if you move from one index to an index that is higher than the available indexes in the resource then XY just leaves the icon preview (in CFI dialog) as the last valid icon shown, also if for example you pick an index, then change back to having no index XY still displays the last valid index icon shown, closing re-opening dialog or changing to index 0 updates the display.
Anyway thanks for adding this.
Re: CFI: Customize File Icons support icon index
Posted: 08 Apr 2022 08:57
by admin
Yep, next beta will fix those things.
Re: CFI: Customize File Icons support icon index
Posted: 08 May 2022 04:58
by jupe
I noticed a minor thing but thought I would bring it up, if you use an index in a file and create another entry using a different index in the same file the bottom entries show as blank until the dialog is reopened, functionally it is fine it is only a visual oddity.
xyCFI.gif
changing the extension on a new entry doesn't affect behavior (so I didn't bother in the example), even though in reality you probably would.
Re: CFI: Customize File Icons support icon index
Posted: 08 May 2022 16:22
by admin
Confirmed & Fixed.
