Commit 8d113b09 authored by Nate Graham's avatar Nate Graham 🔩

[Kicker] Only show "Add to Panel (Widget)" When there's no Task Manager

Summary:
Users get confused by the difference between "Pin to Task Manager" and "Add to Panel (Widget)", and we get bugs about this.

This patch resolves that confusion by only showing "Add to Panel (Widget)" when there's no Task Manager widget.

BUG: 390817
FIXED-IN: 5.14.0

Test Plan:
Dragging-and-dropping an app from Kicker or Kickoff pins it to the Task Manager if there's a Task Manager, or creates a Panel launcher if there's no Task Manager.

Context menu items:

Task Manager, widgets unlocked:
{F5856628}

Task Manager, Widgets locked:
{F5856629}

No Task Manager, Widgets unlocked:
{F5856630}

Task Manager, Widgets unlocked:
{F5856631}

Reviewers: #plasma, davidedmundson, mart

Reviewed By: #plasma, mart

Subscribers: mart, davidedmundson, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D12969
parent 42a4bc15
......@@ -149,12 +149,12 @@ QVariantList createAddLauncherActionList(QObject *appletInterface, const KServic
actionList << Kicker::createActionItem(i18n("Add to Desktop"), "addToDesktop");
}
if (ContainmentInterface::mayAddLauncher(appletInterface, ContainmentInterface::Panel)) {
actionList << Kicker::createActionItem(i18n("Add to Panel (Widget)"), "addToPanel");
}
// to avoid confusing users, only show "Pin to Task Manager" if there's a Task Manager (see Bug 390817)
// If there's no Task Manager and the panel is unlocked, show "Add to Panel (Widget)" instead
if (service && ContainmentInterface::mayAddLauncher(appletInterface, ContainmentInterface::TaskManager, service->entryPath())) {
actionList << Kicker::createActionItem(i18n("Pin to Task Manager"), "addToTaskManager");
} else if (ContainmentInterface::mayAddLauncher(appletInterface, ContainmentInterface::Panel)) {
actionList << Kicker::createActionItem(i18n("Add to Panel (Widget)"), "addToPanel");
}
return actionList;
......
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