Re: Correctly setting icons for the Finder
Re: Correctly setting icons for the Finder
- Subject: Re: Correctly setting icons for the Finder
- From: Brian Ganninger <email@hidden>
- Date: Mon, 17 Feb 2003 17:58:08 -0600
Just wanted to let the list know I found a simple solution to the problem
within IconFamily:
IconFamily *iconFamily;
BOOL *setCustomOk = [iconFamily setAsCustomIconForDirectory:pathToSet];
// basic log to report what happens
if(setCustomOk == YES)
{
NSLog(@"Custom Icon set for directory");
}
else
{
NSLog(@"Oops... custom icon not set");
}
- Brian Ganninger
On 2/17/03 3:18 PM, "Brian Ganninger" <email@hidden> wrote:
Using the freely available IconFamily wrapper class
(
http://homepage.mac.com/troy_stephens/software/objects/IconFamily/content.h
tml) I've set my app up to composite images and then write out a .icns file
at a given path (all of which works correctly, thanks in part to the help of
this list, thanks everybody)
Because I'm wanting to set it as a volume's icon the path is always
path/.VolumeIcon.icns (as is visible when showing hidden & system files) The
icon writes perfectly and if opened in Preview, shows up correctly. However,
restarting the Finder will not actually read the icon as the volume's icon.
If the icon file is opened in an icon editor (say Icongrapher) and then
copied as an icon family and pasted into the icon via the Get Info window,
then it will work.
If a custom icon already exists and the app writes over/into the file, it
will work as well, but not if the app generates the file from scratch as it
were.
How can I resolve this? (it may be an obvious solution, but I'm missing it)
Thanks for your assistance.
- Brian Ganninger
_______________________________________________
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.