Summary: | LNF Scripting contextmenu config not always works | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Leszek Lesner <leszek.lesner> |
Component: | general | Assignee: | David Edmundson <kde> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bshah, notmart, plasma-bugs-null |
Priority: | NOR | ||
Version First Reported In: | 5.8.2 | ||
Target Milestone: | 1.0 | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/plasma-workspace/b9760e852042fb113caef8ad547967b98cfdd32a | Version Fixed In: | |
Sentry Crash Report: |
Description
Leszek Lesner
2016-10-26 09:45:29 UTC
a still not pushed solution is at https://phabricator.kde.org/D3166 and I will continue to block it. It fails to understand the problem, and fails to solve it. 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"); ... Another proposed way could be https://phabricator.kde.org/D3220 what should change is that the whole part about setting the containment actions should be moved in a different javascript file, org.kde.plasma.desktop-prelayout.js. Leszek, would you be ok with that? Git commit b9760e852042fb113caef8ad547967b98cfdd32a by David Edmundson. Committed on 03/11/2016 at 20:24. Pushed by davidedmundson into branch 'Plasma/5.8'. Introduce new pre-layout script hook Summary: layout.js used to be run before any containments were added. This was broken in a697d291 which creates desktop containments for that activity first. However, some scripts rely on being able to alter global configuration before any containments are loaded. In order to allow the same functionality we need to provide a new hook for whatever these scripts may need to do. Test Plan: Not done yet. Reviewers: #plasma, mart Reviewed By: mart Subscribers: apol, mart, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D3220 M +25 -1 shell/shellcorona.cpp http://commits.kde.org/plasma-workspace/b9760e852042fb113caef8ad547967b98cfdd32a |