[Gpephone-devel] Adding new entry to .desktop file
Florian Boor
florian.boor at kernelconcepts.de
Thu Jan 3 15:22:08 CET 2008
Hi,
Nils Faerber schrieb:
> For me this translates as, the desktop file will contain all mimetype an
> application can handle. Then there is the mimetype database where
> applications can add the "verbs", i.e. actions. The tutorial (above)
> shows an example for Gimp:
> <desktop:can-edit-with>gimp.desktop</desktop:can-edit-with>
>
> It is not clear to me yet where this information will end and how to use
> it. But it seems to me the correct start of the track - if there is
> already a standard wayof doing it, we should try to use it.
I'm not sure if this is exactly what we want to use. That means that we use the
shared mime database and application provided overrides to it instead of
providing the data in the desktop files themselves. We could do this but then we
get a lot of additional complexity such as a second database that needs to be
merged from several files and the need to provide an xml file for each
application that handles a mime type.
The desktop file standard allows extending the desktop files by custom data
fields where the name of these fields has to start with 'X-' indicating a
non-standard entry. That means we can extend the desktop files without breaking
standard compatibility.
An alternative way to provide both mime types and related actions could be
something like this:
MimeType = text/html;text/plain;text/pdf
X-MimeCapabilities = open,edit;open,edit;open
Once we are sure our solution is useful in real life we could propose it as an
extension to the standard.
A related problem is the desired way of selecting the right application for an
action. The mime database supports to put a priority into the xml file but that
means that the information which application to use is shipped with the
application itself. For security and reliability reasons we need a way to teach
gpe-applauncher only to use a predefined application for some mime type. This
information should never be part of the application package itself. For all
types/actions that are not bound to a single handler we need to offer some user
interface to allow the user to select the preferred handler for these.
Greetings
Florian
--
The dream of yesterday Florian Boor
is the hope of today Tel: +49 271-771091-15
and the reality of tomorrow. Fax: +49 271-771091-19
[Robert Hutchings Goddard, 1904] florian.boor at kernelconcepts.de
1D78 2D4D 6C53 1CA4 5588 D07B A8E7 940C 25B7 9A76
More information about the Gpephone-devel
mailing list