Supporting mime types in desktop actions
adys.wh at gmail.com
Fri Nov 2 09:58:23 PDT 2012
Sorry David, really (really) late reply.
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?
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
And in a context menu it would look something like:
Open with... >
- My App (default)
- Print with My App
- Share with My App
On Tue, May 22, 2012 at 5:49 PM, David Faure <faure at kde.org> wrote:
> On Saturday 19 May 2012 17:08:16 Jerome Leclanche wrote:
> > 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.
> If you mean QMimeDatabase/QMimeType, I should know, I wrote it :-)
> But that's only the shared-mime-info spec, not the mime-associations spec.
> BTW, you wrote earlier:
> > The syntax itself for mimeapps.list would not require an update as it's
> > just a "list of strings", although I don't think mimeapps.list actually
> > has a spec anywhere.
> But actually there is a spec, at
> > > I'm confused over all, because mimeapps.list is about application
> > > files, not just about desktop files that define desktop actions. So,
> > > 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
> > Edit] section.
> Ah! I understand now.
> mimeapps.list *was* about desktop files without actions, but your proposal
> to change exactly that! :-)
> Now the only thing I don't understand, is in which case would xdg-open
> is just one of the users of mimeapps.list BTW] look for "Edit"? From your
> description, it sounds like it would just stumble upon that as being the
> preferred action...
> So basically if I put image/png=myapp.desktop[Print] in mimeapps.list,
> time I click on a PNG in a file manager it will print it...
> But that's not what you wanted, is it?
> You simply wanted the "Print" action to show up in the contextual menu over
> png files, even if the definition of the print action (in the root-owned
> file) mentionned other mimetypes than png files.
> So this is the problem I have with this suggested change for mimeapps.list:
> for the desired effect of "adding a mimetype to an action", it has the side
> effect of "making it the default action for this mimetype", unless the full
> list of current associated applications is written out in mimeapps.list
> to ensure the added action is only at the end of the list.
> I think this is mixing two things, really.
> If the goal is to add a mimetype to a specific action, but without changing
> what happens when simply opening a file, then it should be done in a
> file, or in a separate group ([Added Action Associations]) in
> David Faure, faure at kde.org, http://www.davidfaure.fr
> Sponsored by Nokia to work on KDE, incl. KDE Frameworks 5
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the xdg