Commit 66940389 authored by Nate Graham's avatar Nate Graham 🔩
Browse files

[context menu] Remove last traces of "Lock Widgets" action from UI

Summary:
In Plasma, 5.18, this ishn't a user-facing option anymore. It's still visible in the
context meny configuration dialog though, and it's still referenced in some of the
context menu building code.

This patch removes it from those places

BUG: 416578
FIXED-IN: 5.18.0

Test Plan:
Context menu still looks the same on the desktop and panel, both in and out of edit mode
The action no longer shows up in the configuration UI.

Please review carefully as this code is fairly unfamiliar to me.

Reviewers: mart, #plasma

Reviewed By: mart, #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D26845
parent b3213101
......@@ -71,11 +71,11 @@ void ContextMenu::restore(const KConfigGroup &config)
if (c->containmentType() == Plasma::Types::PanelContainment ||
c->containmentType() == Plasma::Types::CustomPanelContainment) {
m_actionOrder << QStringLiteral("add widgets") << QStringLiteral("_add panel") << QStringLiteral("lock widgets") << QStringLiteral("_context") << QStringLiteral("configure") << QStringLiteral("remove");
m_actionOrder << QStringLiteral("add widgets") << QStringLiteral("_add panel") << QStringLiteral("_context") << QStringLiteral("configure") << QStringLiteral("remove");
} else {
actions.insert(QStringLiteral("configure shortcuts"), false);
m_actionOrder << QStringLiteral("_context") << QStringLiteral("_run_command") << QStringLiteral("add widgets") << QStringLiteral("_add panel")
<< QStringLiteral("manage activities") << QStringLiteral("remove") << QStringLiteral("lock widgets") << QStringLiteral("edit mode") << QStringLiteral("_sep1")
<< QStringLiteral("manage activities") << QStringLiteral("remove") << QStringLiteral("edit mode") << QStringLiteral("_sep1")
<<QStringLiteral("_lock_screen") << QStringLiteral("_logout") << QStringLiteral("_sep2") << QStringLiteral("run associated application") << QStringLiteral("configure")
<< QStringLiteral("configure shortcuts") << QStringLiteral("_sep3") << QStringLiteral("_wallpaper");
disabled.insert(QStringLiteral("configure shortcuts"));
......@@ -140,11 +140,9 @@ QList<QAction*> ContextMenu::contextualActions()
// Bug 364292: show "Remove this Panel" option only when panelcontroller is opened
if (name != QLatin1String("remove") || c->isUserConfiguring() ||
(c->containmentType() != Plasma::Types::PanelContainment
&& c->containmentType() != Plasma::Types::CustomPanelContainment)) {
if (name != QLatin1String("lock widgets") || c->corona()->immutability() != Plasma::Types::Mutable) {
&& c->containmentType() != Plasma::Types::CustomPanelContainment
&& c->corona()->immutability() != Plasma::Types::Mutable)) {
actions << a;
}
}
}
}
......@@ -178,10 +176,6 @@ QAction *ContextMenu::action(const QString &name)
if (KAuthorized::authorize(QStringLiteral("logout"))) {
return m_logoutAction;
}
} else if (name == QLatin1String("lock widgets")) {
if (c->corona()) {
return c->corona()->actions()->action(QStringLiteral("lock widgets"));
}
} else if (name == QLatin1String("edit mode")) {
if (c->corona()) {
return c->corona()->actions()->action(QStringLiteral("edit mode"));
......
Markdown is supported
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