on xenial help sign in
Merged trunk
commitde5d9f7a34ce838dc23af1db1dbf6fc7c8b26757 authorMichal Hruby <michal.mhr@gmail.com> dateWed 11 Dec 2013, 12:57 (13 years ago) parentb9a4eab4f3b200
14 files changed+192−48
Dash/DashFilterGrid.qml+3−2 Dash/DashRenderer.qml+2−2 Launcher/Launcher.qml+3−3 Launcher/LauncherPanel.qml+2−2 Panel/Panel.qml+22 Shell.qml+5−1 debian/changelog+62 plugins/Unity/Indicators/Messaging/qml/MessageMenuItemFactory.qml+15−22 plugins/Unity/Indicators/qml/IndicatorPage.qml+13−1 plugins/Unity/Indicators/qml/MenuItemFactory.qml+6 po/gl.po+6−6 tests/qmltests/Dash/tst_GenericScopeView.qml+33−3 tests/qmltests/Launcher/tst_Launcher.qml+6−6 tests/qmltests/Panel/tst_Panel.qml+14
Dash/DashFilterGrid.qml+3−2
@@ -37,8 +37,6 @@ DashRenderer {
3737 rows: filter ? filterGrid.collapsedRowCount : filterGrid.uncollapsedRowCount
3838 currentItem: filterGrid.currentItem
3939 expandable: filterGrid.expandable
40− delegateCreationBegin: filterGrid.delegateCreationBegin
41− delegateCreationEnd: filterGrid.delegateCreationEnd
4240 height: filterGrid.height
4341 margins: filterGrid.margins
4442 uncollapsedHeight: filterGrid.uncollapsedHeight
@@ -58,9 +56,12 @@ DashRenderer {
5856 model: dashFilterGrid.model
5957 filter: dashFilterGrid.filter
6058 highlightIndex: dashFilterGrid.highlightIndex
59+ delegateCreationBegin: dashFilterGrid.delegateCreationBegin
60+ delegateCreationEnd: dashFilterGrid.delegateCreationEnd
6161
6262 onFilterChanged: {
6363 dashFilterGrid.filter = filter
64+ filter = Qt.binding(function() { return dashFilterGrid.filter })
6465 }
6566 }
6667}
Dash/DashRenderer.qml+2−2
@@ -38,9 +38,9 @@ Item {
3838
3939 property int uncollapsedHeight: height
4040
41− property real delegateCreationBegin
41+ property var delegateCreationBegin: undefined
4242
43− property real delegateCreationEnd
43+ property var delegateCreationEnd: undefined
4444
4545 property real verticalSpacing: 0
4646
Launcher/Launcher.qml+3−3
@@ -40,7 +40,7 @@ Item {
4040 signal dash()
4141
4242 // emitted when the dash icon in the launcher has been tapped
43− signal dashItemSelected()
43+ signal showDashHome()
4444
4545 onStateChanged: {
4646 if (state == "") {
@@ -160,9 +160,9 @@ Item {
160160 root.state = ""
161161 launcherApplicationSelected(appId)
162162 }
163− onDashItemSelected: {
163+ onShowDashHome: {
164164 root.state = ""
165− root.dashItemSelected(index)
165+ root.showDashHome();
166166 }
167167
168168 onPreventHidingChanged: {
Launcher/LauncherPanel.qml+2−2
@@ -35,7 +35,7 @@ Item {
3535 property int highlightIndex: -1
3636
3737 signal applicationSelected(string appId)
38− signal dashItemSelected(int index)
38+ signal showDashHome()
3939
4040 BorderImage {
4141 id: background
@@ -56,7 +56,7 @@ Item {
5656 id: dashItem
5757 width: parent.width
5858 height: units.gu(7)
59− onClicked: root.dashItemSelected(0)
59+ onClicked: root.showDashHome()
6060 z: 1
6161 Image {
6262 objectName: "dashItem"
Panel/Panel.qml+22
@@ -31,6 +31,28 @@ Item {
3131
3232 signal searchClicked
3333
34+ function hideIndicatorMenu(delay) {
35+ if (delay !== undefined) {
36+ hideTimer.interval = delay;
37+ hideTimer.start();
38+ } else {
39+ indicatorsMenu.hide();
40+ }
41+ }
42+
43+ Timer {
44+ id: hideTimer
45+ running: false
46+ onTriggered: {
47+ indicatorsMenu.hide();
48+ }
49+ }
50+
51+ Connections {
52+ target: indicatorsMenu
53+ onShown: hideTimer.stop()
54+ }
55+
3456 PanelBackground {
3557 id: panelBackground
3658 anchors {
Shell.qml+5−1
@@ -576,6 +576,10 @@ FocusScope {
576576 stages.hide()
577577 }
578578
579+ function hideIndicatorMenu(delay) {
580+ panel.hideIndicatorMenu(delay);
581+ }
582+
579583 Item {
580584 id: overlay
581585
@@ -667,7 +671,7 @@ FocusScope {
667671 dragAreaWidth: shell.edgeSize
668672 available: (!greeter.shown || greeter.narrowMode) && edgeDemo.launcherEnabled
669673
670− onDashItemSelected: {
674+ onShowDashHome: {
671675 if (edgeDemo.running)
672676 return;
673677
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 ]
plugins/Unity/Indicators/Messaging/qml/MessageMenuItemFactory.qml+15−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 {
@@ -72,10 +50,15 @@ Indicators.BaseMenuItem {
7250
7351 onActivateApp: {
7452 menuItem.model.activate(modelIndex, true);
53+ shell.hideIndicatorMenu(UbuntuAnimation.FastDuration);
7554 }
7655 onDismiss: {
7756 menuItem.model.activate(modelIndex, false);
7857 }
58+
59+ menuSelected: menuItem.menuSelected
60+ onSelectMenu: menuItem.selectMenu()
61+ onDeselectMenu: menuItem.deselectMenu()
7962 }
8063 }
8164 Component {
@@ -100,6 +83,7 @@ Indicators.BaseMenuItem {
10083
10184 onActivateApp: {
10285 menuItem.model.activate(modelIndex, true);
86+ shell.hideIndicatorMenu(UbuntuAnimation.FastDuration);
10387 }
10488 onDismiss: {
10589 menuItem.model.activate(modelIndex, false);
@@ -107,6 +91,10 @@ Indicators.BaseMenuItem {
10791 onReply: {
10892 replyAction.activate(value);
10993 }
94+
95+ menuSelected: menuItem.menuSelected
96+ onSelectMenu: menuItem.selectMenu()
97+ onDeselectMenu: menuItem.deselectMenu()
11098 }
11199 }
112100 Component {
@@ -139,6 +127,7 @@ Indicators.BaseMenuItem {
139127
140128 onActivateApp: {
141129 menuItem.model.activate(modelIndex, true);
130+ shell.hideIndicatorMenu(UbuntuAnimation.FastDuration);
142131 }
143132 onDismiss: {
144133 menuItem.model.activate(modelIndex, false);
@@ -149,6 +138,10 @@ Indicators.BaseMenuItem {
149138 onReply: {
150139 replyAction.activate(value);
151140 }
141+
142+ menuSelected: menuItem.menuSelected
143+ onSelectMenu: menuItem.selectMenu()
144+ onDeselectMenu: menuItem.deselectMenu()
152145 }
153146 }
154147 }
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/Indicators/qml/MenuItemFactory.qml+6
@@ -22,6 +22,7 @@ import Unity.Indicators 0.1 as Indicators
2222import Unity.Indicators.Network 0.1 as ICNetwork
2323import Unity.Indicators.Messaging 0.1 as ICMessaging
2424import QMenuModel 0.1 as QMenuModel
25+import Ubuntu.Components 0.1
2526
2627Item {
2728 id: menuFactory
@@ -95,6 +96,7 @@ Item {
9596
9697 onActivate: {
9798 model.activate(modelIndex);
99+ shell.hideIndicatorMenu(UbuntuAnimation.FastDuration);
98100 }
99101 }
100102 }
@@ -132,6 +134,7 @@ Item {
132134
133135 onActivate: {
134136 model.activate(modelIndex);
137+ shell.hideIndicatorMenu(UbuntuAnimation.BriskDuration);
135138 }
136139 }
137140 }
@@ -148,6 +151,7 @@ Item {
148151
149152 onActivate: {
150153 model.activate(modelIndex);
154+ shell.hideIndicatorMenu(UbuntuAnimation.BriskDuration);
151155 }
152156 }
153157 }
@@ -190,6 +194,7 @@ Item {
190194 }
191195 onActivate: {
192196 model.activate(modelIndex);
197+ shell.hideIndicatorMenu(UbuntuAnimation.BriskDuration);
193198 }
194199 }
195200 }
@@ -225,6 +230,7 @@ Item {
225230 }
226231 onActivateApp: {
227232 model.activate(modelIndex, true);
233+ shell.hideIndicatorMenu(UbuntuAnimation.FastDuration);
228234 }
229235 onDismiss: {
230236 model.activate(modelIndex, false);
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/qmltests/Dash/tst_GenericScopeView.qml+33−3
@@ -79,14 +79,14 @@ Item {
7979 var categoryListView = findChild(genericScopeView, "categoryListView");
8080 categoryListView.positionAtBeginning();
8181
82− var tile = findChild(genericScopeView, "delegate0");
82+ var tile = findChild(findChild(genericScopeView, "0"), "delegate0");
8383 mouseClick(tile, tile.width / 2, tile.height / 2);
8484 var openEffect = findChild(genericScopeView, "openEffect");
8585 tryCompare(openEffect, "gap", 1);
8686 }
8787
8888 function checkArrowPosition(index) {
89− var tile = findChild(genericScopeView, "delegate" + index);
89+ var tile = findChild(findChild(genericScopeView, "0"), "delegate" + index);
9090 var tileCenter = tile.x + tile.width/2;
9191 var pointerArrow = findChild(genericScopeView, "pointerArrow");
9292 var pointerArrowCenter = pointerArrow.x + pointerArrow.width/2;
@@ -141,7 +141,7 @@ Item {
141141 categoryListView.flick(0, -units.gu(80));
142142 tryCompare(categoryListView.flicking, false);
143143
144− var tile = findChild(genericScopeView, "delegate0");
144+ var tile = findChild(findChild(genericScopeView, "0"), "delegate0");
145145 mouseClick(tile, tile.width / 2, tile.height - 1);
146146 var openEffect = findChild(genericScopeView, "openEffect");
147147 tryCompare(openEffect, "gap", 1);
@@ -276,6 +276,36 @@ Item {
276276 closePreview();
277277 tryCompare(previewListView, "open", false);
278278 }
279+
280+ function test_filter_expand_expand() {
281+ // wait for the item to be there
282+ tryCompareFunction(function() { return findChild(genericScopeView, "dashSectionHeader2") != undefined; }, true);
283+
284+ var categoryListView = findChild(genericScopeView, "categoryListView");
285+ categoryListView.contentY = categoryListView.height;
286+
287+ var header2 = findChild(genericScopeView, "dashSectionHeader2")
288+ var category2 = findChild(genericScopeView, "dashCategory2")
289+ var category2FilterGrid = category2.children[0].children[0].children[0];
290+ verify(UT.Util.isInstanceOf(category2FilterGrid, "FilterGrid"));
291+
292+ waitForRendering(header2);
293+ verify(category2.expandable);
294+ verify(category2.filtered);
295+
296+ mouseClick(header2, header2.width / 2, header2.height / 2);
297+ tryCompare(category2, "filtered", false);
298+ tryCompare(category2FilterGrid, "filter", false);
299+
300+ categoryListView.positionAtBeginning();
301+
302+ var header0 = findChild(genericScopeView, "dashSectionHeader0")
303+ var category0 = findChild(genericScopeView, "dashCategory0")
304+ mouseClick(header0, header0.width / 2, header0.height / 2);
305+ tryCompare(category0, "filtered", false);
306+ tryCompare(category2, "filtered", true);
307+ tryCompare(category2FilterGrid, "filter", true);
308+ }
279309 }
280310 }
281311}
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()
tests/qmltests/Panel/tst_Panel.qml+14
@@ -264,5 +264,19 @@ Item {
264264
265265 compare(indicatorRow.currentItem, indicatorItemFirst, "First indicator should still be the current item");
266266 }
267+
268+ function test_hideIndicatorMenu_data() {
269+ return [ {tag: "no-delay", delay: undefined },
270+ {tag: "delayed", delay: 200 }
271+ ];
272+ }
273+
274+ function test_hideIndicatorMenu(data) {
275+ panel.indicators.show();
276+ compare(panel.indicators.shown, true);
277+
278+ panel.hideIndicatorMenu(data.delay);
279+ tryCompare(panel.indicators, "shown", false);
280+ }
267281 }
268282}