Re: Icon for prefPane bundle?
Re: Icon for prefPane bundle?
- Subject: Re: Icon for prefPane bundle?
- From: email@hidden
- Date: Fri, 12 Apr 2002 16:43:00 -0700
I'm coming onto this thread a bit late -- I'm planning my wedding, so
I'm too busy to keep up with the list right now. However, I found it
searching the archives just today:
Has anyone attempted to figure out exactly what happens when you paste
an icon
into an info window? Perhaps we could automate the process into a
shell
script, and add a build phase.
What happens is the following:
1. A file named 'Icon\r' is created inside the folder.
2. The file is assigned a resource fork containing icns resource -16455
with
the icon. If the original file icon had legacy icon resources, they were
copied as well.
3. The Has Custom Icon flag of the containing folder (the target) is
set.
4. Finder is notified of the change and reloads the icon.
I believe the possibility of making a shell script for automating the
process was discussed on this list or macosx-dev about a year ago (when
Docklings were top fashion). It turned out to be rather difficult.
Making a
simple cli using carbon to do it would probably be easier, even...
Does anybody have any sample code to do this? Specifically, I'm
looking to make an app of mine that saves images be able to save a
"preview" icon for each image as well (by user request). Making the
preview image is easy enough, but how might one set that image to be the
icon for a file? I looked in NSWorkspace and NSFileManager, no joy...
Ben Haller
Stick Software
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.