Review Request: Load webslice params from desktop file

Sebastian Kügler sebas at kde.org
Thu Mar 18 09:53:16 CET 2010


On Wednesday 17 March 2010 18:48:50 Aaron Seigo wrote:
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/3315/#review4540
> -----------------------------------------------------------
> 
> 
> this is a clever approach, however i think it does it in a sort of hackish
> manner by adding more entries to the ksycoca database. since these would
> be distributed as packages via get hot new stuff, they really ought to
> -be- Packages. what would be very nice, imho, is the ability to associate
> a Package with a C++ driven plasmoid. this would open up a whole bunch of
> possibilities, including this one.
> 
> off the top of my head: we could add one new property to the Plasma/Applet
> service type which would define the name of the package to use
> (X-Plasma-Package?); in the C++ case this would serve the same purpose as
> the X-KDE-PluginInfo-Name= entry. it would define a name that would be
> looked for in a well known location (apps/plasma/packages? so as not to
> conflict with apps/plasma/plasmoids/?)
> 
> then webslice could simply include a .desktop file describing the "package
> format" (which would be beyond simple; either being empty if the values
> stored in the .desktop file or contain a path to a config file such as
> "config" which would be a kconfig-readable file and which would be found
> as contents/config in the package) and it should all Just Work(tm) from
> there. WebSlice could see if package() returns a non-null pointer and if
> so, ask it for the config file that contains the values.

I agree, conceptually great, but we don't want to pollute the sycoca database. 

Another idea is to allow argv in the applet's .desktop file, for example a 
QStringList X-Plasma-Args much like we do with the runner? (See mediawiki 
runner as example).

It would look like this in the .desktop file then:

X-Plasma-Args=http://www.kde.org,#myselector

We can pass in those arguments at applet creation and make sure the WebSlice 
applet does "something" with it.

The mechanism ties in nicely with the system (specifying configurable stuff 
through the commandline args), it's generic (so can be reused for different 
applets) and is easy to implement (even easier than "beyond simple" I'd say 
:)).
-- 
sebas

http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9


More information about the Plasma-devel mailing list