summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Uwe Broulik <[email protected]>2018-05-24 01:42:48 +0900
committerEike Hein <[email protected]>2018-05-24 01:44:18 +0900
commitf7516196cfa49904a4b9daf337090c8f2c78ab20 (patch)
tree304f59225403e2cfb8699d3f1eec496f6cdcdc70
parent476ec86ce0fac3bea85d70af22e9b79a4dd75e09 (diff)
[Task Manager] Fix URL comparison
Summary: You cannot compare to `null` but to empty string. This was done to disable "Pin" when no launcher URL is available but not properly executed in "Start New Instance" Test Plan: 5.12 branch * "Launch new instance" is now disabled for e.g. wine notepad where it wouldn't work anyway (second change) * "Pin" is still properly checked depending on whether the task is pinned or not (first change) Reviewers: #plasma, hein Reviewed By: #plasma, hein Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D13069
-rw-r--r--applets/taskmanager/package/contents/ui/ContextMenu.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/applets/taskmanager/package/contents/ui/ContextMenu.qml b/applets/taskmanager/package/contents/ui/ContextMenu.qml
index daf55bb..1f327a3 100644
--- a/applets/taskmanager/package/contents/ui/ContextMenu.qml
+++ b/applets/taskmanager/package/contents/ui/ContextMenu.qml
@@ -52,7 +52,7 @@ PlasmaComponents.ContextMenu {
minimumWidth: visualParent.width
onStatusChanged: {
- if (visualParent && get(atm.LauncherUrlWithoutIcon) != null && status == PlasmaComponents.DialogStatus.Open) {
+ if (visualParent && get(atm.LauncherUrlWithoutIcon) != "" && status == PlasmaComponents.DialogStatus.Open) {
launcherToggleAction.checked = (tasksModel.launcherPosition(get(atm.LauncherUrlWithoutIcon)) != -1);
activitiesDesktopsMenu.refresh();
@@ -434,7 +434,7 @@ PlasmaComponents.ContextMenu {
id: startNewInstanceItem
visible: (visualParent && get(atm.IsLauncher) !== true && get(atm.IsStartup) !== true)
- enabled: visualParent && get(atm.LauncherUrlWithoutIcon) != null
+ enabled: visualParent && get(atm.LauncherUrlWithoutIcon) != ""
text: i18n("Start New Instance")
icon: "system-run"