https://bugs.kde.org/show_bug.cgi?id=371704

--- Comment #3 from Marco Martin <notm...@gmail.com> ---
tought about it, found an api that is maybe not too much invasive, but still
think that for 5.8 a retrocompatible fix should be done, unless Leszek is ok to
adapt the api on the fly.
(a fix for Maui is quite urgent i think)
An api that may make sense and not be too much invasive may be:
* to Containment (the scripting wrapper) add the property actionPluginsConfig,
that is an instance of type ConfigGroup
* at that point, it's used exactly as the current script in maui
* but then we know it's exactly that group has been touched, so we know when to
reload containment actions or not, instead of shooting blindly

the javascript would change from

var actionPlugins = ConfigFile("plasma-org.kde.plasma.desktop-appletsrc",
"ActionPlugins");
var actionPluginsDesktop = ConfigFile(actionPlugins,"0");
actionPluginsDesktop.writeEntry("MidButton;NoModifier", "org.kde.paste");
actionPluginsDesktop.writeEntry("RightButton;NoModifier",
"org.kde.contextmenu");
actionPluginsDesktop.writeEntry("wheel:Vertical;NoModifier",
"org.kde.switchdesktop");

var rightButton = ConfigFile(actionPluginsDesktop,"RightButton;NoModifier");
rightButton.writeEntry("_add panel", "true");
...

to

var actionPluginsDesktop = containment.actionPluginsConfig
actionPluginsDesktop.writeEntry("MidButton;NoModifier", "org.kde.paste");
actionPluginsDesktop.writeEntry("RightButton;NoModifier",
"org.kde.contextmenu");
actionPluginsDesktop.writeEntry("wheel:Vertical;NoModifier",
"org.kde.switchdesktop");

var rightButton = ConfigFile(actionPluginsDesktop,"RightButton;NoModifier");
rightButton.writeEntry("_add panel", "true");
...

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to