on xenial help sign in
Make running apps work again
a283753Michal Hruby
Dash/DashApps.qml+13−1
@@ -33,11 +33,23 @@ GenericScopeView {
33 AppsAvailableForDownloadModel { id: appsAvailableForDownloadModel }
33 AppsAvailableForDownloadModel { id: appsAvailableForDownloadModel }
34
34
35 ListModel {
35 ListModel {
36+ id: dummyVisibilityModifier
37+
38+ ListElement { name: "running-apps" }
39+ }
40+
41+ SortFilterProxyModel {
36 id: runningApplicationsModel
42 id: runningApplicationsModel
37
43
38 property var firstModel: mainStageApplicationsModel
44 property var firstModel: mainStageApplicationsModel
39 property var secondModel: sideStageApplicationModel
45 property var secondModel: sideStageApplicationModel
40− property bool canEnableTerminationMode: Qt.binding(function() { return isCurrent; })
46+ //property bool canEnableTerminationMode: Qt.binding(function() { return isCurrent; })
47+
48+ model: dummyVisibilityModifier
49+ filterRole: 0
50+ filterRegExp: invertMatch ? ((mainStageApplicationsModel.count === 0 &&
51+ sideStageApplicationModel.count === 0) ? RegExp("running-apps") : RegExp("")) : RegExp("disabled")
52+ invertMatch: scopeView.scope.searchQuery.length == 0
41 }
53 }
42
54
43 onScopeChanged: {
55 onScopeChanged: {
Dash/GenericScopeView.qml+7−1
@@ -67,7 +67,13 @@ ScopeView {
67 source: getRenderer(model.renderer, model.contentType)
67 source: getRenderer(model.renderer, model.contentType)
68
68
69 onLoaded: {
69 onLoaded: {
70+ if (source.toString().indexOf("Apps/RunningApplicationsGrid.qml") != -1) {
71+ // TODO: the running apps grid doesn't support standard scope results model yet
72+ item.firstModel = results.firstModel;
73+ item.secondModel = results.secondModel;
74+ } else {
70− item.model = results
75+ item.model = results
76+ }
71 }
77 }
72
78
73 Connections {
79 Connections {