On Feb 10, 2009, at 11:21 AM, Krzysztof Kosiński wrote:

Jon A. Cruz wrote:

No, we don't. We'd only have to split things out if we let the system  
use it's file-based approach. That has many problems.

It also has one big advantage, namely you don't have to dig in the source
code to discover which icon names you need to provide in your theme. The
monolithic icons.svg file is also fairly unobvious to theme designers.

There are many other ways to approach this.

One would be a simple XSLT run on the icons.svg to generate a list of icons. Other things could be done, but that one might be the simplest and most web-developer friendly.

And for a generic theme designer out there, Inkscape will happily go with any icons they've added in a standard themeing way. The single file is more for the Inkscape internal/built-in icons.



*However*, GTK+ supports all the calls needed for the application  
itself to be a source of named icons. We need to finish all the  
details of using it, but the main code is in Inkscape now.

I can't find the relevant GTK extension point. I think you are talking about
gtk_icon_theme_add_builtin_icon(), but it's not documented whether the
built-in icons sort in the lookup order after or before icons from the theme
(we want them after theme icons).


GtkIconTheme
GtkIconTheme — Looking up icons by name
http://library.gnome.org/devel/gtk/stable/GtkIconTheme.html

"Themeable Stock Images" is another, but not the main thing we want.


Did you check what the calls do? They do look to the system first, and then go to the internal as a fall-back. Try switching icon themes for the system and watch which icons change in our UI and which do not. Then look at a few of those changing ones to see what they are named. That should be a good starting point.


That's probably the number one thing we have to do.
1) determine which names in Inkscape are covered in Art Libre.
2) list any issues of complicated names.
3) determine which need to be added to Art Libre.

I used their names where it made sense, but I also changed some of them.
Their wiki seems to be invitation-only - does anybody here have edit access?

Just jump on #tango at freenode sometime. They've been quite helpful, and I've been working on and off with them for a while now.


Aaron Spike-2 wrote:

1) Dogfood. People wanted to use our renderer for the icons as a visual
test and because other renderers weren't up to par.

We can use Inkscape's shell mode to render the icons at build time. It would
be a matter of generating / writing a simple script.

Yes. Especially one that was used as an extension also.




2) Startup time. IIRC startup times were shown to be significantly
faster loading icons from a single file.

I intend to render to PNG at build time, so it would be even faster than
rendering all the icons at startup. An additional benefit is that if the
icon is overridden in the user's icon theme, it will load from the icon
cache, which is blazingly fast.

That won't work. With the fact that things can scale, you'd need to generate dozens of PNG versions for each SVG version.