on xenial help sign in
merge trunk
commitc8adabc7a9ea5a627932df8c567390231fcb2a66 authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 14 Oct 2014, 17:53 (12 years ago) parent3a0095810ac5e3
49 files changed+447−321
debian/changelog+27 plugins/Dash/listviewwithpageheader.cpp+1−1 po/en_AU.po+16−22 po/fa.po+4−10 po/hu.po+3−9 qml/Components/Carousel.qml+2−3 qml/Components/Flickables/Flickable.qml+23 qml/Components/Flickables/GridView.qml+25 qml/Components/Flickables/ListView.qml+25 qml/Components/Flickables/ListViewWithPageHeader.qml+23 qml/Components/ListItems/Base.qml−116 qml/Components/ListItems/Highlight.qml−46 qml/Components/ResponsiveGridView.qml+2−1 qml/Components/ZoomableImage.qml+2−2 qml/Dash/CardHorizontalList.qml+2−1 qml/Dash/DashCategoryBase.qml+62 qml/Dash/DashContent.qml+2−3 qml/Dash/DashNavigationButton.qml+2−1 qml/Dash/DashNavigationList.qml+2−1 qml/Dash/GenericScopeView.qml+5−2 qml/Dash/PageHeader.qml+2−1 qml/Dash/PreviewListView.qml+2−3 qml/Dash/Previews/Preview.qml+2−1 qml/Dash/Previews/PreviewImageGallery.qml+3−2 qml/Dash/Previews/PreviewTextSummary.qml+1−1 qml/Dash/ScopeListView.qml+3−6 qml/Dash/ScopeSettingsPage.qml+2−1 qml/Dash/ScopesOverviewAll.qml+2−1 qml/Dash/ScopesOverviewFavorites.qml+4−2 qml/Greeter/LoginList.qml+2−2 qml/Hud/Hud.qml+2−1 qml/Hud/HudParametrizedActionsPage.qml+2−1 qml/Launcher/LauncherPanel.qml+2−1 qml/Notifications/Notification.qml+2−1 qml/Notifications/Notifications.qml+2−1 qml/Panel/IndicatorRow.qml+2−1 qml/Panel/Indicators/DefaultIndicatorPage.qml+2−1 qml/Panel/Indicators/client/IndicatorsList.qml+2−1 qml/Panel/Indicators/client/IndicatorsTree.qml+2−1 qml/Panel/MenuContent.qml+3−2 qml/Shell.qml+55−21 qml/Stages/PhoneStage.qml+2−1 qml/Stages/TabletStage.qml+2−1 tests/autopilot/unity8/shell/emulators/dash.py+1−1 tests/mocks/AccountsService/AccountsService.cpp+5−3 tests/mocks/AccountsService/AccountsService.h+1 tests/qmltests/tst_ShellWithPin.qml+90−43 tests/qmltests/tst_TabletShell.qml+10−2 tests/utils/modules/Unity/Test/UnityTestCase.qml+9
debian/changelog+27
@@ -1,3 +1,30 @@
1+unity8 (8.00+14.10.20141013.2-0ubuntu1) utopic; urgency=low
2+
3+ [ Michael Terry ]
4+ * Don't show initial lockscreen during the edge demo. The user just
5+ set up their phone with a password, it's pointless to ask them
6+ again. (LP: #1358283)
7+ * Distinguish between incoming calls and other dialer-app opens. (LP:
8+ #1378218) (LP: #1378218)
9+
10+ [ Andrea Cimitan ]
11+ * Fix flickable speed to be resolution independent, by subclassing
12+ components (LP: #1348557)
13+
14+ [ Michał Sawicz ]
15+ * Fix the ShellWithPin test and some functionality.
16+
17+ [ Albert Astals ]
18+ * Move Base.qml to DashCategoryBase
19+ * Fix first item positioning when m_clipItem->y() is not 0 (LP:
20+ #1251597)
21+ * Fix some small qml warnings
22+
23+ [ Daniel d'Andrada ]
24+ * Add touch ownership logic on top of qt input handling
25+
26+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 13 Oct 2014 15:43:03 +0000
27+
128unity8 (8.00+14.10.20141009.4-0ubuntu1) utopic; urgency=low
229
330 [ Michał Sawicz ]
plugins/Dash/listviewwithpageheader.cpp+1−1
@@ -851,7 +851,7 @@ ListViewWithPageHeader::ListItem *ListViewWithPageHeader::createItem(int modelIn
851851 if (nextItem) {
852852 listItem->setY(nextItem->y() - listItem->height());
853853 } else if (modelIndex == 0) {
854− listItem->setY(m_headerItem ? m_headerItem->height() : 0);
854+ listItem->setY(-m_clipItem->y() + (m_headerItem ? m_headerItem->height() : 0));
855855 } else if (!m_visibleItems.isEmpty()) {
856856 lostItem = true;
857857 }
po/en_AU.po+16−22
@@ -8,14 +8,14 @@ msgstr ""
88"Project-Id-Version: unity\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2014-10-07 11:37+0300\n"
11−"PO-Revision-Date: 2014-09-23 01:24+0000\n"
11+"PO-Revision-Date: 2014-10-12 09:41+0000\n"
1212"Last-Translator: Jared Norris <jarednorris@ubuntu.com>\n"
1313"Language-Team: English (Australia) <en_AU@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-10-09 06:37+0000\n"
18+"X-Launchpad-Export-Date: 2014-10-13 06:15+0000\n"
1919"X-Generator: Launchpad (build 17196)\n"
2020
2121#: plugins/LightDM/Greeter.cpp:130
@@ -33,22 +33,22 @@ msgstr "Unpin shortcut"
3333
3434#: qml/Components/DelayedLockscreen.qml:47
3535msgid "Device Locked"
36−msgstr ""
36+msgstr "Device Locked"
3737
3838#: qml/Components/DelayedLockscreen.qml:62
3939msgid "You have been locked out due to too many failed passphrase attempts."
40−msgstr ""
40+msgstr "You have been locked out due to too many failed passphrase attempts."
4141
4242#: qml/Components/DelayedLockscreen.qml:63
4343msgid "You have been locked out due to too many failed passcode attempts."
44−msgstr ""
44+msgstr "You have been locked out due to too many failed passcode attempts."
4545
4646#: qml/Components/DelayedLockscreen.qml:72
4747#, qt-format
4848msgid "Please wait %1 minute and then try again…"
4949msgid_plural "Please wait %1 minutes and then try again…"
50−msgstr[0] ""
51−msgstr[1] ""
50+msgstr[0] "Please wait %1 minute and then try again…"
51+msgstr[1] "Please wait %1 minutes and then try again…"
5252
5353#: qml/Components/Dialogs.qml:70
5454msgid "Log out"
@@ -211,15 +211,15 @@ msgstr "Send"
211211
212212#: qml/Dash/PullToRefreshScopeStyle.qml:55
213213msgid "Pull to refresh…"
214−msgstr ""
214+msgstr "Pull to refresh…"
215215
216216#: qml/Dash/PullToRefreshScopeStyle.qml:60
217217msgid "Release to refresh…"
218−msgstr ""
218+msgstr "Release to refresh…"
219219
220220#: qml/Dash/ScopesOverview.qml:206
221221msgid "Manage Scopes"
222−msgstr ""
222+msgstr "Manage Scopes"
223223
224224#: qml/Dash/ScopesOverview.qml:428
225225msgid "Done"
@@ -239,7 +239,7 @@ msgstr "All"
239239
240240#: qml/Greeter/Greeter.qml:157
241241msgid "Unlock"
242−msgstr ""
242+msgstr "Unlock"
243243
244244#: qml/Hud/HudParametrizedActionsPage.qml:139
245245msgid "Confirm"
@@ -275,7 +275,7 @@ msgstr "Conference"
275275
276276#: qml/Panel/Indicators/MenuItemFactory.qml:600
277277msgid "Nothing is playing"
278−msgstr ""
278+msgstr "Nothing is playing"
279279
280280#: qml/Panel/Indicators/MenuItemFactory.qml:748
281281msgid "In queue…"
@@ -311,7 +311,7 @@ msgstr "Roaming"
311311
312312#: qml/Shell.qml:346
313313msgid "Enter passphrase"
314−msgstr ""
314+msgstr "Enter passphrase"
315315
316316#: qml/Shell.qml:347
317317msgid "Sorry, incorrect passphrase"
@@ -319,11 +319,11 @@ msgstr "Sorry, incorrect passphrase"
319319
320320#: qml/Shell.qml:348
321321msgid "Please re-enter"
322−msgstr ""
322+msgstr "Please re-enter"
323323
324324#: qml/Shell.qml:350
325325msgid "Enter passcode"
326−msgstr ""
326+msgstr "Enter passcode"
327327
328328#: qml/Shell.qml:351
329329msgid "Sorry, incorrect passcode"
@@ -332,7 +332,7 @@ msgstr "Sorry, incorrect passcode"
332332#: qml/Shell.qml:354
333333#, qt-format
334334msgid "Enter %1"
335−msgstr ""
335+msgstr "Enter %1"
336336
337337#: qml/Shell.qml:355
338338#, qt-format
@@ -366,9 +366,3 @@ msgid ""
366366msgstr ""
367367"If passcode is entered incorrectly, your phone will conduct a factory reset "
368368"and all personal data will be deleted."
369−
370−#~ msgid "Sorry, incorrect PIN"
371−#~ msgstr "Sorry, incorrect PIN"
372−
373−#~ msgid "Enter SIM PIN"
374−#~ msgstr "Enter SIM PIN"
po/fa.po+4−10
@@ -8,14 +8,14 @@ msgstr ""
88"Project-Id-Version: unity8\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2014-10-07 11:37+0300\n"
11−"PO-Revision-Date: 2014-10-02 23:07+0000\n"
11+"PO-Revision-Date: 2014-10-11 23:41+0000\n"
1212"Last-Translator: Danial Behzadi <dani.behzi@gmail.com>\n"
1313"Language-Team: Persian <fa@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=1; plural=0;\n"
18−"X-Launchpad-Export-Date: 2014-10-09 06:36+0000\n"
18+"X-Launchpad-Export-Date: 2014-10-12 06:55+0000\n"
1919"X-Generator: Launchpad (build 17196)\n"
2020
2121#: plugins/LightDM/Greeter.cpp:130
@@ -211,11 +211,11 @@ msgstr "ارسال"
211211
212212#: qml/Dash/PullToRefreshScopeStyle.qml:55
213213msgid "Pull to refresh…"
214−msgstr ""
214+msgstr "برای تازه‌سازی بکشید…"
215215
216216#: qml/Dash/PullToRefreshScopeStyle.qml:60
217217msgid "Release to refresh…"
218−msgstr ""
218+msgstr "برای تازه‌سازی رها کنید…"
219219
220220#: qml/Dash/ScopesOverview.qml:206
221221msgid "Manage Scopes"
@@ -366,9 +366,3 @@ msgid ""
366366msgstr ""
367367"اگر رمزعبور نادرست وارد شود، تلفن شما بازنشانی کارخانه خواهد شد و تمامی "
368368"اطّلاعات شخصی حذف خواهند شد."
369−
370−#~ msgid "Sorry, incorrect PIN"
371−#~ msgstr "متأسّفیم، PIN نادرست بود"
372−
373−#~ msgid "Enter SIM PIN"
374−#~ msgstr "PIN سیم‌کارت را وارد کنید"
po/hu.po+3−9
@@ -8,14 +8,14 @@ msgstr ""
88"Project-Id-Version: unity\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2014-10-07 11:37+0300\n"
11−"PO-Revision-Date: 2014-10-08 08:13+0000\n"
11+"PO-Revision-Date: 2014-10-11 10:50+0000\n"
1212"Last-Translator: Richard Somlói <ricsipontaz@gmail.com>\n"
1313"Language-Team: Hungarian <hu@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-10-09 06:36+0000\n"
18+"X-Launchpad-Export-Date: 2014-10-12 06:55+0000\n"
1919"X-Generator: Launchpad (build 17196)\n"
2020
2121#: plugins/LightDM/Greeter.cpp:130
@@ -321,7 +321,7 @@ msgstr "Sajnáljuk, helytelen jelmondat"
321321
322322#: qml/Shell.qml:348
323323msgid "Please re-enter"
324−msgstr "Kérjük adja meg újra"
324+msgstr "Kérjük próbálja újra"
325325
326326#: qml/Shell.qml:350
327327msgid "Enter passcode"
@@ -368,9 +368,3 @@ msgid ""
368368msgstr ""
369369"Ha helytelen jelkódot ad meg, a telefonja visszaállítja a gyári "
370370"beállításokat és törli minden személyes adatát."
371−
372−#~ msgid "Sorry, incorrect PIN"
373−#~ msgstr "Sajnáljuk, helytelen PIN"
374−
375−#~ msgid "Enter SIM PIN"
376−#~ msgstr "Adja meg a SIM PIN kódját"
qml/Components/Carousel.qml+2−3
@@ -17,6 +17,7 @@
1717import QtQuick 2.0
1818import Ubuntu.Components 0.1
1919import "carousel.js" as CarouselJS
20+import "Flickables" as Flickables
2021
2122/*! The Carousel component presents the items of a model in a carousel view. It's similar to a
2223 cover flow. But it stops at it's boundaries (therefore no PathView is used).
@@ -63,7 +64,7 @@ Item {
6364 and footer item to compensate that.
6465
6566 The scaling of the items is controlled by the variable continuousIndex, described below. */
66− ListView {
67+ Flickables.ListView {
6768 id: listView
6869 objectName: "listView"
6970
@@ -135,8 +136,6 @@ Item {
135136
136137 boundsBehavior: Flickable.DragOverBounds
137138 cacheBuffer: carousel.cacheBuffer
138− flickDeceleration: Math.max(1500 * Math.pow(realWidth / referenceWidth, 1.5), 1500) // 1500 is platform default
139− maximumFlickVelocity: Math.max(2500 * Math.pow(realWidth / referenceWidth, 1.5), 2500) // 2500 is platform default
140139 orientation: ListView.Horizontal
141140
142141 function getXFromContinuousIndex(index) {
qml/Components/Flickables/Flickable.qmlnew file+23
@@ -0,0 +1,23 @@
1+/*
2+ * Copyright (C) 2014 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.3 as QtQuick
18+import Ubuntu.Components 1.1
19+
20+QtQuick.Flickable {
21+ flickDeceleration: 1500 * units.gridUnit / 8
22+ maximumFlickVelocity: 2500 * units.gridUnit / 8
23+}
qml/Components/Flickables/GridView.qmlnew file+25
@@ -0,0 +1,25 @@
1+/*
2+ * Copyright (C) 2014 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.3 as QtQuick
18+import Ubuntu.Components 1.1
19+
20+QtQuick.GridView {
21+ // Attached components and usages like GridView.onRemove are known not to work
22+ // please use GridView directly from QtQuick if needed
23+ flickDeceleration: 1500 * units.gridUnit / 8
24+ maximumFlickVelocity: 2500 * units.gridUnit / 8
25+}
qml/Components/Flickables/ListView.qmlnew file+25
@@ -0,0 +1,25 @@
1+/*
2+ * Copyright (C) 2014 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.3 as QtQuick
18+import Ubuntu.Components 1.1
19+
20+QtQuick.ListView {
21+ // Attached components and usages like ListView.onRemove are known not to work
22+ // please use ListView directly from QtQuick if needed
23+ flickDeceleration: 1500 * units.gridUnit / 8
24+ maximumFlickVelocity: 2500 * units.gridUnit / 8
25+}
qml/Components/Flickables/ListViewWithPageHeader.qmlnew file+23
@@ -0,0 +1,23 @@
1+/*
2+ * Copyright (C) 2014 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 Dash 0.1
18+import Ubuntu.Components 1.1
19+
20+ListViewWithPageHeader {
21+ flickDeceleration: 1500 * units.gridUnit / 8
22+ maximumFlickVelocity: 2500 * units.gridUnit / 8
23+}
qml/Components/ListItems/Base.qmldeleted−116
@@ -1,116 +0,0 @@
1−/*
2− * Copyright (C) 2012 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: emptyListItem
22− width: parent ? parent.width : units.gu(31)
23− height: body.height + bottomDividerLine.height
24−
25− /*!
26− \preliminary
27− Specifies whether the list item is selected.
28− */
29− property bool selected: false
30−
31− /*!
32− \preliminary
33− Set to show or hide the thin bottom divider line (drawn by the \l ThinDivider component).
34− This line is shown by default except in cases where this item is the delegate of a ListView.
35− */
36− property bool showDivider: __showDivider()
37−
38− /*!
39− \internal
40− Method to automatically determine if the bottom divider line should be drawn.
41− This always returns true, unless item is a delegate in a ListView. If in a ListView
42− it will return false only when:
43− + if this is the final item in the list, and ListView.footer is set (again as thin
44− divider line won't look well with footer below it)
45− */
46− function __showDivider() {
47− // if we're not in ListView, always show a thin dividing line at the bottom
48− var model = null;
49− if (typeof ListViewWithPageHeader !== 'undefined') {
50− if (typeof ListViewWithPageHeader.model !== 'undefined') {
51− model = ListViewWithPageHeader.model;
52− }
53− } else if (ListView.view !== null) {
54− model = ListView.view.model;
55− }
56− // if we're last item in ListView don't show divider
57− if (model && index === model.count - 1) return false;
58−
59− return true;
60− }
61−
62− /* Relevant really only for ListViewWithPageHeader case: specify how many pixels we can overlap with the section header */
63− readonly property int allowedOverlap: units.dp(1)
64−
65− property real __heightToClip: {
66− // Check this is in position where clipping is needed
67− if (typeof ListViewWithPageHeader !== 'undefined') {
68− if (typeof heightToClip !== 'undefined') {
69− if (heightToClip >= allowedOverlap) {
70− return heightToClip - allowedOverlap;
71− }
72− }
73− }
74− return 0;
75− }
76−
77− /*!
78− \internal
79− Reparent so that the visuals of the children does not
80− occlude the bottom divider line.
81− */
82− default property alias children: body.children
83−
84− Item {
85− id: clippingContainer
86− height: parent.height - __heightToClip
87− anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
88− clip: __heightToClip > 0
89−
90− Item {
91− id: body
92− anchors {
93− left: parent.left
94− right: parent.right
95− bottom: bottomDividerLine.top
96− }
97− height: childrenRect.height
98− }
99−
100− ThinDivider {
101− id: bottomDividerLine
102− anchors.bottom: parent.bottom
103− visible: showDivider
104− }
105−
106− Highlight {
107− anchors {
108− top: parent.top
109− left: parent.left
110− right: parent.right
111− bottom: bottomDividerLine.top
112− }
113− pressed: emptyListItem.selected
114− }
115− }
116−}
qml/Components/ListItems/Highlight.qmldeleted−46
@@ -1,46 +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−
19−Rectangle {
20− id: highlight
21−
22− property bool pressed: false
23− property real pressedOpacity: 0.3
24−
25− color: "black"
26− opacity: 0
27− state: pressed ? "pressed" : ""
28− states: [
29− State {
30− name: "pressed"
31− PropertyChanges { target: highlight; opacity: pressedOpacity}
32− }
33− ]
34− transitions: [
35− Transition {
36− from: ""
37− to: "pressed"
38− NumberAnimation { target: highlight; property: "opacity"; duration: 50}
39− },
40− Transition {
41− from: "pressed"
42− to: ""
43− NumberAnimation { target: highlight; property: "opacity"; duration: 100}
44− }
45− ]
46−}
qml/Components/ResponsiveGridView.qml+2−1
@@ -16,6 +16,7 @@
1616
1717import QtQuick 2.3
1818import Ubuntu.Components 0.1
19+import "Flickables" as Flickables
1920
2021/*
2122 Essentially a GridView where you can specify the maximum number of columns it can have.
@@ -55,7 +56,7 @@ Item {
5556 return rows * height
5657 }
5758
58− GridView {
59+ Flickables.GridView {
5960 id: gridView
6061 objectName: "responsiveGridViewGrid"
6162 anchors {
qml/Components/ZoomableImage.qml+2−2
@@ -16,7 +16,7 @@
1616
1717import QtQuick 2.0
1818import Ubuntu.Components 0.1
19−import "../Components"
19+import "Flickables" as Flickables
2020
2121/*! \brief Zoomable for image.
2222
@@ -32,7 +32,7 @@ Item {
3232 property alias scaleTo: lazyImage.scaleTo
3333 property alias asynchronous: lazyImage.asynchronous
3434
35− Flickable {
35+ Flickables.Flickable {
3636 id: flickable
3737 objectName: "flickable"
3838 clip: true
qml/Dash/CardHorizontalList.qml+2−1
@@ -17,6 +17,7 @@
1717import QtQuick 2.2
1818import Ubuntu.Components 1.1
1919import "../Components"
20+import "../Components/Flickables" as Flickables
2021
2122DashRenderer {
2223 id: root
@@ -25,7 +26,7 @@ DashRenderer {
2526 collapsedHeight: expandedHeight
2627 clip: true
2728
28− ListView {
29+ Flickables.ListView {
2930 id: listView
3031 anchors {
3132 fill: parent
qml/Dash/DashCategoryBase.qmlnew file+62
@@ -0,0 +1,62 @@
1+/*
2+ * Copyright (C) 2012-2014 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+ width: parent.width
22+ height: body.height
23+
24+ /* Relevant really only for ListViewWithPageHeader case: specify how many pixels we can overlap with the section header */
25+ readonly property int allowedOverlap: units.dp(1)
26+
27+ property real __heightToClip: {
28+ // Check this is in position where clipping is needed
29+ if (typeof ListViewWithPageHeader !== 'undefined') {
30+ if (typeof heightToClip !== 'undefined') {
31+ if (heightToClip >= allowedOverlap) {
32+ return heightToClip - allowedOverlap;
33+ }
34+ }
35+ }
36+ return 0;
37+ }
38+
39+ /*!
40+ \internal
41+ Reparent so that the visuals of the children does not
42+ occlude the bottom divider line.
43+ */
44+ default property alias children: body.children
45+
46+ Item {
47+ id: clippingContainer
48+ height: parent.height - __heightToClip
49+ anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
50+ clip: __heightToClip > 0
51+
52+ Item {
53+ id: body
54+ anchors {
55+ left: parent.left
56+ right: parent.right
57+ bottom: parent.bottom
58+ }
59+ height: childrenRect.height
60+ }
61+ }
62+}
qml/Dash/DashContent.qml+2−3
@@ -19,6 +19,7 @@ import Ubuntu.Components 0.1
1919import Unity 0.2
2020import Utils 0.1
2121import "../Components"
22+import "../Components/Flickables" as Flickables
2223
2324Item {
2425 id: dashContent
@@ -98,7 +99,7 @@ Item {
9899 anchors.fill: parent
99100 }
100101
101− ListView {
102+ Flickables.ListView {
102103 id: dashContentList
103104 objectName: "dashContentList"
104105
@@ -107,8 +108,6 @@ Item {
107108 anchors.fill: parent
108109 orientation: ListView.Horizontal
109110 boundsBehavior: Flickable.DragAndOvershootBounds
110− flickDeceleration: units.gu(625)
111− maximumFlickVelocity: width * 5
112111 snapMode: ListView.SnapOneItem
113112 highlightMoveDuration: 250
114113 highlightRangeMode: ListView.StrictlyEnforceRange
qml/Dash/DashNavigationButton.qml+2−1
@@ -16,6 +16,7 @@
1616
1717import QtQuick 2.2
1818import Ubuntu.Components 1.1
19+import "../Components/Flickables" as Flickables
1920
2021AbstractButton {
2122 id: root
@@ -75,7 +76,7 @@ AbstractButton {
7576 }
7677
7778 // navigationListView is outside root
78− ListView {
79+ Flickables.ListView {
7980 id: navigationListView
8081 objectName: "navigationListView"
8182 visible: height > 0
qml/Dash/DashNavigationList.qml+2−1
@@ -17,6 +17,7 @@
1717import QtQuick 2.2
1818import Ubuntu.Components 1.1
1919import "../Components"
20+import "../Components/Flickables" as Flickables
2021
2122Item {
2223 id: root
@@ -45,7 +46,7 @@ Item {
4546 }
4647 }
4748
48− Flickable {
49+ Flickables.Flickable {
4950 id: flickable
5051
5152 anchors.fill: parent
qml/Dash/GenericScopeView.qml+5−2
@@ -212,10 +212,13 @@ FocusScope {
212212 }
213213 }
214214
215− delegate: ListItems.Base {
215+ delegate: DashCategoryBase {
216216 id: baseItem
217217 objectName: "dashCategory" + category
218+<<<<<<< TREE
218219 showDivider: false
220+=======
221+>>>>>>> MERGE-SOURCE
219222
220223 property Item seeAllButton: seeAll
221224
@@ -238,7 +241,7 @@ FocusScope {
238241 CardTool {
239242 id: cardTool
240243 objectName: "cardTool"
241− count: results.count
244+ count: results ? results.count : 0
242245 template: model.renderer
243246 components: model.components
244247 viewWidth: parent.width
qml/Dash/PageHeader.qml+2−1
@@ -21,6 +21,7 @@ import Ubuntu.Components.Popups 1.0
2121import Ubuntu.Components.ListItems 1.0
2222import "../Components"
2323import "../Components/SearchHistoryModel"
24+import "../Components/Flickables" as Flickables
2425
2526Item {
2627 id: root
@@ -127,7 +128,7 @@ Item {
127128 }
128129 }
129130
130− Flickable {
131+ Flickables.Flickable {
131132 id: headerContainer
132133 objectName: "headerContainer"
133134 clip: contentY < height
qml/Dash/PreviewListView.qml+2−3
@@ -18,6 +18,7 @@ import QtQuick 2.0
1818import Ubuntu.Components 0.1
1919import Unity 0.2
2020import "../Components"
21+import "../Components/Flickables" as Flickables
2122import "Previews" as Previews
2223
2324Item {
@@ -52,7 +53,7 @@ Item {
5253 onBackClicked: root.backClicked()
5354 }
5455
55− ListView {
56+ Flickables.ListView {
5657 id: previewListView
5758 objectName: "listView"
5859 anchors {
@@ -66,8 +67,6 @@ Item {
6667 snapMode: ListView.SnapOneItem
6768 boundsBehavior: Flickable.DragAndOvershootBounds
6869 highlightMoveDuration: 250
69− flickDeceleration: units.gu(625)
70− maximumFlickVelocity: width * 5
7170 cacheBuffer: 0
7271
7372 property bool open: false
qml/Dash/Previews/Preview.qml+2−1
@@ -16,6 +16,7 @@
1616
1717import QtQuick 2.0
1818import Ubuntu.Components 0.1
19+import "../../Components/Flickables" as Flickables
1920
2021/*! \brief This component constructs the Preview UI.
2122 *
@@ -63,7 +64,7 @@ Item {
6364 Repeater {
6465 model: previewModel
6566
66− delegate: ListView {
67+ delegate: Flickables.ListView {
6768 id: column
6869 anchors { top: parent.top; bottom: parent.bottom }
6970 width: row.columnWidth
qml/Dash/Previews/PreviewImageGallery.qml+3−2
@@ -17,6 +17,7 @@
1717import QtQuick 2.0
1818import Ubuntu.Components 1.1
1919import "../../Components"
20+import "../../Components/Flickables" as Flickables
2021
2122/*! This preview widget shows a horizontal list of images.
2223 * The URIs for the images should be an array in widgetData["sources"].
@@ -28,7 +29,7 @@ PreviewWidget {
2829
2930 property Item rootItem: QuickUtils.rootItem(root)
3031
31− ListView {
32+ Flickables.ListView {
3233 id: previewImageListView
3334 objectName: "previewImageListView"
3435 spacing: units.gu(1)
@@ -102,7 +103,7 @@ PreviewWidget {
102103 UbuntuNumberAnimation { duration: UbuntuAnimation.FastDuration }
103104 }
104105
105− ListView {
106+ Flickables.ListView {
106107 id: slideShowListView
107108 objectName: "slideShowListView"
108109 anchors.fill: parent
qml/Dash/Previews/PreviewTextSummary.qml+1−1
@@ -63,7 +63,7 @@ PreviewWidget {
6363 lineHeight: 1.2
6464 color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
6565 opacity: .8
66− text: widgetData["text"]
66+ text: widgetData["text"] || ""
6767 wrapMode: Text.Wrap
6868
6969 Behavior on height {
qml/Dash/ScopeListView.qml+3−6
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2013 Canonical, Ltd.
2+ * Copyright (C) 2014 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,11 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Dash 0.1
17+import "../Components/Flickables" as Flickables
1918
20−ListViewWithPageHeader {
21− maximumFlickVelocity: height * 10
22− flickDeceleration: height * 2
19+Flickables.ListViewWithPageHeader {
2320 cacheBuffer: Number.MAX_VALUE
2421}
qml/Dash/ScopeSettingsPage.qml+2−1
@@ -18,6 +18,7 @@ import QtQuick 2.2
1818import Ubuntu.Components 1.1
1919import Unity 0.2
2020import "../Components"
21+import "../Components/Flickables" as Flickables
2122import "ScopeSettings"
2223
2324Item {
@@ -39,7 +40,7 @@ Item {
3940 onBackClicked: root.backClicked()
4041 }
4142
42− ListView {
43+ Flickables.ListView {
4344 id: scopeSettings
4445 objectName: "scopeSettings"
4546 anchors {
qml/Dash/ScopesOverviewAll.qml+2−1
@@ -16,8 +16,9 @@
1616
1717import QtQuick 2.0
1818import Ubuntu.Components 0.1
19+import "../Components/Flickables" as Flickables
1920
20−Flickable {
21+Flickables.Flickable {
2122 id: root
2223
2324 property alias model: cardGrid.model
qml/Dash/ScopesOverviewFavorites.qml+4−2
@@ -14,9 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.3
18+import Ubuntu.Components 1.1
19+import "../Components/Flickables" as Flickables
1820
19−Flickable {
21+Flickables.Flickable {
2022 id: root
2123
2224 signal clicked(int index, var result, var itemModel)
qml/Greeter/LoginList.qml+2−2
@@ -18,6 +18,7 @@ import QtQuick 2.0
1818import Ubuntu.Components 0.1
1919import LightDM 0.1 as LightDM
2020import "../Components"
21+import "../Components/Flickables" as Flickables
2122
2223Item {
2324 id: root
@@ -68,7 +69,7 @@ Item {
6869 antialiasing: true
6970 }
7071
71− ListView {
72+ Flickables.ListView {
7273 id: userList
7374 objectName: "userList"
7475
@@ -78,7 +79,6 @@ Item {
7879 preferredHighlightEnd: userList.height / 2 - root.highlightedHeight / 2
7980 highlightRangeMode: ListView.StrictlyEnforceRange
8081 highlightMoveDuration: root.moveDuration
81− flickDeceleration: 10000
8282
8383 readonly property bool movingInternally: moveTimer.running || userList.moving
8484
qml/Hud/Hud.qml+2−1
@@ -19,6 +19,7 @@ import Ubuntu.Components 0.1
1919import HudClient 0.1
2020
2121import "../Components"
22+import "../Components/Flickables" as Flickables
2223
2324Item {
2425 id: hud
@@ -400,7 +401,7 @@ Item {
400401 }
401402 progress: MathUtils.clamp((y - hudShowable.y + height - units.gu(8))/elementsYSliding, 0, 1)
402403
403− Flickable {
404+ Flickables.Flickable {
404405 anchors.left: parent.left
405406 anchors.right: parent.right
406407 contentHeight: resultList.height
qml/Hud/HudParametrizedActionsPage.qml+2−1
@@ -18,6 +18,7 @@ import QtQuick 2.0
1818import Ubuntu.Components 1.1
1919import Ubuntu.Components.Themes.Ambiance 1.1
2020import "../Components"
21+import "../Components/Flickables" as Flickables
2122
2223Item {
2324 property alias header: header.title
@@ -74,7 +75,7 @@ Item {
7475 return values
7576 }
7677
77− Flickable {
78+ Flickables.Flickable {
7879 anchors.top: parent.top
7980 anchors.bottom: buttons.top
8081 anchors.left: parent.left
qml/Launcher/LauncherPanel.qml+2−1
@@ -21,6 +21,7 @@ import Unity.Launcher 0.1
2121import Ubuntu.Components.Popups 0.1
2222import "../Components/ListItems"
2323import "../Components/"
24+import "../Components/Flickables" as Flickables
2425
2526Rectangle {
2627 id: root
@@ -75,7 +76,7 @@ Rectangle {
7576 anchors.fill: parent
7677 clip: true
7778
78− ListView {
79+ Flickables.ListView {
7980 id: launcherListView
8081 objectName: "launcherListView"
8182 anchors {
qml/Notifications/Notification.qml+2−1
@@ -20,6 +20,7 @@ import Ubuntu.Components 1.1
2020import Unity.Notifications 1.0
2121import QMenuModel 0.1
2222import Utils 0.1
23+import "../Components/Flickables" as Flickables
2324
2425import Ubuntu.Components.ListItems 0.1 as ListItem
2526
@@ -455,7 +456,7 @@ Item {
455456 onClicked: notification.notification.invokeAction(comboRepeater.itemAt(2).actionId)
456457 expanded: false
457458 expandedHeight: (comboRepeater.count - 2) * units.gu(4) + units.gu(.5)
458− comboList: Flickable {
459+ comboList: Flickables.Flickable {
459460 // this has to be wrapped inside a flickable
460461 // to work around a feature/bug? of the
461462 // ComboButton SDK-element, making a regular
qml/Notifications/Notifications.qml+2−1
@@ -19,8 +19,9 @@ import Ubuntu.Components 0.1
1919import Unity.Notifications 1.0 as UnityNotifications
2020import Utils 0.1
2121import "../Components"
22+import "../Components/Flickables" as Flickables
2223
23−ListView {
24+Flickables.ListView {
2425 id: notificationList
2526
2627 objectName: "notificationList"
qml/Panel/IndicatorRow.qml+2−1
@@ -18,6 +18,7 @@ import QtQuick 2.0
1818import Ubuntu.Components 0.1
1919import Unity.Indicators 0.1 as Indicators
2020import "../Components"
21+import "../Components/Flickables" as Flickables
2122
2223Item {
2324 id: indicatorRow
@@ -60,7 +61,7 @@ Item {
6061 }
6162 }
6263
63− ListView {
64+ Flickables.ListView {
6465 id: itemView
6566 objectName: "indicatorRowItems"
6667 interactive: false
qml/Panel/Indicators/DefaultIndicatorPage.qml+2−1
@@ -21,6 +21,7 @@
2121import QtQuick 2.0
2222import Ubuntu.Components 0.1 as Components
2323import Unity.Indicators 0.1 as Indicators
24+import "../../Components/Flickables" as Flickables
2425
2526IndicatorBase {
2627 id: main
@@ -65,7 +66,7 @@ IndicatorBase {
6566 }
6667 }
6768
68− ListView {
69+ Flickables.ListView {
6970 id: mainMenu
7071 objectName: "mainMenu"
7172 model: menuStack.rootMenu
qml/Panel/Indicators/client/IndicatorsList.qml+2−1
@@ -22,6 +22,7 @@ import Ubuntu.Components 0.1
2222import Ubuntu.Components.ListItems 0.1 as ListItem
2323import Unity.Indicators 0.1 as Indicators
2424import "../.."
25+import "../../../Components/Flickables" as Flickables
2526
2627Page {
2728 id: page
@@ -35,7 +36,7 @@ Page {
3536 Component.onCompleted: load(profile)
3637 }
3738
38− ListView {
39+ Flickables.ListView {
3940 id: mainMenu
4041 objectName: "mainMenu"
4142 anchors.fill: parent
qml/Panel/Indicators/client/IndicatorsTree.qml+2−1
@@ -22,6 +22,7 @@ import Ubuntu.Components 0.1
2222import Unity.Indicators 0.1 as Indicators
2323import QMenuModel 0.1
2424import Ubuntu.Components.ListItems 0.1 as ListItem
25+import "../../../Components/Flickables" as Flickables
2526
2627Page {
2728 id: page
@@ -52,7 +53,7 @@ Page {
5253 model: unityModel
5354 }
5455
55− Flickable {
56+ Flickables.Flickable {
5657 anchors.fill: parent
5758 contentHeight: all_data.height
5859 clip:true
qml/Panel/MenuContent.qml+3−2
@@ -20,6 +20,7 @@ import Ubuntu.Components 1.1
2020import Unity.Indicators 0.1 as Indicators
2121import Utils 0.1
2222import "../Components"
23+import "../Components/Flickables" as Flickables
2324import "Indicators"
2425
2526Rectangle {
@@ -39,7 +40,7 @@ Rectangle {
3940 listViewHeader.currentIndex = index;
4041 }
4142
42− ListView {
43+ Flickables.ListView {
4344 id: listViewHeader
4445 objectName: "indicatorsHeaderListView"
4546 model: content.indicatorsModel
@@ -80,7 +81,7 @@ Rectangle {
8081 }
8182 }
8283
83− ListView {
84+ Flickables.ListView {
8485 id: listViewContent
8586 objectName: "indicatorsContentListView"
8687 anchors {
qml/Shell.qml+55−21
@@ -53,7 +53,9 @@ Item {
5353 property url background
5454 readonly property real panelHeight: panel.panelHeight
5555
56− readonly property bool locked: LightDM.Greeter.active && !LightDM.Greeter.authenticated
56+ readonly property bool locked: LightDM.Greeter.active && !LightDM.Greeter.authenticated && !forcedUnlock
57+ readonly property bool forcedUnlock: edgeDemo.running
58+ onForcedUnlockChanged: if (forcedUnlock) lockscreen.hide()
5759
5860 property bool sideStageEnabled: shell.width >= units.gu(100)
5961 readonly property string focusedApplicationId: ApplicationManager.focusedApplicationId
@@ -87,11 +89,13 @@ Item {
8789 }
8890 }
8991
90− function setLockedApp(app) {
91− if (shell.locked) {
92− greeter.lockedApp = app
93− lockscreen.hide()
92+ function startLockedApp(app) {
93+ if (!shell.locked) {
94+ console.warn("Called startLockedApp(%1) when not locked, ignoring".arg(app))
95+ return
9496 }
97+ greeter.lockedApp = app
98+ shell.activateApplication(app)
9599 }
96100
97101 Binding {
@@ -170,12 +174,18 @@ Item {
170174 target: ApplicationManager
171175 onFocusRequested: {
172176 if (greeter.narrowMode) {
173− if (appId === "dialer-app") {
174− // Always let the dialer-app through. Either user asked
175− // for an emergency call or accepted an incoming call.
176− setLockedApp(appId)
177− } else if (greeter.hasLockedApp && greeter.lockedApp !== appId) {
178− greeter.startUnlock()
177+ if (appId === "dialer-app" && callManager.hasCalls) {
178+ // If we are in the middle of a call, make dialer lockedApp and show it.
179+ // This can happen if user backs out of dialer back to greeter, then
180+ // launches dialer again.
181+ greeter.lockedApp = appId;
182+ }
183+ if (greeter.hasLockedApp) {
184+ if (appId === greeter.lockedApp) {
185+ lockscreen.hide() // show locked app
186+ } else {
187+ greeter.startUnlock() // show lockscreen if necessary
188+ }
179189 }
180190 greeter.hide();
181191 } else {
@@ -196,10 +206,8 @@ Item {
196206 if (greeter.shown && appId != "unity8-dash") {
197207 greeter.startUnlock()
198208 }
199− if (greeter.narrowMode && appId === "dialer-app") {
200− // Always let the dialer-app through. Either user asked
201− // for an emergency call or accepted an incoming call.
202− setLockedApp(appId)
209+ if (greeter.narrowMode && greeter.hasLockedApp && appId === greeter.lockedApp) {
210+ lockscreen.hide() // show locked app
203211 }
204212 launcher.hide();
205213 }
@@ -325,10 +333,16 @@ Item {
325333
326334 onEntered: LightDM.Greeter.respond(passphrase);
327335 onCancel: greeter.show()
328− onEmergencyCall: shell.activateApplication("dialer-app") // will automatically enter locked-app mode
336+ onEmergencyCall: startLockedApp("dialer-app")
329337
330338 onShownChanged: if (shown) greeter.lockedApp = ""
331339
340+ function maybeShow() {
341+ if (!shell.forcedUnlock) {
342+ show()
343+ }
344+ }
345+
332346 Timer {
333347 id: forcedDelayTimer
334348 interval: 1000 * 60
@@ -371,7 +385,7 @@ Item {
371385 lockscreen.errorText = i18n.tr("Sorry, incorrect %1").arg(text.toLowerCase())
372386 }
373387
374− lockscreen.show();
388+ lockscreen.maybeShow();
375389 }
376390 }
377391
@@ -381,7 +395,7 @@ Item {
381395 lockscreen.hide()
382396 } else {
383397 lockscreen.reset();
384− lockscreen.show();
398+ lockscreen.maybeShow();
385399 }
386400 }
387401 }
@@ -460,14 +474,14 @@ Item {
460474 // Wait until the greeter is completely covering lockscreen before resetting it.
461475 if (greeter.narrowMode && fullyShown && !LightDM.Greeter.authenticated) {
462476 lockscreen.reset();
463− lockscreen.show();
477+ lockscreen.maybeShow();
464478 }
465479 }
466480
467481 readonly property real showProgress: MathUtils.clamp((1 - x/width) + greeter.showProgress - 1, 0, 1)
468482 onShowProgressChanged: {
469483 if (showProgress === 0) {
470− if (LightDM.Greeter.promptless && LightDM.Greeter.authenticated) {
484+ if ((LightDM.Greeter.promptless && LightDM.Greeter.authenticated) || shell.forcedUnlock) {
471485 greeter.login()
472486 } else if (greeter.narrowMode) {
473487 lockscreen.clear(false) // to reset focus if necessary
@@ -501,7 +515,7 @@ Item {
501515 function startUnlock() {
502516 if (narrowMode) {
503517 if (!LightDM.Greeter.authenticated) {
504− lockscreen.show()
518+ lockscreen.maybeShow()
505519 }
506520 hide()
507521 } else {
@@ -556,6 +570,25 @@ Item {
556570 }
557571 }
558572
573+ Connections {
574+ id: callConnection
575+ target: callManager
576+
577+ onHasCallsChanged: {
578+ if (shell.locked && callManager.hasCalls) {
579+ // We just received an incoming call while locked. The
580+ // indicator will have already launched dialer-app for us, but
581+ // there is a race between "hasCalls" changing and the dialer
582+ // starting up. So in case we lose that race, we'll start/
583+ // focus the dialer ourselves here too. Even if the indicator
584+ // didn't launch the dialer for some reason (or maybe a call
585+ // started via some other means), if an active call is
586+ // happening, we want to be in the dialer.
587+ startLockedApp("dialer-app")
588+ }
589+ }
590+ }
591+
559592 Connections {
560593 id: powerConnection
561594 target: Powerd
@@ -725,6 +758,7 @@ Item {
725758
726759 EdgeDemo {
727760 id: edgeDemo
761+ objectName: "edgeDemo"
728762 z: alphaDisclaimerLabel.z + 10
729763 paused: Powerd.status === Powerd.Off // Saves power
730764 greeter: greeter
qml/Stages/PhoneStage.qml+2−1
@@ -21,6 +21,7 @@ import Unity.Application 0.1
2121import Unity.Session 0.1
2222import Utils 0.1
2323import "../Components"
24+import "../Components/Flickables" as Flickables
2425
2526Rectangle {
2627 id: root
@@ -120,7 +121,7 @@ Rectangle {
120121
121122 }
122123
123− Flickable {
124+ Flickables.Flickable {
124125 id: spreadView
125126 objectName: "spreadView"
126127 anchors.fill: parent
qml/Stages/TabletStage.qml+2−1
@@ -20,6 +20,7 @@ import Ubuntu.Gestures 0.1
2020import Unity.Application 0.1
2121import Utils 0.1
2222import "../Components"
23+import "../Components/Flickables" as Flickables
2324
2425Rectangle {
2526 id: root
@@ -153,7 +154,7 @@ Rectangle {
153154 }
154155 }
155156
156− Flickable {
157+ Flickables.Flickable {
157158 id: spreadView
158159 anchors.fill: parent
159160 interactive: (spreadDragArea.status == DirectionalDragArea.Recognized || phase > 1)
tests/autopilot/unity8/shell/emulators/dash.py+1−1
@@ -206,7 +206,7 @@ class GenericScopeView(emulators.UnityEmulatorBase):
206206 def _get_category_element(self, category):
207207 try:
208208 return self.wait_select_single(
209− 'Base', objectName='dashCategory{}'.format(category))
209+ 'DashCategoryBase', objectName='dashCategory{}'.format(category))
210210 except dbus.StateNotFoundError:
211211 raise emulators.UnityEmulatorException(
212212 'No category found with name {}'.format(category))
tests/mocks/AccountsService/AccountsService.cpp+5−3
@@ -26,7 +26,8 @@ AccountsService::AccountsService(QObject* parent)
2626 m_enableIndicatorsWhileLocked(true),
2727 m_backgroundFile(qmlDirectory() + "graphics/phone_background.jpg"),
2828 m_statsWelcomeScreen(true),
29− m_failedLogins(0)
29+ m_failedLogins(0),
30+ m_demoEdges(false)
3031{
3132}
3233
@@ -44,12 +45,13 @@ void AccountsService::setUser(const QString &user)
4445
4546bool AccountsService::demoEdges() const
4647{
47− return false;
48+ return m_demoEdges;
4849}
4950
5051void AccountsService::setDemoEdges(bool demoEdges)
5152{
52− Q_UNUSED(demoEdges)
53+ m_demoEdges = demoEdges;
54+ Q_EMIT demoEdgesChanged();
5355}
5456
5557bool AccountsService::enableLauncherWhileLocked() const
tests/mocks/AccountsService/AccountsService.h+1
@@ -101,6 +101,7 @@ private:
101101 QString m_user;
102102 bool m_statsWelcomeScreen;
103103 uint m_failedLogins;
104+ bool m_demoEdges;
104105};
105106
106107#endif
tests/qmltests/tst_ShellWithPin.qml+90−43
@@ -21,15 +21,17 @@ import AccountsService 0.1
2121import GSettings 1.0
2222import LightDM 0.1 as LightDM
2323import Ubuntu.SystemImage 0.1
24+import Ubuntu.Telephony 0.1 as Telephony
2425import Unity.Application 0.1
2526import Unity.Test 0.1 as UT
2627import Powerd 0.1
2728
2829import "../../qml"
2930
30−Row {
31+Item {
3132 id: root
32− spacing: 0
33+ width: contentRow.width
34+ height: contentRow.height
3335
3436 QtObject {
3537 id: applicationArguments
@@ -47,34 +49,36 @@ Row {
4749 }
4850 }
4951
50− Loader {
51− id: shellLoader
52+ Row {
53+ id: contentRow
5254
53− width: units.gu(40)
54− height: units.gu(71)
55+ Loader {
56+ id: shellLoader
5557
56− property bool itemDestroyed: false
57− sourceComponent: Component {
58− Shell {
59− Component.onDestruction: {
60− shellLoader.itemDestroyed = true
58+ width: units.gu(40)
59+ height: units.gu(71)
60+
61+ property bool itemDestroyed: false
62+ sourceComponent: Component {
63+ Shell {
64+ Component.onDestruction: {
65+ shellLoader.itemDestroyed = true
66+ }
67+ maxFailedLogins: maxRetriesTextField.text
6168 }
62− maxFailedLogins: maxRetriesTextField.text
6369 }
6470 }
65− }
6671
67− Rectangle {
68− color: "white"
69− width: units.gu(30)
70− height: shellLoader.height
72+ Rectangle {
73+ color: "white"
74+ width: units.gu(30)
75+ height: shellLoader.height
7176
72− Column {
73− anchors { left: parent.left; right: parent.right; top: parent.top; margins: units.gu(1) }
74− spacing: units.gu(1)
75− Row {
76− anchors { left: parent.left; right: parent.right }
77+ Column {
78+ anchors { left: parent.left; right: parent.right; top: parent.top; margins: units.gu(1) }
79+ spacing: units.gu(1)
7780 Button {
81+ anchors { left: parent.left; right: parent.right }
7882 text: "Show Greeter"
7983 onClicked: {
8084 if (shellLoader.status !== Loader.Ready)
@@ -86,15 +90,15 @@ Row {
8690 }
8791 }
8892 }
89− }
9093
91− Label {
92− text: "Max retries:"
93− color: "black"
94− }
95− TextField {
96− id: maxRetriesTextField
97− text: "-1"
94+ Label {
95+ text: "Max retries:"
96+ color: "black"
97+ }
98+ TextField {
99+ id: maxRetriesTextField
100+ text: "-1"
101+ }
98102 }
99103 }
100104 }
@@ -110,7 +114,13 @@ Row {
110114 signalName: "resettingDevice"
111115 }
112116
117+ Telephony.CallEntry {
118+ id: phoneCall
119+ phoneNumber: "+447812221111"
120+ }
121+
113122 UT.UnityTestCase {
123+ id: testCase
114124 name: "ShellWithPin"
115125 when: windowShown
116126
@@ -119,10 +129,9 @@ Row {
119129 function init() {
120130 sessionSpy.target = findChild(shell, "greeter")
121131 swipeAwayGreeter()
132+ waitForLockscreen()
122133 shell.failedLoginsDelayAttempts = -1
123134 maxRetriesTextField.text = "-1"
124− AccountsService.enableLauncherWhileLocked = true
125− AccountsService.enableIndicatorsWhileLocked = true
126135 }
127136
128137 function cleanup() {
@@ -143,6 +152,10 @@ Row {
143152 // kill all (fake) running apps
144153 killApps()
145154
155+ AccountsService.enableLauncherWhileLocked = true
156+ AccountsService.enableIndicatorsWhileLocked = true
157+ AccountsService.demoEdges = false
158+
146159 // reload our test subject to get it in a fresh state once again
147160 shellLoader.active = true
148161
@@ -169,8 +182,9 @@ Row {
169182
170183 // wait until the animation has finished
171184 tryCompare(greeter, "showProgress", 0);
185+ }
172186
173− // and for pin to be ready
187+ function waitForLockscreen() {
174188 var lockscreen = findChild(shell, "lockscreen");
175189 var pinPadLoader = findChild(lockscreen, "pinPadLoader");
176190 tryCompare(pinPadLoader, "status", Loader.Ready)
@@ -182,10 +196,20 @@ Row {
182196 for (var i = 0; i < pin.length; ++i) {
183197 var character = pin.charAt(i)
184198 var button = findChild(shell, "pinPadButton" + character)
185− mouseClick(button, units.gu(1), units.gu(1))
199+ tap(button)
186200 }
187201 }
188202
203+ function confirmLockedApp(app) {
204+ var greeter = findChild(shell, "greeter")
205+ var lockscreen = findChild(shell, "lockscreen")
206+ tryCompare(greeter, "shown", false)
207+ tryCompare(lockscreen, "shown", false)
208+ tryCompare(greeter, "hasLockedApp", true)
209+ tryCompare(greeter, "lockedApp", app)
210+ tryCompare(ApplicationManager, "focusedApplicationId", app)
211+ }
212+
189213 function test_login() {
190214 sessionSpy.clear()
191215 tryCompare(sessionSpy, "count", 0)
@@ -193,6 +217,25 @@ Row {
193217 tryCompare(sessionSpy, "count", 1)
194218 }
195219
220+ function test_edgeDemoHidesLockscreen() {
221+ LightDM.Greeter.showGreeter()
222+ sessionSpy.clear()
223+ var lockscreen = findChild(shell, "lockscreen")
224+
225+ tryCompare(lockscreen, "shown", true)
226+ AccountsService.demoEdges = true
227+ tryCompare(lockscreen, "shown", false)
228+
229+ swipeAwayGreeter()
230+ tryCompare(sessionSpy, "count", 1)
231+
232+ // Lockscreen is only hidden by the edge demo, so if we turn that
233+ // off and show greeter again, lockscreen should appear
234+ AccountsService.demoEdges = false
235+ LightDM.Greeter.showGreeter()
236+ tryCompare(lockscreen, "shown", true)
237+ }
238+
196239 function test_disabledEdges() {
197240 var launcher = findChild(shell, "launcher")
198241 tryCompare(launcher, "available", true)
@@ -214,7 +257,7 @@ Row {
214257 var launcher = findChild(shell, "launcher")
215258 var stage = findChild(shell, "stage")
216259
217− mouseClick(emergencyButton, units.gu(1), units.gu(1))
260+ tap(emergencyButton)
218261
219262 tryCompare(greeter, "lockedApp", "dialer-app")
220263 tryCompare(greeter, "hasLockedApp", true)
@@ -241,7 +284,7 @@ Row {
241284 function test_emergencyCallCrash() {
242285 var lockscreen = findChild(shell, "lockscreen")
243286 var emergencyButton = findChild(lockscreen, "emergencyCallLabel")
244− mouseClick(emergencyButton, units.gu(1), units.gu(1))
287+ tap(emergencyButton)
245288
246289 tryCompare(lockscreen, "shown", false)
247290 killApps() // kill dialer-app, as if it crashed
@@ -251,7 +294,7 @@ Row {
251294 function test_emergencyCallAppLaunch() {
252295 var lockscreen = findChild(shell, "lockscreen")
253296 var emergencyButton = findChild(lockscreen, "emergencyCallLabel")
254− mouseClick(emergencyButton, units.gu(1), units.gu(1))
297+ tap(emergencyButton)
255298
256299 tryCompare(lockscreen, "shown", false)
257300 ApplicationManager.startApplication("gallery-app", ApplicationManager.NoFlag)
@@ -296,7 +339,7 @@ Row {
296339
297340 var dialog = findChild(root, "infoPopup")
298341 var button = findChild(dialog, "infoPopupOkButton")
299− mouseClick(button, units.gu(1), units.gu(1))
342+ tap(button)
300343 tryCompareFunction(function() {return findChild(root, "infoPopup")}, null)
301344
302345 tryCompare(resetSpy, "count", 0)
@@ -317,11 +360,9 @@ Row {
317360 tryCompare(shell, "sideStageEnabled", false)
318361 tryCompare(applicationsDisplayLoader, "tabletMode", false)
319362
320− var app = ApplicationManager.startApplication("dialer-app")
321−
322− var greeter = findChild(shell, "greeter")
323− tryCompare(greeter, "showProgress", 0)
324− tryCompare(greeter, "hasLockedApp", true)
363+ var lockscreen = findChild(shell, "lockscreen")
364+ lockscreen.emergencyCall()
365+ confirmLockedApp("dialer-app")
325366
326367 // OK, we're in. Now try (but fail) to switch to tablet mode
327368 shell.tablet = true
@@ -330,9 +371,15 @@ Row {
330371
331372 // And when we kill the app, we go back to locked tablet mode
332373 killApps()
374+ var greeter = findChild(shell, "greeter")
333375 tryCompare(greeter, "showProgress", 1)
334376 tryCompare(shell, "sideStageEnabled", true)
335377 tryCompare(applicationsDisplayLoader, "tabletMode", true)
336378 }
379+
380+ function test_emergencyDialerIncoming() {
381+ callManager.foregroundCall = phoneCall
382+ confirmLockedApp("dialer-app")
383+ }
337384 }
338385}
tests/qmltests/tst_TabletShell.qml+10−2
@@ -16,6 +16,7 @@
1616
1717import QtQuick 2.0
1818import QtTest 1.0
19+import AccountsService 0.1
1920import GSettings 1.0
2021import LightDM 0.1 as LightDM
2122import Ubuntu.Components 1.1
@@ -142,6 +143,7 @@ Row {
142143 killApps()
143144
144145 unlockAllModemsSpy.clear()
146+ AccountsService.demoEdges = false
145147
146148 // reload our test subject to get it in a fresh state once again
147149 shellLoader.active = true
@@ -274,13 +276,19 @@ Row {
274276
275277 function test_leftEdgeDrag_data() {
276278 return [
277− {tag: "without password", user: "no-password", loggedIn: true},
278− {tag: "with password", user: "has-password", loggedIn: false},
279+ {tag: "without password", user: "no-password", loggedIn: true, demo: false},
280+ {tag: "with password", user: "has-password", loggedIn: false, demo: false},
281+ {tag: "with demo", user: "has-password", loggedIn: true, demo: true},
279282 ]
280283 }
281284
282285 function test_leftEdgeDrag(data) {
283286 selectUser(data.user)
287+
288+ AccountsService.demoEdges = data.demo
289+ var edgeDemo = findChild(shell, "edgeDemo")
290+ tryCompare(edgeDemo, "running", data.demo)
291+
284292 swipeFromLeftEdge(shell.width * 0.75)
285293 wait(500) // to give time to handle dash() signal from Launcher
286294 confirmLoggedIn(data.loggedIn)
tests/utils/modules/Unity/Test/UnityTestCase.qml+9
@@ -321,7 +321,16 @@ TestCase {
321321 event.commit()
322322 }
323323
324+ /*! \brief Tap the item with a touch event.
325+
326+ \param item The item to be tapped
327+ \param x The x coordinate of the tap, defaults to horizontal center
328+ \param y The y coordinate of the tap, defaults to vertical center
329+ */
324330 function tap(item, x, y) {
331+ if (typeof x !== "number") x = item.width / 2;
332+ if (typeof y !== "number") y = item.height / 2;
333+
325334 var root = fetchRootItem(item)
326335 var rootPoint = item.mapToItem(root, x, y)
327336