mime icons for panel

Jasper Huijsmans jasper at moongroup.com
Wed Nov 26 22:18:07 CET 2003


Op di 25-11-2003, om 20:31 schreef edscott wilson garcia:
> On Tue, 2003-11-25 at 13:07, Jasper Huijsmans wrote:
> 
> > > You have to update both xffm and xffm_theme_maker to get the fix. It
> > > should work now.
> > > 
> > 
> > Yay! Success, it works. Looks very nice too!
> > 
> > I'll look into it a little deeper tomorrow I think.
> 

I don't know how exactly how you intended to use the mime module, but
looks like the start of an icon theme support library. Some of the stuff
is a bit too tied into xffm for a general interface, but the idea is
certainly there.

I was trying some things myself for the panel, which is based on a
similar idea, but tries to use the gtk theme system a bit more. Maybe
you would be interested to have a look:

http://members.home.nl/xfce4/files/test_iconfactory.tar.bz2

Beware this is _test_ code. I think there are some hardcoded references
to /home/huysmans you may have to change ;)

Where you keep track of your own theme info and have a custom mime.xml,
I try to make gtk take care of this: the 'theme' files are regular gtk
rc files defining icons for xfce stock id's. I don't know if this is
feasible or desirable for mime icons though. It does seem to make sense
for the panel.

Anyway, this isn't entirely straightforward either, since gtk will add
every file you parse with gtk_rc_parse() to a global rc list that it
will reread every time a theme changes. So, as a trick I create a
symlink in ~/.xfce4/temprcdir/ pointing to the current theme's rc file
and call gtk_rc_reparse_all(). The advantage is that it's easy to add
different icons for different sizes.

Talking about icon theme support, ideally, you don't actually want the
user to have to change a theme in every app or utility he uses and
everything should just use the current icon theme. This probably doesn't
work well for us, since it requires theme authors to specifically put in
Xfce support, so perhaps we should try to follow the icon theme with our
own themes.

And finally there is of course the icon theme spec on freedesktop.org,
that perhaps we should use. I haven't looked into that enough to give an
opinion on it. Hopefully it offers us some opportunities to take
advantage of work other people have done (the real advantage of using
standards ;-)

Just some thoughts for future development,

	Jasper




More information about the Xfce4-dev mailing list