Re: Finder Icon Badging...
Re: Finder Icon Badging...
- Subject: Re: Finder Icon Badging...
- From: Rainer Brockerhoff <email@hidden>
- Date: Tue, 3 Feb 2004 19:22:27 -0200
Christopher,
At 16:00 -0500 03/02/2004, Christopher Pavicich wrote:
>
Rainer, Scott, et al.
>
>
I want to (semi-) permanently tag a documents icon. I am trying
>
to show SCM state in the Finder. Checkout http://scplugin.tigris.org to get an idea of what I am doing.
OK. You want set a badge on a document to show its CVS state. Badge resources should work for that...
...however you may want to look into two issues: one, putting a badge on a file will change its modification timestamp unless you take pains to change it back afterwards; two, this will also create a resource fork for the file, causing its total size to change. No idea how CVS will handle this.
>
1. Thanks for the code. I fumbled around with IconServices for a while and I wanted to pull my hair out.
It's not the easiest of APIs to use, that's for sure; parts of it date from the original Mac and every release new stuff has been piled on.
>
2. I think Rainer's code does what I want. I couldn;t find an example badge to use, but
>
when I ran it, it did replace the files icon. It took a while to for the finder to notice that
>
the icon changed. Is there someway around this?
Any icon with lots of transparent space should do. Download XRay from my site, open any file with it, and generate a report in .txt format. Open the report with Resorcerer or ResEdit, you'll see a 'badg' resource and the 'icns' resource with a sample badge.
For the Finder to notice the change you have to notify it. The FNNotity function usually does that.
>
Rainer, do you have an example badge that you would mind sending me off list?
Will do.
>
3. I will check into IconFamily.
I just downloaded it and looked what it does. It does not handle badges as such, although the techniques used could be adapted to generate the necessary 'icns' resource from an arbitrary picture; but you'll also need to create a 'badg' resource. Besides, in your case, you'll probably use several pre-built icons anyway.
--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"It's extremely unlucky to be superstitious, for no other reason
than it is always unlucky to be colossally stupid." (Stephen Fry)
Weblog:
http://www.brockerhoff.net/bb/viewtopic.php
_______________________________________________
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.