on xenial help sign in
Put canEnableTerminationMode stuff back
91af41fDaniel d'Andrada
Dash/Apps/RunningApplicationsGrid.qml+11−1
@@ -52,6 +52,13 @@ ResponsiveFlowView {
52 }
52 }
53 }
53 }
54
54
55+ property bool canEnableTerminationMode: true
56+
57+ onCanEnableTerminationModeChanged: {
58+ if (!canEnableTerminationMode)
59+ terminationModeEnabled = false
60+ }
61+
55 // when false, it means it's on activation mode
62 // when false, it means it's on activation mode
56 property bool terminationModeEnabled: false
63 property bool terminationModeEnabled: false
57
64
@@ -73,7 +80,10 @@ ResponsiveFlowView {
73 }
80 }
74 application: model
81 application: model
75 onRequestedActivationMode: { root.terminationModeEnabled = false }
82 onRequestedActivationMode: { root.terminationModeEnabled = false }
83+ onRequestedTerminationMode: {
84+ if (canEnableTerminationMode)
76− onRequestedTerminationMode: { root.terminationModeEnabled = true }
85+ root.terminationModeEnabled = true
86+ }
77 onRequestedApplicationTermination: {
87 onRequestedApplicationTermination: {
78 shell.applicationManager.stopApplication(model.appId)
88 shell.applicationManager.stopApplication(model.appId)
79 }
89 }
Dash/DashApps.qml+1
@@ -44,6 +44,7 @@ GenericScopeView {
44
44
45 property var firstModel: mainStageApplicationsModel
45 property var firstModel: mainStageApplicationsModel
46 property var secondModel: sideStageApplicationModel
46 property var secondModel: sideStageApplicationModel
47+ property bool canEnableTerminationMode: scopeView.isCurrent
47
48
48 model: dummyVisibilityModifier
49 model: dummyVisibilityModifier
49 filterRole: 0
50 filterRole: 0
Dash/GenericScopeView.qml+1
@@ -151,6 +151,7 @@ FocusScope {
151 // TODO: the running apps grid doesn't support standard scope results model yet
151 // TODO: the running apps grid doesn't support standard scope results model yet
152 item.firstModel = Qt.binding(function() { return results.firstModel })
152 item.firstModel = Qt.binding(function() { return results.firstModel })
153 item.secondModel = Qt.binding(function() { return results.secondModel })
153 item.secondModel = Qt.binding(function() { return results.secondModel })
154+ item.canEnableTerminationMode = Qt.binding(function() { return scopeView.isCurrent })
154 } else {
155 } else {
155 item.model = Qt.binding(function() { return results })
156 item.model = Qt.binding(function() { return results })
156 }
157 }