on xenial help sign in
merged with parent
commit99aa1a8984c5bc0b336d9b19642bbf91273e8eb3 authorNick Dedekind <nicholas.dedekind@gmail.com> dateMon 8 Jul 2013, 12:30 (13 years ago) parent423e715ffd8a36
21 files changed+331−387
Dash/Apps/RunningApplicationsGrid.qml+1 Dash/DashApps.qml+11−22 Dash/DashHome.qml+12−25 Dash/DashMusic.qml+3−10 Dash/DashVideos.qml+3−10 Greeter/Infographics.qml+1−1 Launcher/LauncherDelegate.qml−1 Launcher/LauncherPanel.qml+26−14 Panel/IndicatorsDataModel.qml+2−2 debian/changelog+98−2 debian/control+23−20 debian/unity8-autopilot.install+1−1 plugins/Unity/Indicators/Network/qml/PasswordTextField.qml+1−1 po/is.po−220 po/sl.po+11−17 src/Panel/Indicators/client/indicatorsclient.cpp+17 src/Panel/Indicators/servicefiles/com.canonical.indicator.battery+1−1 src/Panel/Indicators/servicefiles/com.canonical.indicator.time+1−1 tests/autopilot/indicators_client/emulators/main_window.py+3−3 tests/autopilot/indicators_client/tests/test_power.py → tests/autopilot/indicators_client/tests/test_battery.py+2−2 tests/qmltests/Launcher/tst_Launcher.qml+114−34
Dash/Apps/RunningApplicationsGrid.qml+1
@@ -19,6 +19,7 @@ import "../../Components"
1919
2020ResponsiveFlowView {
2121 id: root
22+ clip: true
2223
2324 signal updateScreenshots
2425
Dash/DashApps.qml+11−22
@@ -56,10 +56,10 @@ ScopeView {
5656 ListModel {
5757 id: categoryListModel
5858 // specifies app categories, type of delegate and model used in each category
59− ListElement { category: "Running apps"; component: "RunningApplicationsGrid"; modelName: "RunningApplicationsModel" }
60− ListElement { category: "Frequently used"; component: "ApplicationsFilterGrid"; modelName: "FrequentlyUsedAppsModel" }
61− ListElement { category: "Installed"; component: "ApplicationsFilterGrid"; modelName: "InstalledApplicationsModel" }
62− ListElement { category: "Available for download"; component: "ApplicationsFilterGrid"; modelName: "AppsAvailableForDownloadModel" }
59+ ListElement { category: "Running apps"; component: "Apps/RunningApplicationsGrid.qml"; modelName: "RunningApplicationsModel" }
60+ ListElement { category: "Frequently used"; component: "Apps/ApplicationsFilterGrid.qml"; modelName: "FrequentlyUsedAppsModel" }
61+ ListElement { category: "Installed"; component: "Apps/ApplicationsFilterGrid.qml"; modelName: "InstalledApplicationsModel" }
62+ ListElement { category: "Available for download"; component: "Apps/ApplicationsFilterGrid.qml"; modelName: "AppsAvailableForDownloadModel" }
6363 function getCategory(category1) {
6464 if (category1 === "Running apps") {
6565 return i18n.tr("Running apps");
@@ -95,23 +95,6 @@ ScopeView {
9595 "AppsAvailableForDownloadModel": appsAvailableForDownloadModel,
9696 }
9797
98− /* Workaround for bug: https://bugreports.qt-project.org/browse/QTBUG-28403
99− When using Loader to load external QML file in the list deelgate, the ListView has
100− a bug where it can position the delegate content to overlap the section header
101− of the ListView - a workaround is to use sourceComponent of Loader instead */
102− Component { id: runningApplicationsGrid; RunningApplicationsGrid { clip: true } }
103− Component {
104− id: applicationsFilterGrid;
105− ApplicationsFilterGrid {
106− onClicked: shell.activateApplication(data)
107− }
108− }
109−
110− property var componentModels: {
111− "RunningApplicationsGrid": runningApplicationsGrid,
112− "ApplicationsFilterGrid": applicationsFilterGrid,
113− }
114−
11598 ScopeListView {
11699 id: categoryView
117100 anchors.fill: parent
@@ -139,7 +122,7 @@ ScopeView {
139122 left: parent.left
140123 right: parent.right
141124 }
142− sourceComponent: componentModels[component]
125+ source: component
143126 onLoaded: {
144127 if (modelName == "RunningApplicationsModel") {
145128 item.firstModel = mainStageApplicationsModel
@@ -147,7 +130,13 @@ ScopeView {
147130 item.canEnableTerminationMode =
148131 Qt.binding(function() { return isCurrent; })
149132 } else {
133+ function activateApplication(index, data) {
134+ shell.activateApplication(data);
135+ }
136+
150137 item.model = categoryModels[modelName]
138+ item.clicked.connect(activateApplication);
139+
151140 }
152141 }
153142 }
Dash/DashHome.qml+12−25
@@ -32,9 +32,9 @@ ScopeView {
3232 ListModel {
3333 id: categoryListModel
3434 // specifies page's content categories, type of delegate and model used in each category
35− ListElement { category: "Frequent Apps"; component: "AppsGrid"; modelName: "AppsModel" }
36− ListElement { category: "Recent Music"; component: "MusicGrid"; modelName: "MusicModel" }
37− ListElement { category: "Videos Popular Online"; component: "VideosGrid"; modelName: "VideosModel" }
35+ ListElement { category: "Frequent Apps"; component: "Apps/ApplicationsFilterGrid.qml"; modelName: "AppsModel" }
36+ ListElement { category: "Recent Music"; component: "Music/MusicFilterGrid.qml"; modelName: "MusicModel" }
37+ ListElement { category: "Videos Popular Online"; component: "Video/VideosFilterGrid.qml"; modelName: "VideosModel" }
3838 function getCategory(category1) {
3939 if (category1 === "Frequent Apps") {
4040 return i18n.tr("Frequent Apps");
@@ -110,26 +110,6 @@ ScopeView {
110110 "VideosModel": videosFilter,
111111 }
112112
113− /* Workaround for bug: https://bugreports.qt-project.org/browse/QTBUG-28403
114− When using Loader to load external QML file in the list deelgate, the ListView has
115− a bug where it can position the delegate content to overlap the section header
116− of the ListView - a workaround is to use sourceComponent of Loader instead */
117− Component {
118− id: applicationsFilterGrid
119− ApplicationsFilterGrid {
120− objectName: "dashHomeApplicationsGrid"
121− onClicked: shell.activateApplication(data);
122− }
123− }
124−
125− Component { id: musicGrid; MusicFilterGrid {} }
126− Component { id: videosGrid; VideosFilterGrid {} }
127− property var componentModels: {
128− "AppsGrid": applicationsFilterGrid,
129− "MusicGrid": musicGrid,
130− "VideosGrid": videosGrid,
131− }
132−
133113 ScopeListView {
134114 id: listView
135115 anchors.fill: parent
@@ -145,13 +125,13 @@ ScopeView {
145125
146126 Loader {
147127 anchors { top: parent.top; left: parent.left; right: parent.right }
148− sourceComponent: componentModels[component]
128+ source: component
149129 onLoaded: {
150130 item.model = categoryModels[modelName]
151131
152132 //FIXME: workaround for lack of previews for videos in Home scope.
153133 //Need to connect to the clicked() signal here and act upon it here instead.
154− if (component === "VideosGrid") {
134+ if (modelName === "VideosModel") {
155135 function playVideo(index, data) {
156136 if (data.fileUri) {
157137 shell.activateApplication('/usr/share/applications/mediaplayer-app.desktop', "/usr/share/demo-assets/videos/" + data.fileUri);
@@ -159,6 +139,13 @@ ScopeView {
159139 }
160140
161141 item.clicked.connect(playVideo);
142+ } else if (modelName === "AppsModel") {
143+ function activateApplication(index, data) {
144+ shell.activateApplication(data);
145+ }
146+
147+ item.objectName = "dashHomeApplicationsGrid";
148+ item.clicked.connect(activateApplication);
162149 }
163150 }
164151 }
Dash/DashMusic.qml+3−10
@@ -50,17 +50,10 @@ ScopeView {
5050 }
5151 }
5252
53− /* Workaround for bug: https://bugreports.qt-project.org/browse/QTBUG-28403
54− When using Loader to load external QML file in the list deelgate, the ListView has
55− a bug where it can position the delegate content to overlap the section header
56− of the ListView - a workaround is to use sourceComponent of Loader instead */
57− Component { id: musicCarousel; MusicCarousel {} }
58− Component { id: musicFilterGrid; MusicFilterGrid {} }
59−
6053 function getRenderer(categoryId) {
6154 switch (categoryId) {
62− case 1: return musicCarousel
63− default: return musicFilterGrid
55+ case 1: return "Music/MusicCarousel.qml"
56+ default: return "Music/MusicFilterGrid.qml"
6457 }
6558 }
6659
@@ -80,7 +73,7 @@ ScopeView {
8073
8174 Loader {
8275 anchors { top: parent.top; left: parent.left; right: parent.right }
83− sourceComponent: scopeView.getRenderer(base.categoryId)
76+ source: scopeView.getRenderer(base.categoryId)
8477 onLoaded: {
8578 item.model = results
8679 }
Dash/DashVideos.qml+3−10
@@ -51,17 +51,10 @@ ScopeView {
5151 }
5252 }
5353
54− /* Workaround for bug: https://bugreports.qt-project.org/browse/QTBUG-28403
55− When using Loader to load external QML file in the list deelgate, the ListView has
56− a bug where it can position the delegate content to overlap the section header
57− of the ListView - a workaround is to use sourceComponent of Loader instead */
58− Component { id: videosFilterGrid; VideosFilterGrid {} }
59− Component { id: videosCarousel; VideosCarousel {} }
60−
6154 function getRenderer(categoryId) {
6255 switch (categoryId) {
63− case 1: return videosCarousel
64− default: return videosFilterGrid
56+ case 1: return "Video/VideosCarousel.qml"
57+ default: return "Video/VideosFilterGrid.qml"
6558 }
6659 }
6760
@@ -115,7 +108,7 @@ ScopeView {
115108 Loader {
116109 id: loader
117110 anchors { top: parent.top; left: parent.left; right: parent.right }
118− sourceComponent: scopeView.getRenderer(base.categoryId)
111+ source: scopeView.getRenderer(base.categoryId)
119112 onLoaded: {
120113 item.model = results
121114 }
Greeter/Infographics.qml+1−1
@@ -81,7 +81,7 @@ Item {
8181 var nextCircle = presentCircles.itemAt(presentCircleCounter++)
8282 if (nextCircle !== null) nextCircle.presentCircleGrowAnim.start()
8383 }
84− if (presentCircleCounter > infographic.model.currentDay) {
84+ if (presentCircleCounter > infographic.model.currentDay && pastCircleCounter >= pastCircles.count) {
8585 stop()
8686 }
8787 }
Launcher/LauncherDelegate.qml−1
@@ -65,7 +65,6 @@ Item {
6565 onClicked: root.clicked()
6666 onCanceled: root.released()
6767 preventStealing: false
68− enabled: root.angle < 5
6968
7069 onPressAndHold: {
7170 root.state = "moving"
Launcher/LauncherPanel.qml+26−14
@@ -100,6 +100,7 @@ Item {
100100 height: parent.height - dashItem.height - parent.spacing*2
101101 ListView {
102102 id: launcherListView
103+ objectName: "launcherListView"
103104 anchors.fill: parent
104105 anchors.topMargin: -itemSize
105106 anchors.bottomMargin: -itemSize
@@ -116,15 +117,7 @@ Item {
116117 // The height of the area where icons start getting folded
117118 property int foldingAreaHeight: itemSize * 0.75
118119 property int itemSize: width
119−
120− Component.onCompleted: {
121− // This is needed because snapping would partially fold
122− // the first item on initialisation. This can only be
123− // overridden by mouse interactions - which is what flick()
124− // simulates. Setting contentY to 0 would not work because
125− // of this.
126− flick(0, units.gu(20))
127− }
120+ property int clickFlickSpeed: units.gu(60)
128121
129122 delegate: LauncherDelegate {
130123 id: launcherDelegate
@@ -139,7 +132,26 @@ Item {
139132 maxAngle: 60
140133
141134 onClicked: {
142− root.applicationSelected(launcherModel.get(index).desktopFile);
135+ // First/last item do the scrolling at more than 12 degrees
136+ if (index == 0 || index == launcherListView.count -1) {
137+ if (angle > 12) {
138+ launcherListView.flick(0, -launcherListView.clickFlickSpeed);
139+ } else if (angle < -12) {
140+ launcherListView.flick(0, launcherListView.clickFlickSpeed);
141+ } else {
142+ root.applicationSelected(launcherModel.get(index).desktopFile);
143+ }
144+ return;
145+ }
146+
147+ // the rest launches apps up to an angle of 30 degrees
148+ if (angle > 30) {
149+ launcherListView.flick(0, -launcherListView.clickFlickSpeed);
150+ } else if (angle < -30) {
151+ launcherListView.flick(0, launcherListView.clickFlickSpeed);
152+ } else {
153+ root.applicationSelected(launcherModel.get(index).desktopFile);
154+ }
143155 }
144156 }
145157
@@ -151,9 +163,9 @@ Item {
151163 top: parent.top
152164 topMargin: launcherListView.topMargin
153165 }
154− height: launcherListView.itemSize
166+ height: launcherListView.itemSize / 2
155167 enabled: launcherListView.contentY > -launcherListView.topMargin
156− onClicked: launcherListView.flick(0, units.gu(40))
168+ onClicked: launcherListView.flick(0, launcherListView.clickFlickSpeed)
157169 }
158170
159171 MouseArea {
@@ -164,9 +176,9 @@ Item {
164176 bottom: parent.bottom
165177 bottomMargin: launcherListView.bottomMargin
166178 }
167− height: launcherListView.itemSize
179+ height: launcherListView.itemSize / 2
168180 enabled: launcherListView.contentHeight - launcherListView.height - launcherListView.contentY > -launcherListView.bottomMargin
169− onClicked: launcherListView.flick(0, -units.gu(40))
181+ onClicked: launcherListView.flick(0, -launcherListView.clickFlickSpeed)
170182 }
171183 }
172184 }
Panel/IndicatorsDataModel.qml+2−2
@@ -48,14 +48,14 @@ Indicators.IndicatorsModel {
4848 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/NetworkIndicatorWidget.qml',
4949 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/NetworkIndicatorPage.qml'
5050 },
51− 'indicator-power' : {
51+ 'indicator-battery' : {
5252 'title': 'Battery',
5353 'description' : '',
5454 'priority': 40,
5555 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorWidget.qml',
5656 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorPage.qml'
5757 },
58− 'indicator-datetime' : {
58+ 'indicator-time' : {
5959 'title': 'Date and Time',
6060 'description' : '',
6161 'priority': 100,
debian/changelog+98−2
@@ -1,9 +1,105 @@
1−unity8 (7.81.3-0ubuntu1) UNRELEASED; urgency=low
1+unity8 (7.81.3+13.10.20130708ubuntu.unity.next-0ubuntu1) saucy; urgency=low
22
3+ [ Michael Terry ]
4+ * Ensure the past circle animations complete Currently, all the
5+ animations stop as soon as the present circles are all visible. This
6+ change ensures that the animations run to completion.
7+
8+ [ Michael Zanetti ]
9+ * improve launcher flicking bahavior - fix initial snapping - improve
10+ foldingAreas behavior - increase clickFlick speed to flick 4 items.
11+
12+ [ Albert Astals ]
13+ * Remove workarounds for Qt bug 28403 . (LP: #28403)
14+
15+ [ Ubuntu daily release ]
16+ * Automatic snapshot from revision 83 (ubuntu-unity/next)
17+
18+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 08 Jul 2013 02:34:23 +0000
19+
20+unity8 (7.81.3+13.10.20130704ubuntu.unity.next-0ubuntu1) saucy; urgency=low
21+
22+ [ Didier Roche ]
323 * Clean packaging for entering saucy and following daily release guidelines
424 * Automatic snapshot from revision 49 (bootstrap)
525
6− -- Didier Roche <didrocks@ubuntu.com> Wed, 26 Jun 2013 11:01:09 +0200
26+ [ Michał Sawicz ]
27+ * Fix unity8.pot file.
28+ * Support the simplified theming from ubuntu-ui-toolkit.
29+ * Use AbstractButtons instead of Button { color: "transparent" } that
30+ doesn't work.
31+
32+ [ Albert Astals ]
33+ * ListViewWithPageHeader implementation in C++. (LP: #1171918)
34+ * LVWPH: Do not crash on showHeader if we don't have a header .
35+ * Fix bug when setting the same model twice to a QLimitProxyModelQML.
36+ * Add some const & Saves us some microseconds in copying stuff.
37+
38+ [ Daniel d'Andrada ]
39+ * Make Greeter and Stage use the new DragHandle component. So they no
40+ longer use Revealers. Now a directional drag gesture is required to
41+ start the animation that brings back a "minimized" application when
42+ the dash is on foreground. Besides that, now they have the following
43+ feature:  - Action only completes succesfully if you drag through at
44+ least half the    screen width or if your swipe is fast enough. The
45+ shorter the swipe, the faster it has to be for the action to auto-
46+ complete.
47+ * DirectionalDragArea: add touchSceneX, touchSceneY, and sceneDistance
48+ properties.
49+ * DirectionalDragArea: emit draggingChanged() on direct recognition
50+ draggingChanged() should be emited when status change from
51+ WaitingForTouch directly to Recognized.
52+ * update CODING instructions for building & running.
53+ * DragHandle: add stretch and hintDisplacement properties.
54+ * DragHandle: fix hinting Revision 64 had a bad interaction with
55+ revision 66 (that added line was lost in the merge/rebase process).
56+ tst_DragHandle::hintingAnimation() points out the problem (fails on
57+ line 388).
58+ * Make Panel use DragHandles instead of a Revealer - A directional
59+ drag gesture is needed reveal the panel when fullscreen. - better
60+ logic for deciding when to auto-complete the show/hide animation -
61+ hinting animation to close the panel - Tapping on menu bar no longer
62+ opens nearest indicator menu - No closing with handle click.
63+
64+ [ mhall119 ]
65+ * Fix build script error from extra blank line. (LP: #1196322)
66+
67+ [ Nick Dedekind ]
68+ * Changed shellImportPath to return a list of paths. Added
69+ prependImportPaths and changed appendImportPaths to check for
70+ duplicates.
71+
72+ [ Mirco Müller ]
73+ * Added support and tests for expanding snap-decisions with more than
74+ 2 actions passed in.
75+
76+ [ Michael Zanetti ]
77+ * As requested by design, decreasing wobblyness in the
78+ WrongPasswordAnimation.
79+ * improve the bzr commit hook - don't run qmltests in here, it takes
80+ too long - don't abort commit on failed tests, its too annoying -
81+ instead, print a fat warning and backup the commit message to be
82+ reused after uncommitting and fixing the tests.
83+ * edge hinting tweaks - change edge hinting behavior to only happen on
84+ onPressed and immediately snap back - fix edge hinting to not happen
85+ if the Greeter is locked .
86+
87+ [ Michael Terry ]
88+ * Fix "Tap to Unlock" text not appearing when in tablet greeter mode
89+ with only one user.
90+ * Use libusermetrics to provide infographic data.
91+ * Delete builddir/ when running "debuild clean".
92+
93+ [ Pawel Stolowski ]
94+ * Bindings for preview and activation requests.
95+
96+ [ Kevin Gunn ]
97+ * update CODING instructions for building & running.
98+
99+ [ Ubuntu daily release ]
100+ * Automatic snapshot from revision 78 (ubuntu-unity/next)
101+
102+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 04 Jul 2013 12:44:19 +0000
7103
8104unity8 (7.81.3) UNRELEASED; urgency=low
9105
debian/control+23−20
@@ -4,12 +4,12 @@ Priority: optional
44Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
55Build-Depends: cmake,
66 debhelper (>= 9),
7− libjson-perl,
87 libdee-qt5-dev (>= 3.0),
98 libgl1-mesa-dev[!armhf] | libgl-dev[!armhf],
109 libgl1-mesa-dri,
1110 libgles2-mesa-dev[armhf],
1211 libhud-client2-dev,
12+ libjson-perl,
1313 libnm-glib-dev,
1414 libnm-util-dev,
1515 libpulse-dev,
@@ -17,12 +17,13 @@ Build-Depends: cmake,
1717 libqt5v8-5-private-dev,
1818 libunity-core-6.0-dev (<< 7.80),
1919 libunity-dev (>= 7.0.3),
20+ libunity-scopes-json-def-phone,
2021 libusermetricsoutput1-dev,
2122 libxcb1-dev,
2223 pkg-config,
23− python3,
2424 python (>= 2.7),
2525 python-setuptools,
26+ python3,
2627 qt5-default,
2728 qtbase5-dev,
2829 qtbase5-private-dev,
@@ -33,8 +34,7 @@ Build-Depends: cmake,
3334 qtdeclarative5-test-plugin,
3435 qtdeclarative5-ubuntu-ui-toolkit-plugin,
3536 qtdeclarative5-xmllistmodel-plugin,
36− ttf-ubuntu-font-family,
37− libunity-scopes-json-def-phone,
37+ ttf-ubuntu-font-family
3838Standards-Version: 3.9.4
3939Homepage: http://launchpad.net/unity
4040# If you aren't a member of ~unity-team but need to upload
@@ -45,17 +45,22 @@ Vcs-Browser: https://bazaar.launchpad.net/~unity-team/unity8/trunk
4545
4646Package: unity8
4747Architecture: any
48−Depends: ${misc:Depends},
49− ${shlibs:Depends},
50− unity8-private (= ${binary:Version}),
51− qmenumodel-qml,
48+Depends: qmenumodel-qml,
5249 qtdeclarative5-dee-plugin,
5350 qtdeclarative5-ubuntu-ui-toolkit-plugin,
5451 qtdeclarative5-unity-notifications-plugin | unity-notifications-impl,
55− unity-notifications-impl-1,
5652 qtdeclarative5-xmllistmodel-plugin,
53+ unity-notifications-impl-1,
5754 unity8-fake-env | qtubuntu-shell,
58−Recommends: ${unity-default-masterscopes},
55+ unity8-private (= ${binary:Version}),
56+ ${misc:Depends},
57+ ${shlibs:Depends}
58+Recommends: indicator-battery,
59+ indicator-messages,
60+ indicator-network,
61+ indicator-sound,
62+ indicator-time,
63+ ${unity-default-masterscopes}
5964Description: Unity 8 shell
6065 The Unity 8 shell is the primary user interface for Ubuntu devices.
6166
@@ -63,8 +68,7 @@ Package: unity8-private
6368Architecture: any
6469Multi-Arch: same
6570Pre-Depends: ${misc:Pre-Depends}
66−Depends: ${misc:Depends},
67− ${shlibs:Depends},
71+Depends: ${misc:Depends}, ${shlibs:Depends}
6872Description: Unity 8 private libs
6973 The Unity 8 shell is the primary user interface for Ubuntu devices.
7074 .
@@ -75,9 +79,8 @@ Package: unity8-fake-env
7579Architecture: any
7680Multi-Arch: same
7781Pre-Depends: ${misc:Pre-Depends}
78−Depends: ${misc:Depends},
79− ${shlibs:Depends},
80−Provides: qtubuntu-shell,
82+Depends: ${misc:Depends}, ${shlibs:Depends}
83+Provides: qtubuntu-shell
8184Description: Fake environment for running Unity 8 shell
8285 Provides fake implementations of some QML modules used by Unity 8 shell
8386 (e.g Ubuntu.Application) so that you can run it in a sandboxed environment.
@@ -88,21 +91,21 @@ Depends: qmenumodel-qml,
8891 qtdeclarative5-ubuntu-ui-toolkit-plugin | qt-components-ubuntu,
8992 unity8 (= ${binary:Version}),
9093 ${misc:Depends},
91− ${shlibs:Depends},
94+ ${shlibs:Depends}
9295Description: Indicators client test application
9396 This package contains the client application for indicators used by autopilot
9497
9598Package: unity8-autopilot
9699Architecture: all
97−Depends: ${misc:Depends},
98− ${shlibs:Depends},
99− ${python:Depends},
100− indicators-client (>= ${source:Version}),
100+Depends: indicators-client (>= ${source:Version}),
101101 libautopilot-qt,
102102 libqt5test5,
103103 libqt5widgets5,
104104 python-evdev,
105105 unity8 (>= ${source:Version}),
106106 unity8-fake-env (>= ${source:Version}),
107+ ${misc:Depends},
108+ ${python:Depends},
109+ ${shlibs:Depends}
107110Description: Test package for Unity 8 shell
108111 Autopilot tests for the unity8 package
debian/unity8-autopilot.install+1−1
@@ -1,2 +1,2 @@
1−usr/lib/python*/*/unity*
21usr/lib/python*/*/indicators_client
2+usr/lib/python*/*/unity*
plugins/Unity/Indicators/Network/qml/PasswordTextField.qml+1−1
@@ -44,7 +44,7 @@ Item {
4444 }
4545
4646 placeholderText: "Password"
47− echoMode: showPassword.checked ? TextInput.Password : TextInput.Normal
47+ echoMode: showPassword.checked ? TextInput.Normal : TextInput.Password
4848 }
4949
5050 Row {
po/is.podeleted−220
@@ -1,220 +0,0 @@
1−# Icelandic translation for unity
2−# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
3−# This file is distributed under the same license as the unity package.
4−# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
5−#
6−msgid ""
7−msgstr ""
8−"Project-Id-Version: unity\n"
9−"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2013-06-26 22:58+0200\n"
11−"PO-Revision-Date: 2013-07-01 02:39+0000\n"
12−"Last-Translator: Andri Thorlacius <Unknown>\n"
13−"Language-Team: Icelandic <is@li.org>\n"
14−"MIME-Version: 1.0\n"
15−"Content-Type: text/plain; charset=UTF-8\n"
16−"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-02 07:01+0000\n"
18−"X-Generator: Launchpad (build 16692)\n"
19−
20−#: Applications/applications.js:23
21−msgid "Phone"
22−msgstr "Sími"
23−
24−#: Applications/applications.js:29
25−msgid "Camera"
26−msgstr "Myndavél"
27−
28−#: Applications/applications.js:35
29−msgid "Gallery"
30−msgstr "Myndasafn"
31−
32−#: Applications/applications.js:40
33−msgid "Facebook"
34−msgstr "Facebook"
35−
36−#: Applications/applications.js:46
37−msgid "Browser"
38−msgstr "Vafri"
39−
40−#: Applications/applications.js:51
41−msgid "Twitter"
42−msgstr "Twitter"
43−
44−#: Applications/applications.js:57
45−msgid "GMail"
46−msgstr "GMail"
47−
48−#: Applications/applications.js:62
49−msgid "Weather"
50−msgstr "Veður"
51−
52−#: Applications/applications.js:68
53−msgid "Notepad"
54−msgstr "Skrifblokk"
55−
56−#: Applications/applications.js:74
57−msgid "Calendar"
58−msgstr "Dagatal"
59−
60−#: Applications/applications.js:80
61−msgid "Media Player"
62−msgstr "Margmiðlunarspilari"
63−
64−#: Applications/applications.js:86
65−msgid "Evernote"
66−msgstr "Evernote"
67−
68−#: Applications/applications.js:91
69−msgid "Map"
70−msgstr "Kort"
71−
72−#: Applications/applications.js:96
73−msgid "Pinterest"
74−msgstr "Pinterest"
75−
76−#: Applications/applications.js:101
77−msgid "SoundCloud"
78−msgstr "SoundCloud"
79−
80−#: Applications/applications.js:106
81−msgid "Wikipedia"
82−msgstr "Wikipedia"
83−
84−#: Applications/applications.js:111
85−msgid "YouTube"
86−msgstr "YouTube"
87−
88−#: Components/PageHeader.qml:300
89−msgid "Recent searches"
90−msgstr "Nýlegar leitir"
91−
92−#: Dash/DashApps.qml:65
93−msgid "Running apps"
94−msgstr "Forrit í gangi"
95−
96−#: Dash/DashApps.qml:68
97−msgid "Frequently used"
98−msgstr "Oft notað"
99−
100−#: Dash/DashApps.qml:71
101−msgid "Installed"
102−msgstr "Uppsett"
103−
104−#: Dash/DashApps.qml:74
105−msgid "Available for download"
106−msgstr "Fáanlegt til niðurhals"
107−
108−#: Dash/DashApps.qml:178
109−msgid "Apps"
110−msgstr "Forrit"
111−
112−#: Dash/DashHome.qml:40
113−msgid "Frequent Apps"
114−msgstr "Margnotuð Forrit"
115−
116−#: Dash/DashHome.qml:43
117−msgid "Recent Music"
118−msgstr "Nýleg Tónlist"
119−
120−#: Dash/DashHome.qml:46
121−msgid "Videos Popular Online"
122−msgstr "Vinsæl Myndbönd á Netinu"
123−
124−#: Dash/DashHome.qml:175
125−msgid "Home"
126−msgstr "Heim"
127−
128−#: Dash/DashMusic.qml:27 Dash/DashVideos.qml:28
129−msgid "Featured"
130−msgstr "Efst á baugi"
131−
132−#: Dash/DashMusic.qml:28 Dash/DashVideos.qml:29
133−msgid "Recent"
134−msgstr "Nýlegt"
135−
136−#: Dash/DashMusic.qml:29 Dash/DashVideos.qml:30
137−msgid "New Releases"
138−msgstr "Nýjar Útgáfur"
139−
140−#: Dash/DashMusic.qml:30
141−msgid "Top Charting"
142−msgstr "Topp Listi"
143−
144−#: Dash/DashMusic.qml:99
145−msgid "Music"
146−msgstr "Tónlist"
147−
148−#: Dash/DashVideos.qml:31
149−msgid "Popular Online"
150−msgstr "Vinsælt á Netinu"
151−
152−#: Dash/DashVideos.qml:155
153−msgid "Videos"
154−msgstr "Myndbönd"
155−
156−#: Dash/Video/VideoPreview.qml:98
157−msgid "Directed by:"
158−msgstr "Leikstýrt af:"
159−
160−#: Dash/Video/VideoPreview.qml:121
161−msgid "Starring:"
162−msgstr "Meðal leikara eru:"
163−
164−#: Dash/Video/VideoPreview.qml:144
165−msgid "Author:"
166−msgstr "Höfundur:"
167−
168−#: Greeter/Lockscreen.qml:133
169−msgid "Emergency call"
170−msgstr "Neyðar símtal"
171−
172−#: Greeter/PassphraseLockscreen.qml:59
173−#, qt-format
174−msgid "Hello %1"
175−msgstr "Hæ %1"
176−
177−#: Greeter/PassphraseLockscreen.qml:59
178−msgid "Hello"
179−msgstr "Hæ"
180−
181−#: Hud/HudParametrizedActionsPage.qml:132
182−msgid "Confirm"
183−msgstr "Staðfesta"
184−
185−#: Hud/Hud.qml:61 Hud/Hud.qml:99 Hud/Hud.qml:372
186−msgid "Type or say a command"
187−msgstr "Skrifaðu eða segðu eitthvað"
188−
189−#: Hud/Hud.qml:84
190−msgid "Loading. Please Wait..."
191−msgstr "Hleð. Vinsamlegast Bíðið..."
192−
193−#: Hud/Hud.qml:89
194−msgid "Speak Now..."
195−msgstr "Talaðu Núna..."
196−
197−#: Hud/Hud.qml:94
198−msgid "Speaking..."
199−msgstr "Tala..."
200−
201−#: Panel/MenuContent.qml:192
202−msgid "Device"
203−msgstr "Tæki"
204−
205−#: Panel/Menus/Overview/FlightModeWidget.qml:42
206−msgid "Flight mode"
207−msgstr "Flug hamur"
208−
209−#: Panel/SearchIndicator.qml:26
210−msgid "Search"
211−msgstr "Leita"
212−
213−#: plugins/Unity/scope.cpp:268
214−msgid "Sorry, there is nothing that matches your search."
215−msgstr "Því miður, það var ekkert sem passaði við leitarorðið þitt."
216−
217−#: Shell.qml:383
218−#, qt-format
219−msgid "Please enter %1"
220−msgstr "Vinsamlegast sláðu inn %1"
po/sl.po+11−17
@@ -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: 2013-06-26 22:58+0200\n"
11−"PO-Revision-Date: 2013-06-29 10:26+0000\n"
11+"PO-Revision-Date: 2013-07-02 12:59+0000\n"
1212"Last-Translator: Damir Jerovšek <Unknown>\n"
1313"Language-Team: Slovenian <sl@li.org>\n"
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-06-30 07:12+0000\n"
18−"X-Generator: Launchpad (build 16692)\n"
17+"X-Launchpad-Export-Date: 2013-07-06 08:44+0000\n"
18+"X-Generator: Launchpad (build 16696)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
@@ -23,7 +23,7 @@ msgstr "Telefon"
2323
2424#: Applications/applications.js:29
2525msgid "Camera"
26−msgstr "Fotoaparat"
26+msgstr ""
2727
2828#: Applications/applications.js:35
2929msgid "Gallery"
@@ -111,7 +111,7 @@ msgstr "Programi"
111111
112112#: Dash/DashHome.qml:40
113113msgid "Frequent Apps"
114−msgstr ""
114+msgstr "Pogosto uporabljani programi"
115115
116116#: Dash/DashHome.qml:43
117117msgid "Recent Music"
@@ -127,7 +127,7 @@ msgstr "Domov"
127127
128128#: Dash/DashMusic.qml:27 Dash/DashVideos.qml:28
129129msgid "Featured"
130−msgstr ""
130+msgstr "Predstavljeno"
131131
132132#: Dash/DashMusic.qml:28 Dash/DashVideos.qml:29
133133msgid "Recent"
@@ -139,7 +139,7 @@ msgstr "Nove izdaje"
139139
140140#: Dash/DashMusic.qml:30
141141msgid "Top Charting"
142−msgstr ""
142+msgstr "Najvišje na lestvici"
143143
144144#: Dash/DashMusic.qml:99
145145msgid "Music"
@@ -147,7 +147,7 @@ msgstr "Glasba"
147147
148148#: Dash/DashVideos.qml:31
149149msgid "Popular Online"
150−msgstr ""
150+msgstr "Priljubljeno na spletu"
151151
152152#: Dash/DashVideos.qml:155
153153msgid "Videos"
@@ -163,7 +163,7 @@ msgstr ""
163163
164164#: Dash/Video/VideoPreview.qml:144
165165msgid "Author:"
166−msgstr "Avtor:"
166+msgstr ""
167167
168168#: Greeter/Lockscreen.qml:133
169169msgid "Emergency call"
@@ -176,7 +176,7 @@ msgstr "Pozdravljeni, %1"
176176
177177#: Greeter/PassphraseLockscreen.qml:59
178178msgid "Hello"
179−msgstr "Pozdravljeni"
179+msgstr ""
180180
181181#: Hud/HudParametrizedActionsPage.qml:132
182182msgid "Confirm"
@@ -217,10 +217,4 @@ msgstr "Nič se ne ujema z vašim iskalnim nizom."
217217#: Shell.qml:383
218218#, qt-format
219219msgid "Please enter %1"
220−msgstr "Vnesite %1"
221−
222−#~ msgid "People"
223−#~ msgstr "Ljudje"
224−
225−#~ msgid "Home screen"
226−#~ msgstr "Domači zaslon"
220+msgstr ""
src/Panel/Indicators/client/indicatorsclient.cpp+17
@@ -35,6 +35,22 @@ void prependImportPaths(QQmlEngine *engine, const QStringList &paths)
3535 engine->setImportPathList(importPathList);
3636}
3737
38+/* When you append and import path to the list of import paths it will be the *last*
39+ place where Qt will search for QML modules.
40+ The usual QQmlEngine::addImportPath() actually prepends the given path.*/
41+void appendImportPaths(QQmlEngine *engine, const QStringList &paths)
42+{
43+ QStringList importPathList = engine->importPathList();
44+ Q_FOREACH(const QString& path, paths) {
45+ // don't duplicate
46+ QStringList::iterator iter = qFind(importPathList.begin(), importPathList.end(), path);
47+ if (iter == importPathList.end()) {
48+ importPathList.append(path);
49+ }
50+ }
51+ engine->setImportPathList(importPathList);
52+}
53+
3854IndicatorsClient::IndicatorsClient(int &argc, char **argv)
3955 : QObject(0),
4056 m_view(0)
@@ -56,6 +72,7 @@ void IndicatorsClient::setupUI()
5672 m_view = new QQuickView;
5773 m_view->engine()->setBaseUrl(QUrl::fromLocalFile(::shellAppDirectory()+"Panel/Indicators/client/"));
5874 prependImportPaths(m_view->engine(), ::overrideImportPaths());
75+ appendImportPaths(m_view->engine(), ::fallbackImportPaths());
5976
6077 m_view->setSource(QUrl("IndicatorsClient.qml"));
6178 m_view->setResizeMode(QQuickView::SizeRootObjectToView);
src/Panel/Indicators/servicefiles/com.canonical.indicator.battery+1−1
@@ -1,5 +1,5 @@
11[Indicator Service]
2−Name=indicator-power
2+Name=indicator-battery
33ObjectPath=/com/canonical/indicator/battery
44
55[phone]
src/Panel/Indicators/servicefiles/com.canonical.indicator.time+1−1
@@ -1,5 +1,5 @@
11[Indicator Service]
2−Name=indicator-datetime
2+Name=indicator-time
33ObjectPath=/com/canonical/indicator/time
44
55[phone]
tests/autopilot/indicators_client/emulators/main_window.py+3−3
@@ -24,6 +24,6 @@ class MainWindow(object):
2424 """Get the page stack"""
2525 return self.app.select_single("PageStack")
2626
27− def get_power_menu(self):
28− """Get the power menu from the list"""
29− return self.app.select_single("BasicMenuItem", objectName="indicator-power");
27+ def get_battery_menu(self):
28+ """Get the battery menu from the list"""
29+ return self.app.select_single("BasicMenuItem", objectName="indicator-battery");
tests/autopilot/indicators_client/tests/test_power.py → tests/autopilot/indicators_client/tests/test_battery.pyrenamed+2−2
@@ -21,8 +21,8 @@ class TestDisplayMenus(IndicatorsTestCase):
2121
2222 # This opens the messaging menu so you don't have to do that in
2323 # every test case
24− power = self.main_window.get_power_menu()
25− self.pointing_device.move_to_object(power)
24+ battery_menu = self.main_window.get_battery_menu()
25+ self.pointing_device.move_to_object(battery_menu)
2626 self.pointing_device.click()
2727
2828 self.page = self.app.select_single("IndicatorsPage");
tests/qmltests/Launcher/tst_Launcher.qml+114−34
@@ -23,20 +23,21 @@ import "../../../Launcher"
2323/* Nothing is shown at first. If you drag from left edge you will bring up the
2424 launcher. */
2525Item {
26+ id: root
2627 width: units.gu(50)
27− height: units.gu(81)
28+ height: units.gu(55)
2829
2930 Launcher {
3031 id: launcher
3132 x: 0
3233 y: 0
3334 width: units.gu(40)
34− height: units.gu(81)
35+ height: parent.height
3536
36− property string latestApplicationSelected
37+ property string lastSelectedApplication
3738
3839 onLauncherApplicationSelected: {
39− latestApplicationSelected = desktopFile
40+ lastSelectedApplication = desktopFile
4041 }
4142
4243 property int dashItemSelected_count: 0
@@ -57,10 +58,34 @@ Item {
5758 }
5859 }
5960
61+ UT.UnityTestCase {
62+ id: revealer
63+
64+ function dragLauncherIntoView() {
65+ var startX = launcher.dragAreaWidth/2;
66+ var startY = launcher.height/2;
67+ touchFlick(launcher,
68+ startX, startY,
69+ startX+units.gu(8), startY);
70+
71+ var panel = findChild(launcher, "launcherPanel");
72+ verify(panel != undefined);
73+
74+ // wait until it gets fully extended
75+ tryCompare(panel, "x", 0);
76+ tryCompare(launcher, "state", "visible");
77+ }
78+
79+ function waitUntilLauncherDisappears() {
80+ var panel = findChild(launcher, "launcherPanel");
81+ tryCompare(panel, "x", -panel.width, 1000);
82+ }
83+ }
84+
6085 UT.UnityTestCase {
6186 id: testCase
6287 name: "Launcher"
63− when: windowShown
88+ when: windowShown && initTestCase.completed
6489
6590 // Drag from the left edge of the screen rightwards and check that the launcher
6691 // appears (as if being dragged by the finger/pointer)
@@ -71,7 +96,7 @@ Item {
7196 // it starts out hidden just left of the left launcher edge
7297 compare(panel.x, -panel.width)
7398
74− dragLauncherIntoView()
99+ revealer.dragLauncherIntoView()
75100
76101 // tapping on the center of the screen should dismiss the launcher
77102 mouseClick(launcher, launcher.width/2, launcher.height/2)
@@ -85,20 +110,25 @@ Item {
85110 corresponding desktop file. E.g. clicking on phone icon should yield
86111 launcherApplicationSelected("[...]phone-app.desktop") */
87112 function test_clickingOnAppIconCausesSignalEmission() {
88− launcher.latestApplicationSelected = ""
113+ launcher.lastSelectedApplication = ""
89114
90− dragLauncherIntoView()
115+ revealer.dragLauncherIntoView()
116+
117+ var listView = findChild(launcher, "launcherListView");
118+ listView.flick(0, units.gu(500));
119+ tryCompare(listView, "flicking", false);
91120
92121 var appIcon = findChild(launcher, "launcherDelegate0")
122+
93123 verify(appIcon != undefined)
94124
95125 mouseClick(appIcon, appIcon.width/2, appIcon.height/2)
96126
97− tryCompare(launcher, "latestApplicationSelected",
127+ tryCompare(launcher, "lastSelectedApplication",
98128 "/usr/share/applications/phone-app.desktop")
99129
100130 // Tapping on an application icon also dismisses the launcher
101− waitUntilLauncherDisappears()
131+ revealer.waitUntilLauncherDisappears()
102132 }
103133
104134 /* If I click on the dash icon on the launcher
@@ -106,7 +136,7 @@ Item {
106136 function test_clickingOnDashIconCausesSignalEmission() {
107137 launcher.dashItemSelected_count = 0
108138
109− dragLauncherIntoView()
139+ revealer.dragLauncherIntoView()
110140
111141 var dashIcon = findChild(launcher, "dashItem")
112142 verify(dashIcon != undefined)
@@ -116,30 +146,9 @@ Item {
116146 tryCompare(launcher, "dashItemSelected_count", 1)
117147
118148 // Tapping on the dash icon also dismisses the launcher
119− waitUntilLauncherDisappears()
120− }
121−
122− function dragLauncherIntoView() {
123− var startX = launcher.dragAreaWidth/2
124− var startY = launcher.height/2
125− touchFlick(launcher,
126− startX, startY,
127− startX+units.gu(8), startY)
128−
129− var panel = findChild(launcher, "launcherPanel")
130− verify(panel != undefined)
131−
132− // wait until it gets fully extended
133− tryCompare(panel, "x", 0)
134− tryCompare(launcher, "state", "visible")
135− }
136−
137− function waitUntilLauncherDisappears() {
138− var panel = findChild(launcher, "launcherPanel")
139− tryCompare(panel, "x", -panel.width, 1000)
149+ revealer.waitUntilLauncherDisappears()
140150 }
141151
142−
143152 function test_teaseLauncher_data() {
144153 return [
145154 {tag: "available", available: true},
@@ -164,7 +173,78 @@ Item {
164173 wait(100)
165174 compare(launcher.maxPanelX, -launcher.panelWidth, "Launcher moved even if it shouldn't")
166175 }
167− waitUntilLauncherDisappears();
176+ revealer.waitUntilLauncherDisappears();
177+ launcher.available = true;
178+ }
179+ }
180+
181+ UT.UnityTestCase {
182+ id: clickFlickTestCase
183+ when: windowShown && testCase.completed
184+
185+ function test_clickFlick_data() {
186+ var listView = findChild(launcher, "launcherListView");
187+ return [
188+ {tag: "unfolded top", flickSpeed: units.gu(200), clickY: listView.topMargin + units.gu(2), expectFlick: false},
189+ {tag: "folded top", flickSpeed: -units.gu(200), clickY: listView.topMargin + units.gu(2), expectFlick: true},
190+ {tag: "unfolded bottom", flickSpeed: -units.gu(200), clickY: listView.height - listView.topMargin - units.gu(1), expectFlick: false},
191+ {tag: "folded bottom", flickSpeed: units.gu(200), clickY: listView.height - listView.topMargin - units.gu(1), expectFlick: true},
192+ ];
193+ }
194+
195+ function test_clickFlick(data) {
196+ launcher.lastSelectedApplication = "";
197+ revealer.dragLauncherIntoView();
198+ var listView = findChild(launcher, "launcherListView");
199+
200+ listView.flick(0, data.flickSpeed);
201+ tryCompare(listView, "flicking", false);
202+
203+ var oldY = listView.contentY;
204+
205+ mouseClick(listView, listView.width / 2, data.clickY);
206+ tryCompare(listView, "flicking", false);
207+
208+ if (data.expectFlick) {
209+ verify(listView.contentY != oldY);
210+ compare(launcher.lastSelectedApplication, "", "Launcher app clicked signal emitted even though it should only flick");
211+ } else {
212+ verify(launcher.lastSelectedApplication != "");
213+ compare(listView.contentY, oldY, "Launcher was flicked even though it should only launch an app");
214+ }
215+
216+ // Restore position on top
217+ listView.flick(0, units.gu(200));
218+ tryCompare(listView, "flicking", false)
219+ // Click somewhere in the empty space to make it hide in case it isn't
220+ mouseClick(launcher, launcher.width - units.gu(1), units.gu(1));
221+ revealer.waitUntilLauncherDisappears();
222+ }
223+ }
224+
225+ UT.UnityTestCase {
226+ id: initTestCase
227+ name: "LauncherInit"
228+ when: windowShown
229+
230+ /*
231+ * FIXME: There is a bug in ListView which makes it snap to an item
232+ * instead of the edge at startup. Enable this test once our patch for
233+ * ListView has landed upstream.
234+ * https://bugreports.qt-project.org/browse/QTBUG-32251
235+
236+ function test_initFirstUnfolded() {
237+
238+ // Make sure noone changed the height of the window. The issue this test case
239+ // is verifying only happens on certain heights of the Launcher
240+ compare(root.height, units.gu(55));
241+
242+ var listView = findChild(launcher, "launcherListView");
243+ compare(listView.contentY, -listView.topMargin, "Launcher did not start up with first item unfolded");
244+
245+ // Now do check that snapping is in fact enabled
246+ compare(listView.snapMode, ListView.SnapToItem, "Snapping is not enabled");
168247 }
248+ */
169249 }
170250}