mime icons for panel

edscott wilson garcia edscott at lunar-linux.org
Fri Nov 28 14:53:45 CET 2003


On Wed, 2003-11-26 at 21:18, Jasper Huijsmans wrote:
> 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.

The tie up is because I'm too lazy to change it if nothing but xffm is
using it ;-)

> 
> 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 ;)

OK. Will do. I'm a little tied up with time now, so It might take me a
few days to look through it...


> 
> 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.

I'm using xml in order to extend the freedesktop format for xfce. The
file is not namespaced yet, but since it is not merged with the
freedesktop file there is no problem here.

> 
> 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.

The approach I use is to create an iconfactory. The icons per se are not
saved, only the iconset, which allows you to create an icon on any size
and to switch themes easily. On first sight, I think what you have in
could be very similar to what is now enabled for xffm. To make it more
versatile, all icons should be managed by an xfce-icon theme package.
(See "lazy" note above as to why not yet implemented). Currently the
mime_icons module also searches the panel icon directories too in order
to obtain compatible icons.  

> 
> 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.

I don't quite understand what you're saying here :-0

> 
> 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 ;-)

Yes. Although we can fill in whatever is missing with our own xfce
specific stuff. The files I've created are not yet namespaced, but that
should not be hard to do when and if necessary.

> 
> Just some thoughts for future development,

The mime_module can evolve as you propose according to the needs of
other xfce programs. It's design as a module is quite versatile because
individual programs that use it do not have to be recompiled for any
changes to take effect (quite different from plain dynamic loading
libraries) although special care must be taken as you can recall from
the bug fixed on wednesday.

> 
> 	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