on xenial help sign in
Merge from trunk
commit2b5d9df3e28de4db4ac536929073d83f52d9fc15 authorMichael Terry <michael.terry@canonical.com> dateWed 30 Oct 2013, 10:02 (13 years ago) parent5f45971ea02059
30 files changed+622−168
Components/Carousel.qml+5−4 Dash/Apps/FrequentlyUsedAppsModel.qml+16−16 Dash/DashPreview.qml+8 Dash/Generic/GenericPreview.qml+4−1 Dash/GenericScopeView.qml+7 Notifications/Notification.qml+2−1 data/unity8-setcap.conf−32 debian/changelog+115−2 debian/unity8-fake-env.install+1 debian/unity8.install−1 debian/unity8.maintscript+1 plugins/Unity/scope.cpp+10−1 plugins/Unity/scope.h+1 plugins/Unity/variantutils.cpp+31 plugins/Unity/variantutils.h+3−1 po/ar.po+33−44 po/de.po+11−28 po/ta.po+229 po/uk.po+6−25 tests/autopilot/unity8/__init__.py+46−1 tests/autopilot/unity8/shell/tests/__init__.py+8 tests/autopilot/unity8/shell/tests/test_notifications.py+10−9 tests/mocks/CMakeLists.txt+5 tests/mocks/data/applications/camera-app.desktop tests/plugins/Unity/resultstest.cpp+52 tests/plugins/Unity/resultstest.h+2 tests/qmltests/Dash/Apps/tst_AppPreview.qml+3−2 tests/qmltests/Dash/Movie/tst_MoviePreview.qml+1 tests/qmltests/Dash/tst_GenericPreview.qml+1 tests/qmltests/Dash/tst_GenericScopeView.qml+11
Components/Carousel.qml+5−4
@@ -72,7 +72,7 @@ Item {
7272 id: listView
7373
7474 property real minimumTileWidth: 0
75− property real newContentX: -1
75+ property real newContentX: disabledNewContentX
7676 property real pathItemCount: referenceWidth / referenceTileWidth
7777 property real tileAspectRatio: 1
7878
@@ -100,6 +100,7 @@ Item {
100100 readonly property real kMiddleIndex: (realWidth / 2) / tileWidth - 0.5
101101 readonly property real kXBeginningEnd: 1 / tileWidth + kMiddleIndex / gapToMiddlePhase
102102 readonly property real maximumItemTranslation: (listView.tileWidth * 3) / listView.scaleFactor
103+ readonly property real disabledNewContentX: -carousel.drawBuffer - 1
103104 readonly property real realContentWidth: contentWidth - 2 * carousel.drawBuffer
104105 readonly property real realContentX: contentX + carousel.drawBuffer
105106 readonly property real realPathItemCount: Math.min(realWidth / tileWidth, pathItemCount)
@@ -192,7 +193,7 @@ Item {
192193 onMovementStarted: {
193194 stepAnimation.stop()
194195 newContentXAnimation.stop()
195− newContentX = -1
196+ newContentX = disabledNewContentX
196197 }
197198 onMovementEnded: {
198199 if (realContentX > 0 && realContentX < realContentWidth - realWidth)
@@ -228,7 +229,7 @@ Item {
228229 easing.type: Easing.InOutQuad
229230 }
230231 ScriptAction {
231− script: listView.newContentX = -1
232+ script: listView.newContentX = listView.disabledNewContentX
232233 }
233234 }
234235
@@ -253,7 +254,7 @@ Item {
253254 readonly property bool explicitScale: (!listView.moving ||
254255 listView.realContentX <= 0 ||
255256 listView.realContentX >= listView.realContentWidth - listView.realWidth) &&
256− listView.newContentX < 0 &&
257+ listView.newContentX === listView.disabledNewContentX &&
257258 index === listView.selectedIndex
258259 readonly property real cachedTiles: listView.realPathItemCount + carousel.drawBuffer / listView.tileWidth
259260 readonly property real distance: listView.continuousIndex - index
Dash/Apps/FrequentlyUsedAppsModel.qml+16−16
@@ -18,54 +18,54 @@ import QtQuick 2.0
1818
1919ListModel {
2020 ListElement {
21− uri: "application:///usr/share/applications/dialer-app.desktop"
21+ uri: "application://dialer-app.desktop"
2222 icon: "../../graphics/applicationIcons/phone-app.png"
2323 category: 0
2424 mimetype: "application/x-desktop"
2525 title: "Dialer"
2626 comment: ""
2727 dndUri: "file:///usr/share/applications/dialer-app.desktop"
28− metadata: ""
28+ metadata: "subscope:applications.scope/applications-non-click.scope"
2929 }
3030 ListElement {
31− uri: "application:///usr/share/applications/messaging-app.desktop"
31+ uri: "application://messaging-app.desktop"
3232 icon: "../../graphics/applicationIcons/messages-app.png"
3333 category: 0
3434 mimetype: "application/x-desktop"
3535 title: "Messaging"
3636 comment: ""
3737 dndUri: "file:///usr/share/applications/messaging-app.desktop"
38− metadata: ""
38+ metadata: "subscope:applications.scope/applications-non-click.scope"
3939 }
4040 ListElement {
41− uri: "application:///usr/share/applications/address-book-app.desktop"
41+ uri: "application://address-book-app.desktop"
4242 icon: "../../graphics/applicationIcons/contacts-app.png"
4343 category: 0
4444 mimetype: "application/x-desktop"
4545 title: "Contacts"
4646 comment: ""
4747 dndUri: "file:///usr/share/applications/address-book-app.desktop"
48− metadata: ""
48+ metadata: "subscope:applications.scope/applications-non-click.scope"
4949 }
5050 ListElement {
51− uri: "application:///usr/share/applications/camera-app.desktop"
51+ uri: "application://camera-app.desktop"
5252 icon: "../../graphics/applicationIcons/camera.png"
5353 category: 0
5454 mimetype: "application/x-desktop"
5555 title: "Camera"
5656 comment: ""
5757 dndUri: "file:///usr/share/applications/camera-app.desktop"
58− metadata: ""
58+ metadata: "subscope:applications.scope/applications-non-click.scope"
5959 }
6060 ListElement {
61− uri: "application:///usr/share/applications/gallery-app.desktop"
61+ uri: "application://gallery-app.desktop"
6262 icon: "../../graphics/applicationIcons/gallery.png"
6363 category: 0
6464 mimetype: "application/x-desktop"
6565 title: "Gallery"
6666 comment: ""
6767 dndUri: "file:///usr/share/applications/gallery.desktop"
68− metadata: ""
68+ metadata: "subscope:applications.scope/applications-non-click.scope"
6969 }
7070 ListElement {
7171 uri: "appid://com.ubuntu.developer.webapps.webapp-facebook/webapp-facebook/current-user-version"
@@ -75,17 +75,17 @@ ListModel {
7575 title: "Facebook"
7676 comment: ""
7777 dndUri: "appid://com.ubuntu.developer.webapps.webapp-facebook/webapp-facebook/current-user-version"
78− metadata: ""
78+ metadata: "subscope:applications.scope/applications-click.scope?app_id=com.ubuntu.developer.webapps.webapp-facebook"
7979 }
8080 ListElement {
81− uri: "application:///usr/share/applications/webbrowser-app.desktop"
81+ uri: "application://webbrowser-app.desktop"
8282 icon: "../../graphics/applicationIcons/browser.png"
8383 category: 0
8484 mimetype: "application/x-desktop"
8585 title: "Browser"
8686 comment: ""
8787 dndUri: "file:///usr/share/applications/webbrowser-app.desktop"
88− metadata: ""
88+ metadata: "subscope:applications.scope/applications-non-click.scope"
8989 }
9090 ListElement {
9191 uri: "appid://com.ubuntu.developer.webapps.webapp-gmail/webapp-gmail/current-user-version"
@@ -95,16 +95,16 @@ ListModel {
9595 title: "GMail"
9696 comment: ""
9797 dndUri: "appid://com.ubuntu.developer.webapps.webapp-gmail/webapp-gmail/current-user-version"
98− metadata: ""
98+ metadata: "subscope:applications.scope/applications-click.scope?app_id=com.ubuntu.developer.webapps.webapp-gmail"
9999 }
100100 ListElement {
101− uri: "application:///usr/share/applications/ubuntu-system-settings.desktop"
101+ uri: "application://ubuntu-system-settings.desktop"
102102 icon: "../../graphics/applicationIcons/system-settings.png"
103103 category: 0
104104 mimetype: "application/x-desktop"
105105 title: "System Settings"
106106 comment: ""
107107 dndUri: "file:///usr/share/applications/ubuntu-system-settings.desktop"
108− metadata: ""
108+ metadata: "subscope:applications.scope/applications-non-click.scope"
109109 }
110110}
Dash/DashPreview.qml+8
@@ -22,6 +22,7 @@ Rectangle {
2222
2323 property int keyboardSize: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
2424 property var previewData
25+ property alias showProcessingAction: waitingForActionMouseArea.enabled
2526
2627 property real previewWidthRatio: 0.5
2728
@@ -196,4 +197,11 @@ Rectangle {
196197 }
197198 sourceComponent: root.header
198199 }
200+
201+ MouseArea {
202+ id: waitingForActionMouseArea
203+ objectName: "waitingForActionMouseArea"
204+ anchors.fill: parent
205+ enabled: false
206+ }
199207}
Dash/Generic/GenericPreview.qml+4−1
@@ -71,7 +71,10 @@ DashPreview {
7171 text: modelData.displayName
7272 iconSource: modelData.iconHint
7373 iconPosition: "right"
74− onClicked: previewData.execute(modelData.id, { })
74+ onClicked: {
75+ previewData.execute(modelData.id, { })
76+ genericPreview.showProcessingAction = true;
77+ }
7578 }
7679 }
7780 }
Dash/GenericScopeView.qml+7
@@ -59,6 +59,7 @@ ScopeView {
5959 target: scopeView.scope
6060 onShowDash: previewLoader.open = false;
6161 onHideDash: previewLoader.open = false;
62+ onActivated: previewLoader.closePreviewSpinner();
6263 }
6364
6465 ScopeListView {
@@ -345,6 +346,12 @@ ScopeView {
345346 onLoaded: {
346347 item.previewData = Qt.binding(function() { return previewLoader.previewData })
347348 }
349+
350+ function closePreviewSpinner() {
351+ if(item) {
352+ item.showProcessingAction = false;
353+ }
354+ }
348355 }
349356
350357 // TODO: Move as InverseMouseArea to DashPreview
Notifications/Notification.qml+2−1
@@ -34,12 +34,13 @@ UbuntuShape {
3434 property var notification
3535
3636 objectName: "background"
37− implicitHeight: contentColumn.height + contentColumn.spacing * 2
37+ implicitHeight: type != Notification.PlaceHolder ? contentColumn.height + contentColumn.spacing * 2 : 0
3838 color: Qt.rgba(0.132, 0.117, 0.109, 0.97)
3939 opacity: 0
4040 radius: "medium"
4141
4242 clip: true
43+ visible: type != Notification.PlaceHolder
4344
4445 UnityMenuModelPaths {
4546 id: paths
data/unity8-setcap.confdeleted−32
@@ -1,32 +0,0 @@
1−# unity8-setcap - ugly hacks to arrange for /usr/bin/unity8 to have CAP_SYS_RESOURCE
2−
3−# XXX replace me with some root-helper to gain CAP_SYS_RESOURCE XXX
4−
5−author "Loïc Minier <loic.minier@ubuntu.com>"
6−description "Ugly hacks to arrange for /usr/bin/unity8 to have CAP_SYS_RESOURCE"
7−
8−# start when first boot-hooks event is emitted and before lightdm (lightdm
9−# starts ubuntu-touch-session which starts unity8); note that /run is
10−# guaranteeds to be be there because lightdm starts on filesystem
11−start on boot-hooks and starting lightdm
12−
13−# NOT a task as otherwise this would block restarting lightdm
14−
15−env RUNDIR=/run/unity8-setcap
16−
17−# work needs to be done in pre-start as this really is a job with nothing to
18−# start
19−pre-start script
20− if [ ! -e "$RUNDIR" ]; then
21− mkdir "$RUNDIR"
22− # /run is noexec, hence mounting another tmpfs exec
23− # NB: unity8 is 35K; 512K should be enough for everyone
24− mount -o rw,nosuid,nodev,exec,relatime,mode=755,size=512k -t tmpfs tmpfs "$RUNDIR"
25− cp -a /usr/bin/unity8 "$RUNDIR"
26− setcap CAP_SYS_RESOURCE=+ep "$RUNDIR/unity8"
27− # bind-mount this back as unity8 checks dirname(argv[0]'s) == /usr to
28− # decide whether it's installed or not
29− mount --bind "$RUNDIR/unity8" /usr/bin/unity8
30− fi
31−end script
32−
debian/changelog+115−2
@@ -1,8 +1,121 @@
1−unity8 (7.83) UNRELEASED; urgency=low
1+unity8 (7.83+14.04.20131028.1-0ubuntu1) trusty; urgency=low
22
3+ * New rebuild forced
4+ * Automatic snapshot from revision 480
5+
6+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 28 Oct 2013 22:42:07 +0000
7+
8+unity8 (7.83+14.04.20131028-0ubuntu1) trusty; urgency=low
9+
10+ [ Andrea Cimitan ]
11+ * Fix 1195349 by counting drawbuffer on the newContentX logic of the
12+ carousel When we changed carousel from repeater to listview, we
13+ added drawbuffer. this breaks the logic of newContentX, which was
14+ considered disabled and set to -1. The correct disabled value now
15+ has to take into account the drawbuffer. (LP: #1195349)
16+
17+ [ Christopher Lee ]
18+ * Checks both then env and upstart env for the currently set
19+ XDG_DATA_DIRS so they can be set correctly for the test.
20+
21+ [ Ubuntu daily release ]
22+ * Automatic snapshot from revision 479
23+
24+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 28 Oct 2013 03:08:59 +0000
25+
26+unity8 (7.83+13.10.20131016.2-0ubuntu1) saucy; urgency=low
27+
28+ [ Loïc Minier ]
29+ * Merge ~lool/unity8/drop-setcap-conf. Drop unity8-setcap.conf as this
30+ breaks desktop installs (no boot-hook event is emitted, boot
31+ stalls); add maintscript snippet to rm_conffile on upgrades; this
32+ boot-hook is now shipped under a different name in lxc-android-
33+ config.
34+
35+ [ Michał Sawicz ]
36+ * Ship a camera-app.desktop file and use a custom XDG_DATA_DIRS for
37+ testing.
38+
39+ [ Ubuntu daily release ]
40+ * Automatic snapshot from revision 472
41+
42+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 16 Oct 2013 23:15:48 +0000
43+
44+unity8 (7.83+13.10.20131016.1-0ubuntu1) saucy; urgency=low
45+
46+ [ Diego Sarmentero ]
47+ * Disable Preview interaction until the scope responds.
48+
49+ [ Albert Astals ]
50+ * Hide placeholder notification.
51+
52+ [ Ubuntu daily release ]
53+ * Automatic snapshot from revision 469
54+
55+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 16 Oct 2013 17:29:36 +0000
56+
57+unity8 (7.83+13.10.20131016-0ubuntu1) saucy; urgency=low
58+
59+ [ Loïc Minier ]
60+ * Add upstart job to copy unity8 to a new tmpfs, setcap it, and bind-
61+ mount it back; this is an ugly hack to set CAP_SYS_RESOURCE until we
62+ have a root-helper for it.
63+
64+ [ Michal Hruby ]
65+ * Enable definition of scope back references in overridden results.
66+
67+ [ Ubuntu daily release ]
68+ * Automatic snapshot from revision 466
69+
70+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 16 Oct 2013 11:29:52 +0000
71+
72+unity8 (7.83+13.10.20131015.4-0ubuntu1) saucy; urgency=low
73+
74+ [ Michał Sawicz ]
375 * Replace ubuntu-touch-session's unity8.conf upstart job.
76+ * Revert r440 that made the dash collapse animation worse, rather than
77+ better.
78+
79+ [ om26er@ubuntu.com ]
80+ * close the app only when the close button is tapped, not the entire
81+ thumbnail
82+
83+ [ Nick Dedekind ]
84+ * Added missing Unity.Indicator mock objects causing qmltests to fail.
85+ Approved by: Michał Sawicz.
86+
87+ [ Christopher Lee ]
88+ * Launch unity8 for autopilot with upstart, and bring unity8 session
89+ over from session-manager-touch.
90+
91+ [ Pawel Stolowski ]
92+ * Temporarily disable category_order changed signal handling.
93+
94+ [ Daniel d'Andrada ]
95+ * OSKController area shouldn't cover the indicators' bar Since ubuntu-
96+ keyboard surface area doesn't cover the indicators' bar,
97+ OSKController should follow suit. Otherwise the OSKContoller's
98+ internal InputFilterArea (and others) wouldn't perfectly overlap the
99+ graphical keyboard rendered by ubuntu-keyboard (i.e. the opaque part
100+ of ubuntu-keyboard's surface).
101+
102+ [ Michael Zanetti ]
103+ * Initialize initialHeight/Width to height/width depending on scaleTo
104+ add checks for initialWidth/Height in the tests change sizes in
105+ tests to something else than the default for initialWidth/Height in
106+ order to catch failures there more easily
107+
108+ [ Omer Akram ]
109+ * Only show search indicator while the Dash is focued.
110+ * Add 2dp left margin for music and video tiles' title.
111+
112+ [ Nicolas d'Offay ]
113+ * Changed Infographics to use Ubuntu font.
114+
115+ [ Ubuntu daily release ]
116+ * Automatic snapshot from revision 463
4117
5− -- Michał Sawicz <michal.sawicz@canonical.com> Tue, 15 Oct 2013 01:12:45 +0200
118+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 15 Oct 2013 11:05:04 +0000
6119
7120unity8 (7.82+13.10.20131011.2-0ubuntu1) saucy; urgency=low
8121
debian/unity8-fake-env.install+1
@@ -1 +1,2 @@
11usr/lib/*/unity8/qml/mocks
2+usr/share/unity8/mocks
debian/unity8.install−1
@@ -13,4 +13,3 @@ usr/share/unity8/Shell.qml
1313usr/share/unity8/SideStage
1414usr/share/unity8/graphics
1515data/unity8.conf usr/share/upstart/sessions/
16−data/unity8-setcap.conf etc/init/boot-hooks/
debian/unity8.maintscriptnew file+1
@@ -0,0 +1 @@
1+rm_conffile /etc/init/boot-hooks/unity8-setcap.conf
plugins/Unity/scope.cpp+10−1
@@ -28,6 +28,7 @@
2828
2929// Qt
3030#include <QUrl>
31+#include <QUrlQuery>
3132#include <QDebug>
3233#include <QtGui/QDesktopServices>
3334#include <QQmlEngine>
@@ -203,7 +204,13 @@ void Scope::preview(const QVariant &uri, const QVariant &icon_hint, const QVaria
203204 const QVariant &result_type, const QVariant &mimetype, const QVariant &title,
204205 const QVariant &comment, const QVariant &dnd_uri, const QVariant &metadata)
205206{
206− auto res = createLocalResult(uri, icon_hint, category, result_type, mimetype, title, comment, dnd_uri, metadata);
207+ QVariant real_metadata(metadata);
208+ // handle overridden results, since QML doesn't support defining maps
209+ if (metadata.type() == QVariant::String) {
210+ real_metadata = QVariant::fromValue(subscopeUriToMetadataHash(metadata.toString()));
211+ }
212+
213+ auto res = createLocalResult(uri, icon_hint, category, result_type, mimetype, title, comment, dnd_uri, real_metadata);
207214 m_previewCancellable.Renew();
208215
209216 // canned queries don't have previews, must be activated
@@ -221,6 +228,7 @@ void Scope::cancelActivation()
221228
222229void Scope::onActivated(unity::dash::LocalResult const& result, unity::dash::ScopeHandledType type, unity::glib::HintsMap const& hints)
223230{
231+ Q_EMIT activated();
224232 // note: we will not get called on SHOW_PREVIEW, instead UnityCore will signal preview_ready.
225233 switch (type)
226234 {
@@ -254,6 +262,7 @@ void Scope::onActivated(unity::dash::LocalResult const& result, unity::dash::Sco
254262
255263void Scope::onPreviewReady(unity::dash::LocalResult const& /* result */, unity::dash::Preview::Ptr const& preview)
256264{
265+ Q_EMIT activated();
257266 auto prv = Preview::newFromUnityPreview(preview);
258267 // is this the best solution? QML may need to keep more than one preview instance around, so we can't own it.
259268 // passing it by value is not possible.
plugins/Unity/scope.h+1
@@ -117,6 +117,7 @@ Q_SIGNALS:
117117 void showDash();
118118 void hideDash();
119119 void gotoUri(const QString &uri);
120+ void activated();
120121
121122 void activateApplication(const QString &desktop);
122123
plugins/Unity/variantutils.cpp+31
@@ -17,6 +17,10 @@
1717 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1818 */
1919
20+#include <QUrl>
21+#include <QUrlQuery>
22+#include <QStringList>
23+
2024#include <deelistmodel.h>
2125#include "variantutils.h"
2226
@@ -49,3 +53,30 @@ QVariantHash convertToQVariantHash(const unity::glib::HintsMap& var)
4953 }
5054 return hash;
5155}
56+
57+/* This will translate uris in the form of:
58+ * "subscope:master.scope/sub.scope?foo=bar"
59+ * into a QVariantHash that can be passed as a metadata field to scope.
60+ */
61+QVariantHash subscopeUriToMetadataHash(const QString &metadata_string)
62+{
63+ QUrl metadata_url(metadata_string);
64+ if (metadata_url.scheme() == QLatin1String("subscope")) {
65+ QString subscope_uri(metadata_url.toString(QUrl::RemoveScheme | QUrl::RemoveQuery));
66+ QVariantHash new_metadata;
67+ QUrlQuery query(metadata_url.query());
68+ QList<QPair<QString,QString>> queryItems(query.queryItems());
69+ for (auto it = queryItems.begin(); it != queryItems.end(); ++it) {
70+ new_metadata[it->first] = QVariant::fromValue(it->second);
71+ }
72+ QStringList parts(subscope_uri.split(QChar('/')));
73+ for (int i = parts.size() - 1; i >= 0; i--) {
74+ QVariantHash inner;
75+ inner["scope-id"] = QVariant::fromValue(parts[i]);
76+ inner["content"] = QVariant::fromValue(new_metadata);
77+ new_metadata = inner;
78+ }
79+ return new_metadata;
80+ }
81+ return QVariantHash();
82+}
plugins/Unity/variantutils.h+3−1
@@ -28,6 +28,8 @@
2828
2929unity::glib::HintsMap convertToHintsMap(const QHash<QString, QVariant> &val);
3030unity::glib::HintsMap convertToHintsMap(const QVariant &var);
31−QVariantHash convertToQVariantHash(const unity::glib::HintsMap& var);
31+QVariantHash convertToQVariantHash(const unity::glib::HintsMap &var);
32+/* used in tests, so we have to export it */
33+Q_DECL_EXPORT QVariantHash subscopeUriToMetadataHash(const QString &metadata_string);
3234
3335#endif
po/ar.po+33−44
@@ -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-10-11 12:12+0200\n"
11−"PO-Revision-Date: 2013-06-26 23:26+0000\n"
11+"PO-Revision-Date: 2013-10-20 19:41+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-10-13 05:43+0000\n"
20−"X-Generator: Launchpad (build 16799)\n"
19+"X-Launchpad-Export-Date: 2013-10-21 05:04+0000\n"
20+"X-Generator: Launchpad (build 16807)\n"
2121
2222#: Applications/applications.js:23
2323msgid "Phone"
@@ -65,7 +65,7 @@ msgstr "مشغّل الوسائط"
6565
6666#: Applications/applications.js:86
6767msgid "Evernote"
68−msgstr ""
68+msgstr "Evernote"
6969
7070#: Applications/applications.js:91
7171msgid "Map"
@@ -73,11 +73,11 @@ msgstr "الخريطة"
7373
7474#: Applications/applications.js:96
7575msgid "Pinterest"
76−msgstr ""
76+msgstr "Pinterest"
7777
7878#: Applications/applications.js:101
7979msgid "SoundCloud"
80−msgstr ""
80+msgstr "SoundCloud"
8181
8282#: Applications/applications.js:106
8383msgid "Wikipedia"
@@ -89,49 +89,52 @@ msgstr "يوتيوب"
8989
9090#: Components/EdgeDemoOverlay.qml:149
9191msgid "Skip intro"
92−msgstr ""
92+msgstr "تخطي المقدمة"
9393
9494#: Components/EdgeDemo.qml:112
9595msgid "Right edge"
96−msgstr ""
96+msgstr "الحافة اليمنى"
9797
9898#: Components/EdgeDemo.qml:113
9999msgid "Try swiping from the right edge to unlock the phone"
100−msgstr ""
100+msgstr "اسحب اصبعك من الحافة اليمنى لفتح قفل الهاتف"
101101
102102#: Components/EdgeDemo.qml:144
103103msgid "Top edge"
104−msgstr ""
104+msgstr "الحافة العلوية"
105105
106106#: Components/EdgeDemo.qml:145
107107msgid "Try swiping from the top edge to access the indicators"
108−msgstr ""
108+msgstr "اسحب اصبعك من الحافة العلوية للوصول إلى المؤشرات"
109109
110110#: Components/EdgeDemo.qml:170
111111msgid "Close"
112−msgstr ""
112+msgstr "أغلق"
113113
114114#: Components/EdgeDemo.qml:171
115115msgid "Swipe up again to close the settings screen"
116−msgstr ""
116+msgstr "اسحب اصعبك لأعلى مرة أخرى لغلق شاشة الإعدادات"
117117
118118#: Components/EdgeDemo.qml:198
119119msgid "Left edge"
120−msgstr ""
120+msgstr "الحافة اليسرى"
121121
122122#: Components/EdgeDemo.qml:199
123123msgid "Swipe from the left to reveal the launcher for quick access to apps"
124124msgstr ""
125+"اسحب أصبعك من الحافة اليسرى لإظهار شريط يونتي للوصول السريع للتطبيقات"
125126
126127#: Components/EdgeDemo.qml:226
127128msgid "Well done"
128−msgstr ""
129+msgstr "أحسنت!"
129130
130131#: Components/EdgeDemo.qml:227
131132msgid ""
132133"You have now mastered the edge gestures and can start using the "
133134"phone<br><br>Tap anywhere to start"
134135msgstr ""
136+"لقد أتقنت الآن إيماءات الحواف ويمكنك البدء باستخدام الهاتف<br><br>انقر في أي "
137+"مكان للبدء"
135138
136139#: Components/PageHeader.qml:341
137140msgid "Recent searches"
@@ -142,7 +145,7 @@ msgstr "عمليات البحث الأخيرة"
142145#: Dash/Apps/AppInfo.qml:73 Dash/Previews/Header.qml:93
143146#, qt-format
144147msgid "(%1)"
145−msgstr ""
148+msgstr "(%1)"
146149
147150#. TRANSLATORS: Number of persons who wrote reviews for this app
148151#. TRANSLATORS: Number of persons who wrote reviews for this app/video/whatever
@@ -150,32 +153,36 @@ msgstr ""
150153#, qt-format
151154msgid "%1 review"
152155msgid_plural "%1 reviews"
153−msgstr[0] ""
154−msgstr[1] ""
156+msgstr[0] "لا تعليقات (%1)"
157+msgstr[1] "تعليق واحد (%1)"
158+msgstr[2] "تعليقان (%1)"
159+msgstr[3] "%1 تعليقات"
160+msgstr[4] "%1 تعليقا"
161+msgstr[5] "%1 تعليق"
155162
156163#: Dash/Apps/AppPreview.qml:126
157164msgid "Rate this"
158−msgstr ""
165+msgstr "قيّم ذلك"
159166
160167#: Dash/Previews/Reviews.qml:74
161168msgid "Add a review"
162−msgstr ""
169+msgstr "أضف تعليق"
163170
164171#: Dash/Previews/Reviews.qml:86
165172msgid "Review"
166−msgstr ""
173+msgstr "التعليق"
167174
168175#: Dash/Previews/Reviews.qml:121
169176msgid "Send"
170−msgstr ""
177+msgstr "أرسل"
171178
172179#: Dash/Previews/Reviews.qml:139
173180msgid "Comments:"
174−msgstr ""
181+msgstr "التعليقات:"
175182
176183#: Greeter/Lockscreen.qml:142
177184msgid "Emergency Call"
178−msgstr ""
185+msgstr "مكالمة طوارئ"
179186
180187#: Greeter/PassphraseLockscreen.qml:59
181188#, qt-format
@@ -216,27 +223,9 @@ msgstr "عذراً، لا يوجد ما يطابق بحثك."
216223
217224#: plugins/Unity/showallfilteroption.cpp:41
218225msgid "All"
219−msgstr ""
226+msgstr "الكل"
220227
221228#: Shell.qml:438
222229#, qt-format
223230msgid "Please enter %1"
224−msgstr ""
225−
226−#~ msgid "Featured"
227−#~ msgstr "المميز"
228−
229−#~ msgid "Recent"
230−#~ msgstr "الحديث"
231−
232−#~ msgid "New Releases"
233−#~ msgstr "الإصدارات الجديدة"
234−
235−#~ msgid "Music"
236−#~ msgstr "موسيقى"
237−
238−#~ msgid "Popular Online"
239−#~ msgstr "الشائع على الإنترنت"
240−
241−#~ msgid "Videos"
242−#~ msgstr "فيديوهات"
231+msgstr "من فضلك أدخِل %1"
po/de.po+11−28
@@ -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-10-11 12:12+0200\n"
11−"PO-Revision-Date: 2013-10-06 10:57+0000\n"
12−"Last-Translator: SaGrLand <sg@samuel-greef.de>\n"
11+"PO-Revision-Date: 2013-10-18 12:26+0000\n"
12+"Last-Translator: Phillip Sz <Unknown>\n"
1313"Language-Team: German <de@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-10-13 05:43+0000\n"
19−"X-Generator: Launchpad (build 16799)\n"
18+"X-Launchpad-Export-Date: 2013-10-19 05:30+0000\n"
19+"X-Generator: Launchpad (build 16807)\n"
2020
2121#: Applications/applications.js:23
2222msgid "Phone"
@@ -96,7 +96,7 @@ msgstr "Rechter Rand"
9696
9797#: Components/EdgeDemo.qml:113
9898msgid "Try swiping from the right edge to unlock the phone"
99−msgstr ""
99+msgstr "Vom rechten Rand her wischen, um das Gerät zu entsperren"
100100
101101#: Components/EdgeDemo.qml:144
102102msgid "Top edge"
@@ -104,7 +104,7 @@ msgstr "Oberer Rand"
104104
105105#: Components/EdgeDemo.qml:145
106106msgid "Try swiping from the top edge to access the indicators"
107−msgstr ""
107+msgstr "Vom oberen Rand her wischen, um die Statusmeldungen anzuzeigen"
108108
109109#: Components/EdgeDemo.qml:170
110110msgid "Close"
@@ -112,7 +112,7 @@ msgstr "Schließen"
112112
113113#: Components/EdgeDemo.qml:171
114114msgid "Swipe up again to close the settings screen"
115−msgstr ""
115+msgstr "Nochmals nach oben wischen, um das Einstellungsmenü zu schließen"
116116
117117#: Components/EdgeDemo.qml:198
118118msgid "Left edge"
@@ -121,6 +121,8 @@ msgstr "Linker Rand"
121121#: Components/EdgeDemo.qml:199
122122msgid "Swipe from the left to reveal the launcher for quick access to apps"
123123msgstr ""
124+"Von links wischen, um die Seitenleiste für den Anwendungs-Schnellzugriff "
125+"aufzurufen"
124126
125127#: Components/EdgeDemo.qml:226
126128msgid "Well done"
@@ -131,6 +133,8 @@ msgid ""
131133"You have now mastered the edge gestures and can start using the "
132134"phone<br><br>Tap anywhere to start"
133135msgstr ""
136+"Sie haben nun die Einführung abgeschlossen und können Ihr Gerät nun "
137+"verwenden<br><br>Antippen um zu starten"
134138
135139#: Components/PageHeader.qml:341
136140msgid "Recent searches"
@@ -221,24 +225,3 @@ msgstr "Alle"
221225#, qt-format
222226msgid "Please enter %1"
223227msgstr "Bitte geben Sie %1 ein"
224−
225−#~ msgid "Featured"
226−#~ msgstr "Empfehlungen"
227−
228−#~ msgid "Recent"
229−#~ msgstr "Zuletzt verwendet"
230−
231−#~ msgid "New Releases"
232−#~ msgstr "Neue Veröffentlichungen"
233−
234−#~ msgid "Top Charting"
235−#~ msgstr "Top Tabellenplatz"
236−
237−#~ msgid "Music"
238−#~ msgstr "Musik"
239−
240−#~ msgid "Popular Online"
241−#~ msgstr "Online Beliebt"
242−
243−#~ msgid "Videos"
244−#~ msgstr "Videos"
po/ta.ponew file+229
@@ -0,0 +1,229 @@
1+# Tamil translation for unity8
2+# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
3+# This file is distributed under the same license as the unity8 package.
4+# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
5+# துளசி <Thangamani Arun<thangam.arunx@gmail.com>>, 2013.
6+msgid ""
7+msgstr ""
8+"Project-Id-Version: unity8\n"
9+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10+"POT-Creation-Date: 2013-10-11 12:12+0200\n"
11+"PO-Revision-Date: 2013-10-24 11:36+0000\n"
12+"Last-Translator: Thangamani Arun - தங்கமணி அருண் <thangam.arunx@gmail.com>\n"
13+"Language-Team: Ubuntu Tamil Team/Free Tamil Computing/Thamizha\n"
14+"MIME-Version: 1.0\n"
15+"Content-Type: text/plain; charset=UTF-8\n"
16+"Content-Transfer-Encoding: 8bit\n"
17+"Plural-Forms: nplurals=2; plural=n != 1;\n"
18+"X-Launchpad-Export-Date: 2013-10-25 06:05+0000\n"
19+"X-Generator: Launchpad (build 16810)\n"
20+"Language: ta\n"
21+
22+#: Applications/applications.js:23
23+msgid "Phone"
24+msgstr "தொலைபேசி"
25+
26+#: Applications/applications.js:29
27+msgid "Camera"
28+msgstr "புகைப்பட கருவி"
29+
30+#: Applications/applications.js:35
31+msgid "Gallery"
32+msgstr "படத்தொகுப்பு"
33+
34+#: Applications/applications.js:40
35+msgid "Facebook"
36+msgstr "முகநுல்"
37+
38+#: Applications/applications.js:46
39+msgid "Browser"
40+msgstr "உலாவி"
41+
42+#: Applications/applications.js:51
43+msgid "Twitter"
44+msgstr "ட்விட்டர்"
45+
46+#: Applications/applications.js:57
47+msgid "GMail"
48+msgstr "ஜிமெயில்"
49+
50+#: Applications/applications.js:62
51+msgid "Weather"
52+msgstr "வானிலை"
53+
54+#: Applications/applications.js:68
55+msgid "Notepad"
56+msgstr "குறிப்புபலகை"
57+
58+#: Applications/applications.js:74
59+msgid "Calendar"
60+msgstr "நாள்காட்டி"
61+
62+#: Applications/applications.js:80
63+msgid "Media Player"
64+msgstr "ஊடக இயக்கி"
65+
66+#: Applications/applications.js:86
67+msgid "Evernote"
68+msgstr "எப்போதும்குறிப்பெடு"
69+
70+#: Applications/applications.js:91
71+msgid "Map"
72+msgstr "வரைபடம்"
73+
74+#: Applications/applications.js:96
75+msgid "Pinterest"
76+msgstr "விசைத்தட்டு"
77+
78+#: Applications/applications.js:101
79+msgid "SoundCloud"
80+msgstr "ஒலி கிளவுட்"
81+
82+#: Applications/applications.js:106
83+msgid "Wikipedia"
84+msgstr "விக்கிப்பீடியா"
85+
86+#: Applications/applications.js:111
87+msgid "YouTube"
88+msgstr "யூட்யுப்"
89+
90+#: Components/EdgeDemoOverlay.qml:149
91+msgid "Skip intro"
92+msgstr "அறிமுகத்தை தவிர்"
93+
94+#: Components/EdgeDemo.qml:112
95+msgid "Right edge"
96+msgstr "வலது விளிம்பு"
97+
98+#: Components/EdgeDemo.qml:113
99+msgid "Try swiping from the right edge to unlock the phone"
100+msgstr "தொலைபேசியை திறக்க வலது முனையிலிருந்து தேய்த்து முயற்சி செய்"
101+
102+#: Components/EdgeDemo.qml:144
103+msgid "Top edge"
104+msgstr "மேல் விளிம்பு"
105+
106+#: Components/EdgeDemo.qml:145
107+msgid "Try swiping from the top edge to access the indicators"
108+msgstr "காட்டிகளை அனுக மேல் விளிம்பிலிருந்து தேய்த்து முயற்சி செய்"
109+
110+#: Components/EdgeDemo.qml:170
111+msgid "Close"
112+msgstr "மூடு"
113+
114+#: Components/EdgeDemo.qml:171
115+msgid "Swipe up again to close the settings screen"
116+msgstr "அமைவுகளின் திரையை மூட மறுபடியும் மேலே தேய்க்கவும்"
117+
118+#: Components/EdgeDemo.qml:198
119+msgid "Left edge"
120+msgstr "இடது விளிம்பு"
121+
122+#: Components/EdgeDemo.qml:199
123+msgid "Swipe from the left to reveal the launcher for quick access to apps"
124+msgstr ""
125+"பயன்பாடுகளின் விரைவான அணுகலை பெறத்தேவையான தொடக்கியை இடமிருந்து தேய்த்தால் "
126+"வெளிப்படும்"
127+
128+#: Components/EdgeDemo.qml:226
129+msgid "Well done"
130+msgstr "நன்றாக செய்தீர்கள்"
131+
132+#: Components/EdgeDemo.qml:227
133+msgid ""
134+"You have now mastered the edge gestures and can start using the "
135+"phone<br><br>Tap anywhere to start"
136+msgstr ""
137+"நீங்கள் இப்போது விளிம்பு சைகைகளில் கைதேர்ந்தவர் மற்றும் தொலைபேசி "
138+"பயன்படுத்த தொடங்கவும் <br> <br>தட்டுவதன் மூலம் எங்க வேண்டுமானாலும் "
139+"தொடங்கலாம்."
140+
141+#: Components/PageHeader.qml:341
142+msgid "Recent searches"
143+msgstr "கடையாக தேடப்பட்டவைகள்"
144+
145+#. TRANSLATORS: Number of persons who rated this app
146+#. TRANSLATORS: Number of persons who rated this app/video/whatever
147+#: Dash/Apps/AppInfo.qml:73 Dash/Previews/Header.qml:93
148+#, qt-format
149+msgid "(%1)"
150+msgstr "(%1)"
151+
152+#. TRANSLATORS: Number of persons who wrote reviews for this app
153+#. TRANSLATORS: Number of persons who wrote reviews for this app/video/whatever
154+#: Dash/Apps/AppInfo.qml:85 Dash/Previews/Header.qml:105
155+#, qt-format
156+msgid "%1 review"
157+msgid_plural "%1 reviews"
158+msgstr[0] "%1 பரிசீலனை"
159+msgstr[1] "%1 பரிசீலனைகள்"
160+
161+#: Dash/Apps/AppPreview.qml:126
162+msgid "Rate this"
163+msgstr "இதை மதிப்பிடு"
164+
165+#: Dash/Previews/Reviews.qml:74
166+msgid "Add a review"
167+msgstr "ஒரு பரிசீலனையை சேர்"
168+
169+#: Dash/Previews/Reviews.qml:86
170+msgid "Review"
171+msgstr "மறுஆய்வு"
172+
173+#: Dash/Previews/Reviews.qml:121
174+msgid "Send"
175+msgstr "அனுப்பு"
176+
177+#: Dash/Previews/Reviews.qml:139
178+msgid "Comments:"
179+msgstr "கருத்துகள்:"
180+
181+#: Greeter/Lockscreen.qml:142
182+msgid "Emergency Call"
183+msgstr "அவசர அழைப்பு"
184+
185+#: Greeter/PassphraseLockscreen.qml:59
186+#, qt-format
187+msgid "Hello %1"
188+msgstr "வணக்கம் %1"
189+
190+#: Greeter/PassphraseLockscreen.qml:59
191+msgid "Hello"
192+msgstr "வணக்கம்"
193+
194+#: Hud/HudParametrizedActionsPage.qml:132
195+msgid "Confirm"
196+msgstr "உறுதிப்படுத்து"
197+
198+#: Hud/Hud.qml:61 Hud/Hud.qml:99 Hud/Hud.qml:372
199+msgid "Type or say a command"
200+msgstr "ஒரு கட்டளையை உச்சரி அல்லது தட்டச்சுசெய்"
201+
202+#: Hud/Hud.qml:84
203+msgid "Loading. Please Wait..."
204+msgstr "ஏற்றுகிறது. தயைசெய்து காத்திருக்கவும்..."
205+
206+#: Hud/Hud.qml:89
207+msgid "Speak Now..."
208+msgstr "இப்பொது பேசு..."
209+
210+#: Hud/Hud.qml:94
211+msgid "Speaking..."
212+msgstr "பேசுகிறது..."
213+
214+#: Panel/SearchIndicator.qml:27
215+msgid "Search"
216+msgstr "தெடு"
217+
218+#: plugins/Unity/scope.cpp:398
219+msgid "Sorry, there is nothing that matches your search."
220+msgstr "மன்னிக்கவும், உங்களுடைய தேடலுக்கு தகுந்த பொருத்தம் கிடைக்கவில்லை."
221+
222+#: plugins/Unity/showallfilteroption.cpp:41
223+msgid "All"
224+msgstr "அனைத்தும்"
225+
226+#: Shell.qml:438
227+#, qt-format
228+msgid "Please enter %1"
229+msgstr "தயவுச்செய்து %1 உள்ளிடு"
po/uk.po+6−25
@@ -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-10-11 12:12+0200\n"
11−"PO-Revision-Date: 2013-09-28 07:54+0000\n"
11+"PO-Revision-Date: 2013-10-19 16:44+0000\n"
1212"Last-Translator: Yuri Chornoivan <yurchor@gmail.com>\n"
1313"Language-Team: Ukrainian <uk@li.org>\n"
1414"MIME-Version: 1.0\n"
@@ -16,8 +16,8 @@ msgstr ""
1616"Content-Transfer-Encoding: 8bit\n"
1717"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
1818"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
19−"X-Launchpad-Export-Date: 2013-10-13 05:43+0000\n"
20−"X-Generator: Launchpad (build 16799)\n"
19+"X-Launchpad-Export-Date: 2013-10-20 05:20+0000\n"
20+"X-Generator: Launchpad (build 16807)\n"
2121
2222#: Applications/applications.js:23
2323msgid "Phone"
@@ -135,6 +135,8 @@ msgid ""
135135"You have now mastered the edge gestures and can start using the "
136136"phone<br><br>Tap anywhere to start"
137137msgstr ""
138+"Тепер жести налаштовано, ви можете почати користуватися "
139+"телефоном.<br><br>Натисніть у довільному місці екрана."
138140
139141#: Components/PageHeader.qml:341
140142msgid "Recent searches"
@@ -220,30 +222,9 @@ msgstr "Вибачте, для вказаних вами ключових слі
220222
221223#: plugins/Unity/showallfilteroption.cpp:41
222224msgid "All"
223−msgstr ""
225+msgstr "Усе"
224226
225227#: Shell.qml:438
226228#, qt-format
227229msgid "Please enter %1"
228230msgstr "Будь ласка, введіть %1"
229−
230−#~ msgid "Featured"
231−#~ msgstr "Рекомендовані"
232−
233−#~ msgid "Recent"
234−#~ msgstr "Нещодавні"
235−
236−#~ msgid "New Releases"
237−#~ msgstr "Нові випуски"
238−
239−#~ msgid "Top Charting"
240−#~ msgstr "З високими оцінками"
241−
242−#~ msgid "Music"
243−#~ msgstr "Музика"
244−
245−#~ msgid "Popular Online"
246−#~ msgstr "Популярне у мережі"
247−
248−#~ msgid "Videos"
249−#~ msgstr "Відео"
tests/autopilot/unity8/__init__.py+46−1
@@ -52,7 +52,11 @@ def get_mocks_library_path():
5252 if running_installed_tests():
5353 mock_path = "qml/mocks/"
5454 else:
55− mock_path = "../lib/x86_64-linux-gnu/unity8/qml/mocks/"
55+ mock_path = os.path.join(
56+ "../lib/",
57+ sysconfig.get_config_var('MULTIARCH'),
58+ "unity8/qml/mocks/"
59+ )
5660 lib_path = get_lib_path()
5761 ld_library_path = os.path.abspath(
5862 os.path.join(
@@ -84,6 +88,47 @@ def get_binary_path(binary="unity8"):
8488 return binary_path
8589
8690
91+def get_data_dirs():
92+ """Prepend a mock data path to XDG_DATA_DIRS."""
93+ if running_installed_tests():
94+ data_path = "/usr/share/unity8/mocks/data"
95+ else:
96+ data_path = "../../mocks/data"
97+ full_data_path = os.path.abspath(
98+ os.path.join(
99+ os.path.dirname(__file__),
100+ data_path
101+ )
102+ )
103+
104+ if os.path.exists(full_data_path):
105+ xdg_path = _get_xdg_env_path()
106+ if xdg_path is not None:
107+ return "{0}:{1}".format(full_data_path, xdg_path)
108+ else:
109+ return full_data_path
110+ else:
111+ return None
112+
113+
114+def _get_xdg_env_path():
115+ path = os.getenv("XDG_DATA_DIRS")
116+ if path is None:
117+ path = _get_xdg_upstart_env()
118+ return path
119+
120+
121+def _get_xdg_upstart_env():
122+ try:
123+ return subprocess.check_output([
124+ "/sbin/initctl",
125+ "get-env",
126+ "--global",
127+ "XDG_DATA_DIRS"
128+ ]).rstrip()
129+ except subprocess.CalledProcessError:
130+ return None
131+
87132def get_grid_size():
88133 grid_size = os.getenv('GRID_UNIT_PX')
89134 if grid_size is None:
tests/autopilot/unity8/shell/tests/__init__.py+8
@@ -41,6 +41,7 @@ from unity8 import (
4141 get_binary_path,
4242 get_mocks_library_path,
4343 get_default_extra_mock_libraries,
44+ get_data_dirs
4445)
4546from unity8.shell.emulators import UnityEmulatorBase
4647from unity8.shell.emulators.dash import Dash
@@ -123,6 +124,8 @@ class UnityTestCase(AutopilotTestCase):
123124 self._qml_mock_enabled = True
124125 self._environment = {}
125126
127+ self._patch_data_dirs()
128+
126129 #### FIXME: This is a work around re: lp:1238417 ####
127130 if model() != "Desktop":
128131 from autopilot.input import _uinput
@@ -306,6 +309,11 @@ class UnityTestCase(AutopilotTestCase):
306309 except subprocess.CalledProcessError:
307310 logger.warning("Appears unity was already stopped!")
308311
312+ def _patch_data_dirs(self):
313+ data_dirs = get_data_dirs()
314+ if data_dirs is not None:
315+ self._environment['XDG_DATA_DIRS'] = data_dirs
316+
309317 def patch_lightdm_mock(self, mock_type='single'):
310318 self._lightdm_mock_type = mock_type
311319 logger.info("Setting up LightDM mock type '%s'", mock_type)
tests/autopilot/unity8/shell/tests/test_notifications.py+10−9
@@ -143,7 +143,7 @@ class InteractiveNotificationBase(NotificationsBase):
143143 hints,
144144 )
145145
146− get_notification = lambda: notify_list.select_single('Notification')
146+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
147147 self.assertThat(get_notification, Eventually(NotEquals(None)))
148148 notification = get_notification()
149149
@@ -187,7 +187,7 @@ class InteractiveNotificationBase(NotificationsBase):
187187 hints
188188 )
189189
190− get_notification = lambda: notify_list.select_single('Notification')
190+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
191191 self.assertThat(get_notification, Eventually(NotEquals(None)))
192192 notification = get_notification()
193193 self._assert_notification(notification, None, None, True, True, 1.0)
@@ -354,7 +354,7 @@ class EphemeralNotificationsTests(NotificationsBase):
354354
355355 notification.show()
356356
357− get_notification = lambda: notify_list.select_single('Notification')
357+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
358358 self.assertThat(get_notification, Eventually(NotEquals(None)))
359359 notification = get_notification()
360360 self._assert_notification(notification, summary, body, True, True, 1.0)
@@ -383,7 +383,7 @@ class EphemeralNotificationsTests(NotificationsBase):
383383
384384 notification.show()
385385
386− get_notification = lambda: notify_list.select_single('Notification')
386+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
387387 self.assertThat(get_notification, Eventually(NotEquals(None)))
388388 notification = get_notification()
389389 self._assert_notification(
@@ -496,7 +496,7 @@ class EphemeralNotificationsTests(NotificationsBase):
496496 notification = self._create_ephemeral_notification(summary, body)
497497 notification.show()
498498
499− get_notification = lambda: notify_list.select_single('Notification')
499+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
500500 self.assertThat(get_notification, Eventually(NotEquals(None)))
501501 notification = get_notification()
502502 self._assert_notification(
@@ -519,7 +519,7 @@ class EphemeralNotificationsTests(NotificationsBase):
519519 notification = self._create_ephemeral_notification(summary)
520520 notification.show()
521521
522− get_notification = lambda: notify_list.select_single('Notification')
522+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
523523 self.assertThat(get_notification, Eventually(NotEquals(None)))
524524 notification = get_notification()
525525
@@ -585,7 +585,7 @@ class EphemeralNotificationsTests(NotificationsBase):
585585 )
586586 notification.show()
587587
588− get_notification = lambda: notify_list.select_single('Notification')
588+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
589589 self.assertThat(get_notification, Eventually(NotEquals(None)))
590590 self._assert_notification(
591591 get_notification(),
@@ -625,7 +625,7 @@ class EphemeralNotificationsTests(NotificationsBase):
625625
626626 notification.show()
627627
628− get_notification = lambda: notify_list.select_single('Notification')
628+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
629629 self.assertThat(get_notification, Eventually(NotEquals(None)))
630630 notification = get_notification()
631631 self._assert_notification(
@@ -658,7 +658,8 @@ class EphemeralNotificationsTests(NotificationsBase):
658658 )
659659 notification.show()
660660 get_notification = lambda: notify_list.select_single(
661− 'Notification'
661+ 'Notification',
662+ objectName='notification1'
662663 )
663664 self.assertThat(get_notification, Eventually(NotEquals(None)))
664665 notification = get_notification()
tests/mocks/CMakeLists.txt+5
@@ -8,3 +8,8 @@ add_subdirectory(QMenuModel)
88add_subdirectory(SessionManager)
99add_subdirectory(Ubuntu)
1010add_subdirectory(Unity)
11+
12+install(
13+ DIRECTORY data
14+ DESTINATION ${SHELL_APP_DIR}/mocks
15+)
tests/mocks/data/applications/camera-app.desktopnew file

No changes to the content.

tests/plugins/Unity/resultstest.cpp+52
@@ -23,6 +23,7 @@
2323
2424#include "resultstest.h"
2525#include "categoryresults.h"
26+#include "variantutils.h"
2627
2728static DeeModel* createBackendModel()
2829{
@@ -193,4 +194,55 @@ void ResultsTest::testSpecialIcons()
193194 QCOMPARE(transformedIcon, result);
194195}
195196
197+void ResultsTest::testMetadataOverride_data()
198+{
199+ QTest::addColumn<QString>("uri");
200+ QTest::addColumn<QVariantHash>("result");
201+
202+ QVariantHash expected_result;
203+ QVariantHash inner_hash;
204+
205+ expected_result = QVariantHash();
206+ expected_result["scope-id"] = QVariant::fromValue(QString("applications.scope"));
207+ expected_result["content"] = QVariant::fromValue(QVariantHash());
208+
209+ QTest::newRow("single scope") << "subscope:applications.scope" << expected_result;
210+
211+ expected_result = QVariantHash();
212+ expected_result["scope-id"] = QVariant::fromValue(QString("applications.scope"));
213+ inner_hash = QVariantHash();
214+ inner_hash["foo"] = QVariant::fromValue(QString("bar"));
215+ inner_hash["qoo"] = QVariant::fromValue(QString("baz"));
216+ expected_result["content"] = QVariant::fromValue(inner_hash);
217+
218+ QTest::newRow("single scope with data") << "subscope:applications.scope?foo=bar&qoo=baz" << expected_result;
219+
220+ expected_result = QVariantHash();
221+ inner_hash = QVariantHash();
222+ inner_hash["scope-id"] = QVariant::fromValue(QString("applications-local.scope"));
223+ inner_hash["content"] = QVariant::fromValue(QVariantHash());
224+ expected_result["scope-id"] = QVariant::fromValue(QString("applications.scope"));
225+ expected_result["content"] = QVariant::fromValue(inner_hash);
226+ QTest::newRow("master scope") << "subscope:applications.scope/applications-local.scope" << expected_result;
227+
228+ expected_result = QVariantHash();
229+ expected_result["foo"] = QVariant::fromValue(QString("baz"));
230+ expected_result["qoo"] = QVariant::fromValue(QString("baz"));
231+ inner_hash = QVariantHash();
232+ inner_hash["scope-id"] = QVariant::fromValue(QString("applications-local.scope"));
233+ inner_hash["content"] = QVariant::fromValue(expected_result);
234+ expected_result = QVariantHash();
235+ expected_result["scope-id"] = QVariant::fromValue(QString("applications.scope"));
236+ expected_result["content"] = QVariant::fromValue(inner_hash);
237+ QTest::newRow("nested with data") << "subscope:applications.scope/applications-local.scope?foo=baz&qoo=baz" << expected_result;
238+}
239+
240+void ResultsTest::testMetadataOverride()
241+{
242+ QFETCH(QString, uri);
243+ QFETCH(QVariantHash, result);
244+
245+ QCOMPARE(subscopeUriToMetadataHash(uri), result);
246+}
247+
196248QTEST_MAIN(ResultsTest)
tests/plugins/Unity/resultstest.h+2
@@ -32,6 +32,8 @@ class ResultsTest : public QObject
3232 void testIconColumn();
3333 void testSpecialIcons_data();
3434 void testSpecialIcons();
35+ void testMetadataOverride_data();
36+ void testMetadataOverride();
3537};
3638
3739#endif
tests/qmltests/Dash/Apps/tst_AppPreview.qml+3−2
@@ -137,11 +137,12 @@ Item {
137137 for(var i = 0; i < buttons.count; i++) {
138138 var button = findChild(appPreview, "button" + i);
139139 mouseClick(button, 1, 1);
140+ appPreview.showProcessingAction = false;
140141 }
141142
142143 var actions = data.actions;
143− for(var i = 0; i < actions.length; i++) {
144− compare(root.calls[i][0], actions[i].id, "Id of action not found.");
144+ for(var j = 0; j < actions.length; j++) {
145+ compare(root.calls[j][0], actions[j].id, "Id of action not found.");
145146 }
146147 }
147148
tests/qmltests/Dash/Movie/tst_MoviePreview.qml+1
@@ -74,6 +74,7 @@ Item {
7474 for(var i = 0; i < buttons.count; i++) {
7575 var button = findChild(moviePreview, "button" + i);
7676 mouseClick(button, 1, 1);
77+ moviePreview.showProcessingAction = false;
7778 }
7879
7980 var actions = get_actions_data();
tests/qmltests/Dash/tst_GenericPreview.qml+1
@@ -76,6 +76,7 @@ Item {
7676 for(var i = 0; i < buttons.count; i++) {
7777 var button = findChild(genericPreview, "button" + i);
7878 mouseClick(button, 1, 1);
79+ genericPreview.showProcessingAction = false;
7980 }
8081
8182 var actions = get_actions_data();
tests/qmltests/Dash/tst_GenericScopeView.qml+11
@@ -66,6 +66,17 @@ Item {
6666 scopes.get(0).hideDash();
6767 tryCompare(genericScopeView, "previewShown", false);
6868 }
69+
70+ function test_show_spinner() {
71+ var previewLoader = findChild(genericScopeView, "previewLoader");
72+ previewLoader.open = true;
73+ previewLoader.source = "../../../Dash/Generic/GenericPreview.qml";
74+ previewLoader.item.showProcessingAction = true;
75+ var waitingForAction = findChild(genericScopeView, "waitingForActionMouseArea");
76+ tryCompare(waitingForAction, "enabled", true);
77+ previewLoader.closePreviewSpinner();
78+ tryCompare(waitingForAction, "enabled", false);
79+ }
6980 }
7081 }
7182}