on xenial help sign in
merge trunk
commit349587ac4566a185be44f26728366ecf467d46f7 authorMichael Zanetti <michael.zanetti@canonical.com> dateMon 21 Oct 2013, 13:51 (13 years ago) parentd5f8ac2f2920dd
28 files changed+370−135
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 debian/changelog+90−2 debian/control+2 debian/unity8-fake-env.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/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
@@ -78,7 +78,7 @@ Item {
7878 id: listView
7979
8080 property real minimumTileWidth: 0
81− property real newContentX: -1
81+ property real newContentX: disabledNewContentX
8282 property real pathItemCount: referenceWidth / referenceTileWidth
8383 property real tileAspectRatio: 1
8484 property int highlightIndex: -1
@@ -107,6 +107,7 @@ Item {
107107 readonly property real kMiddleIndex: (realWidth / 2) / tileWidth - 0.5
108108 readonly property real kXBeginningEnd: 1 / tileWidth + kMiddleIndex / gapToMiddlePhase
109109 readonly property real maximumItemTranslation: (listView.tileWidth * 3) / listView.scaleFactor
110+ readonly property real disabledNewContentX: -carousel.drawBuffer - 1
110111 readonly property real realContentWidth: contentWidth - 2 * carousel.drawBuffer
111112 readonly property real realContentX: contentX + carousel.drawBuffer
112113 readonly property real realPathItemCount: Math.min(realWidth / tileWidth, pathItemCount)
@@ -206,7 +207,7 @@ Item {
206207 onMovementStarted: {
207208 stepAnimation.stop()
208209 newContentXAnimation.stop()
209− newContentX = -1
210+ newContentX = disabledNewContentX
210211 }
211212 onMovementEnded: {
212213 if (realContentX > 0 && realContentX < realContentWidth - realWidth)
@@ -242,7 +243,7 @@ Item {
242243 easing.type: Easing.InOutQuad
243244 }
244245 ScriptAction {
245− script: listView.newContentX = -1
246+ script: listView.newContentX = listView.disabledNewContentX
246247 }
247248 }
248249
@@ -267,7 +268,7 @@ Item {
267268 readonly property bool explicitScale: (!listView.moving ||
268269 listView.realContentX <= 0 ||
269270 listView.realContentX >= listView.realContentWidth - listView.realWidth) &&
270− listView.newContentX < 0 &&
271+ listView.newContentX === listView.disabledNewContentX &&
271272 index === listView.selectedIndex
272273 readonly property real cachedTiles: listView.realPathItemCount + carousel.drawBuffer / listView.tileWidth
273274 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 @@ Item {
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
@@ -194,4 +195,11 @@ Item {
194195 }
195196 sourceComponent: root.header
196197 }
198+
199+ MouseArea {
200+ id: waitingForActionMouseArea
201+ objectName: "waitingForActionMouseArea"
202+ anchors.fill: parent
203+ enabled: false
204+ }
197205}
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: previewListView.open = false;
6161 onHideDash: previewListView.open = false;
62+ onActivated: previewLoader.closePreviewSpinner();
6263 }
6364
6465 ScopeListView {
@@ -484,6 +485,12 @@ ScopeView {
484485 previewListView.open = false
485486 }
486487 }
488+
489+ function closePreviewSpinner() {
490+ if(item) {
491+ item.showProcessingAction = false;
492+ }
493+ }
487494 }
488495 }
489496
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
debian/changelog+90−2
@@ -1,8 +1,96 @@
1−unity8 (7.83) UNRELEASED; urgency=low
1+unity8 (7.83+13.10.20131016.2-0ubuntu1) saucy; urgency=low
22
3+ [ Loïc Minier ]
4+ * Merge ~lool/unity8/drop-setcap-conf. Drop unity8-setcap.conf as this
5+ breaks desktop installs (no boot-hook event is emitted, boot
6+ stalls); add maintscript snippet to rm_conffile on upgrades; this
7+ boot-hook is now shipped under a different name in lxc-android-
8+ config.
9+
10+ [ Michał Sawicz ]
11+ * Ship a camera-app.desktop file and use a custom XDG_DATA_DIRS for
12+ testing.
13+
14+ [ Ubuntu daily release ]
15+ * Automatic snapshot from revision 472
16+
17+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 16 Oct 2013 23:15:48 +0000
18+
19+unity8 (7.83+13.10.20131016.1-0ubuntu1) saucy; urgency=low
20+
21+ [ Diego Sarmentero ]
22+ * Disable Preview interaction until the scope responds.
23+
24+ [ Albert Astals ]
25+ * Hide placeholder notification.
26+
27+ [ Ubuntu daily release ]
28+ * Automatic snapshot from revision 469
29+
30+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 16 Oct 2013 17:29:36 +0000
31+
32+unity8 (7.83+13.10.20131016-0ubuntu1) saucy; urgency=low
33+
34+ [ Loïc Minier ]
35+ * Add upstart job to copy unity8 to a new tmpfs, setcap it, and bind-
36+ mount it back; this is an ugly hack to set CAP_SYS_RESOURCE until we
37+ have a root-helper for it.
38+
39+ [ Michal Hruby ]
40+ * Enable definition of scope back references in overridden results.
41+
42+ [ Ubuntu daily release ]
43+ * Automatic snapshot from revision 466
44+
45+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 16 Oct 2013 11:29:52 +0000
46+
47+unity8 (7.83+13.10.20131015.4-0ubuntu1) saucy; urgency=low
48+
49+ [ Michał Sawicz ]
350 * Replace ubuntu-touch-session's unity8.conf upstart job.
51+ * Revert r440 that made the dash collapse animation worse, rather than
52+ better.
53+
54+ [ om26er@ubuntu.com ]
55+ * close the app only when the close button is tapped, not the entire
56+ thumbnail
57+
58+ [ Nick Dedekind ]
59+ * Added missing Unity.Indicator mock objects causing qmltests to fail.
60+ Approved by: Michał Sawicz.
61+
62+ [ Christopher Lee ]
63+ * Launch unity8 for autopilot with upstart, and bring unity8 session
64+ over from session-manager-touch.
65+
66+ [ Pawel Stolowski ]
67+ * Temporarily disable category_order changed signal handling.
68+
69+ [ Daniel d'Andrada ]
70+ * OSKController area shouldn't cover the indicators' bar Since ubuntu-
71+ keyboard surface area doesn't cover the indicators' bar,
72+ OSKController should follow suit. Otherwise the OSKContoller's
73+ internal InputFilterArea (and others) wouldn't perfectly overlap the
74+ graphical keyboard rendered by ubuntu-keyboard (i.e. the opaque part
75+ of ubuntu-keyboard's surface).
76+
77+ [ Michael Zanetti ]
78+ * Initialize initialHeight/Width to height/width depending on scaleTo
79+ add checks for initialWidth/Height in the tests change sizes in
80+ tests to something else than the default for initialWidth/Height in
81+ order to catch failures there more easily
82+
83+ [ Omer Akram ]
84+ * Only show search indicator while the Dash is focued.
85+ * Add 2dp left margin for music and video tiles' title.
86+
87+ [ Nicolas d'Offay ]
88+ * Changed Infographics to use Ubuntu font.
89+
90+ [ Ubuntu daily release ]
91+ * Automatic snapshot from revision 463
492
5− -- Michał Sawicz <michal.sawicz@canonical.com> Tue, 15 Oct 2013 01:12:45 +0200
93+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 15 Oct 2013 11:05:04 +0000
694
795unity8 (7.82+13.10.20131011.2-0ubuntu1) saucy; urgency=low
896
debian/control+2
@@ -78,6 +78,8 @@ Depends: gsettings-desktop-schemas,
7878 unity8-fake-env | qtubuntu-shell,
7979 unity8-private (= ${binary:Version}),
8080 unity8-private | unity-launcher-impl,
81+# for setcap:
82+ libcap2-bin,
8183 ${misc:Depends},
8284 ${shlibs:Depends},
8385Recommends: ${unity-default-masterscopes},
debian/unity8-fake-env.install+1
@@ -1 +1,2 @@
11usr/lib/*/unity8/qml/mocks
2+usr/share/unity8/mocks
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/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
@@ -122,6 +123,8 @@ class UnityTestCase(AutopilotTestCase):
122123 self._qml_mock_enabled = True
123124 self._environment = {}
124125
126+ self._patch_data_dirs()
127+
125128 #### FIXME: This is a work around re: lp:1238417 ####
126129 if model() != "Desktop":
127130 from autopilot.input import _uinput
@@ -297,6 +300,11 @@ class UnityTestCase(AutopilotTestCase):
297300 except subprocess.CalledProcessError:
298301 logger.warning("Appears unity was already stopped!")
299302
303+ def _patch_data_dirs(self):
304+ data_dirs = get_data_dirs()
305+ if data_dirs is not None:
306+ self._environment['XDG_DATA_DIRS'] = data_dirs
307+
300308 def patch_lightdm_mock(self, mock_type='single'):
301309 self._lightdm_mock_type = mock_type
302310 logger.info("Setting up LightDM mock type '%s'", mock_type)
tests/autopilot/unity8/shell/tests/test_notifications.py+10−9
@@ -145,7 +145,7 @@ class InteractiveNotificationBase(NotificationsBase):
145145 hints,
146146 )
147147
148− get_notification = lambda: notify_list.select_single('Notification')
148+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
149149 self.assertThat(get_notification, Eventually(NotEquals(None)))
150150 notification = get_notification()
151151
@@ -191,7 +191,7 @@ class InteractiveNotificationBase(NotificationsBase):
191191 hints
192192 )
193193
194− get_notification = lambda: notify_list.select_single('Notification')
194+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
195195 self.assertThat(get_notification, Eventually(NotEquals(None)))
196196 notification = get_notification()
197197 self._assert_notification(notification, None, None, True, True, 1.0)
@@ -360,7 +360,7 @@ class EphemeralNotificationsTests(NotificationsBase):
360360
361361 notification.show()
362362
363− get_notification = lambda: notify_list.select_single('Notification')
363+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
364364 self.assertThat(get_notification, Eventually(NotEquals(None)))
365365 notification = get_notification()
366366 self._assert_notification(notification, summary, body, True, True, 1.0)
@@ -391,7 +391,7 @@ class EphemeralNotificationsTests(NotificationsBase):
391391
392392 notification.show()
393393
394− get_notification = lambda: notify_list.select_single('Notification')
394+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
395395 self.assertThat(get_notification, Eventually(NotEquals(None)))
396396 notification = get_notification()
397397 self._assert_notification(
@@ -508,7 +508,7 @@ class EphemeralNotificationsTests(NotificationsBase):
508508 notification = self._create_ephemeral_notification(summary, body)
509509 notification.show()
510510
511− get_notification = lambda: notify_list.select_single('Notification')
511+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
512512 self.assertThat(get_notification, Eventually(NotEquals(None)))
513513 notification = get_notification()
514514 self._assert_notification(
@@ -533,7 +533,7 @@ class EphemeralNotificationsTests(NotificationsBase):
533533 notification = self._create_ephemeral_notification(summary)
534534 notification.show()
535535
536− get_notification = lambda: notify_list.select_single('Notification')
536+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
537537 self.assertThat(get_notification, Eventually(NotEquals(None)))
538538 notification = get_notification()
539539
@@ -603,7 +603,7 @@ class EphemeralNotificationsTests(NotificationsBase):
603603 )
604604 notification.show()
605605
606− get_notification = lambda: notify_list.select_single('Notification')
606+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
607607 self.assertThat(get_notification, Eventually(NotEquals(None)))
608608 self._assert_notification(
609609 get_notification(),
@@ -645,7 +645,7 @@ class EphemeralNotificationsTests(NotificationsBase):
645645
646646 notification.show()
647647
648− get_notification = lambda: notify_list.select_single('Notification')
648+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
649649 self.assertThat(get_notification, Eventually(NotEquals(None)))
650650 notification = get_notification()
651651 self._assert_notification(
@@ -678,7 +678,8 @@ class EphemeralNotificationsTests(NotificationsBase):
678678 )
679679 notification.show()
680680 get_notification = lambda: notify_list.select_single(
681− 'Notification'
681+ 'Notification',
682+ objectName='notification1'
682683 )
683684 self.assertThat(get_notification, Eventually(NotEquals(None)))
684685 notification = get_notification()
tests/mocks/CMakeLists.txt+5
@@ -7,3 +7,8 @@ add_subdirectory(Powerd)
77add_subdirectory(QMenuModel)
88add_subdirectory(Ubuntu)
99add_subdirectory(Unity)
10+
11+install(
12+ DIRECTORY data
13+ DESTINATION ${SHELL_APP_DIR}/mocks
14+)
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}