Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Give PC documents customized icons Desktop
Fed up with seeing generic white sheets for all your PC documents? So was I so I opened up the Appleworks application and fixed it. Show the Appleworks package contents (control-click on the AppleWorks application and select Show Package Contents) and find the file called Info-macos.plist. Open this in BBEdit or TextEdit or whatever and find this line:
<key>CFBundleTypeName</key>   <string></string>
Look at the paragraph above it and copy the line that defines the icon, and paste it into the appropriate place under the line you just found:
<key>CFBundleTypeIconFile</key>   <string>Document.icns</string>
You can change the Documents.icns to whatever you want (but the actual .icns file you specify must exist one level down from this document, in the Resources folder). I'm going to make a new icon so I can tell at a glance what's a Word document, but for now this at least will give it some colour. Do the same with the Excel definition and that'll sort it.

You WILL have to update prebindings for this to take effect. Open the terminal and type:
sudo update_prebinding -root /
[Editor's note: I have not tried this myself, but it makes sense and I verified the structure of the Info.plist file ... I wonder how this would be done without AppleWorks?]
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)

Give PC documents customized icons | 2 comments | Create New Account
Click here to return to the 'Give PC documents customized icons' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Incomplete hack, please help
Authored by: leenoble_uk on Dec 28, '01 01:34:08PM

I was the original poster of this hack and I have tried to add my own icons but I can't get it to work.

Can someone help me perfect this hack?

I made an icns icon in IconBuilder Pro and moved it into the resources folder in the Appleworks package. The odd thing I noticed was that the other .icns files all looked like their icon (hope you know what I mean), but my icon had a generic preview icon.

Now after updating prebinding again, I located a word document and chose show info in the finder. I changed the opening app to BBEdit and then back to Appleworks to effect the change. Now, when I choose Appleworks from the application list the file's icon in the info pane changes to my new icon (great), but when I click the button to change all files of this type to the same setting it changes to the icon that I previously set, the generic Appleworks document.

I have now tried several types of icon exported from IBP and updated the prebinding a few times but it WILL NOT WORK.

any ideas?

[ Reply to This | # ]
Authored by: bhines on Dec 29, '01 07:47:27AM

Well, for one thing, prebinding has absolutely nothing to do with icons. update_prebinding re-associates symbols (functions) with their location in an object file so they don't have to be looked up at runtime.

To reset your Icon associations, I believe you delete LSClaimedTypes in the preferences folder. (and maybe LSApplications too)

All this hack is doing is causing AppleWorks to claim certain document types, and set their icon. You could do the same with any application's info.plist - appleworks has nothing to do with it, really. It just claims a lot of types. :)

Also, you should use PropertyListEditor in /Developer/Applications to edit plists. Much safer.

All should read "Inside Mac OS X: System Overview" which explains the document/icon association system instead of trying to hack it out. All is explained. It's on apple's developer site.


[ Reply to This | # ]