One thing that may not be obvious about IKIcon is how I envision a theme switch to happen, so I thought I'd elaborate that here in case you see any flaws and so it's recorded somewhere when it comes time to implement this.

Basically, every IKIcon that is a standard icon knows its icon identifier, and thus knows how to reload its icon image from the corresponding image file from the current theme. To do this, you use the -update method.

Every composited icon, OTOH, will eventually carry a pointer to the two IKIcon objects it is based on around. That way, when the theme is changed and e.g. the folder icon changes, all IKIcons that are badged folders can register for the icon updated notification of the icon they're based on and re-composite themselves with the updated icons.

So, whenever a theme switch happens, all the icon provider will have to do is call "update" on the icon cache, and all icons on the display should upgrade automatically. Of course, anyone who held on to the NSImage won't get the update, but those using the IKIcon at least will.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
       "The Witnesses of TeachText are everywhere..."
                   http://www.zathras.de

Reply via email to