Commit Graph

8 Commits (d66a804bbb15437bf865410a8b494c81498edb14)

Author SHA1 Message Date
Martin Gräßlin 8aa8617ed4 Drop our custom KLocalizedTranslator
It's upstreamed to ki18n framework.
2014-06-18 15:02:58 +02:00
Martin Gräßlin 0c4aaaf4ad [scripting] Support loading translations for UI loaded configs
Scripts and scripted effects can provide a ui file which gets loaded at
runtime. Obviously such a ui file is not translated. This introduces
quite a hack to load the translated strings.

In the metadata.desktop file the scripted component can provide a key
X-KWin-Config-TranslationDomain. The genericscriptedconfig tries to
locate the metadata.desktop file and reads this entry. If it is present
we extract all string properties of the loaded UI and pass them through
ki18nd.

REVIEW: 118585
2014-06-10 15:49:19 +02:00
David Faure 20bc3ff68b Include ksharedconfig.h (since it will be removed from kpluginfactory.h) 2014-03-29 09:32:06 +01:00
Alex Merry 4d88fcdff6 [kwin] Adapt to KPluginFactory change
KPluginFactory's constructor no longer takes arguments, since plugin
root objects are not passed any arguments.
2014-03-28 19:50:46 +00:00
Martin Gräßlin 0d07738ca9 [kwin] Fix genericscripted config
* Use metadata as json
* set Q_PLUGIN_METADATA and Q_INTERFACES
* port away from kde4_add_plugin

Only tested with effects, scripts might need further adjustements.

REVIEW: 116862
2014-03-19 08:00:28 +01:00
Martin Gräßlin d11288293c Port GenericScriptedConfig
KCModule needs a KAboutData as argument and KPluginFactory provides
componentName() as static method.
2013-07-24 09:58:42 +02:00
Martin Gräßlin 1d2c2d5982 Use Q_SLOTS and Q_SIGNALS instead of slots and signals
Fixes compilation with Qt5/KF5 setup.
2013-07-24 09:46:54 +02:00
Martin Gräßlin 650c606e95 Provide config interface for scripted effects and KWin scripts
A scripted component providing:
* ui/config.ui
* config/main.xml

can get a config interface by using the following in metadata.desktop:
X-KDE-ServiceTypes=KWin/Effect,KCModule
X-KDE-PluginKeyword=`X-KDE-PluginInfo-Name`
X-KDE-Library=kcm_kwin4_genericscripted
X-KDE-ParentComponents=`X-KDE-PluginInfo-Name`

`X-KDE-PluginInfo-Name` has to be replaced by the actual value. In case
of a KWin Script the X-KDE-ServiceTypes needs to be:
X-KDE-ServiceTypes=KWin/Script,KCModule

The GenericScriptedConfig tries to identify the package from the keyword
and creates a Plasma::ConfigLoader and loads the UI from the packaged UI
file.
2013-03-04 10:29:24 +01:00