Supporting mime types in desktop actions

Jerome Leclanche adys.wh at gmail.com
Sat May 19 09:08:16 PDT 2012


On Sat, May 19, 2012 at 12:06 PM, David Faure <faure at kde.org> wrote:
>
>
> There's no code in Qt yet, at this point it would be
> kdelibs/kded/kmimeassociations.cpp
> in git://anongit.kde.org/kdelibs


Heads up: There will be code in Qt in 5.0.


>
>
> > It's a bit unclear to me how the old stacks will react to something
> > like:
> >   image/png=myapp.desktop[Edit];
> > Will they just fail gracefully?
>
> Yep, the KDE implementation will just output a warning saying
> KMimeAssociations::parseAddedAssociations: ".../mimeapps.list" specifies
> unknown service "myapp.desktop[Edit]" in "Added Associations".
>
> But that's for mimeapps.list. I'm not sure what the suggested change for
> application .desktop files actually is. Ah, we're not talking about
> changing
> the way apps are associated with mimetypes, only about "desktop actions",
> i.e.
> typically contextual menu stuff? I wonder how the GUI is supposed to look
> like,
> to distinguish Open from Edit?
>

I'm not sure what you mean. My proposal only defines mime types an action
can be used *for*, nothing else.


>
> I'm confused over all, because mimeapps.list is about application desktop
> files, not just about desktop files that define desktop actions. So, what
> should
> happen when writing image/png=myapp.desktop[Edit];
> and myapp.desktop simply says Exec=gimp ? Nothing new, right?
>

Right. When looking at an image/png file, xdg-open will
see myapp.desktop[Edit], go in myapp.desktop and look for a [Desktop Action
Edit] section. If it doesn't find it, we *could* add a fallback to the
simple Desktop Entry (and a warning I guess).

How does it become "just about desktop files that define desktop actions",
though? Desktop files without DAs are still recognized as before.


>
> --
> David Faure, faure at kde.org, http://www.davidfaure.fr
> Sponsored by Nokia to work on KDE, incl. KDE Frameworks 5
>
> _______________________________________________
> xdg mailing list
> xdg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xdg
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/xdg/attachments/20120519/bec59ad6/attachment.html>


More information about the xdg mailing list