Sorry David, really (really) late reply.<div><br></div><div>Yes, if image/png=myapp.desktop[Print] is specified, printing the png becomes the default action. Yes, it sounds awkward in that situation, but who would assign it like this?</div>

<div><br></div><div>The idea behind the addition is to be able to specify *extra* actions in addition to the "main" one, so it would more likely look like image/png=myapp.desktop;myapp.desktop[Print];myapp.desktop[Share]</div>

<div><br></div><div>And in a context menu it would look something like:</div><div><br></div><div>====</div><div>Open</div><div>Copy</div><div>Open with... ></div><div> - My App (default)</div><div>   -------</div><div>

 - Print with My App</div><div> - Share with My App</div><div><br></div><div><br></div><div class="gmail_extra"><br clear="all">J. Leclanche<br>
<br><br><div class="gmail_quote">On Tue, May 22, 2012 at 5:49 PM, David Faure <span dir="ltr"><<a href="mailto:faure@kde.org" target="_blank">faure@kde.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On Saturday 19 May 2012 17:08:16 Jerome Leclanche wrote:<br>
> On Sat, May 19, 2012 at 12:06 PM, David Faure <<a href="mailto:faure@kde.org">faure@kde.org</a>> wrote:<br>
> > There's no code in Qt yet, at this point it would be<br>
> > kdelibs/kded/kmimeassociations.cpp<br>
> > in git://<a href="http://anongit.kde.org/kdelibs" target="_blank">anongit.kde.org/kdelibs</a><br>
><br>
> Heads up: There will be code in Qt in 5.0.<br>
<br>
</div>If you mean QMimeDatabase/QMimeType, I should know, I wrote it :-)<br>
But that's only the shared-mime-info spec, not the mime-associations spec.<br>
<br>
BTW, you wrote earlier:<br>
<div class="im">> The syntax itself for mimeapps.list would not require an update as it's<br>
> just a "list of strings", although I don't think mimeapps.list actually<br>
> has a spec anywhere.<br>
<br>
</div>But actually there is a spec, at<br>
<a href="http://www.freedesktop.org/wiki/Specifications/mime-actions-spec" target="_blank">http://www.freedesktop.org/wiki/Specifications/mime-actions-spec</a><br>
<div class="im"><br>
> > I'm confused over all, because mimeapps.list is about application desktop<br>
> > files, not just about desktop files that define desktop actions. So, what<br>
> > should<br>
> > happen when writing image/png=myapp.desktop[Edit];<br>
> > and myapp.desktop simply says Exec=gimp ? Nothing new, right?<br>
><br>
> Right. When looking at an image/png file, xdg-open will<br>
> see myapp.desktop[Edit], go in myapp.desktop and look for a [Desktop Action<br>
> Edit] section.<br>
<br>
</div>Ah! I understand now.<br>
mimeapps.list *was* about desktop files without actions, but your proposal is<br>
to change exactly that! :-)<br>
<br>
Now the only thing I don't understand, is in which case would xdg-open [which<br>
is just one of the users of mimeapps.list BTW] look for "Edit"? From your<br>
description, it sounds like it would just stumble upon that as being the<br>
preferred action...<br>
So basically if I put image/png=myapp.desktop[Print] in mimeapps.list, every<br>
time I click on a PNG in a file manager it will print it...<br>
<br>
But that's not what you wanted, is it?<br>
You simply wanted the "Print" action to show up in the contextual menu over<br>
png files, even if the definition of the print action (in the root-owned desktop<br>
file) mentionned other mimetypes than png files.<br>
<br>
So this is the problem I have with this suggested change for mimeapps.list:<br>
for the desired effect of "adding a mimetype to an action", it has the side<br>
effect of "making it the default action for this mimetype", unless the full<br>
list of current associated applications is written out in mimeapps.list too,<br>
to ensure the added action is only at the end of the list.<br>
<br>
I think this is mixing two things, really.<br>
<br>
If the goal is to add a mimetype to a specific action, but without changing<br>
what happens when simply opening a file, then it should be done in a separate<br>
file, or in a separate group ([Added Action Associations]) in mimeapps.list.<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
David Faure, <a href="mailto:faure@kde.org">faure@kde.org</a>, <a href="http://www.davidfaure.fr" target="_blank">http://www.davidfaure.fr</a><br>
Sponsored by Nokia to work on KDE, incl. KDE Frameworks 5<br>
<br>
</div></div></blockquote></div><br></div>