on xenial help sign in
Make running apps work again
commita28375382fb62b5a809d3cb09a0d71aeb69f651b authorMichal Hruby <michal.mhr@gmail.com> dateFri 9 Aug 2013, 22:18 (13 years ago) parentfaa1ae6
2 files changed+20−2
Dash/DashApps.qml+13−1 Dash/GenericScopeView.qml+7−1
Dash/DashApps.qml+13−1
@@ -33,11 +33,23 @@ GenericScopeView {
3333 AppsAvailableForDownloadModel { id: appsAvailableForDownloadModel }
3434
3535 ListModel {
36+ id: dummyVisibilityModifier
37+
38+ ListElement { name: "running-apps" }
39+ }
40+
41+ SortFilterProxyModel {
3642 id: runningApplicationsModel
3743
3844 property var firstModel: mainStageApplicationsModel
3945 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
4153 }
4254
4355 onScopeChanged: {
Dash/GenericScopeView.qml+7−1
@@ -67,7 +67,13 @@ ScopeView {
6767 source: getRenderer(model.renderer, model.contentType)
6868
6969 onLoaded: {
70− item.model = results
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 {
75+ item.model = results
76+ }
7177 }
7278
7379 Connections {