From 69fb206e395a9795648bd3e4ba28898f1c042c99 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Thu, 12 Mar 2015 21:34:53 +0100 Subject: [PATCH 12/12] Show pause/stop buttons in jobs notification only for suspendable/killable jobs REVIEW: 122920 --- applets/notifications/package/contents/ui/JobDelegate.qml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/applets/notifications/package/contents/ui/JobDelegate.qml b/applets/notifications/package/contents/ui/JobDelegate.qml index 4c792588e13ef8cb54f2a117f4cd2726a785519c..d77290d68f1a5f12e0507a85fd10cb5fb64bea68 100644 --- a/applets/notifications/package/contents/ui/JobDelegate.qml +++ b/applets/notifications/package/contents/ui/JobDelegate.qml @@ -155,6 +155,7 @@ Column { PlasmaComponents.ToolButton { id: pauseButton iconSource: jobItem.jobstate == "suspended" ? "media-playback-start" : "media-playback-pause" + visible: getData(jobsSource.data, "suspendable", 0) onClicked: { var operationName = "suspend" @@ -170,6 +171,7 @@ Column { PlasmaComponents.ToolButton { id: stopButton iconSource: "media-playback-stop" + visible: getData(jobsSource.data, "killable", 0) onClicked: { cancelledJobs.push(modelData) // register that it was user-cancelled -- 2.3.1