2 * Copyright (C) 2015-2016 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18import QtQuick.Layouts 1.1
19import Ubuntu.Components 1.3
20import Unity.Application 0.1
25 property bool checked: false
27 function createSurface() {
29 d.application.createSurface();
33 enabled: appId !== "unity8-dash"
36 if (d.bindGuard) { return; }
40 ApplicationManager.startApplication(root.appId);
42 ApplicationManager.stopApplication(root.appId);
47 // Application checkbox row
52 property bool bindGuard: false
53 property var application: null
54 Component.onCompleted: {
55 application = ApplicationManager.findApplication(root.appId);
60 target: ApplicationManager
62 d.application = ApplicationManager.findApplication(root.appId);
66 Layout.fillWidth: true
70 activeFocusOnPress: false
73 if (d.bindGuard) { return; }
77 ApplicationManager.startApplication(root.appId);
79 ApplicationManager.stopApplication(root.appId);
84 if (d.bindGuard) { return; }
87 root.checked = checked;
94 value: d.application != null
100 anchors.verticalCenter: parent.verticalCenter
105 if (d.application.state === ApplicationInfoInterface.Starting) {
107 } else if (d.application.state === ApplicationInfoInterface.Running) {
109 } else if (d.application.state === ApplicationInfoInterface.Suspended) {
119 height: appIdLabel.height * 0.7
120 anchors.verticalCenter: parent.verticalCenter
125 height: appIdLabel.height * 0.7
126 anchors.verticalCenter: parent.verticalCenter
127 onClicked: root.createSurface()
128 enabled: d.application && d.application.state === ApplicationInfoInterface.Running
132 anchors.centerIn: parent
137 // Prompts controls row
139 anchors.left: root.left
140 anchors.leftMargin: units.gu(2)
141 visible: root.checked === true && d.application !== null && root.enabled
144 property int promptCount: d.application ? d.application.promptSurfaceList.count : 0
146 text: promptCount + " prompts"
150 height: promptsLabel.height * 0.7
151 anchors.verticalCenter: parent.verticalCenter
152 onClicked: d.application.createPromptSurface()
153 Label { text: "➕"; anchors.centerIn: parent }
157 height: promptsLabel.height * 0.7
158 anchors.verticalCenter: parent.verticalCenter
159 onClicked: d.application.promptSurfaceList.get(0).close()
160 enabled: d.application && d.application.promptSurfaceList.count > 0
161 Label { text: "➖"; anchors.centerIn: parent; enabled: parent.enabled }
165 // Rows of top-level application surfaces
167 model: d.application ? d.application.surfaceList : null
169 anchors.left: root.left
170 anchors.leftMargin: units.gu(2)
173 text: "- " + model.surface.name
177 height: appIdLabel.height * 0.7
178 anchors.verticalCenter: parent.verticalCenter
179 enabled: model.surface.live
181 onClicked: model.surface.setLive(false);
184 anchors.centerIn: parent
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list