On Sat, 2009-03-14 at 12:41 -0700, Jon A. Cruz wrote:
So... to summarize: The ancient SPIcon way was to do all the loading, rendering, caching, fetching and displaying was done directly. The newer way was changing a bit more to eventually *decouple* loading from display. We want to be a themed icon source and fill in our theme with internal images. Then whatever needs to use an icon just uses the themed icon loading to get it from the system, or ours as a fallback.
For a bit more insight... take a look at GtkToolButton
http://library.gnome.org/devel/gtk/stable/GtkToolButton.html
The ancient way was for SodiPodi to create it's own SodiPodiButton, and add a SodiPodiIcon to it and run things itself.
The older GTK+ way was to use a stock_id and get a GtkToolButton with that stock id set and it would take care of the image fetching and such.
Then newer GTK+ way is now to use a named themed icon. http://library.gnome.org/devel/gtk/stable/GtkToolButton.html#gtk-tool-button...
Oh, one caveat is that stock items do more and are logically sized, whereas named themed icons do less (e.g. RTL vs. LTR) and are physically sized.