mime icons for panel

edscott wilson garcia edscott at lunar-linux.org
Fri Nov 28 15:10:42 CET 2003


On Thu, 2003-11-27 at 12:12, Thomas Leonard wrote:
> On Wed, Nov 26, 2003 at 10:18:07PM +0100, Jasper Huijsmans wrote:
> [...]
> > 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 ;-)
> 
> Sorry to jump in here (only just noticed this thread). This is about
> finding MIME icons for MIME types?

No need to apologise. Quite the contrary. Thank you. 

The thread is about finding/rendering icons from an icon factory indexed
by MIME type. All freedesktop types are included, plus the internal
types used by xfce. This is being done by a loadable module, currently
in the xffm tree but probably going to be separated in the future.

 
> 
> We're using the freedesktop.org icon theme spec (code copied from
> GTK developer series; will be in GTK 2.4). There's a selector in the
> Options window of ROX-Filer 2.1.0 that lets the user switch theme while
> the filer is running, and we have some themes in the new format here:
> 
> 	http://rox.sourceforge.net/phpwiki/index.php/ThemeGallery
> 
> The format for the icon names is given on the MIME page:
> 
> 	http://www.freedesktop.org/standards/shared-mime-info-spec

I got a "gateway timeout". I'll try again later, although I do not think
there is any difference. Since each file type has a specific MIME-type
obtained by the rules of the freedesktop standard, we are currently
associating that MIME-type as a way to locate the icon. Separate files
for each theme allows us to switch icon themes on the fly in xffm. A
typical file looks like this:

<?xml version="1.0"?>
<mime-info>
  <mime-type type="text/default" icon="text.png"/>
  <mime-type type="text/x-makefile" icon="make.png"/>
</mime-info>

I've added the "default" type for each MIME group, so that a single icon
can be defined for the whole group as a fallback in case a specific icon
is not defined. Yea, I know I should do namespacing, but that should not
be too difficult when the time comes (or when someone who knows how to
do the xml parsing does it).



> 
> (right at the bottom of that page)
> 
> HTH,
> 




More information about the Xfce4-dev mailing list