[3268] in Release_7.7_team

home help back first fref pref prev next nref lref last post

mime type support for evolution

daemon@ATHENA.MIT.EDU (Robert A Basch)
Mon May 6 19:45:11 2002

Message-Id: <200205062345.TAA09018@anhedonia.mit.edu>
To: release-team@MIT.EDU
Date: Mon, 06 May 2002 19:45:06 -0400
From: Robert A Basch <rbasch@MIT.EDU>

I did some investigation of how we can configure evolution to know about
various MIME types.  Evolution seems to use the Gnome MIME handling
system.  This is not well documented, but seems to offer most of the
functionality needed.  One file, gnome-vfs.keys, describes the various
MIME types, including which applications can handle each particular
type.  (Settings vary based on user level, i.e. novice, intermediate,
or advanced).  Another file, gnome-vfs.applications, contains info
about how a particular application is invoked, including the name and
actual command.  These are system files, though the user can add to
or override these settings (via control center).

To display a MIME type, evolution apparently constructs a menu
dynamically, based on the above configuration files; each application
configured for the type and user level which exists on the system is
included in the menu, with an entry "Open with <name>".  So the user
gets a choice of available applications for displaying the file, which
is pretty nice.

One problem for us is that there does not seem to be a "test" facility,
to check whether an application can be run; Gnome apparently just
uses stat to determine if an application is available.  And, in
evolution, you do not seem to get any feedback when such an application
fails.  This will be a problem for any applications which do not
exist on all platforms, e.g. frame (not on Linux), applix (not on
IRIX), and soffice (not on IRIX); since we would invoke them via athrun,
evolution will think these applications exist everywhere, offer them
in the menu, and then fail to run them, apparently silently.

We might be able to deal with this by maintaining per-platform versions
of these files in, say, the mimeutils locker.  But I fear that might
cause problems for users who add their own customizations, as well as
being a nuisance to maintain.  Other ideas include adding attach-and-run
scripts to the release for such applications, adding wrappers in mimeutils
for the commands, which will pop up an error message when invoked on the
wrong platform, or adding a "test" facility to Gnome (could be a lot of
work).

My initial impulse is to use wrappers in mimeutils which pop up an error
when appropriate, since that is easy and doesn't clutter up the release,
but it would be nice to do better, from the user standpoint.

Thoughts?

Bob

home help back first fref pref prev next nref lref last post