At 10:10 Uhr +0100 09.02.2005, Quentin Mathé wrote:
here is a very simple IconKit test application, which works with the cvs version iirc but shows many bugs.

Okay. I hope I'm understanding this code correctly, but the way it looks, IKApplicationIconProvider should definitely be an implementation detail of a general icon provider.

The UI would basically be iconForFile:. In iconForFile, IconKit would check what kind of file/folder it is. If it's an application package, it would call upon IKApplicationIconProvider to give it the proper icon. If it's a regular folder, it'd just use its own generic icon database (the list of icons from the current theme).

And if it's a document of some kind, it would get the icon for that from the IKApplicationIconProvider for the application that owns it. IKIconProvider would have two caches: One based on file type, and another based on file path (or inode ID, or whatever ...). Of course, all icon providers would return IKIcons, not NSImages.

And the IKIcon methods for getting a file based on extension, path or suffix would actually go through the IKIconProvider cache.

 Does that sound sensible so far?

 Still, since MacOS uses Icon Services, only GNUstep would have icon providers.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
       "The Witnesses of TeachText are everywhere..."
                   http://www.zathras.de

Reply via email to