Merge lp:~mzanetti/unity8/drop-running-apps-from-dash into lp:unity8
- drop-running-apps-from-dash
- Merge into trunk
Status: | Merged | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Approved by: | Albert Astals Cid | ||||||||||||||||
Approved revision: | 1081 | ||||||||||||||||
Merged at revision: | 1097 | ||||||||||||||||
Proposed branch: | lp:~mzanetti/unity8/drop-running-apps-from-dash | ||||||||||||||||
Merge into: | lp:unity8 | ||||||||||||||||
Prerequisite: | lp:~unity-team/unity8/mirCompositor | ||||||||||||||||
Diff against target: |
705 lines (+5/-585) 11 files modified
qml/Dash/Apps/CloseIcon.qml (+0/-62) qml/Dash/Apps/RunningApplicationTile.qml (+0/-136) qml/Dash/Apps/RunningApplicationsGrid.qml (+0/-105) qml/Dash/DashApps.qml (+0/-40) qml/Dash/DashContent.qml (+1/-3) qml/Dash/GenericScopeView.qml (+1/-10) tests/autopilot/unity8/shell/emulators/dash.py (+0/-4) tests/autopilot/unity8/shell/tests/test_emulators.py (+1/-1) tests/qmltests/CMakeLists.txt (+0/-1) tests/qmltests/Dash/Apps/tst_RunningApplicationsGrid.qml (+0/-217) tests/qmltests/tst_Shell.qml (+2/-6) |
||||||||||||||||
To merge this branch: | bzr merge lp:~mzanetti/unity8/drop-running-apps-from-dash | ||||||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Albert Astals Cid (community) | Approve | ||
Review via email:
|
Commit message
Drop Recent apps category from Dash
Description of the change
* Are there any related MPs required for this MP to build/function as expected? Please list.
see prereq
* Did you perform an exploratory manual test run of your code change and any related functionality?
sure
* Did you make sure that your branch does not contain spurious tags?
yes
* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
nope
* If you changed the UI, has there been a design review?
no real review... but this is wanted by design according to various bug reports and specs.
- 1079. By Michael Zanetti
-
merge prereq
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
- 1080. By Michael Zanetti
-
merge prereq
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1080
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 1081. By Michael Zanetti
-
merge prereq
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Albert Astals Cid (aacid) wrote : | # |
Looks good to me
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Albert Astals Cid (aacid) wrote : | # |
* Did you perform an exploratory manual test run of the code change and any related functionality?
No, but it is exactly the changes i did when removing this on the non QtComp branch so it looks good
* Did CI run pass? If not, please explain why.
No, unity8 : Depends: qtdeclarative5-
- 1082. By Michael Zanetti
-
merge prereq
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1081
http://
Executed test runs:
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 1083. By Michael Zanetti
-
merge prereq
- 1084. By Michael Zanetti
-
merge prereq
- 1085. By Michael Zanetti
-
merge prereq
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1085
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 1086. By Michael Zanetti
-
merge prereq
- 1087. By Michael Zanetti
-
merge prereq
- 1088. By Michael Zanetti
-
merge prereq
- 1089. By Michael Zanetti
-
merge prereq
Preview Diff
1 | === removed file 'qml/Dash/Apps/CloseIcon.qml' | |||
2 | --- qml/Dash/Apps/CloseIcon.qml 2013-06-05 22:03:08 +0000 | |||
3 | +++ qml/Dash/Apps/CloseIcon.qml 1970-01-01 00:00:00 +0000 | |||
4 | @@ -1,62 +0,0 @@ | |||
5 | 1 | /* | ||
6 | 2 | * Copyright (C) 2013 Canonical, Ltd. | ||
7 | 3 | * | ||
8 | 4 | * This program is free software; you can redistribute it and/or modify | ||
9 | 5 | * it under the terms of the GNU General Public License as published by | ||
10 | 6 | * the Free Software Foundation; version 3. | ||
11 | 7 | * | ||
12 | 8 | * This program is distributed in the hope that it will be useful, | ||
13 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | 11 | * GNU General Public License for more details. | ||
16 | 12 | * | ||
17 | 13 | * You should have received a copy of the GNU General Public License | ||
18 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | 15 | */ | ||
20 | 16 | |||
21 | 17 | import QtQuick 2.0 | ||
22 | 18 | |||
23 | 19 | Item { | ||
24 | 20 | id: root | ||
25 | 21 | |||
26 | 22 | Image { | ||
27 | 23 | id: closeIcon | ||
28 | 24 | anchors.centerIn: parent | ||
29 | 25 | source: "graphics/close_btn.png" | ||
30 | 26 | |||
31 | 27 | state: (root.enabled) ? "shown" : "hidden" | ||
32 | 28 | |||
33 | 29 | states: [ | ||
34 | 30 | State { | ||
35 | 31 | name: "shown" | ||
36 | 32 | PropertyChanges { | ||
37 | 33 | target: closeIcon | ||
38 | 34 | height: root.height | ||
39 | 35 | width: root.width | ||
40 | 36 | } | ||
41 | 37 | }, | ||
42 | 38 | State { | ||
43 | 39 | name: "hidden" | ||
44 | 40 | PropertyChanges { | ||
45 | 41 | target: closeIcon | ||
46 | 42 | height: 0 | ||
47 | 43 | width: 0 | ||
48 | 44 | } | ||
49 | 45 | } | ||
50 | 46 | |||
51 | 47 | ] | ||
52 | 48 | transitions: [ | ||
53 | 49 | Transition { | ||
54 | 50 | to: "shown" | ||
55 | 51 | NumberAnimation { | ||
56 | 52 | properties: "width, height"; duration: 300 | ||
57 | 53 | easing { type: Easing.OutBack; overshoot: 5 } | ||
58 | 54 | } | ||
59 | 55 | }, | ||
60 | 56 | Transition { | ||
61 | 57 | to: "hidden" | ||
62 | 58 | NumberAnimation { properties: "width, height"; duration: 250; } | ||
63 | 59 | } | ||
64 | 60 | ] | ||
65 | 61 | } | ||
66 | 62 | } | ||
67 | 63 | 0 | ||
68 | === removed file 'qml/Dash/Apps/RunningApplicationTile.qml' | |||
69 | --- qml/Dash/Apps/RunningApplicationTile.qml 2014-07-28 17:07:14 +0000 | |||
70 | +++ qml/Dash/Apps/RunningApplicationTile.qml 1970-01-01 00:00:00 +0000 | |||
71 | @@ -1,136 +0,0 @@ | |||
72 | 1 | /* | ||
73 | 2 | * Copyright (C) 2013 Canonical, Ltd. | ||
74 | 3 | * | ||
75 | 4 | * This program is free software; you can redistribute it and/or modify | ||
76 | 5 | * it under the terms of the GNU General Public License as published by | ||
77 | 6 | * the Free Software Foundation; version 3. | ||
78 | 7 | * | ||
79 | 8 | * This program is distributed in the hope that it will be useful, | ||
80 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
81 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
82 | 11 | * GNU General Public License for more details. | ||
83 | 12 | * | ||
84 | 13 | * You should have received a copy of the GNU General Public License | ||
85 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
86 | 15 | */ | ||
87 | 16 | |||
88 | 17 | import QtQuick 2.0 | ||
89 | 18 | import Ubuntu.Components 0.1 | ||
90 | 19 | import Unity.Application 0.1 | ||
91 | 20 | import "../../Components/" | ||
92 | 21 | import "../../Components/ListItems" | ||
93 | 22 | |||
94 | 23 | AbstractButton { | ||
95 | 24 | id: root | ||
96 | 25 | property var application | ||
97 | 26 | |||
98 | 27 | signal requestedApplicationActivation(var application) | ||
99 | 28 | signal requestedApplicationTermination(var application) | ||
100 | 29 | signal requestedActivationMode() | ||
101 | 30 | signal requestedTerminationMode() | ||
102 | 31 | |||
103 | 32 | width: thumbnail.width | ||
104 | 33 | height: thumbnail.height + labelContainer.height | ||
105 | 34 | |||
106 | 35 | property bool terminationModeEnabled: false | ||
107 | 36 | |||
108 | 37 | onClicked: { | ||
109 | 38 | if (!terminationModeEnabled) | ||
110 | 39 | requestedApplicationActivation(application) | ||
111 | 40 | } | ||
112 | 41 | |||
113 | 42 | onPressAndHold: { | ||
114 | 43 | if (terminationModeEnabled) { | ||
115 | 44 | requestedActivationMode() | ||
116 | 45 | } else { | ||
117 | 46 | requestedTerminationMode() | ||
118 | 47 | } | ||
119 | 48 | } | ||
120 | 49 | |||
121 | 50 | Item { | ||
122 | 51 | id: thumbnail | ||
123 | 52 | |||
124 | 53 | width: shapedApplicationImage.width | ||
125 | 54 | height: shapedApplicationImage.height | ||
126 | 55 | |||
127 | 56 | UbuntuShape { | ||
128 | 57 | id: shapedApplicationImage | ||
129 | 58 | x: 0 | ||
130 | 59 | y: 0 | ||
131 | 60 | height: applicationImage.height | ||
132 | 61 | width: applicationImage.width | ||
133 | 62 | radius: "medium" | ||
134 | 63 | |||
135 | 64 | image: Image { | ||
136 | 65 | id: applicationImage | ||
137 | 66 | source: application.screenshot | ||
138 | 67 | // height : width = ss.height : ss.width | ||
139 | 68 | |||
140 | 69 | property bool isLandscape: sourceSize.width > sourceSize.height | ||
141 | 70 | property real maxDimension: units.gu(17) | ||
142 | 71 | |||
143 | 72 | width: isLandscape ? Math.min(sourceSize.width, maxDimension) : height * (sourceSize.width / sourceSize.height) | ||
144 | 73 | height: isLandscape ? width * (sourceSize.height / sourceSize.width) : Math.min(sourceSize.height, maxDimension) | ||
145 | 74 | fillMode: Image.Stretch | ||
146 | 75 | } | ||
147 | 76 | |||
148 | 77 | } | ||
149 | 78 | |||
150 | 79 | UbuntuShape { | ||
151 | 80 | id: borderPressed | ||
152 | 81 | |||
153 | 82 | anchors.fill: shapedApplicationImage | ||
154 | 83 | radius: "medium" | ||
155 | 84 | borderSource: "radius_pressed.sci" | ||
156 | 85 | opacity: root.pressed ? 1.0 : 0.0 | ||
157 | 86 | Behavior on opacity { NumberAnimation { duration: 200; easing.type: Easing.OutQuint } } | ||
158 | 87 | } | ||
159 | 88 | } | ||
160 | 89 | |||
161 | 90 | // FIXME: label code duplicated with Tile | ||
162 | 91 | Item { | ||
163 | 92 | id: labelContainer | ||
164 | 93 | anchors { | ||
165 | 94 | left: thumbnail.left | ||
166 | 95 | right: thumbnail.right | ||
167 | 96 | top: thumbnail.bottom | ||
168 | 97 | } | ||
169 | 98 | height: units.gu(2) | ||
170 | 99 | |||
171 | 100 | Label { | ||
172 | 101 | id: label | ||
173 | 102 | anchors { | ||
174 | 103 | baseline: parent.bottom | ||
175 | 104 | left: parent.left | ||
176 | 105 | right: parent.right | ||
177 | 106 | } | ||
178 | 107 | text: (application) ? application.name : "" | ||
179 | 108 | |||
180 | 109 | // TODO karni: Update Ubuntu.Components.Themes.Palette and use theme color instead | ||
181 | 110 | color: "grey" | ||
182 | 111 | opacity: 0.9 | ||
183 | 112 | fontSize: "small" | ||
184 | 113 | elide: Text.ElideMiddle | ||
185 | 114 | horizontalAlignment: Text.AlignHCenter | ||
186 | 115 | } | ||
187 | 116 | } | ||
188 | 117 | |||
189 | 118 | CloseIcon { | ||
190 | 119 | objectName: "closeIcon " + model.name | ||
191 | 120 | anchors { | ||
192 | 121 | left: thumbnail.left | ||
193 | 122 | leftMargin: -units.gu(1) | ||
194 | 123 | top: thumbnail.top | ||
195 | 124 | topMargin: -units.gu(1) | ||
196 | 125 | } | ||
197 | 126 | height: units.gu(6) | ||
198 | 127 | width: units.gu(6) | ||
199 | 128 | id: closeIcon | ||
200 | 129 | enabled: root.terminationModeEnabled | ||
201 | 130 | |||
202 | 131 | MouseArea { | ||
203 | 132 | anchors { fill: parent; margins: -units.gu(1) } | ||
204 | 133 | onClicked: requestedApplicationTermination(application) | ||
205 | 134 | } | ||
206 | 135 | } | ||
207 | 136 | } | ||
208 | 137 | 0 | ||
209 | === removed file 'qml/Dash/Apps/RunningApplicationsGrid.qml' | |||
210 | --- qml/Dash/Apps/RunningApplicationsGrid.qml 2014-03-25 11:34:34 +0000 | |||
211 | +++ qml/Dash/Apps/RunningApplicationsGrid.qml 1970-01-01 00:00:00 +0000 | |||
212 | @@ -1,105 +0,0 @@ | |||
213 | 1 | /* | ||
214 | 2 | * Copyright (C) 2013 Canonical, Ltd. | ||
215 | 3 | * | ||
216 | 4 | * This program is free software; you can redistribute it and/or modify | ||
217 | 5 | * it under the terms of the GNU General Public License as published by | ||
218 | 6 | * the Free Software Foundation; version 3. | ||
219 | 7 | * | ||
220 | 8 | * This program is distributed in the hope that it will be useful, | ||
221 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
222 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
223 | 11 | * GNU General Public License for more details. | ||
224 | 12 | * | ||
225 | 13 | * You should have received a copy of the GNU General Public License | ||
226 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
227 | 15 | */ | ||
228 | 16 | |||
229 | 17 | import QtQuick 2.0 | ||
230 | 18 | import "../../Components" | ||
231 | 19 | |||
232 | 20 | import Ubuntu.Gestures 0.1 | ||
233 | 21 | import Unity.Application 0.1 | ||
234 | 22 | |||
235 | 23 | ResponsiveFlowView { | ||
236 | 24 | id: root | ||
237 | 25 | clip: true | ||
238 | 26 | |||
239 | 27 | signal updateScreenshots | ||
240 | 28 | property alias enableHeightBehavior: heightBehaviour.enabled | ||
241 | 29 | property bool enableHeightBehaviorOnNextCreation: model.count === 0 | ||
242 | 30 | |||
243 | 31 | Behavior on height { | ||
244 | 32 | id: heightBehaviour | ||
245 | 33 | enabled: false | ||
246 | 34 | NumberAnimation { duration: 200; easing.type: Easing.InOutQuad } | ||
247 | 35 | } | ||
248 | 36 | |||
249 | 37 | Connections { | ||
250 | 38 | target: root.model | ||
251 | 39 | onCountChanged: { | ||
252 | 40 | heightBehaviour.enabled = true; | ||
253 | 41 | } | ||
254 | 42 | } | ||
255 | 43 | |||
256 | 44 | property bool canEnableTerminationMode: true | ||
257 | 45 | |||
258 | 46 | onCanEnableTerminationModeChanged: { | ||
259 | 47 | if (!canEnableTerminationMode) | ||
260 | 48 | terminationModeEnabled = false | ||
261 | 49 | } | ||
262 | 50 | |||
263 | 51 | // when false, it means it's on activation mode | ||
264 | 52 | property bool terminationModeEnabled: false | ||
265 | 53 | |||
266 | 54 | maximumNumberOfColumns: 10 | ||
267 | 55 | minimumHorizontalSpacing: units.gu(2) | ||
268 | 56 | referenceDelegateWidth: units.gu(11) | ||
269 | 57 | verticalSpacing: units.gu(2) | ||
270 | 58 | |||
271 | 59 | delegate: Item { | ||
272 | 60 | width: runningAppTile.width + root.horizontalSpacing | ||
273 | 61 | height: runningAppTile.height + root.verticalSpacing | ||
274 | 62 | |||
275 | 63 | RunningApplicationTile { | ||
276 | 64 | id: runningAppTile | ||
277 | 65 | objectName: "runningAppTile " + model.name | ||
278 | 66 | anchors { | ||
279 | 67 | top: parent.top | ||
280 | 68 | horizontalCenter: parent.horizontalCenter | ||
281 | 69 | } | ||
282 | 70 | application: model | ||
283 | 71 | onRequestedActivationMode: { root.terminationModeEnabled = false } | ||
284 | 72 | onRequestedTerminationMode: { | ||
285 | 73 | if (canEnableTerminationMode) | ||
286 | 74 | root.terminationModeEnabled = true | ||
287 | 75 | } | ||
288 | 76 | onRequestedApplicationTermination: { | ||
289 | 77 | ApplicationManager.stopApplication(model.appId) | ||
290 | 78 | } | ||
291 | 79 | onRequestedApplicationActivation: { | ||
292 | 80 | ApplicationManager.requestFocusApplication(model.appId) | ||
293 | 81 | } | ||
294 | 82 | |||
295 | 83 | terminationModeEnabled: root.terminationModeEnabled | ||
296 | 84 | } | ||
297 | 85 | } | ||
298 | 86 | |||
299 | 87 | move: Transition { | ||
300 | 88 | NumberAnimation { properties: "x,y"; duration: 400; easing.type: Easing.OutCubic } | ||
301 | 89 | } | ||
302 | 90 | |||
303 | 91 | MouseArea { | ||
304 | 92 | anchors.fill: parent | ||
305 | 93 | z: -1 // behind all RunningApplicationTiles | ||
306 | 94 | enabled: root.terminationModeEnabled | ||
307 | 95 | onPressed: { root.terminationModeEnabled = false; } | ||
308 | 96 | } | ||
309 | 97 | |||
310 | 98 | PressedOutsideNotifier { | ||
311 | 99 | anchors.fill: parent | ||
312 | 100 | enabled: root.terminationModeEnabled | ||
313 | 101 | onPressedOutside: { | ||
314 | 102 | root.terminationModeEnabled = false; | ||
315 | 103 | } | ||
316 | 104 | } | ||
317 | 105 | } | ||
318 | 106 | 0 | ||
319 | === removed directory 'qml/Dash/Apps/graphics' | |||
320 | === removed file 'qml/Dash/Apps/graphics/close_btn@9.png' | |||
321 | 107 | Binary files qml/Dash/Apps/graphics/close_btn@9.png 2013-06-20 13:42:39 +0000 and qml/Dash/Apps/graphics/close_btn@9.png 1970-01-01 00:00:00 +0000 differ | 1 | Binary files qml/Dash/Apps/graphics/close_btn@9.png 2013-06-20 13:42:39 +0000 and qml/Dash/Apps/graphics/close_btn@9.png 1970-01-01 00:00:00 +0000 differ |
322 | === removed file 'qml/Dash/DashApps.qml' | |||
323 | --- qml/Dash/DashApps.qml 2014-03-28 00:32:46 +0000 | |||
324 | +++ qml/Dash/DashApps.qml 1970-01-01 00:00:00 +0000 | |||
325 | @@ -1,40 +0,0 @@ | |||
326 | 1 | /* | ||
327 | 2 | * Copyright (C) 2013 Canonical, Ltd. | ||
328 | 3 | * | ||
329 | 4 | * This program is free software; you can redistribute it and/or modify | ||
330 | 5 | * it under the terms of the GNU General Public License as published by | ||
331 | 6 | * the Free Software Foundation; version 3. | ||
332 | 7 | * | ||
333 | 8 | * This program is distributed in the hope that it will be useful, | ||
334 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
335 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
336 | 11 | * GNU General Public License for more details. | ||
337 | 12 | * | ||
338 | 13 | * You should have received a copy of the GNU General Public License | ||
339 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
340 | 15 | */ | ||
341 | 16 | |||
342 | 17 | import QtQuick 2.0 | ||
343 | 18 | import Ubuntu.Components 0.1 | ||
344 | 19 | import Utils 0.1 | ||
345 | 20 | import Unity.Application 0.1 | ||
346 | 21 | import "../Components" | ||
347 | 22 | import "../Components/ListItems" | ||
348 | 23 | import "Apps" | ||
349 | 24 | |||
350 | 25 | GenericScopeView { | ||
351 | 26 | id: scopeView | ||
352 | 27 | objectName: "DashApps" | ||
353 | 28 | |||
354 | 29 | property var runningApps: ApplicationManager | ||
355 | 30 | |||
356 | 31 | QtObject { | ||
357 | 32 | id: countObject | ||
358 | 33 | property int count: scopeView.scope.searchQuery.length == 0 ? scopeView.runningApps.count : 0 | ||
359 | 34 | } | ||
360 | 35 | |||
361 | 36 | onScopeChanged: { | ||
362 | 37 | scopeView.scope.categories.addSpecialCategory("running.apps.category", i18n.tr("Recent"), "", "{ \"template\": { \"category-layout\": \"running-apps\" } }", countObject); | ||
363 | 38 | enableHeightBehaviorOnNextCreation = scopeView.runningApps.count === 0 | ||
364 | 39 | } | ||
365 | 40 | } | ||
366 | 41 | 0 | ||
367 | === modified file 'qml/Dash/DashContent.qml' | |||
368 | --- qml/Dash/DashContent.qml 2014-07-28 17:07:14 +0000 | |||
369 | +++ qml/Dash/DashContent.qml 2014-07-28 17:07:15 +0000 | |||
370 | @@ -126,9 +126,7 @@ | |||
371 | 126 | return (xPositionRelativetoView > -width && xPositionRelativetoView < width) ? 1 : 0 | 126 | return (xPositionRelativetoView > -width && xPositionRelativetoView < width) ? 1 : 0 |
372 | 127 | } | 127 | } |
373 | 128 | asynchronous: true | 128 | asynchronous: true |
377 | 129 | // TODO This if will eventually go away since we're killing DashApps.qml | 129 | source: "GenericScopeView.qml" |
375 | 130 | // once we move app closing to the spread | ||
376 | 131 | source: (scope.id == "clickscope") ? "DashApps.qml" : "GenericScopeView.qml" | ||
378 | 132 | objectName: scope.id + " loader" | 130 | objectName: scope.id + " loader" |
379 | 133 | 131 | ||
380 | 134 | readonly property bool moving: item ? item.moving : false | 132 | readonly property bool moving: item ? item.moving : false |
381 | 135 | 133 | ||
382 | === modified file 'qml/Dash/GenericScopeView.qml' | |||
383 | --- qml/Dash/GenericScopeView.qml 2014-07-24 20:40:44 +0000 | |||
384 | +++ qml/Dash/GenericScopeView.qml 2014-07-28 17:07:15 +0000 | |||
385 | @@ -18,7 +18,6 @@ | |||
386 | 18 | import Ubuntu.Components 0.1 | 18 | import Ubuntu.Components 0.1 |
387 | 19 | import Utils 0.1 | 19 | import Utils 0.1 |
388 | 20 | import Unity 0.2 | 20 | import Unity 0.2 |
389 | 21 | import Unity.Application 0.1 | ||
390 | 22 | import Dash 0.1 | 21 | import Dash 0.1 |
391 | 23 | import "../Components" | 22 | import "../Components" |
392 | 24 | import "../Components/ListItems" as ListItems | 23 | import "../Components/ListItems" as ListItems |
393 | @@ -194,7 +193,6 @@ | |||
394 | 194 | switch (cardTool.categoryLayout) { | 193 | switch (cardTool.categoryLayout) { |
395 | 195 | case "carousel": return "CardCarousel.qml"; | 194 | case "carousel": return "CardCarousel.qml"; |
396 | 196 | case "vertical-journal": return "CardVerticalJournal.qml"; | 195 | case "vertical-journal": return "CardVerticalJournal.qml"; |
397 | 197 | case "running-apps": return "Apps/RunningApplicationsGrid.qml"; | ||
398 | 198 | case "grid": | 196 | case "grid": |
399 | 199 | default: return "CardGrid.qml"; | 197 | default: return "CardGrid.qml"; |
400 | 200 | } | 198 | } |
401 | @@ -205,14 +203,7 @@ | |||
402 | 205 | item.enableHeightBehavior = scopeView.enableHeightBehaviorOnNextCreation; | 203 | item.enableHeightBehavior = scopeView.enableHeightBehaviorOnNextCreation; |
403 | 206 | scopeView.enableHeightBehaviorOnNextCreation = false; | 204 | scopeView.enableHeightBehaviorOnNextCreation = false; |
404 | 207 | } | 205 | } |
413 | 208 | if (source.toString().indexOf("Apps/RunningApplicationsGrid.qml") != -1) { | 206 | item.model = Qt.binding(function() { return results }) |
406 | 209 | // TODO: this is still a kludge :D Ideally add some kind of hook so that we | ||
407 | 210 | // can do this from DashApps.qml or think a better way that needs no special casing | ||
408 | 211 | item.model = Qt.binding(function() { return runningApps; }) | ||
409 | 212 | item.canEnableTerminationMode = Qt.binding(function() { return scopeView.isCurrent }) | ||
410 | 213 | } else { | ||
411 | 214 | item.model = Qt.binding(function() { return results }) | ||
412 | 215 | } | ||
414 | 216 | item.objectName = Qt.binding(function() { return categoryId }) | 207 | item.objectName = Qt.binding(function() { return categoryId }) |
415 | 217 | item.scopeStyle = scopeView.scopeStyle; | 208 | item.scopeStyle = scopeView.scopeStyle; |
416 | 218 | if (baseItem.expandable) { | 209 | if (baseItem.expandable) { |
417 | 219 | 210 | ||
418 | === modified file 'tests/autopilot/unity8/shell/emulators/dash.py' | |||
419 | --- tests/autopilot/unity8/shell/emulators/dash.py 2014-07-25 10:47:19 +0000 | |||
420 | +++ tests/autopilot/unity8/shell/emulators/dash.py 2014-07-28 17:07:15 +0000 | |||
421 | @@ -188,10 +188,6 @@ | |||
422 | 188 | raise emulators.UnityEmulatorException( | 188 | raise emulators.UnityEmulatorException( |
423 | 189 | 'No category found with name {}'.format(category)) | 189 | 'No category found with name {}'.format(category)) |
424 | 190 | 190 | ||
425 | 191 | |||
426 | 192 | class DashApps(GenericScopeView): | ||
427 | 193 | """Autopilot emulator for the applications scope.""" | ||
428 | 194 | |||
429 | 195 | def get_applications(self, category): | 191 | def get_applications(self, category): |
430 | 196 | """Return the list of applications on a category. | 192 | """Return the list of applications on a category. |
431 | 197 | 193 | ||
432 | 198 | 194 | ||
433 | === modified file 'tests/autopilot/unity8/shell/tests/test_emulators.py' | |||
434 | --- tests/autopilot/unity8/shell/tests/test_emulators.py 2014-07-24 14:45:36 +0000 | |||
435 | +++ tests/autopilot/unity8/shell/tests/test_emulators.py 2014-07-28 17:07:15 +0000 | |||
436 | @@ -142,7 +142,7 @@ | |||
437 | 142 | scope_id = 'clickscope' | 142 | scope_id = 'clickscope' |
438 | 143 | scope = self.dash.open_scope(scope_id) | 143 | scope = self.dash.open_scope(scope_id) |
439 | 144 | self._assert_scope_is_opened(scope, scope_id) | 144 | self._assert_scope_is_opened(scope, scope_id) |
441 | 145 | self.assertIsInstance(scope, dash_emulators.DashApps) | 145 | self.assertIsInstance(scope, dash_emulators.GenericScopeView) |
442 | 146 | 146 | ||
443 | 147 | 147 | ||
444 | 148 | class GenericScopeViewEmulatorTestCase(DashBaseTestCase): | 148 | class GenericScopeViewEmulatorTestCase(DashBaseTestCase): |
445 | 149 | 149 | ||
446 | === modified file 'tests/qmltests/CMakeLists.txt' | |||
447 | --- tests/qmltests/CMakeLists.txt 2014-07-21 23:38:11 +0000 | |||
448 | +++ tests/qmltests/CMakeLists.txt 2014-07-28 17:07:15 +0000 | |||
449 | @@ -40,7 +40,6 @@ | |||
450 | 40 | add_qml_benchmark(Dash CardBenchmark 1000) | 40 | add_qml_benchmark(Dash CardBenchmark 1000) |
451 | 41 | add_qml_test(Dash CardTool) | 41 | add_qml_test(Dash CardTool) |
452 | 42 | add_qml_test(Dash GenericScopeView) | 42 | add_qml_test(Dash GenericScopeView) |
453 | 43 | add_qml_test(Dash/Apps RunningApplicationsGrid) | ||
454 | 44 | add_qml_test(Dash/Previews Preview) | 43 | add_qml_test(Dash/Previews Preview) |
455 | 45 | add_qml_test(Dash/Previews PreviewActions) | 44 | add_qml_test(Dash/Previews PreviewActions) |
456 | 46 | add_qml_test(Dash/Previews PreviewAudioPlayback) | 45 | add_qml_test(Dash/Previews PreviewAudioPlayback) |
457 | 47 | 46 | ||
458 | === removed file 'tests/qmltests/Dash/Apps/tst_RunningApplicationsGrid.qml' | |||
459 | --- tests/qmltests/Dash/Apps/tst_RunningApplicationsGrid.qml 2014-07-28 17:07:14 +0000 | |||
460 | +++ tests/qmltests/Dash/Apps/tst_RunningApplicationsGrid.qml 1970-01-01 00:00:00 +0000 | |||
461 | @@ -1,217 +0,0 @@ | |||
462 | 1 | /* | ||
463 | 2 | * Copyright 2013 Canonical Ltd. | ||
464 | 3 | * | ||
465 | 4 | * This program is free software; you can redistribute it and/or modify | ||
466 | 5 | * it under the terms of the GNU General Public License as published by | ||
467 | 6 | * the Free Software Foundation; version 3. | ||
468 | 7 | * | ||
469 | 8 | * This program is distributed in the hope that it will be useful, | ||
470 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
471 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
472 | 11 | * GNU General Public License for more details. | ||
473 | 12 | * | ||
474 | 13 | * You should have received a copy of the GNU General Public License | ||
475 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
476 | 15 | */ | ||
477 | 16 | |||
478 | 17 | import QtQuick 2.0 | ||
479 | 18 | import QtTest 1.0 | ||
480 | 19 | import "../../../../qml/Dash/Apps" | ||
481 | 20 | import Unity.Test 0.1 as UT | ||
482 | 21 | import Unity.Application 0.1 | ||
483 | 22 | import Ubuntu.Components 1.1 | ||
484 | 23 | |||
485 | 24 | // Using Rectangle to have an opaque surface because AppManager paints app surfaces behind it. | ||
486 | 25 | Rectangle { | ||
487 | 26 | width: units.gu(70) | ||
488 | 27 | height: units.gu(40) | ||
489 | 28 | |||
490 | 29 | function resetRunningApplications() { | ||
491 | 30 | while (ApplicationManager.count > 0) { | ||
492 | 31 | ApplicationManager.stopApplication(ApplicationManager.get(0).appId) | ||
493 | 32 | } | ||
494 | 33 | |||
495 | 34 | ApplicationManager.startApplication("dialer-app"); | ||
496 | 35 | ApplicationManager.startApplication("webbrowser-app"); | ||
497 | 36 | } | ||
498 | 37 | |||
499 | 38 | Component.onCompleted: { | ||
500 | 39 | resetRunningApplications() | ||
501 | 40 | } | ||
502 | 41 | |||
503 | 42 | // The component under test | ||
504 | 43 | RunningApplicationsGrid { | ||
505 | 44 | id: runningApplicationsGrid | ||
506 | 45 | orientationAngle: orientationAngleSelector.selectedIndex * 90 | ||
507 | 46 | anchors.left: parent.left | ||
508 | 47 | anchors.right: controlPanel.left | ||
509 | 48 | anchors.top: parent.top | ||
510 | 49 | anchors.bottom: parent.bottom | ||
511 | 50 | model: ApplicationManager | ||
512 | 51 | } | ||
513 | 52 | |||
514 | 53 | Rectangle { | ||
515 | 54 | id: controlPanel | ||
516 | 55 | anchors.right: parent.right | ||
517 | 56 | anchors.top: parent.top | ||
518 | 57 | anchors.bottom: parent.bottom | ||
519 | 58 | width: units.gu(20) | ||
520 | 59 | color: "black" | ||
521 | 60 | |||
522 | 61 | OptionSelector { | ||
523 | 62 | id: orientationAngleSelector | ||
524 | 63 | model: ["0","90","180","270"] | ||
525 | 64 | text: "Orientation Angle" | ||
526 | 65 | width: parent.width | ||
527 | 66 | } | ||
528 | 67 | } | ||
529 | 68 | |||
530 | 69 | UT.UnityTestCase { | ||
531 | 70 | name: "RunningApplicationsGrid" | ||
532 | 71 | when: windowShown | ||
533 | 72 | |||
534 | 73 | function init() { | ||
535 | 74 | runningApplicationsGrid.terminationModeEnabled = false | ||
536 | 75 | resetRunningApplications() | ||
537 | 76 | } | ||
538 | 77 | |||
539 | 78 | property var browserTile | ||
540 | 79 | property var phoneTile | ||
541 | 80 | |||
542 | 81 | property var isBrowserLongPressed: false | ||
543 | 82 | function onBrowserLongPressed() {isBrowserLongPressed = true} | ||
544 | 83 | |||
545 | 84 | property var isPhoneLongPressed: false | ||
546 | 85 | function onPhoneLongPressed() {isPhoneLongPressed = true} | ||
547 | 86 | |||
548 | 87 | // Tiles should go to termination mode when any one of them is long-pressed. | ||
549 | 88 | // Long-pressing when they're in termination mode brings them back to activation mode | ||
550 | 89 | function test_enterTerminationMode() { | ||
551 | 90 | browserTile = findChild(runningApplicationsGrid, "runningAppTile Browser") | ||
552 | 91 | verify(browserTile != undefined) | ||
553 | 92 | browserTile.onPressAndHold.connect(onBrowserLongPressed) | ||
554 | 93 | |||
555 | 94 | phoneTile = findChild(runningApplicationsGrid, "runningAppTile Dialer") | ||
556 | 95 | verify(phoneTile != undefined) | ||
557 | 96 | phoneTile.onPressAndHold.connect(onPhoneLongPressed) | ||
558 | 97 | |||
559 | 98 | compare(browserTile.terminationModeEnabled, false) | ||
560 | 99 | compare(phoneTile.terminationModeEnabled, false) | ||
561 | 100 | compare(runningApplicationsGrid.terminationModeEnabled, false) | ||
562 | 101 | |||
563 | 102 | isBrowserLongPressed = false | ||
564 | 103 | mousePress(browserTile, browserTile.width/2, browserTile.height/2) | ||
565 | 104 | tryCompareFunction(checkSwitchToTerminationModeAfterLongPress, true) | ||
566 | 105 | |||
567 | 106 | mouseRelease(browserTile, browserTile.width/2, browserTile.height/2) | ||
568 | 107 | |||
569 | 108 | compare(browserTile.terminationModeEnabled, true) | ||
570 | 109 | compare(phoneTile.terminationModeEnabled, true) | ||
571 | 110 | compare(runningApplicationsGrid.terminationModeEnabled, true) | ||
572 | 111 | |||
573 | 112 | isPhoneLongPressed = false | ||
574 | 113 | mousePress(phoneTile, phoneTile.width/2, phoneTile.height/2) | ||
575 | 114 | tryCompareFunction(checkSwitchToActivationModeAfterLongPress, true) | ||
576 | 115 | |||
577 | 116 | mouseRelease(phoneTile, phoneTile.width/2, phoneTile.height/2) | ||
578 | 117 | |||
579 | 118 | compare(browserTile.terminationModeEnabled, false) | ||
580 | 119 | compare(phoneTile.terminationModeEnabled, false) | ||
581 | 120 | compare(runningApplicationsGrid.terminationModeEnabled, false) | ||
582 | 121 | |||
583 | 122 | browserTile.onPressAndHold.disconnect(onBrowserLongPressed) | ||
584 | 123 | phoneTile.onPressAndHold.disconnect(onPhoneLongPressed) | ||
585 | 124 | } | ||
586 | 125 | |||
587 | 126 | // Checks that components swicth to termination mode after (and only after) a long | ||
588 | 127 | // press happens on Browser tile. | ||
589 | 128 | function checkSwitchToTerminationModeAfterLongPress() { | ||
590 | 129 | compare(browserTile.terminationModeEnabled, isBrowserLongPressed) | ||
591 | 130 | compare(phoneTile.terminationModeEnabled, isBrowserLongPressed) | ||
592 | 131 | compare(runningApplicationsGrid.terminationModeEnabled, isBrowserLongPressed) | ||
593 | 132 | |||
594 | 133 | return isBrowserLongPressed && | ||
595 | 134 | browserTile.terminationModeEnabled && | ||
596 | 135 | phoneTile.terminationModeEnabled && | ||
597 | 136 | runningApplicationsGrid.terminationModeEnabled | ||
598 | 137 | } | ||
599 | 138 | |||
600 | 139 | // Checks that components swicth to activation mode after (and only after) a long | ||
601 | 140 | // press happens on Phone tile. | ||
602 | 141 | function checkSwitchToActivationModeAfterLongPress() { | ||
603 | 142 | compare(browserTile.terminationModeEnabled, !isPhoneLongPressed) | ||
604 | 143 | compare(phoneTile.terminationModeEnabled, !isPhoneLongPressed) | ||
605 | 144 | compare(runningApplicationsGrid.terminationModeEnabled, !isPhoneLongPressed) | ||
606 | 145 | |||
607 | 146 | return isPhoneLongPressed && | ||
608 | 147 | !browserTile.terminationModeEnabled && | ||
609 | 148 | !phoneTile.terminationModeEnabled && | ||
610 | 149 | !runningApplicationsGrid.terminationModeEnabled | ||
611 | 150 | } | ||
612 | 151 | |||
613 | 152 | // While on termination mode, clicking a running application tile, outside of | ||
614 | 153 | // the close icon should do nothing | ||
615 | 154 | function test_clickTileNotClose() { | ||
616 | 155 | runningApplicationsGrid.terminationModeEnabled = true | ||
617 | 156 | |||
618 | 157 | var browserTile = findChild(runningApplicationsGrid, "runningAppTile Browser") | ||
619 | 158 | verify(browserTile != undefined) | ||
620 | 159 | |||
621 | 160 | verify(ApplicationManager.findApplication("webbrowser-app") !== null) | ||
622 | 161 | |||
623 | 162 | mouseClick(browserTile, browserTile.width/2, browserTile.height/2) | ||
624 | 163 | |||
625 | 164 | verify(ApplicationManager.findApplication("webbrowser-app") !== null) | ||
626 | 165 | |||
627 | 166 | // The tile for the Browser app should stay there | ||
628 | 167 | tryCompareFunction(checkBrowserTileExists, true) | ||
629 | 168 | } | ||
630 | 169 | |||
631 | 170 | // While in termination mode, clicking on a running application tile's close icon | ||
632 | 171 | // causes the corresponding application to be terminated | ||
633 | 172 | function test_clickCloseIconToTerminateApp() { | ||
634 | 173 | runningApplicationsGrid.terminationModeEnabled = true | ||
635 | 174 | |||
636 | 175 | var browserTile = findChild(runningApplicationsGrid, "runningAppTile Browser") | ||
637 | 176 | var browserTileCloseButton = findChild(runningApplicationsGrid, "closeIcon Browser") | ||
638 | 177 | |||
639 | 178 | verify(browserTile != undefined) | ||
640 | 179 | verify(browserTileCloseButton != undefined) | ||
641 | 180 | verify(ApplicationManager.findApplication("webbrowser-app") !== 0) | ||
642 | 181 | |||
643 | 182 | mouseClick(browserTileCloseButton, browserTileCloseButton.width/2, browserTileCloseButton.height/2) | ||
644 | 183 | wait(0) // spin event loop to start any pending animation | ||
645 | 184 | |||
646 | 185 | verify(ApplicationManager.findApplication("webbrowser-app") === null) | ||
647 | 186 | |||
648 | 187 | // The tile for the Browser app should eventually vanish since the | ||
649 | 188 | // application has been terminated. | ||
650 | 189 | tryCompareFunction(checkBrowserTileExists, false) | ||
651 | 190 | } | ||
652 | 191 | |||
653 | 192 | function checkBrowserTileExists() { | ||
654 | 193 | return findChild(runningApplicationsGrid, "runningAppTile Browser") | ||
655 | 194 | != undefined | ||
656 | 195 | } | ||
657 | 196 | |||
658 | 197 | // While in termination mode, if you click outside any of the tiles, the | ||
659 | 198 | // termination mode is disabled (i.e. we switch back to activation mode). | ||
660 | 199 | function test_clickOutsideTilesDisablesTerminationMode() { | ||
661 | 200 | runningApplicationsGrid.terminationModeEnabled = true | ||
662 | 201 | |||
663 | 202 | var browserTile = findChild(runningApplicationsGrid, "runningAppTile Browser") | ||
664 | 203 | verify(browserTile != undefined) | ||
665 | 204 | |||
666 | 205 | verify(runningApplicationsGrid.terminationModeEnabled); | ||
667 | 206 | |||
668 | 207 | // Click on the bottom right corner of the grid, where there's no | ||
669 | 208 | // RunningApplicationTile lying around | ||
670 | 209 | mouseClick(runningApplicationsGrid, | ||
671 | 210 | runningApplicationsGrid.width - 1, runningApplicationsGrid.height - 1); | ||
672 | 211 | |||
673 | 212 | wait(0) // spin event loop to ensure that any pending signal emission went through | ||
674 | 213 | |||
675 | 214 | verify(!runningApplicationsGrid.terminationModeEnabled); | ||
676 | 215 | } | ||
677 | 216 | } | ||
678 | 217 | } | ||
679 | 218 | 0 | ||
680 | === modified file 'tests/qmltests/tst_Shell.qml' | |||
681 | --- tests/qmltests/tst_Shell.qml 2014-07-28 17:07:14 +0000 | |||
682 | +++ tests/qmltests/tst_Shell.qml 2014-07-28 17:07:15 +0000 | |||
683 | @@ -313,9 +313,9 @@ | |||
684 | 313 | - perform long left edge swipe to go minimize the app and go back to the dash. | 313 | - perform long left edge swipe to go minimize the app and go back to the dash. |
685 | 314 | 314 | ||
686 | 315 | Expected Results | 315 | Expected Results |
688 | 316 | - apps lens shown and Running Apps visible on screen | 316 | - apps lens shown |
689 | 317 | */ | 317 | */ |
691 | 318 | function test_minimizingAppTakesToRunningApps() { | 318 | function test_minimizingAppTakesToDashApps() { |
692 | 319 | var dashApps = findChild(shell, "clickscope"); | 319 | var dashApps = findChild(shell, "clickscope"); |
693 | 320 | swipeUntilScopeViewIsReached(dashApps); | 320 | swipeUntilScopeViewIsReached(dashApps); |
694 | 321 | 321 | ||
695 | @@ -353,10 +353,6 @@ | |||
696 | 353 | tryCompare(appsCategoryListView, "moving", false); | 353 | tryCompare(appsCategoryListView, "moving", false); |
697 | 354 | 354 | ||
698 | 355 | verify(itemIsOnScreen(dashApps)); | 355 | verify(itemIsOnScreen(dashApps)); |
699 | 356 | |||
700 | 357 | var runningApplicationsGrid = findChild(appsCategoryListView, "running.apps.category"); | ||
701 | 358 | verify(runningApplicationsGrid); | ||
702 | 359 | verify(itemIsOnScreen(runningApplicationsGrid)); | ||
703 | 360 | } | 356 | } |
704 | 361 | 357 | ||
705 | 362 | function test_showInputMethod() { | 358 | function test_showInputMethod() { |
FAILED: Continuous integration, rev:1079 jenkins. qa.ubuntu. com/job/ unity8- ci/3526/ jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- utopic- touch/2306/ console jenkins. qa.ubuntu. com/job/ unity-phablet- qmluitests- utopic/ 528/console jenkins. qa.ubuntu. com/job/ unity8- utopic- amd64-ci/ 620/console jenkins. qa.ubuntu. com/job/ unity8- utopic- armhf-ci/ 620/console jenkins. qa.ubuntu. com/job/ unity8- utopic- i386-ci/ 620/console jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- armhf/3513/ console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/unity8- ci/3526/ rebuild
http://