on xenial help sign in
Merge from trunk
commitb020c522e5f1b9b8a15873c4731f0d192861ad75 authorMichael Terry <michael.terry@canonical.com> dateTue 10 Dec 2013, 16:26 (13 years ago) parent25238927e7264a
21 files changed+192−56
Components/EdgeDemo.qml+1 Components/FilterGrid.qml+1−1 Dash/DashFilterGrid.qml+6−2 Dash/Generic/GenericCarousel.qml+1 Dash/GenericScopeView.qml+2 Greeter/Greeter.qml+1−1 GreeterShell.qml+1−1 Launcher/Launcher.qml+3−3 Launcher/LauncherPanel.qml+2−2 Shell.qml+10−1 debian/changelog+62 debian/control−1 plugins/Unity/Indicators/Messaging/qml/MessageMenuItemFactory.qml+12−22 plugins/Unity/Indicators/qml/IndicatorPage.qml+13−1 plugins/Unity/Launcher/backend/launcherbackend.cpp+4−2 po/ar.po+5−5 po/gl.po+6−6 tests/mocks/Unity/fake_scope.cpp+1−1 tests/qmltests/Dash/tst_GenericScopeView.qml+54 tests/qmltests/Greeter/tst_Phone.qml+1−1 tests/qmltests/Launcher/tst_Launcher.qml+6−6
Components/EdgeDemo.qml+1
@@ -29,6 +29,7 @@ Item {
2929 property bool dashEnabled: true
3030 property bool panelEnabled: true
3131 property bool panelContentEnabled: true
32+ property bool running: !launcherEnabled || !dashEnabled || !panelEnabled || !panelContentEnabled
3233
3334 property bool paused: false
3435
Components/FilterGrid.qml+1−1
@@ -67,7 +67,7 @@ Item {
6767 property alias highlightIndex: iconTileGrid.highlightIndex
6868 readonly property alias currentItem: iconTileGrid.currentItem
6969
70− implicitHeight: !filterAnimation.running ? childrenRect.height : height
70+ height: !filterAnimation.running ? childrenRect.height : height
7171 clip: filterAnimation.running
7272
7373 NumberAnimation {
Dash/DashFilterGrid.qml+6−2
@@ -37,7 +37,7 @@ DashRenderer {
3737 expandable: filterGrid.expandable
3838 delegateCreationBegin: filterGrid.delegateCreationBegin
3939 delegateCreationEnd: filterGrid.delegateCreationEnd
40− implicitHeight: filterGrid.implicitHeight
40+ height: filterGrid.height
4141 margins: filterGrid.margins
4242 uncollapsedHeight: filterGrid.uncollapsedHeight
4343 verticalSpacing: filterGrid.verticalSpacing
@@ -48,7 +48,7 @@ DashRenderer {
4848
4949 FilterGrid {
5050 id: filterGrid
51− anchors.fill: parent
51+ width: dashFilterGrid.width
5252 minimumHorizontalSpacing: units.gu(0.5)
5353 delegateWidth: units.gu(11)
5454 delegateHeight: units.gu(9.5)
@@ -56,5 +56,9 @@ DashRenderer {
5656 model: dashFilterGrid.model
5757 filter: dashFilterGrid.filter
5858 highlightIndex: dashFilterGrid.highlightIndex
59+
60+ onFilterChanged: {
61+ dashFilterGrid.filter = filter
62+ }
5963 }
6064}
Dash/Generic/GenericCarousel.qml+1
@@ -28,6 +28,7 @@ DashCarousel {
2828
2929 BaseCarouselDelegate {
3030 id: item
31+ objectName: "carouselDelegate"
3132
3233 UbuntuShape {
3334 anchors.fill: parent
Dash/GenericScopeView.qml+2
@@ -126,6 +126,7 @@ FocusScope {
126126
127127 delegate: ListItems.Base {
128128 id: baseItem
129+ objectName: "dashCategory" + category
129130 highlightWhenPressed: false
130131
131132 readonly property bool expandable: rendererLoader.item ? rendererLoader.item.expandable : false
@@ -271,6 +272,7 @@ FocusScope {
271272
272273 sectionProperty: "name"
273274 sectionDelegate: ListItems.Header {
275+ objectName: "dashSectionHeader" + delegate.category
274276 property var delegate: categoryView.item(delegateIndex)
275277 width: categoryView.width
276278 text: section
Greeter/Greeter.qml+1−1
@@ -51,7 +51,7 @@ Showable {
5151 signal unlocked(int uid)
5252
5353 onRightTeaserPressedChanged: {
54− if (rightTeaserPressed && !locked && x == 0) {
54+ if (rightTeaserPressed && (!locked || narrowMode) && x == 0) {
5555 teasingTimer.start();
5656 }
5757 }
GreeterShell.qml+1−1
@@ -199,7 +199,7 @@ BasicShell {
199199 panel.indicators.hide()
200200 }
201201 }
202− onDashItemSelected: greeter.show()
202+ onShowDashHome: greeter.show()
203203 }
204204
205205 Notifications {
Launcher/Launcher.qml+3−3
@@ -41,7 +41,7 @@ Item {
4141 signal dash()
4242
4343 // emitted when the dash icon in the launcher has been tapped
44− signal dashItemSelected()
44+ signal showDashHome()
4545
4646 onStateChanged: {
4747 if (state == "") {
@@ -161,9 +161,9 @@ Item {
161161 root.state = ""
162162 launcherApplicationSelected(appId)
163163 }
164− onDashItemSelected: {
164+ onShowDashHome: {
165165 root.state = ""
166− root.dashItemSelected(index)
166+ root.showDashHome();
167167 }
168168
169169 onPreventHidingChanged: {
Launcher/LauncherPanel.qml+2−2
@@ -36,7 +36,7 @@ Item {
3636 property int highlightIndex: -1
3737
3838 signal applicationSelected(string appId)
39− signal dashItemSelected(int index)
39+ signal showDashHome()
4040
4141 BorderImage {
4242 id: background
@@ -57,7 +57,7 @@ Item {
5757 id: dashItem
5858 width: parent.width
5959 height: units.gu(7)
60− onClicked: root.dashItemSelected(0)
60+ onClicked: root.showDashHome()
6161 z: 1
6262 Image {
6363 objectName: "dashItem"
Shell.qml+10−1
@@ -502,7 +502,13 @@ BasicShell {
502502 width: parent.width
503503 dragAreaWidth: shell.edgeSize
504504 available: edgeDemo.launcherEnabled
505− onDashItemSelected: showHome(true)
505+ onShowDashHome: {
506+ if (edgeDemo.running)
507+ return;
508+
509+ showHome(true)
510+ }
511+
506512 onDash: {
507513 if (stages.shown) {
508514 stages.hide();
@@ -511,6 +517,9 @@ BasicShell {
511517 }
512518 onDashSwipeChanged: if (dashSwipe && stages.shown) dash.setCurrentScope("applications.scope", false, true)
513519 onLauncherApplicationSelected:{
520+ if (edgeDemo.running)
521+ return;
522+
514523 shell.activateApplication(appId)
515524 }
516525 onShownChanged: {
debian/changelog+62
@@ -1,3 +1,65 @@
1+unity8 (7.84+14.04.20131206.1-0ubuntu1) trusty; urgency=low
2+
3+ [ Michal Hruby ]
4+ * Ensure DashContent's ListView's currentItem is set if the model is
5+ not empty.
6+
7+ [ Michał Sawicz ]
8+ * Don't generate build-deps .deb twice and allow overriding
9+ QML2_IMPORT_PATH in ./run.
10+
11+ [ Albert Astals ]
12+ * Remove unused Applications/ folder .
13+ * Implement an 'interface' for Dash Renderers.
14+ * Use deelistmodel's conversion method Instead of a copy of the code .
15+ * Remove icons we don't use .
16+ * Do not start apps or go to dash on demo If you are pulling the
17+ launcher out while in demo mode it doesn't make sense to let you
18+ start applications. Besides it locks you out because it starts the
19+ app and the demo is still not finished so you can't really use any
20+ of the edges to escape Bug #1233696. (LP: #1233696)
21+ * Add a test for the carousel showing the preview when being clicked .
22+ * Fix collapsing of categories not working and the
23+ expansion/collapsing animation +test.
24+
25+ [ Timo Jyrinki ]
26+ * Depend on either Qt 5.2 or libqt5v8-5-private-dev.
27+ * qtdeclarative5-private-dev 5.0.2-6ubuntu5 now depends directly on Qt
28+ V8 private headers. The remaining "qtdeclarative5-private-dev"
29+ dependency is enough now both when compiling against 5.0.2 or 5.2.
30+
31+ [ Pete Woods ]
32+ * Handle optional parameterized action properties. (LP: #1256258)
33+
34+ [ Andrea Cimitan ]
35+ * Implement an 'interface' for Dash Renderers.
36+
37+ [ Michael Zanetti ]
38+ * Added music preview.
39+ * rename some parameters from desktopFile to appId as scopes are now
40+ changed to give us the appId.
41+ * unhardcode launcher's search paths for .desktop files.
42+ * Enable teasing of the phone greeter even though we have a
43+ lockscreen.
44+ * check if variant is valid to avoid asserting in debug mode when the
45+ connection to AccountsService doesn't work for some reason .
46+
47+ [ Michael Terry ]
48+ * Add the DBus greeter API from the desktop greeter into the unity8
49+ greeter.
50+
51+ [ Daniel d'Andrada ]
52+ * Dash: disable close mode when you click outside app thumbnails To
53+ leave the termination mode you can now just mouse/touch press
54+ anywhere outside the running applications' thumbnails The other way,
55+ which still works, is long-pressing a thumbnail once more. (LP:
56+ #1193414)
57+
58+ [ Ubuntu daily release ]
59+ * Automatic snapshot from revision 579
60+
61+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Fri, 06 Dec 2013 13:15:57 +0000
62+
163unity8 (7.84+14.04.20131128.2-0ubuntu1) trusty; urgency=low
264
365 [ Michal Hruby ]
debian/control−1
@@ -17,7 +17,6 @@ Build-Depends: cmake,
1717 liblightdm-qt5-3-dev,
1818 libpulse-dev,
1919 libqmenumodel-dev (>= 0.2.7),
20− qtdeclarative5-dev (>= 5.2~) | libqt5v8-5-private-dev,
2120 libunity-api-dev (>= 7.80.4),
2221 libunity-mir-dev,
2322 libunity-scopes-json-def-phone,
plugins/Unity/Indicators/Messaging/qml/MessageMenuItemFactory.qml+12−22
@@ -37,28 +37,6 @@ Indicators.BaseMenuItem {
3737
3838 sourceComponent: loadMessage(actionsDescription);
3939
40− // Binding all properties for the item, to make sure that any change in the
41− // property will be propagated to the contents.item at any time
42− Binding {
43− target: contents.item
44− property: "menuSelected"
45− value: menuSelected
46− when: (contents.status == Loader.Ready)
47− }
48−
49− Binding {
50− target: contents.item
51− property: "menu"
52− value: menu
53− when: (contents.status == Loader.Ready)
54− }
55−
56− Connections {
57− target: contents.item ? contents.item : null
58− onSelectMenu: selectMenu()
59− onDeselectMenu: deselectMenu()
60− }
61−
6240 Component {
6341 id: simpleTextMessage
6442 SimpleTextMessage {
@@ -76,6 +54,10 @@ Indicators.BaseMenuItem {
7654 onDismiss: {
7755 menuItem.model.activate(modelIndex, false);
7856 }
57+
58+ menuSelected: menuItem.menuSelected
59+ onSelectMenu: menuItem.selectMenu()
60+ onDeselectMenu: menuItem.deselectMenu()
7961 }
8062 }
8163 Component {
@@ -107,6 +89,10 @@ Indicators.BaseMenuItem {
10789 onReply: {
10890 replyAction.activate(value);
10991 }
92+
93+ menuSelected: menuItem.menuSelected
94+ onSelectMenu: menuItem.selectMenu()
95+ onDeselectMenu: menuItem.deselectMenu()
11096 }
11197 }
11298 Component {
@@ -149,6 +135,10 @@ Indicators.BaseMenuItem {
149135 onReply: {
150136 replyAction.activate(value);
151137 }
138+
139+ menuSelected: menuItem.menuSelected
140+ onSelectMenu: menuItem.selectMenu()
141+ onDeselectMenu: menuItem.deselectMenu()
152142 }
153143 }
154144 }
plugins/Unity/Indicators/qml/IndicatorPage.qml+13−1
@@ -140,10 +140,11 @@ IndicatorBase {
140140
141141 onLoaded: {
142142 if (item.hasOwnProperty("menuSelected")) {
143− item.menuSelected = Qt.binding(function() { return mainMenu.selectedIndex == index; });
143+ item.menuSelected = mainMenu.selectedIndex == index;
144144 item.selectMenu.connect(function() { mainMenu.selectedIndex = index; });
145145 item.deselectMenu.connect(function() { mainMenu.selectedIndex = -1; });
146146 }
147+
147148 if (item.hasOwnProperty("menu")) {
148149 item.menu = Qt.binding(function() { return model; });
149150 }
@@ -154,6 +155,17 @@ IndicatorBase {
154155 property: "objectName"
155156 value: model.action
156157 }
158+
159+ // TODO: Fixes lp#1243146
160+ // This is a workaround for a Qt bug. https://bugreports.qt-project.org/browse/QTBUG-34351
161+ Connections {
162+ target: mainMenu
163+ onSelectedIndexChanged: {
164+ if (loader.item && loader.item.hasOwnProperty("menuSelected")) {
165+ loader.item.menuSelected = mainMenu.selectedIndex == index;
166+ }
167+ }
168+ }
157169 }
158170 }
159171 }
plugins/Unity/Launcher/backend/launcherbackend.cpp+4−2
@@ -183,8 +183,10 @@ void LauncherBackend::syncFromAccounts()
183183
184184 if (m_accounts && !m_user.isEmpty()) {
185185 QVariant variant = m_accounts->getUserProperty(m_user, "com.canonical.unity.AccountsService", "launcher-items");
186− apps = qdbus_cast<QList<QVariantMap>>(variant.value<QDBusArgument>());
187− defaults = isDefaultsItem(apps);
186+ if (variant.isValid() && variant.canConvert<QDBusArgument>()) {
187+ apps = qdbus_cast<QList<QVariantMap>>(variant.value<QDBusArgument>());
188+ defaults = isDefaultsItem(apps);
189+ }
188190 }
189191
190192 if (m_accounts && defaults) { // Checking accounts as it'll be null when !useStorage
po/ar.po+5−5
@@ -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: 2013-11-29 09:21+0100\n"
11−"PO-Revision-Date: 2013-11-15 12:29+0000\n"
11+"PO-Revision-Date: 2013-12-05 06:55+0000\n"
1212"Last-Translator: Ibrahim Saed <ibraheem5000@gmail.com>\n"
1313"Language-Team: Arabic <ar@li.org>\n"
1414"MIME-Version: 1.0\n"
@@ -16,8 +16,8 @@ msgstr ""
1616"Content-Transfer-Encoding: 8bit\n"
1717"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n % 100 >= "
1818"3 && n % 100 <= 10 ? 3 : n % 100 >= 11 && n % 100 <= 99 ? 4 : 5;\n"
19−"X-Launchpad-Export-Date: 2013-11-30 05:33+0000\n"
20−"X-Generator: Launchpad (build 16856)\n"
19+"X-Launchpad-Export-Date: 2013-12-06 06:30+0000\n"
20+"X-Generator: Launchpad (build 16863)\n"
2121
2222#: Components/EdgeDemoOverlay.qml:151
2323msgid "Skip intro"
@@ -154,11 +154,11 @@ msgstr "ابحث"
154154#: plugins/Unity/Launcher/launcheritem.cpp:43
155155#: plugins/Unity/Launcher/launcheritem.cpp:73
156156msgid "Lock to Launcher"
157−msgstr ""
157+msgstr "ثبّت في الشريط"
158158
159159#: plugins/Unity/Launcher/launcheritem.cpp:73
160160msgid "Unlock from Launcher"
161−msgstr ""
161+msgstr "فُك التثبيت من الشريط"
162162
163163#: Shell.qml:439
164164#, qt-format
po/gl.po+6−6
@@ -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: 2013-11-29 09:21+0100\n"
11−"PO-Revision-Date: 2013-10-03 18:49+0000\n"
11+"PO-Revision-Date: 2013-12-06 17:15+0000\n"
1212"Last-Translator: Marcos Lans <Unknown>\n"
1313"Language-Team: Galician <gl@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: 2013-11-30 05:33+0000\n"
19−"X-Generator: Launchpad (build 16856)\n"
18+"X-Launchpad-Export-Date: 2013-12-07 06:35+0000\n"
19+"X-Generator: Launchpad (build 16869)\n"
2020
2121#: Components/EdgeDemoOverlay.qml:151
2222msgid "Skip intro"
@@ -139,7 +139,7 @@ msgstr "Falando…"
139139
140140#: Notifications/NotificationMenuItemFactory.qml:89
141141msgid "Show password"
142−msgstr ""
142+msgstr "Mostrar contrasinal"
143143
144144#: Panel/SearchIndicator.qml:27
145145msgid "Search"
@@ -148,11 +148,11 @@ msgstr "Buscar"
148148#: plugins/Unity/Launcher/launcheritem.cpp:43
149149#: plugins/Unity/Launcher/launcheritem.cpp:73
150150msgid "Lock to Launcher"
151−msgstr ""
151+msgstr "Manter no Iniciador"
152152
153153#: plugins/Unity/Launcher/launcheritem.cpp:73
154154msgid "Unlock from Launcher"
155−msgstr ""
155+msgstr "Non manter no Iniciador"
156156
157157#: Shell.qml:439
158158#, qt-format
tests/mocks/Unity/fake_scope.cpp+1−1
@@ -204,7 +204,7 @@ DeeModel* create_categories_model(unsigned category_count) {
204204 std::to_string(i).c_str(),
205205 ("Category "+std::to_string(i)).c_str(),
206206 "gtk-apply",
207− "grid",
207+ i % 2 == 0 ? "grid" : "carousel",
208208 hints);
209209 }
210210 return category_model;
tests/qmltests/Dash/tst_GenericScopeView.qml+54
@@ -19,6 +19,7 @@ import QtTest 1.0
1919import Unity 0.1
2020import ".."
2121import "../../../Dash"
22+import "../../../Components"
2223import Ubuntu.Components 0.1
2324import Unity.Test 0.1 as UT
2425
@@ -43,6 +44,7 @@ Item {
4344 GenericScopeView {
4445 id: genericScopeView
4546 anchors.fill: parent
47+ searchHistory: SearchHistoryModel {}
4648
4749 UT.UnityTestCase {
4850 name: "GenericScopeView"
@@ -222,6 +224,58 @@ Item {
222224 genericScopeView.scope = scopes.get(0)
223225 tryCompare(genericScopeView.scope, "searchQuery", "")
224226 }
227+
228+ function test_filter_expand_collapse() {
229+ // wait for the item to be there
230+ tryCompareFunction(function() { return findChild(genericScopeView, "dashSectionHeader0") != undefined; }, true);
231+
232+ var header = findChild(genericScopeView, "dashSectionHeader0")
233+ var category = findChild(genericScopeView, "dashCategory0")
234+
235+ waitForRendering(header);
236+ verify(category.expandable);
237+ verify(category.filtered);
238+
239+ var initialHeight = category.height;
240+ var middleHeight;
241+ mouseClick(header, header.width / 2, header.height / 2);
242+ tryCompareFunction(function() { middleHeight = category.height; return category.height > initialHeight; }, true);
243+ tryCompare(category, "filtered", false);
244+ verify(category.height > middleHeight);
245+
246+ mouseClick(header, header.width / 2, header.height / 2);
247+ verify(category.expandable);
248+ tryCompare(category, "filtered", true);
249+ }
250+
251+ function test_showPreviewCarousel() {
252+ tryCompareFunction(function() { return findChild(genericScopeView, "carouselDelegate") != undefined; }, true);
253+ var tile = findChild(genericScopeView, "carouselDelegate");
254+ mouseClick(tile, tile.width / 2, tile.height / 2);
255+ var openEffect = findChild(genericScopeView, "openEffect");
256+ tryCompare(openEffect, "gap", 1);
257+
258+ // check for it opening successfully
259+ var previewListView = findChild(genericScopeView, "previewListView");
260+ var currentPreviewItem = findChild(genericScopeView, "previewLoader0");
261+ tryCompareFunction(function() {
262+ var parts = currentPreviewItem.source.toString().split("/");
263+ var name = parts[parts.length - 1];
264+ return name == "DashPreviewPlaceholder.qml";
265+ },
266+ true);
267+ tryCompareFunction(function() {
268+ var parts = currentPreviewItem.source.toString().split("/");
269+ var name = parts[parts.length - 1];
270+ return name == "GenericPreview.qml";
271+ },
272+ true);
273+ tryCompare(currentPreviewItem, "progress", 1);
274+ tryCompare(previewListView, "open", true);
275+
276+ closePreview();
277+ tryCompare(previewListView, "open", false);
278+ }
225279 }
226280 }
227281}
tests/qmltests/Greeter/tst_Phone.qml+1−1
@@ -101,7 +101,7 @@ Item {
101101 mouseClick(greeter, greeter.width - units.gu(5), greeter.height - units.gu(1));
102102 greeter.minX = 0; // This is needed because the transition actually makes x jump once before animating
103103
104− if (!data.locked && !data.moved) {
104+ if (!data.moved) {
105105 // Check if it has been moved over by 2 GUs. Give it a 2 pixel grace area
106106 // because animation duration and teaseTimer are the same duration and
107107 // might cause slight offsets
tests/qmltests/Launcher/tst_Launcher.qml+6−6
@@ -41,9 +41,9 @@ Item {
4141 lastSelectedApplication = appId
4242 }
4343
44− property int dashItemSelected_count: 0
45− onDashItemSelected: {
46− dashItemSelected_count++;
44+ property int showDashHome_count: 0
45+ onShowDashHome: {
46+ showDashHome_count++;
4747 }
4848
4949 property int maxPanelX: 0
@@ -138,9 +138,9 @@ Item {
138138 }
139139
140140 /* If I click on the dash icon on the launcher
141− Launcher::dashItemSelected signal should be emitted */
141+ Launcher::showDashHome signal should be emitted */
142142 function test_clickingOnDashIconCausesSignalEmission() {
143− launcher.dashItemSelected_count = 0
143+ launcher.showDashHome_count = 0
144144
145145 revealer.dragLauncherIntoView()
146146
@@ -149,7 +149,7 @@ Item {
149149
150150 mouseClick(dashIcon, dashIcon.width/2, dashIcon.height/2)
151151
152− tryCompare(launcher, "dashItemSelected_count", 1)
152+ tryCompare(launcher, "showDashHome_count", 1)
153153
154154 // Tapping on the dash icon also dismisses the launcher
155155 revealer.waitUntilLauncherDisappears()