deprecated stuff

Benedikt Meurer benedikt.meurer at unix-ag.uni-siegen.de
Tue Aug 30 22:07:47 CEST 2005


Brian J. Tarricone wrote:
>>>Maybe you can explain what kind of shortcomings you are talking about?
> 
> Well, there's the lack of being able to look up icons with fallback
> names (the panel finds this useful).

This is beyond the scope of the icon spec, and personally I think this
is the wrong way to address the issue for the panel. There was an
attempt to get something like this into the icon spec on the xdg-list,
but it somehow died (as usual). Maybe somebody should open that topic again.

Speaking of GtkIconTheme 2.6 and above, it's no problem to do a few
gtk_icon_theme_has_icon() calls to provide fallbacks (that's actually
how the icon lookup in Thunar works, esp. for the MIME icon lookup). The
performance is good and the code is easy to read, e.g. for the panel:

const gchar*
gimme_that_damn_icon_name (GtkIconTheme *icon_theme)
{
  static const gchar *myicons[] = { "icon-foo1", "icon-foo2" };

  for (i = 0; i < G_N_ELEMENTS (myicons); ++i)
    if (gtk_icon_theme_has_icon (icon_theme, myicons[i]))
      return myicons[i];
  return "fallback";
}

That's what I was wondering about the shortcomings you are talking about.

Ok, people with Gtk 2.4 may experience slower icon lookups, but then
again, XfceIconTheme isn't faster, so there's no problem with using
GtkIconTheme instead.

> Then there's the fact that it
> never seemed to find all icons properly, esp if they were in legacy
> locations like /usr/share/pixmaps/.  There were probably a couple other
> things (that may have been fixed since I last looked), but I can't think
> of them offhand.

Well, as long as /usr/share is in XDG_DATA_DIRS, this should work out of
the box. But honestly, I haven't checked that for ages and I'm not sure
if there are still apps around that (a) use GtkIconTheme and (b) install
icons into the legacy location instead of installing into the hicolor
icon theme. If so, these apps should really be fixed or the maintainers
should be kicked (or both :-).

> 	-brian

Benedikt



More information about the Xfce4-dev mailing list