on xenial help sign in
Merge from wizard-import
commit25af38fe9d0c39b588ea29a07284159e4fde1daa authorMichael Terry <michael.terry@canonical.com> dateWed 19 Nov 2014, 12:54 (12 years ago) parentba4a9a0c07aa7e
23 files changed+267−394
CMakeLists.txt+1 debian/changelog+38 plugins/Utils/CMakeLists.txt+1−1 po/is.po+32−28 po/nb.po+24−24 po/ro.po+23−23 qml/Components/Lockscreen.qml+15 qml/Components/ResponsiveFlowView.qml−74 qml/Greeter/Greeter.qml+1−1 qml/Greeter/GreeterContent.qml+1−18 qml/Launcher/LauncherPanel.qml+6 qml/Notifications/NotificationMenuItemFactory.qml+6 qml/Notifications/ShapedIcon.qml+1−1 qml/Shell.qml+31−29 qml/Stages/PhoneStage.qml+1−1 qml/Stages/SessionContainer.qml+4 qml/Stages/TabletStage.qml+1−1 tests/mocks/Unity/Application/Session.h+1−1 tests/qmltests/CMakeLists.txt−1 tests/qmltests/Components/tst_ResponsiveFlowView.qml−191 tests/qmltests/Launcher/tst_Launcher.qml+18 tests/qmltests/Stages/tst_SessionContainer.qml+35 tests/qmltests/tst_ShellWithPin.qml+27
CMakeLists.txt+1
@@ -53,6 +53,7 @@ find_package(Qt5Qml 5.2 REQUIRED)
5353find_package(Qt5Quick 5.2 REQUIRED)
5454find_package(Qt5Gui 5.2 REQUIRED)
5555find_package(Qt5DBus 5.2 REQUIRED)
56+find_package(Qt5Concurrent 5.2 REQUIRED)
5657
5758# Standard install paths
5859include(GNUInstallDirs)
debian/changelog+38
@@ -1,3 +1,41 @@
1+unity8 (8.01+15.04.20141117-0ubuntu1) vivid; urgency=low
2+
3+ [ josharenson ]
4+ * Return focus to the application after a tusted session overlay is
5+ closing. (LP: #1381292)
6+
7+ [ Josh Arenson ]
8+ * Return focus to the application after a tusted session overlay is
9+ closing. (LP: #1381292)
10+
11+ [ Albert Astals ]
12+ * Remove unused ResponsiveFlowView
13+ * Fix a few cmake warnings when running ./build.sh in a clean checkout
14+
15+ [ Mirco Müller ]
16+ * Make sure non-square icons are not cropped. (LP: #1378417)
17+
18+ [ Michael Terry ]
19+ * Drop the "EARLY ALPHA" scare label when running in testing mode.
20+
21+ [ Michael Zanetti ]
22+ * unify Greeter and Lockscreen wallpaper again
23+ * hide quicklist when launcher hides (LP: #1387088)
24+ * Keep applications suspended while lockscreen is shown (LP: #1378126)
25+ * change spread background color to 111111
26+
27+ [ Omer Akram ]
28+ * show password when tapped on the 'Show password' label, not just the
29+ checkbox. (LP: #1389832)
30+
31+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 17 Nov 2014 13:48:33 +0000
32+
33+unity8 (8.01+15.04.20141107.2-0ubuntu2) vivid; urgency=medium
34+
35+ * No-change rebuild against Qt 5.3.2.
36+
37+ -- Timo Jyrinki <timo-jyrinki@ubuntu.com> Sat, 08 Nov 2014 13:50:11 +0200
38+
139unity8 (8.01+15.04.20141107.2-0ubuntu1) vivid; urgency=low
240
341 [ Michael Terry ]
plugins/Utils/CMakeLists.txt+1−1
@@ -33,6 +33,6 @@ target_link_libraries(Utils-qml ${GIO_LDFLAGS})
3333# files directly in targets.
3434set_target_properties(Utils-qml PROPERTIES COMPILE_FLAGS -fvisibility=default)
3535
36−qt5_use_modules(Utils-qml Qml Quick DBus Network XmlPatterns Gui Concurrent)
36+qt5_use_modules(Utils-qml Qml Quick DBus Network Gui)
3737
3838add_unity8_plugin(Utils 0.1 Utils TARGETS Utils-qml)
po/is.po+32−28
@@ -10,15 +10,15 @@ msgstr ""
1010"Project-Id-Version: po_unity8-is\n"
1111"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1212"POT-Creation-Date: 2014-11-07 10:59+0100\n"
13−"PO-Revision-Date: 2014-10-09 10:49+0000\n"
13+"PO-Revision-Date: 2014-11-13 09:32+0000\n"
1414"Last-Translator: Sveinn í Felli <sv1@fellsnet.is>\n"
1515"Language-Team: Icelandic <translation-team-is@lists.sourceforge.net>\n"
1616"MIME-Version: 1.0\n"
1717"Content-Type: text/plain; charset=UTF-8\n"
1818"Content-Transfer-Encoding: 8bit\n"
1919"Plural-Forms: nplurals=2; plural=n != 1;\n"
20−"X-Launchpad-Export-Date: 2014-11-09 06:54+0000\n"
21−"X-Generator: Launchpad (build 17231)\n"
20+"X-Launchpad-Export-Date: 2014-11-14 06:34+0000\n"
21+"X-Generator: Launchpad (build 17241)\n"
2222"Language: is\n"
2323
2424#: plugins/LightDM/Greeter.cpp:130
@@ -41,10 +41,14 @@ msgstr "Tæki læst"
4141#: qml/Components/DelayedLockscreen.qml:62
4242msgid "You have been locked out due to too many failed passphrase attempts."
4343msgstr ""
44+"Það er búið að loka á þig vegna of margra tilrauna við innsetningu "
45+"lykilfrasa."
4446
4547#: qml/Components/DelayedLockscreen.qml:63
4648msgid "You have been locked out due to too many failed passcode attempts."
4749msgstr ""
50+"Það er búið að loka á þig vegna of margra tilrauna við innsetningu "
51+"aðgangskóða."
4852
4953#: qml/Components/DelayedLockscreen.qml:72
5054#, qt-format
@@ -162,7 +166,7 @@ msgstr ""
162166
163167#: qml/Components/Lockscreen.qml:223
164168msgid "Return to Call"
165−msgstr ""
169+msgstr "Snúa aftur í símtal"
166170
167171#: qml/Components/Lockscreen.qml:223
168172msgid "Emergency Call"
@@ -219,7 +223,7 @@ msgstr "Senda"
219223
220224#: qml/Dash/PullToRefreshScopeStyle.qml:55
221225msgid "Pull to refresh…"
222−msgstr ""
226+msgstr "Toga til að endurlesa..."
223227
224228#: qml/Dash/PullToRefreshScopeStyle.qml:60
225229msgid "Release to refresh…"
@@ -227,7 +231,7 @@ msgstr "Slepptu til að endurlesa..."
227231
228232#: qml/Dash/ScopesOverview.qml:215
229233msgid "Manage Scopes"
230−msgstr ""
234+msgstr "Sýsla með leitarsvið"
231235
232236#: qml/Dash/ScopesOverview.qml:437
233237msgid "Done"
@@ -261,31 +265,31 @@ msgstr "Slá til að svara símtali..."
261265msgid "Conference"
262266msgstr "Ráðstefna"
263267
264−#: qml/Panel/Indicators/MenuItemFactory.qml:643
268+#: qml/Panel/Indicators/MenuItemFactory.qml:615
265269msgid "Nothing is playing"
266−msgstr ""
270+msgstr "Ekkert er í afspilun"
267271
268−#: qml/Panel/Indicators/MenuItemFactory.qml:791
272+#: qml/Panel/Indicators/MenuItemFactory.qml:763
269273msgid "In queue…"
270274msgstr "Í biðröð..."
271275
272−#: qml/Panel/Indicators/MenuItemFactory.qml:795
276+#: qml/Panel/Indicators/MenuItemFactory.qml:767
273277msgid "Downloading"
274278msgstr "Sæki"
275279
276−#: qml/Panel/Indicators/MenuItemFactory.qml:797
280+#: qml/Panel/Indicators/MenuItemFactory.qml:769
277281msgid "Paused, tap to resume"
278282msgstr "Í bið, sláðu létt til að halda áfram"
279283
280−#: qml/Panel/Indicators/MenuItemFactory.qml:799
284+#: qml/Panel/Indicators/MenuItemFactory.qml:771
281285msgid "Canceled"
282286msgstr "Hætt við"
283287
284−#: qml/Panel/Indicators/MenuItemFactory.qml:801
288+#: qml/Panel/Indicators/MenuItemFactory.qml:773
285289msgid "Finished"
286290msgstr "Lokið"
287291
288−#: qml/Panel/Indicators/MenuItemFactory.qml:803
292+#: qml/Panel/Indicators/MenuItemFactory.qml:775
289293msgid "Failed, tap to retry"
290294msgstr "Mistókst, sláðu létt til að reyna aftur"
291295
@@ -297,49 +301,49 @@ msgstr "Aflæsa SIM-korti"
297301msgid "Roaming"
298302msgstr "Ráphamur"
299303
300−#: qml/Shell.qml:391
304+#: qml/Shell.qml:381
301305msgid "Enter passphrase"
302−msgstr ""
306+msgstr "Settu inn lykilfrasa"
303307
304−#: qml/Shell.qml:392
308+#: qml/Shell.qml:382
305309msgid "Sorry, incorrect passphrase"
306310msgstr "Því miður, rangt lykilorð"
307311
308−#: qml/Shell.qml:393
312+#: qml/Shell.qml:383
309313msgid "Please re-enter"
310314msgstr "Settu aftur inn"
311315
312−#: qml/Shell.qml:395
316+#: qml/Shell.qml:385
313317msgid "Enter passcode"
314−msgstr ""
318+msgstr "Settu inn aðgangskóða"
315319
316−#: qml/Shell.qml:396
320+#: qml/Shell.qml:386
317321msgid "Sorry, incorrect passcode"
318322msgstr "Því miður, rangur aðgangskóði"
319323
320−#: qml/Shell.qml:399
324+#: qml/Shell.qml:389
321325#, qt-format
322326msgid "Enter %1"
323327msgstr "Settu inn %1"
324328
325−#: qml/Shell.qml:400
329+#: qml/Shell.qml:390
326330#, qt-format
327331msgid "Sorry, incorrect %1"
328332msgstr "Því miður, rangt %1"
329333
330−#: qml/Shell.qml:441
334+#: qml/Shell.qml:431
331335msgid "Sorry, incorrect passphrase."
332336msgstr "Því miður, rangt lykilorð."
333337
334−#: qml/Shell.qml:442
338+#: qml/Shell.qml:432
335339msgid "Sorry, incorrect passcode."
336340msgstr "Því miður, rangur aðgangskóði."
337341
338−#: qml/Shell.qml:443
342+#: qml/Shell.qml:433
339343msgid "This will be your last attempt."
340344msgstr "Þetta mun verða síðasta tilraunin þín."
341345
342−#: qml/Shell.qml:445
346+#: qml/Shell.qml:435
343347msgid ""
344348"If passphrase is entered incorrectly, your phone will conduct a factory "
345349"reset and all personal data will be deleted."
@@ -347,7 +351,7 @@ msgstr ""
347351"Ef lykilorð er rangt, mun síminn frumstilla allt á verksmiðjustillingar og "
348352"öllum einkagögnum verður eytt."
349353
350−#: qml/Shell.qml:446
354+#: qml/Shell.qml:436
351355msgid ""
352356"If passcode is entered incorrectly, your phone will conduct a factory reset "
353357"and all personal data will be deleted."
po/nb.po+24−24
@@ -8,15 +8,15 @@ msgstr ""
88"Project-Id-Version: unity\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2014-11-07 10:59+0100\n"
11−"PO-Revision-Date: 2014-10-07 10:32+0000\n"
12−"Last-Translator: Åka Sikrom <Unknown>\n"
11+"PO-Revision-Date: 2014-11-12 19:57+0000\n"
12+"Last-Translator: Ari Börde Kröyer <Unknown>\n"
1313"Language-Team: Norwegian Bokmal <nb@li.org>\n"
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
1717"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-11-09 06:54+0000\n"
19−"X-Generator: Launchpad (build 17231)\n"
18+"X-Launchpad-Export-Date: 2014-11-13 06:37+0000\n"
19+"X-Generator: Launchpad (build 17241)\n"
2020
2121#: plugins/LightDM/Greeter.cpp:130
2222msgid "Password: "
@@ -160,7 +160,7 @@ msgstr ""
160160
161161#: qml/Components/Lockscreen.qml:223
162162msgid "Return to Call"
163−msgstr ""
163+msgstr "Tilbake til samtale"
164164
165165#: qml/Components/Lockscreen.qml:223
166166msgid "Emergency Call"
@@ -259,31 +259,31 @@ msgstr "Trykk for å gå tilbake til anrop …"
259259msgid "Conference"
260260msgstr "Konferanse"
261261
262−#: qml/Panel/Indicators/MenuItemFactory.qml:643
262+#: qml/Panel/Indicators/MenuItemFactory.qml:615
263263msgid "Nothing is playing"
264264msgstr "Ingenting spilles nå"
265265
266−#: qml/Panel/Indicators/MenuItemFactory.qml:791
266+#: qml/Panel/Indicators/MenuItemFactory.qml:763
267267msgid "In queue…"
268268msgstr "I kø …"
269269
270−#: qml/Panel/Indicators/MenuItemFactory.qml:795
270+#: qml/Panel/Indicators/MenuItemFactory.qml:767
271271msgid "Downloading"
272272msgstr "Laster ned"
273273
274−#: qml/Panel/Indicators/MenuItemFactory.qml:797
274+#: qml/Panel/Indicators/MenuItemFactory.qml:769
275275msgid "Paused, tap to resume"
276276msgstr "Satt på pause (trykk for å fortsette)"
277277
278−#: qml/Panel/Indicators/MenuItemFactory.qml:799
278+#: qml/Panel/Indicators/MenuItemFactory.qml:771
279279msgid "Canceled"
280280msgstr "Avbrutt"
281281
282−#: qml/Panel/Indicators/MenuItemFactory.qml:801
282+#: qml/Panel/Indicators/MenuItemFactory.qml:773
283283msgid "Finished"
284284msgstr "Ferdig"
285285
286−#: qml/Panel/Indicators/MenuItemFactory.qml:803
286+#: qml/Panel/Indicators/MenuItemFactory.qml:775
287287msgid "Failed, tap to retry"
288288msgstr "Feilet. Trykk for å prøve på nytt"
289289
@@ -295,49 +295,49 @@ msgstr "Lås opp SIM"
295295msgid "Roaming"
296296msgstr "Fremmednett"
297297
298−#: qml/Shell.qml:391
298+#: qml/Shell.qml:381
299299msgid "Enter passphrase"
300300msgstr "Skriv inn passordfrase"
301301
302−#: qml/Shell.qml:392
302+#: qml/Shell.qml:382
303303msgid "Sorry, incorrect passphrase"
304304msgstr "Feil passordfrase"
305305
306−#: qml/Shell.qml:393
306+#: qml/Shell.qml:383
307307msgid "Please re-enter"
308308msgstr "Skriv inn på nytt"
309309
310−#: qml/Shell.qml:395
310+#: qml/Shell.qml:385
311311msgid "Enter passcode"
312312msgstr "Tast kode"
313313
314−#: qml/Shell.qml:396
314+#: qml/Shell.qml:386
315315msgid "Sorry, incorrect passcode"
316316msgstr "Feil kode"
317317
318−#: qml/Shell.qml:399
318+#: qml/Shell.qml:389
319319#, qt-format
320320msgid "Enter %1"
321321msgstr "Skriv inn %1"
322322
323−#: qml/Shell.qml:400
323+#: qml/Shell.qml:390
324324#, qt-format
325325msgid "Sorry, incorrect %1"
326326msgstr "Feil %1"
327327
328−#: qml/Shell.qml:441
328+#: qml/Shell.qml:431
329329msgid "Sorry, incorrect passphrase."
330330msgstr "Feil passordfrase."
331331
332−#: qml/Shell.qml:442
332+#: qml/Shell.qml:432
333333msgid "Sorry, incorrect passcode."
334334msgstr "Feil kode."
335335
336−#: qml/Shell.qml:443
336+#: qml/Shell.qml:433
337337msgid "This will be your last attempt."
338338msgstr "Dette er ditt siste forsøk."
339339
340−#: qml/Shell.qml:445
340+#: qml/Shell.qml:435
341341msgid ""
342342"If passphrase is entered incorrectly, your phone will conduct a factory "
343343"reset and all personal data will be deleted."
@@ -345,7 +345,7 @@ msgstr ""
345345"Hvis du skriver feil passordfrase en gang til, tilbakestilles telefonen til "
346346"fabrikkinnstillinger, og alle personlige data slettes."
347347
348−#: qml/Shell.qml:446
348+#: qml/Shell.qml:436
349349msgid ""
350350"If passcode is entered incorrectly, your phone will conduct a factory reset "
351351"and all personal data will be deleted."
po/ro.po+23−23
@@ -8,7 +8,7 @@ msgstr ""
88"Project-Id-Version: unity\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2014-11-07 10:59+0100\n"
11−"PO-Revision-Date: 2014-10-07 15:54+0000\n"
11+"PO-Revision-Date: 2014-11-18 12:09+0000\n"
1212"Last-Translator: Marian Vasile <marianvasile1972@gmail.com>\n"
1313"Language-Team: Romanian <ro@li.org>\n"
1414"MIME-Version: 1.0\n"
@@ -16,8 +16,8 @@ msgstr ""
1616"Content-Transfer-Encoding: 8bit\n"
1717"Plural-Forms: nplurals=3; plural=(n == 1 ? 0: (((n % 100 > 19) || ((n % 100 "
1818"== 0) && (n != 0))) ? 2: 1));\n"
19−"X-Launchpad-Export-Date: 2014-11-09 06:54+0000\n"
20−"X-Generator: Launchpad (build 17231)\n"
19+"X-Launchpad-Export-Date: 2014-11-19 06:24+0000\n"
20+"X-Generator: Launchpad (build 17252)\n"
2121
2222#: plugins/LightDM/Greeter.cpp:130
2323msgid "Password: "
@@ -166,7 +166,7 @@ msgstr ""
166166
167167#: qml/Components/Lockscreen.qml:223
168168msgid "Return to Call"
169−msgstr ""
169+msgstr "Reveniți la funcția de apelare"
170170
171171#: qml/Components/Lockscreen.qml:223
172172msgid "Emergency Call"
@@ -265,31 +265,31 @@ msgstr "Atingeți pentru a vă întoarce la convorbire..."
265265msgid "Conference"
266266msgstr "Conferință"
267267
268−#: qml/Panel/Indicators/MenuItemFactory.qml:643
268+#: qml/Panel/Indicators/MenuItemFactory.qml:615
269269msgid "Nothing is playing"
270270msgstr "Nu se redă nimic"
271271
272−#: qml/Panel/Indicators/MenuItemFactory.qml:791
272+#: qml/Panel/Indicators/MenuItemFactory.qml:763
273273msgid "In queue…"
274274msgstr "În așteptare..."
275275
276−#: qml/Panel/Indicators/MenuItemFactory.qml:795
276+#: qml/Panel/Indicators/MenuItemFactory.qml:767
277277msgid "Downloading"
278278msgstr "Se descarcă"
279279
280−#: qml/Panel/Indicators/MenuItemFactory.qml:797
280+#: qml/Panel/Indicators/MenuItemFactory.qml:769
281281msgid "Paused, tap to resume"
282282msgstr "În pauză, atingeți pentru a relua"
283283
284−#: qml/Panel/Indicators/MenuItemFactory.qml:799
284+#: qml/Panel/Indicators/MenuItemFactory.qml:771
285285msgid "Canceled"
286286msgstr "Anulată"
287287
288−#: qml/Panel/Indicators/MenuItemFactory.qml:801
288+#: qml/Panel/Indicators/MenuItemFactory.qml:773
289289msgid "Finished"
290290msgstr "Finalizată"
291291
292−#: qml/Panel/Indicators/MenuItemFactory.qml:803
292+#: qml/Panel/Indicators/MenuItemFactory.qml:775
293293msgid "Failed, tap to retry"
294294msgstr "Eșec, atingeți pentru a încerca din nou"
295295
@@ -301,49 +301,49 @@ msgstr "Deblocare SIM"
301301msgid "Roaming"
302302msgstr "Roaming"
303303
304−#: qml/Shell.qml:391
304+#: qml/Shell.qml:381
305305msgid "Enter passphrase"
306306msgstr "Introduceți fraza parolă"
307307
308−#: qml/Shell.qml:392
308+#: qml/Shell.qml:382
309309msgid "Sorry, incorrect passphrase"
310310msgstr "Frază secretă incorectă"
311311
312−#: qml/Shell.qml:393
312+#: qml/Shell.qml:383
313313msgid "Please re-enter"
314314msgstr "Introduceți din nou"
315315
316−#: qml/Shell.qml:395
316+#: qml/Shell.qml:385
317317msgid "Enter passcode"
318318msgstr "Introduceți parola"
319319
320−#: qml/Shell.qml:396
320+#: qml/Shell.qml:386
321321msgid "Sorry, incorrect passcode"
322322msgstr "Parolă incorectă"
323323
324−#: qml/Shell.qml:399
324+#: qml/Shell.qml:389
325325#, qt-format
326326msgid "Enter %1"
327327msgstr "Introducere %1"
328328
329−#: qml/Shell.qml:400
329+#: qml/Shell.qml:390
330330#, qt-format
331331msgid "Sorry, incorrect %1"
332332msgstr "%1 incorectă"
333333
334−#: qml/Shell.qml:441
334+#: qml/Shell.qml:431
335335msgid "Sorry, incorrect passphrase."
336336msgstr "Frază parolă greșită"
337337
338−#: qml/Shell.qml:442
338+#: qml/Shell.qml:432
339339msgid "Sorry, incorrect passcode."
340340msgstr "Parolă greșită"
341341
342−#: qml/Shell.qml:443
342+#: qml/Shell.qml:433
343343msgid "This will be your last attempt."
344344msgstr "Aceasta va fi ultima încercare"
345345
346−#: qml/Shell.qml:445
346+#: qml/Shell.qml:435
347347msgid ""
348348"If passphrase is entered incorrectly, your phone will conduct a factory "
349349"reset and all personal data will be deleted."
@@ -352,7 +352,7 @@ msgstr ""
352352"configurările inițiale, ale fabricantului, iar toate datele personale vor fi "
353353"șterse."
354354
355−#: qml/Shell.qml:446
355+#: qml/Shell.qml:436
356356msgid ""
357357"If passcode is entered incorrectly, your phone will conduct a factory reset "
358358"and all personal data will be deleted."
qml/Components/Lockscreen.qml+15
@@ -56,6 +56,9 @@ Showable {
5656 property int maxPinLength: -1
5757
5858 property url background: ""
59+ // Use this to put a black overlay above the background
60+ // 0: normal background, 1: black background
61+ property real darkenBackground: 0
5962
6063 readonly property string passphrase: (pinPadLoader.item && pinPadLoader.item.passphrase) ? pinPadLoader.item.passphrase : ""
6164
@@ -100,10 +103,22 @@ Showable {
100103 anchors {
101104 fill: parent
102105 }
106+ // Limit how much memory we'll reserve for this image
107+ sourceSize.height: height
108+ sourceSize.width: width
103109 source: root.required ? root.background : ""
104110 fillMode: Image.PreserveAspectCrop
105111 }
106112
113+ // This is to
114+ // a) align it with the greeter and
115+ // b) keep the white fonts readable on bright backgrounds
116+ Rectangle {
117+ anchors.fill: parent
118+ color: "black"
119+ opacity: root.darkenBackground
120+ }
121+
107122 MouseArea {
108123 anchors.fill: root
109124 onClicked: {
qml/Components/ResponsiveFlowView.qmldeleted−74
@@ -1,74 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
20−Item {
21− id: root
22−
23− property int minimumHorizontalSpacing: units.gu(0.5)
24− // property int minimumNumberOfColumns: 2 // FIXME: not implemented
25− property int maximumNumberOfColumns: 6
26− readonly property int columns: flow.columns
27− property alias verticalSpacing: flow.verticalSpacing
28− property alias horizontalSpacing: flow.horizontalSpacing
29− property int referenceDelegateWidth
30− property alias model: repeater.model
31− property alias delegate: repeater.delegate
32− readonly property int cellWidth: referenceDelegateWidth + horizontalSpacing
33− readonly property int cellHeight: referenceDelegateWidth + verticalSpacing
34− property alias move: flow.move
35−
36− height: flow.height + flow.anchors.topMargin
37−
38− Flow {
39− id: flow
40− anchors {
41− left: parent.left
42− right: parent.right
43− top: parent.top
44− leftMargin: margin/2
45− rightMargin: margin/2
46− topMargin: verticalSpacing
47− }
48−
49− function pixelToGU(value) {
50− return Math.floor(value / units.gu(1));
51− }
52−
53− function spacingForColumns(columns) {
54− // spacing between columns as an integer number of GU, the remainder goes in the margins
55− var spacingGU = pixelToGU(allocatableVerticalSpace / columns);
56− return units.gu(spacingGU);
57− }
58−
59− function columnsForSpacing(space) {
60− // minimum margin is half of the spacing
61− return Math.floor((parent.width - space/2) / (referenceDelegateWidth + space));
62− }
63−
64− property real allocatableVerticalSpace: parent.width - columns * referenceDelegateWidth
65− property int columns: Math.min(columnsForSpacing(minimumHorizontalSpacing), maximumNumberOfColumns)
66− property real horizontalSpacing: spacingForColumns(columns)
67− property real verticalSpacing: horizontalSpacing
68− property int margin: allocatableVerticalSpace - columns * horizontalSpacing
69−
70− Repeater {
71− id: repeater
72− }
73− }
74−}
qml/Greeter/Greeter.qml+1−1
@@ -25,7 +25,7 @@ Showable {
2525 enabled: shown
2626 created: greeterContentLoader.status == Loader.Ready && greeterContentLoader.item.ready
2727
28− property url defaultBackground
28+ property url background
2929 property bool loadContent: required
3030
3131 // 1 when fully shown and 0 when fully hidden
qml/Greeter/GreeterContent.qml+1−18
@@ -48,9 +48,6 @@ Item {
4848 color: "black"
4949 }
5050
51− property url backgroundValue: AccountsService.backgroundFile != undefined && AccountsService.backgroundFile.length > 0 ? AccountsService.backgroundFile : greeter.defaultBackground
52− onBackgroundValueChanged: background.source = backgroundValue
53−
5451 CrossFadeImage {
5552 id: background
5653 objectName: "greeterBackground"
@@ -62,21 +59,7 @@ Item {
6259 // Limit how much memory we'll reserve for this image
6360 sourceSize.height: height
6461 sourceSize.width: width
65− }
66−
67− // See Shell.qml's backgroundSettings treatment for why we need a separate
68− // Image, but it boils down to avoiding binding loop detection.
69− Image {
70− source: background.source
71− height: 0
72− width: 0
73− sourceSize.height: 0
74− sourceSize.width: 0
75− onStatusChanged: {
76− if (status == Image.Error && source != greeter.defaultBackground) {
77− background.source = greeter.defaultBackground
78− }
79− }
62+ source: greeter.background
8063 }
8164
8265 Rectangle {
qml/Launcher/LauncherPanel.qml+6
@@ -38,6 +38,12 @@ Rectangle {
3838 signal applicationSelected(string appId)
3939 signal showDashHome()
4040
41+ onXChanged: {
42+ if (quickList.state == "open") {
43+ quickList.state = ""
44+ }
45+ }
46+
4147 Column {
4248 id: mainColumn
4349 anchors {
qml/Notifications/NotificationMenuItemFactory.qml+6
@@ -127,6 +127,11 @@ Loader {
127127 anchors.verticalCenter: checkBox.verticalCenter
128128 text: i18n.tr("Show password")
129129 color: notification.sdFontColor
130+
131+ MouseArea {
132+ anchors.fill: parent
133+ onClicked: { checkBox.checked = !checkBox.checked }
134+ }
130135 }
131136 }
132137 }
@@ -145,6 +150,7 @@ Loader {
145150 errorText: errorAction.valid ? errorAction.state : ""
146151 retryText: notification.body
147152 background: shell.background
153+ darkenBackground: 0.4
148154
149155 onEntered: {
150156 menuModel.changeState(menuIndex, passphrase);
qml/Notifications/ShapedIcon.qml+1−1
@@ -35,6 +35,6 @@ Item {
3535 anchors.fill: parent
3636 visible: !shaped
3737 source: fileSource
38− fillMode: Image.PreserveAspectCrop
38+ fillMode: Image.PreserveAspectFit
3939 }
4040}
qml/Shell.qml+31−29
@@ -52,7 +52,8 @@ Item {
5252
5353 property real edgeSize: units.gu(2)
5454 property url defaultBackground: Qt.resolvedUrl(shell.width >= units.gu(60) ? "graphics/tablet_background.jpg" : "graphics/phone_background.jpg")
55− property url background
55+ property url background: asImageTester.status == Image.Ready ? asImageTester.source
56+ : gsImageTester.status == Image.Ready ? gsImageTester.source : defaultBackground
5657 readonly property real panelHeight: panel.panelHeight
5758
5859 readonly property bool locked: LightDM.Greeter.active && !LightDM.Greeter.authenticated && !forcedUnlock
@@ -99,6 +100,31 @@ Item {
99100 shell.activateApplication(app);
100101 }
101102
103+ // This is a dummy image to detect if the custom AS set wallpaper loads successfully.
104+ Image {
105+ id: asImageTester
106+ source: AccountsService.backgroundFile != undefined && AccountsService.backgroundFile.length > 0 ? AccountsService.backgroundFile : ""
107+ height: 0
108+ width: 0
109+ sourceSize.height: 0
110+ sourceSize.width: 0
111+ }
112+
113+ GSettings {
114+ id: backgroundSettings
115+ schema.id: "org.gnome.desktop.background"
116+ }
117+
118+ // This is a dummy image to detect if the custom GSettings set wallpaper loads successfully.
119+ Image {
120+ id: gsImageTester
121+ source: backgroundSettings.pictureUri != undefined && backgroundSettings.pictureUri.length > 0 ? backgroundSettings.pictureUri : ""
122+ height: 0
123+ width: 0
124+ sourceSize.height: 0
125+ sourceSize.width: 0
126+ }
127+
102128 Binding {
103129 target: LauncherModel
104130 property: "applicationManager"
@@ -115,15 +141,6 @@ Item {
115141 }
116142 }
117143
118− GSettings {
119− id: backgroundSettings
120− schema.id: "org.gnome.desktop.background"
121− }
122− property url gSettingsPicture: backgroundSettings.pictureUri != undefined && backgroundSettings.pictureUri.length > 0 ? backgroundSettings.pictureUri : shell.defaultBackground
123− onGSettingsPictureChanged: {
124− shell.background = gSettingsPicture
125− }
126−
127144 VolumeControl {
128145 id: volumeControl
129146 }
@@ -329,6 +346,7 @@ Item {
329346 width: parent.width
330347 height: parent.height - panel.panelHeight
331348 background: shell.background
349+ darkenBackground: 0.4
332350 alphaNumeric: AccountsService.passwordDisplayHint === AccountsService.Keyboard
333351 minPinLength: 4
334352 maxPinLength: 4
@@ -520,7 +538,7 @@ Item {
520538
521539 locked: shell.locked
522540
523− defaultBackground: shell.background
541+ background: shell.background
524542
525543 width: parent.width
526544 height: parent.height
@@ -584,7 +602,7 @@ Item {
584602 Binding {
585603 target: ApplicationManager
586604 property: "suspended"
587− value: greeter.shown && greeterWrapper.showProgress == 1
605+ value: (greeter.shown && greeterWrapper.showProgress == 1) || lockscreen.shown
588606 }
589607 }
590608 }
@@ -779,26 +797,10 @@ Item {
779797 }
780798 }
781799
782− Label {
783− id: alphaDisclaimerLabel
784− anchors.centerIn: parent
785− visible: ApplicationManager.fake ? ApplicationManager.fake : false
786− z: dialogs.z + 10
787− text: "EARLY ALPHA\nNOT READY FOR USE"
788− color: "lightgrey"
789− opacity: 0.2
790− font.weight: Font.Black
791− horizontalAlignment: Text.AlignHCenter
792− verticalAlignment: Text.AlignVCenter
793− fontSizeMode: Text.Fit
794− rotation: -45
795− scale: Math.min(parent.width, parent.height) / width
796− }
797−
798800 EdgeDemo {
799801 id: edgeDemo
800802 objectName: "edgeDemo"
801− z: alphaDisclaimerLabel.z + 10
803+ z: dialogs.z + 10
802804 paused: Powerd.status === Powerd.Off || wizard.active // Saves power
803805 greeter: greeter
804806 launcher: launcher
qml/Stages/PhoneStage.qml+1−1
@@ -33,7 +33,7 @@ Rectangle {
3333 property real inverseProgress: 0 // This is the progress for left edge drags, in pixels.
3434 property int orientation: Qt.PortraitOrientation
3535
36− color: "black"
36+ color: "#111111"
3737
3838 function select(appId) {
3939 spreadView.snapTo(priv.indexOf(appId));
qml/Stages/SessionContainer.qml+4
@@ -69,6 +69,10 @@ Item {
6969 target: item; when: item
7070 property: "orientation"; value: root.orientation
7171 }
72+
73+ Component.onDestruction: {
74+ root.session.surface.forceActiveFocus();
75+ }
7276 }
7377 }
7478
qml/Stages/TabletStage.qml+1−1
@@ -25,7 +25,7 @@ Rectangle {
2525 id: root
2626 objectName: "stages"
2727 anchors.fill: parent
28− color: "black"
28+ color: "#111111"
2929
3030 // Controls to be set from outside
3131 property bool shown: false
tests/mocks/Unity/Application/Session.h+1−1
@@ -56,7 +56,7 @@ public:
5656
5757 Q_INVOKABLE void addChildSession(Session* session);
5858 void insertChildSession(uint index, Session* session);
59− void removeChildSession(Session* session);
59+ Q_INVOKABLE void removeChildSession(Session* session);
6060
6161Q_SIGNALS:
6262 void applicationChanged(ApplicationInfo*);
tests/qmltests/CMakeLists.txt−1
@@ -28,7 +28,6 @@ add_qml_test(Components EdgeDemoOverlay)
2828add_qml_test(Components LazyImage)
2929add_qml_test(Components Lockscreen)
3030add_qml_test(Components Rating)
31−add_qml_test(Components ResponsiveFlowView)
3231add_qml_test(Components ResponsiveGridView)
3332add_qml_test(Components ResponsiveVerticalJournal IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/plugins)
3433add_qml_test(Components Showable)
tests/qmltests/Components/tst_ResponsiveFlowView.qmldeleted−191
@@ -1,191 +0,0 @@
1−/*
2− * Copyright 2013 Canonical Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import QtTest 1.0
19−import ".."
20−import "../../../qml/Components"
21−import Ubuntu.Components.ListItems 0.1 as ListItem
22−import Ubuntu.Components 0.1
23−import Unity.Test 0.1 as UT
24−
25−Item {
26− width: flowRect.width + controls.width
27− height: units.gu(80)
28−
29− Column {
30− id: controls
31− width: units.gu(40)
32− height: parent.height
33− anchors.top: parent.top
34− anchors.right: parent.right
35− ListItem.ValueSelector {
36− id: maxColumnsSelector
37− text: "maximumNumberOfColumns"
38− values: [2,4,8,13,1000]
39− selectedIndex: 1
40− }
41− ListItem.ValueSelector {
42− id: minHSpacingSelector
43− text: "minHorizontalSpacing"
44− values: [0,units.gu(2),units.gu(8),units.gu(25)]
45− selectedIndex: 0
46− }
47− }
48−
49− ListModel {
50− id: fakeModel
51− ListElement { name: "A" }
52− ListElement { name: "B" }
53− ListElement { name: "C" }
54− ListElement { name: "D" }
55− ListElement { name: "E" }
56− ListElement { name: "F" }
57− ListElement { name: "G" }
58− ListElement { name: "H" }
59− ListElement { name: "I" }
60− ListElement { name: "J" }
61− ListElement { name: "K" }
62− ListElement { name: "L" }
63− ListElement { name: "M" }
64− ListElement { name: "N" }
65− ListElement { name: "O" }
66− ListElement { name: "P" }
67− ListElement { name: "Q" }
68− ListElement { name: "R" }
69− ListElement { name: "S" }
70− ListElement { name: "T" }
71− ListElement { name: "U" }
72− }
73−
74− Rectangle {
75− id: flowRect
76− width: units.gu(80)
77− height: parent.height
78− color: "grey"
79− anchors.top: parent.top
80− anchors.left: parent.left
81−
82− ResponsiveFlowView {
83− id: flow
84− anchors.fill: parent
85− model: fakeModel
86− minimumHorizontalSpacing:
87− minHSpacingSelector.values[minHSpacingSelector.selectedIndex]
88− verticalSpacing: units.gu(2)
89− maximumNumberOfColumns:
90− maxColumnsSelector.values[maxColumnsSelector.selectedIndex]
91− referenceDelegateWidth: units.gu(6)
92−
93− delegate: Rectangle {
94− // So that it can be identified by test code
95− property bool isFlowDelegate: true
96− color: "grey"
97− border.color: "red"
98− border.width: 1
99−
100− // IMPORTANT: always use flow's cellWidth and cellHeight here to get
101− // ResponsiveFlowView's intended result
102− width: flow.cellWidth
103− height: flow.cellHeight
104−
105− Rectangle {
106− color: "green"
107− anchors.centerIn: parent
108− width: units.gu(6)
109− height: units.gu(6)
110− Text {
111− anchors.centerIn: parent
112− text: name
113− }
114− }
115−
116− Text { x:0; y:0; text:"(" + parent.x + ", " + parent.y + ")"}
117− }
118− }
119− }
120−
121− UT.UnityTestCase {
122− name: "ResponsiveFlowView"
123− when: windowShown
124−
125− function test_maximumNumberOfColumns_data() {
126− var data = new Array()
127−
128− data.push({selectedIndex: 0, maxColumnCount:2, columnCount: 2})
129− data.push({selectedIndex: 1, maxColumnCount:4, columnCount: 4})
130− data.push({selectedIndex: 2, maxColumnCount:8, columnCount: 8})
131− data.push({selectedIndex: 4, maxColumnCount:1000, columnCount: 13})
132−
133− return data
134− }
135−
136− /* Change ResponsiveFlowView's maximumNumberOfColumns property and check
137− that the resulting number of columns matches expectations */
138− function test_maximumNumberOfColumns(data) {
139− minHSpacingSelector.selectedIndex = 0
140−
141− // sanity checks
142− compare(maxColumnsSelector.values[data.selectedIndex], data.maxColumnCount)
143− compare(minHSpacingSelector.values[0], 0)
144−
145− maxColumnsSelector.selectedIndex = data.selectedIndex
146− tryCompareFunction(countFlowDelegatesOnFirstRow, data.columnCount);
147− compare(flow.columns, data.columnCount)
148− }
149−
150− function test_minimumHorizontalSpacing_data() {
151− var data = new Array()
152−
153− data.push({selectedIndex: 0, minHSpacing:0, columnCount: 13})
154− data.push({selectedIndex: 1, minHSpacing:units.gu(2), columnCount: 9})
155− data.push({selectedIndex: 2, minHSpacing:units.gu(8), columnCount: 5})
156− data.push({selectedIndex: 3, minHSpacing:units.gu(25), columnCount: 2})
157−
158− return data
159− }
160−
161− /* Change ResponsiveFlowView's minimumHorizontalSpacing property and check
162− that the resulting number of columns matches expectations */
163− function test_minimumHorizontalSpacing(data) {
164− maxColumnsSelector.selectedIndex = 4
165−
166− // sanity checks
167− compare(maxColumnsSelector.values[4], 1000)
168− compare(minHSpacingSelector.values[data.selectedIndex], data.minHSpacing)
169−
170− minHSpacingSelector.selectedIndex = data.selectedIndex
171− tryCompareFunction(countFlowDelegatesOnFirstRow, data.columnCount);
172− compare(flow.columns, data.columnCount)
173− }
174−
175− function countFlowDelegatesOnFirstRow() {
176− return __countFlowDelegatesOnFirstRow(flow.visibleChildren, 0)
177− }
178−
179− function __countFlowDelegatesOnFirstRow(objList, total) {
180− for (var i = 0; i < objList.length; ++i) {
181− var child = objList[i];
182− if (child.isFlowDelegate !== undefined && child.y === 0) {
183− ++total;
184− } else {
185− total = __countFlowDelegatesOnFirstRow(child.visibleChildren, total)
186− }
187− }
188− return total
189− }
190− }
191−}
tests/qmltests/Launcher/tst_Launcher.qml+18
@@ -519,5 +519,23 @@ Item {
519519 tryCompare(quickListShape, "visible", false)
520520 }
521521 }
522+
523+ function test_quicklistHideOnLauncherHide() {
524+ dragLauncherIntoView();
525+ var clickedItem = findChild(launcher, "launcherDelegate5")
526+ var quickList = findChild(launcher, "quickList")
527+
528+ // Initial state
529+ tryCompare(quickList, "state", "")
530+
531+ // Doing longpress
532+ mousePress(clickedItem, clickedItem.width / 2, clickedItem.height / 2)
533+ tryCompare(clickedItem, "itemOpacity", 0) // Wait for longpress to happen
534+ verify(quickList, "state", "open")
535+
536+ launcher.hide();
537+
538+ tryCompare(quickList, "state", "");
539+ }
522540 }
523541}
tests/qmltests/Stages/tst_SessionContainer.qml+35
@@ -185,6 +185,41 @@ Rectangle {
185185 tryCompare(sessionSpy, "count", data.count);
186186 }
187187
188+ function test_childSessionDestructionReturnsFocusToSiblingOrParent() {
189+ sessionCheckbox.checked = true;
190+ var sessionContainer = sessionContainerLoader.item;
191+ compare(sessionContainer.childSessions.count(), 0);
192+
193+ sessionContainer.interactive = true;
194+
195+ var i;
196+ var sessions = [];
197+ // 3 sessions should cover all edge cases
198+ for(i = 0; i < 3; i++) {
199+ var a_session = ApplicationTest.addChildSession(
200+ sessionContainer.session, "gallery"
201+ )
202+
203+ a_session.createSurface();
204+ sessionContainer.session.addChildSession(a_session);
205+ compare(sessionContainer.childSessions.count(), i + 1);
206+
207+ sessions.push(a_session);
208+ }
209+
210+ var a_session;
211+ while(a_session = sessions.pop()) {
212+ a_session.surface.forceActiveFocus();
213+ compare(a_session.surface.activeFocus, true);
214+
215+ var parentSession = a_session.parentSession;
216+ sessionContainer.session.removeChildSession(a_session);
217+ compare(a_session.surface.activeFocus, false);
218+
219+ compare(parentSession.surface.activeFocus, true);
220+ }
221+ }
222+
188223 function test_nestedChildSessions_data() {
189224 return [ { tag: "depth=2", depth: 2 },
190225 { tag: "depth=8", depth: 8 }
tests/qmltests/tst_ShellWithPin.qml+27
@@ -444,5 +444,32 @@ Item {
444444 tryCompare(lockscreen, "shown", false);
445445 tryCompare(LightDM.Greeter, "active", false);
446446 }
447+
448+ function test_suspend() {
449+ var greeter = findChild(shell, "greeter");
450+
451+ // Put it to sleep
452+ Powerd.status = Powerd.Off;
453+
454+ // If locked, ApplicationManager.suspended should be true
455+ tryCompare(ApplicationManager, "suspended", true);
456+
457+ // And wake up
458+ Powerd.status = Powerd.On;
459+ tryCompare(greeter, "showProgress", 1);
460+
461+ // Swipe away greeter to focus app
462+ swipeAwayGreeter();
463+
464+ // We have a lockscreen, make sure we're still suspended
465+ tryCompare(ApplicationManager, "suspended", true);
466+
467+ enterPin("1234")
468+
469+ // Now that the lockscreen has gone too, make sure we're waking up
470+ tryCompare(ApplicationManager, "suspended", false);
471+
472+ }
473+
447474 }
448475}