Commit beea5e69 authored by Marco Martin's avatar Marco Martin
Browse files

migrate from MidButton to MiddleButton

the MidButton name first got deprecated, then doesn't really work anymore
this fixes middle button action on containments
BUG:430418
parent bc025aa0
......@@ -5,7 +5,7 @@ RuntimePlatform=Desktop
[Desktop][ContainmentActions]
RightButton;NoModifier=org.kde.contextmenu
MidButton;NoModifier=org.kde.paste
MiddleButton;NoModifier=org.kde.paste
wheel:Vertical;NoModifier=org.kde.switchdesktop
[Panel]
......
// MidButton got deprecated and doesn't really work anymore as a stringified enum value
// for the middle button Qt::MouseButton, we need to update our config to "MiddleButton"
var plasmaConfig = ConfigFile("plasma-org.kde.plasma.desktop-appletsrc", "ActionPlugins");
for (let i in plasmaConfig.groupList) {
let subGroup = ConfigFile(plasmaConfig, plasmaConfig.groupList[i])
for (let j in subGroup.keyList) {
let key = subGroup.keyList[j];
if (key.indexOf("MidButton") !== -1) {
subGroup.writeEntry(key.replace("MidButton", "MiddleButton"), subGroup.readEntry(key));
subGroup.deleteEntry(key);
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment