[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Passing additional parameters to a mime type handler
From:       David Faure <faure () kde ! org>
Date:       2005-04-14 14:36:06
Message-ID: 200504141636.06756.faure () kde ! org
[Download RAW message or body]

On Monday 11 April 2005 21:07, Fred Schaettgen wrote:
> Like this for instance:
>   X-KDE-ExecParameter=<URI>,<parameter name>
> If kfind knows about a parameter type with the URI http://foobar/pagenumber 
> (which might translate to "base-10 ascii number with the semantics of a page 
> number") and an application supports the same parameter type, the appliation 
> could be started with a page number as a parameter.

Not sure why you would want to use a URI there - after all, all you need is a unique
name for the feature. So "find" or "pagenumber" might do the job.
It might also be simpler to just have
X-KDE-PageNumberParameter=<parameter name>
instead of having to iterate over all ExecParameters.
Note that KService makes it easy to query for custom properties. You might need to
define the property in kio/application.desktop in order to let KService know its type though.

> The 'parameter name' and the actual value of the parameter could simply be 
> appended to the command line. Does this make any sense? Or is there even a 
> good way to do something like that with what we have already?
Can't think of a way to do this already. It does sound pretty close to the
"TempFile" option support I added some time ago (cf PropertyDef::X-KDE-HasTempFileOption
in application.desktop, and the KCmdLineArgs method).
The idea there is the same: the app says in its .desktop file that it supports
a given option, although in the case of the tempfile option, the name of the
command-line option is actually fixed. Your solution is more flexible,
especially for .desktop files describing non-KDE applications.

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic