Modifying an existing desktop file's MimeTypes

David Faure faure at kde.org
Mon Jan 13 03:09:31 PST 2014


On Monday 13 January 2014 09:50:11 Bastien Nocera wrote:
> On Sat, 2014-01-11 at 13:36 +0100, Albert Astals Cid wrote:
> > El Dissabte, 11 de gener de 2014, a les 02:28:18, Jerome Leclanche va
> > 
> > escriure:
> > > Consider the following use case:
> > > 
> > > "gimp" supports image/png. "gimp-webp-plugin" makes gimp support
> > > image/webp.
> > > 
> > > How would gimp-webp-plugin declare that it makes another app support
> > > additional mime types? I don't think it's possible currently.
> > > Suggestions?
> > 
> > In Okular we just install another .desktop with the same main keys (Name,
> > exec, type, etc) except it has a different mimetype and NoDisplay=true
> > 
> > That works fine under KDE but I've been told not so good under
> > gnome/glib/gtk/whatever does the .desktop parsing.
> > 
> > IMHO it's quite a clean an easy way to do it, but I do not have much in
> > depth knowledge of how this works/is supposed to work.
> 
> It works fine under GNOME, but it will break some other functionality
> like "Default applications" because there's no way to back link to the
> original desktop file (the one without NoDisplay=true).

Maybe we just need to add a link back to the main desktop file, by adding a 
line in the secondary desktop file like
RelatesTo=okular.desktop
?

The whole idea being that existing implementation can just ignore that, so 
this is backwards compatible.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5



More information about the xdg mailing list