Re: [java-gnome-hackers] More about named icons
Brought to you by:
afcowie
From: Guillaume M. <res...@gm...> - 2010-11-14 23:26:09
|
> 3. Too many constants > ---------------------------------- > > This is really bugging me. As it stands right now, there are about 300 > objects getting instantiated and put into the reverse lookup map. These > are strongly referenced and even though an app might only use one or > two, we have to maintain references to them for the lifetime of the > program. There's nothing we can do about the in general, but > specifically it's a bit silly to have all those objects loaded when > you're not needing them. Agreed on that. I'm not happy to see too many constants. It's pretty lame to spend more than 30 seconds to find the right constant for something. > So, for Icon, I had the following idea: > > Icon > ├ ApplciationIcon > ├ EmblemIcon > ├ FaceIcon > ├ MimeIcon > └ ApplciationIcon > ... > > and so on. If we get it right, then we can group them (more or less) by > the same categories as found on disk, and more to the point, group them > in related clumps. As it stands right now, you read through the Icon > class in file order or alphabetically and it makes no sense because of > things like this: > > public static Icon TEXT_X_SCRIPT; > public static Icon X_OFFICE_SPREADSHEET; > public static Icon X_OFFICE_DOCUMENT; > public static Icon APPLICATION_X_EXECUTABLE; > > I've done about half of it; patch attached. What do you think? I like that idea. Yes we will till have a lot of constants but classify them is a good thing to use them easily. > 4. Does it belong in org.gnome.gtk? > ------------------------------------------------------ > > Finally, I'm not convinced any of this belongs in the GTK package. Part > of me wants to put all this in org.gnome.icons; but the icon naming spec > is a Free Desktop one; so perhaps org.freedesktop.icons is the right > place for it. > > Admittedly, messing with this would require some magic to enable > getName() to be visible without making it public. > > This would screw up (2) above, so perhaps we should just leave it alone. I don't know... Maybe it would be better in org.freedesktop.icons. Where does the user except to find those icons? > I'm otherwise ready to release 4.0.17 I'm ready to package it ;) -- Guillaume Mazoyer - http://www.respawner.fr/ |