mime and freedesktop (was: Desktop Icons)
Thomas Leonard
tal00r at ecs.soton.ac.uk
Wed Oct 1 11:20:14 CEST 2003
On Tue, 30 Sep 2003, edscott wilson garcia <edscott at imp.mx> wrote:
> /me goes to look at freedesktop.org.
> Well, well, well.
> Freedesktop proposes using xml for mime information. That's good. Xffm
> does that. But there are some differences. Xffm uses a single file
> (following the gnome way), while freedesktop uses twenty thousand score
> files (following the kde way). Keeping tabs on twenty thousand score
> files is very inefficient, so freedesktop suggests hacking up a binary
> database. But Benny does not like hacks...
No, there are two parts:
file -> MIME-type
MIME-type -> Comment, etc
The first is done with a few binary(ish) files so that you don't have to
read in the whole database just to find out that foo.html is a text/html
file. We found that reading 700K of XML at startup was slow.
Once you've got a MIME type, you just load the XML files for that type
(text/html.xml) to get a description in the appropriate language (if you
want it).
> And there is one thorn drawing blood...
> If mime info boils down to one file (xml or binary) shared by all
> desktops, which desktop in a multi-desktop environment, will provide for
> it?
GNOME and KDE have agreed to use the common base package (which ROX-Filer
already uses) here:
http://www.freedesktop.org/software/shared-mime-info
GTK's FileChooser widget for 2.4 uses this too. Any desktop or application
can suppliment the database.
> No trouble exists to make xffm able to read mime info provided by G., K.
> and B. on the fly.
I already merged GNOME and KDE's databases into the shared database above.
But anyway, you can't just combine everything because the point of a
shared MIME system is that everyone uses the same name for a type. DnD,
icon themes, etc don't work if one desktop uses text/x-perl and one uses
application/x-perl...
(Incidentally, ROX-Filer now supports icon themes, so displaying the same
icons in both filers should just be a case of setting the filer's theme to
'xfce4', if xffm does it too. GTK 2.4 has icon theme handling code
included.)
--
Thomas Leonard http://rox.sourceforge.net
tal00r at ecs.soton.ac.uk tal197 at users.sourceforge.net
GPG: 9242 9807 C985 3C07 44A6 8B9A AE07 8280 59A5 3CC1
More information about the Xfce4-dev
mailing list