icon factories

edscott wilson garcia edscott at imp.mx
Thu Dec 18 15:58:04 CET 2003


On Thu, 2003-12-18 at 02:35, Jasper Huijsmans wrote:

> The names are not file names but stock id's. It is equivalent to what
> you do in the xml file, but instead using gtk's builtin mechanisms. Gtk
> uses this for its own stock icon system.
> 
> The gtk rc links a stock id with a file name. It also allows you to add
> different files for different icon states and sizes, if you want.

I see. Probably a good way to customize all the gtk-defined stock icons
without much trouble (as long as you understand the gtkrc syntax). So
that the use of a "gtk-whatever" stock item could be customized on all
gtk applications.

> I don't know how the support in 2.4 for icon themes is implemented and
> whether it interoperates with the stock icon system or simply is another
> implementation of icon themeing.
> Your implementation is mostly equivalent I believe, I was simply
> offering an alternative view that may allow us to make better use of gtk
> functionality and save us from having to maintain that part ourselves.

The only differences I find is the use of freedesktop xml format instead
of gtkrc, and the namespaced freedesktop mimetypes for the string to
identify the icon with. This will probably will require less maintenance
in the future to keep in sync with freedesktop. 

> 
> I'm not sure the stock id system is a particularly good idea for mime
> icons, as it seems to be designed for a limited number of icons. So,
> your implementation may be better suited, I just wanted to make sure we
> aren't unnecessarily duplicating gtk functionality.

With the mime_icons module  you can use gtk-defined stock items. If you
define any icon with a string beginning with "gtk-", it will use the gtk
stock icon, like the following line from the gnome theme:

  <mime-type type="xfce/help_icon" icon="gtk-help"/>

So that extending the code to process any other stock icons parsed from
a gtkrc file is quite trivial. The important part here would be to
achieve coordination between us:

1- A common location for shared icon theme rcfiles and pixmaps.
2- A set of icon identifiers for shared icons (panel icons, plugin
icons, xffm toolbar/menu icons, and overriding of gtk-stock icons if so
desired by the theme).
3- The corresponding pixmaps and rcfiles for the xfce-distributed
themes.

Does that sound like something we might want work in the same direction?
I still think icon theme selection should be done in sync for all xfce
apps by use of the mcs-manager. Olivier? Jasper?
 

> 
> > Type "xfce/unknown" with icon "unknown.png" is what you refer to as
> > XFCE_DEFAULT. I rather put the xfce mouse logo as the xfce/default type
> > since in a more general icon factory scenario it can refer to more
> > diverse objects.
> > 
> 
> The mouse is nice, but perhaps not particularly suited for small icons
> (menu size).
> 
> 	Jasper
> 
> 
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> http://moongroup.com/mailman/listinfo/xfce4-dev
> 




More information about the Xfce4-dev mailing list