Commit 8d113b09 authored by Nate Graham's avatar Nate Graham
Browse files

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

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:

Task Manager, Widgets locked:

No Task Manager, Widgets unlocked:

Task Manager, Widgets unlocked:

Reviewers: #plasma, davidedmundson, mart

Reviewed By: #plasma, mart

Subscribers: mart, davidedmundson, plasma-devel

Tags: #plasma

Differential Revision:
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;
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