Actions extensions in File Manager - Multiple invocation
faure at kde.org
Tue Mar 2 13:10:31 PST 2010
On Tuesday 02 March 2010, Pierre Wieser wrote:
> > De: "David Faure" <faure at kde.org>
> > Envoyé: Vendredi 26 Février 2010 11:51:23
> > > - what should we do when we have e.g. 'echo %d %X' ?
> > Good question, but I don't think this example makes sense :-)
> > Either you want one invocation per selected file, or you want one
> > invocation with all selected files...
> > The rule we use is "the app supports multiple files/urls if %F, %U, %D or
> > %N is in the Exec line". %X would obviously be added to that list for
> > this spec. So I guess the result in practive for %d %X (or %d %F, etc.)
> > would be that the first arg would be the first (i.e. a random)
> > directory...
> > How about we actually add the rule to the spec? [ideally in both
> > specs...] "If multiple files are selected, the application is invoked
> > once per file, unless its Exec line contains %F, %U, %D, %N or %X"
> Why even do we should choose between the two invocation modes ?
> If we consider that mixing single parameters with multiple ones doesn't
> make sense, we may just say that this is a syntax error and that the
> implementation may safely ignore these parameters
Sure. That wasn't what I was referring to, though; my "rule" above was about
when to choose single invocation and when to choose multiple invocations,
since you seemed to find the DES spec a little insufficient on that matter.
By defining the rule precisely we ensure all implementations make the same
choice in all cases.
David Faure, faure at kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. Konqueror (http://www.konqueror.org).
More information about the xdg