
On Tue, 2005-01-04 at 15:58 -0500, MenTaLguY wrote:
IMO, we really shouldn't be using filenames directly. But I would prefer GTK stock IDs (mapped to icons.svg ids on the backend) rather than using icons.svg ids directly, if possible.
In my ideal little world, IconFactory would be subclassable or something so that we could make an IconFactory that used our renderer to render icons on-demand. Sadly, I don't think that's possible yet.
In lieu of that, I'd prefer a pre-populated IconFactory filled with pixmaps using our renderer. From there on up we can use the standard GTK icon facilities directly.
What could be done is this...
The Inkscape::UI::Icons namespace could have its own version of the sp_icon_image_from_svg() function. It would have to return a Glib::RefPtrGdk::Pixbuf, instead of a pointer to an array of guchars.
I could then do something like: src.set_pixbuf(get_icon_pixbuf("draw_select")); ... instead of ... src.set_filename(get_icon_path("tool-select.svg")); ... as it's done now.
However, this get_icon_pixbuf() function has to wait till the Gtkmm codebase has access to Inkscape's renderer, which it currently doesn't.