on xenial help sign in
merge trunk
commit45b5bf076c43088e29341f6583f03943efc5df6d authorMichael Zanetti <michael.zanetti@canonical.com> dateWed 10 Sep 2014, 13:31 (12 years ago) parent18fc4620f0da0f
114 files changed+2926−1582
debian/changelog+54 debian/control+1−1 plugins/AccountsService/AccountsService.qmltypes+1 plugins/Dash/CardCreator.js+2−2 plugins/Dash/listviewwithpageheader.cpp+7−4 plugins/Dash/listviewwithpageheader.h+1−1 plugins/LightDM/LightDM.qmltypes+2 plugins/Powerd/Powerd.cpp+16−2 plugins/Powerd/Powerd.h+8−1 plugins/Powerd/Powerd.qmltypes+3−3 plugins/Ubuntu/SystemImage/SystemImage.qmltypes+2 plugins/Unity/DashCommunicator/dashcommunicator.cpp+2−2 plugins/Unity/DashCommunicator/dashcommunicator.h+1−1 plugins/Unity/DashCommunicator/dashcommunicatorservice.h+1−1 plugins/Unity/DashCommunicator/dbusdashcommunicatorservice.cpp+2−2 plugins/Unity/DashCommunicator/dbusdashcommunicatorservice.h+2−2 plugins/Unity/Indicators/Indicators.qmltypes+6−4 plugins/Unity/Launcher/CMakeLists.txt+1−1 plugins/Unity/Launcher/launcheritem.cpp+1 plugins/Unity/Launcher/launchermodel.cpp+3 po/am.po+18−13 po/ast.po+62−55 po/az.po+56−64 po/ca.po+39−45 po/de.po+7−7 po/en_AU.po+37−43 po/es.po+39−45 po/eu.po+61−56 po/ja.po+37−42 po/ro.po+7−7 po/sv.po+56−52 qml/Components/Background.qml+1−1 qml/Dash/CardTool.qml+7−10 qml/Dash/Dash.qml+12−1 qml/Dash/GenericScopeView.qml+1−2 qml/Dash/PageHeader.qml+19−14 qml/Dash/PreviewListView.qml+2−2 qml/Dash/Previews/PreviewPayments.qml+2 qml/Dash/ScopesOverview.qml+6 qml/Dash/graphics/checkers.png qml/Dash/graphics/pixel.png qml/Notifications/Notification.qml+132−46 qml/Notifications/NotificationMenuItemFactory.qml+4 qml/Notifications/Notifications.qml+1−1 qml/Panel/Indicators/IndicatorsLight.qml+4−7 qml/Shell.qml+18−14 qml/Stages/Animations/BaseSurfaceAnimation.qml → qml/Stages/Animations/BaseSessionAnimation.qml+23−20 qml/Stages/Animations/DarkenAndFadeInAnimation.qml−48 qml/Stages/Animations/SwipeFromBottomAnimation.qml+24−19 qml/Stages/Animations/SwipeUpAnimation.qml−49 qml/Stages/ApplicationWindow.qml+51−71 qml/Stages/PhoneStage.qml+6−1 qml/Stages/SessionContainer.qml+143 qml/Stages/SurfaceContainer.qml+22−67 qml/Stages/TabletStage.qml+5 qml/Stages/TransformedTabletSpreadDelegate.qml+2−1 run_on_device.sh+43−41 tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py+4−2 tests/autopilot/unity8/process_helpers.py+12−17 tests/autopilot/unity8/shell/emulators/greeter.py+4−1 tests/autopilot/unity8/shell/tests/test_lock_screen.py+8−9 tests/autopilot/unity8/shell/tests/test_notifications.py+61−97 tests/mocks/AccountsService/AccountsService.qmltypes+1 tests/mocks/LightDM/LightDM.qmltypes+2 tests/mocks/Powerd/Powerd.cpp+15−1 tests/mocks/Powerd/Powerd.h+8−1 tests/mocks/Powerd/Powerd.qmltypes+3−3 tests/mocks/Ubuntu/Payments/MockPayments.cpp+10−7 tests/mocks/Ubuntu/Payments/MockPayments.h+1 tests/mocks/Ubuntu/SystemImage/SystemImage.qmltypes+3−1 tests/mocks/Unity/Application/Application.qmltypes+115−70 tests/mocks/Unity/Application/ApplicationDBusAdaptor.cpp−81 tests/mocks/Unity/Application/ApplicationInfo.cpp+36−85 tests/mocks/Unity/Application/ApplicationInfo.h+11−23 tests/mocks/Unity/Application/ApplicationManager.cpp+9−16 tests/mocks/Unity/Application/ApplicationManager.h+1−2 tests/mocks/Unity/Application/ApplicationTestInterface.cpp+117 tests/mocks/Unity/Application/ApplicationDBusAdaptor.h → tests/mocks/Unity/Application/ApplicationTestInterface.h+13−11 tests/mocks/Unity/Application/CMakeLists.txt+6−1 tests/mocks/Unity/Application/MirSurfaceItem.cpp+19−79 tests/mocks/Unity/Application/MirSurfaceItem.h+24−31 tests/mocks/Unity/Application/MirSurfaceItemModel.h+35 tests/mocks/Unity/Application/ObjectListModel.h+106 tests/mocks/Unity/Application/Session.cpp+174 tests/mocks/Unity/Application/Session.h+90 tests/mocks/Unity/Application/SessionManager.cpp+55 tests/mocks/Unity/Application/SessionManager.h+44 tests/mocks/Unity/Application/SessionModel.h+35 tests/mocks/Unity/Application/SurfaceManager.cpp+20−7 tests/mocks/Unity/Application/SurfaceManager.h+6−2 tests/mocks/Unity/Application/plugin.cpp+37−4 tests/mocks/Unity/DashCommunicator/dashcommunicatorservice.cpp+2−2 tests/mocks/Unity/DashCommunicator/dashcommunicatorservice.h+2−2 tests/mocks/Unity/Indicators/Indicators.qmltypes+20 tests/mocks/Unity/Unity.qmltypes+30−2 tests/mocks/Unity/fake_scope.cpp+1−1 tests/plugins/Dash/cardcreator/2.res+2−2 tests/plugins/Dash/cardcreator/5.res+2−2 tests/plugins/Dash/cardcreator/6.res+3−3 tests/plugins/Dash/cardcreator/7.res+3−3 tests/plugins/Unity/Launcher/CMakeLists.txt+1−1 tests/qmltests/CMakeLists.txt+1 tests/qmltests/Dash/Previews/tst_PreviewPayments.qml+49−9 tests/qmltests/Dash/tst_Dash.qml+9−2 tests/qmltests/Dash/tst_PreviewListView.qml+29−1 tests/qmltests/Notifications/tst_Notifications.qml+59−17 tests/qmltests/Panel/tst_ActiveCallHint.qml+1−1 tests/qmltests/Stages/RecursingChildSessionControl.qml+142 tests/qmltests/Stages/tst_ApplicationWindow.qml+99−47 tests/qmltests/Stages/tst_PhoneStage.qml+1−1 tests/qmltests/Stages/tst_SessionContainer.qml+267 tests/qmltests/Stages/tst_SurfaceContainer.qml+28−43 tests/qmltests/tst_Shell.qml+23−16 tools/unlock-device+4−5
debian/changelog+54
@@ -1,3 +1,57 @@
1+unity8 (8.00+14.10.20140908.1-0ubuntu1) utopic; urgency=low
2+
3+ [ Michał Sawicz ]
4+ * Use a single white pixel instead of the heavier checkers image.
5+ * Add support to unlock-device for the new adbd coming down the
6+ pipeline. Also fix autopilot tests and run scripts for that.
7+ * Make LVWPH non interactive while on header animation
8+ * Improve references to scope/scopeStyle in PreviewListView and
9+ PageHeader, add tests.
10+
11+ [ Nick Dedekind ]
12+ * Support for nested prompt session. (LP: #1358388)
13+
14+ [ Albert Astals ]
15+ * Remove unused hasAttributes variable
16+ * Disable dash overview if in temp scope preview
17+ * Block mouse events under scope overview bottombar (LP: #1362206)
18+ * Fix regression in focus handling due to SDK change
19+ * Fix warning 'Background.qml:81:21: Unable to assign bool to QUrl'
20+ * Fix launcher internationalization
21+ * Make swipe and home button press in the launcher dismiss the
22+ overview
23+ * GSV: Use proper variable since altnav renames
24+ * Fix some "Cannot read property 'luminance' of null" warnings
25+ * Make LVWPH non interactive while on header animation
26+
27+ [ Mirco Müller ]
28+ * Implemented the needed visual updates on notifications requested by
29+ Design for RTM. (LP: #1348092)
30+
31+ [ Michael Terry ]
32+ * Don't show greeter when screen turns off during a call, even if
33+ proximity sensor isn't active. (LP: #1347001)
34+ * Add support to unlock-device for the new adbd coming down the
35+ pipeline. Also fix autopilot tests and run scripts for that.
36+
37+ [ Michael Zanetti ]
38+ * open the application when clicking on the title entry in the
39+ quicklist (LP: #1336380)
40+ * Don't animate x while dragging apps from the left edge (LP:
41+ #1360105)
42+
43+ [ Diego Sarmentero ]
44+ * Reset button state on cancel (LP: #1362622)
45+
46+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 08 Sep 2014 14:16:42 +0000
47+
48+unity8 (8.00+14.10.20140903.1-0ubuntu1) utopic; urgency=low
49+
50+ [ Nick Dedekind ]
51+ * Support for nested prompt session. (LP: #1358388)
52+
53+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 03 Sep 2014 07:58:49 +0000
54+
155unity8 (8.00+14.10.20140828.1-0ubuntu1) utopic; urgency=low
256
357 [ Michael Terry ]
debian/control+1−1
@@ -85,7 +85,7 @@ Depends: gsettings-desktop-schemas,
8585 qmenumodel-qml (>= 0.2.8),
8686 qml-module-qtquick-xmllistmodel,
8787 qtdeclarative5-gsettings1.0,
88− qtdeclarative5-qtmir-plugin (>= 0.4.1),
88+ qtdeclarative5-qtmir-plugin (>= 0.4.3),
8989 qtdeclarative5-ubuntu-telephony0.1,
9090 unity-launcher-impl-4,
9191 unity8-common (= ${source:Version}),
plugins/AccountsService/AccountsService.qmltypes+1
@@ -26,5 +26,6 @@ Module {
2626 Property { name: "backgroundFile"; type: "string"; isReadonly: true }
2727 Property { name: "statsWelcomeScreen"; type: "bool"; isReadonly: true }
2828 Property { name: "passwordDisplayHint"; type: "PasswordDisplayHint"; isReadonly: true }
29+ Property { name: "failedLogins"; type: "uint" }
2930 }
3031}
plugins/Dash/CardCreator.js+2−2
@@ -440,14 +440,14 @@ function cardString(template, components) {
440440 mascotCode = kMascotImageCode.arg(mascotAnchors).arg(mascotImageVisible);
441441 }
442442
443− var summaryColorWithBackground = 'backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white")';
443+ var summaryColorWithBackground = 'backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white")';
444444
445445 var hasTitleContainer = hasTitle && (hasEmblem || (hasMascot && (hasSubtitle || hasAttributes)));
446446 var titleSubtitleCode = '';
447447 if (hasTitle) {
448448 var titleColor;
449449 if (headerAsOverlay) {
450− titleColor = 'root.scopeStyle ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white")';
450+ titleColor = 'root.scopeStyle && overlayLoader.item ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item && overlayLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white")';
451451 } else if (hasSummary) {
452452 titleColor = 'summary.color';
453453 } else if (hasBackground) {
plugins/Dash/listviewwithpageheader.cpp+7−4
@@ -172,7 +172,7 @@ ListViewWithPageHeader::ListViewWithPageHeader()
172172 connect(this, SIGNAL(contentWidthChanged()), this, SLOT(onContentWidthChanged()));
173173 connect(this, SIGNAL(contentHeightChanged()), this, SLOT(onContentHeightChanged()));
174174 connect(this, SIGNAL(heightChanged()), this, SLOT(onHeightChanged()));
175− connect(m_contentYAnimation, SIGNAL(stopped()), this, SLOT(onShowHeaderAnimationFinished()));
175+ connect(m_contentYAnimation, SIGNAL(runningChanged(bool)), this, SLOT(contentYAnimationRunningChanged(bool)));
176176
177177 setFlickableDirection(VerticalFlick);
178178}
@@ -1056,10 +1056,13 @@ void ListViewWithPageHeader::onModelUpdated(const QQmlChangeSet &changeSet, bool
10561056 m_contentHeightDirty = true;
10571057}
10581058
1059−void ListViewWithPageHeader::onShowHeaderAnimationFinished()
1059+void ListViewWithPageHeader::contentYAnimationRunningChanged(bool running)
10601060{
1061− m_contentHeightDirty = true;
1062− polish();
1061+ setInteractive(!running);
1062+ if (!running) {
1063+ m_contentHeightDirty = true;
1064+ polish();
1065+ }
10631066}
10641067
10651068void ListViewWithPageHeader::itemGeometryChanged(QQuickItem * /*item*/, const QRectF &newGeometry, const QRectF &oldGeometry)
plugins/Dash/listviewwithpageheader.h+1−1
@@ -118,7 +118,7 @@ private Q_SLOTS:
118118 void onContentWidthChanged();
119119 void onHeightChanged();
120120 void onModelUpdated(const QQmlChangeSet &changeSet, bool reset);
121− void onShowHeaderAnimationFinished();
121+ void contentYAnimationRunningChanged(bool running);
122122
123123private:
124124 class ListItem
plugins/LightDM/LightDM.qmltypes+2
@@ -27,6 +27,7 @@ Module {
2727 name: "showPrompt"
2828 Parameter { name: "text"; type: "string" }
2929 Parameter { name: "isSecret"; type: "bool" }
30+ Parameter { name: "isDefaultPrompt"; type: "bool" }
3031 }
3132 Signal { name: "authenticationComplete" }
3233 Signal {
@@ -34,6 +35,7 @@ Module {
3435 Parameter { name: "user"; type: "string" }
3536 }
3637 Signal { name: "isActiveChanged" }
38+ Signal { name: "isAuthenticatedChanged" }
3739 Signal { name: "showGreeter" }
3840 Signal {
3941 name: "requestAuthenticationUser"
plugins/Powerd/Powerd.cpp+16−2
@@ -39,7 +39,8 @@ void dimTimeoutChanged(GSettings *settings, const gchar *key, QDBusInterface *un
3939
4040Powerd::Powerd(QObject* parent)
4141 : QObject(parent),
42− unityScreen(nullptr)
42+ unityScreen(nullptr),
43+ cachedStatus(Status::On)
4344{
4445 unityScreen = new QDBusInterface("com.canonical.Unity.Screen",
4546 "/com/canonical/Unity/Screen",
@@ -51,7 +52,7 @@ Powerd::Powerd(QObject* parent)
5152 "com.canonical.Unity.Screen",
5253 "DisplayPowerStateChange",
5354 this,
54− SIGNAL(displayPowerStateChange(int, int)));
55+ SLOT(handleDisplayPowerStateChange(int, int)));
5556
5657 systemSettings = g_settings_new("com.ubuntu.touch.system");
5758 g_signal_connect(systemSettings, "changed::auto-brightness", G_CALLBACK(autoBrightnessChanged), unityScreen);
@@ -67,3 +68,16 @@ Powerd::~Powerd()
6768 g_signal_handlers_disconnect_by_data(systemSettings, unityScreen);
6869 g_object_unref(systemSettings);
6970}
71+
72+Powerd::Status Powerd::status() const
73+{
74+ return cachedStatus;
75+}
76+
77+void Powerd::handleDisplayPowerStateChange(int status, int reason)
78+{
79+ if (cachedStatus != (Status)status) {
80+ cachedStatus = (Status)status;
81+ Q_EMIT statusChanged((DisplayStateChangeReason)reason);
82+ }
83+}
plugins/Powerd/Powerd.h+8−1
@@ -29,6 +29,7 @@ class Powerd: public QObject
2929 Q_OBJECT
3030 Q_ENUMS(Status)
3131 Q_ENUMS(DisplayStateChangeReason)
32+ Q_PROPERTY(Status status READ status NOTIFY statusChanged)
3233
3334public:
3435 enum DisplayStateChangeReason {
@@ -46,12 +47,18 @@ public:
4647 explicit Powerd(QObject *parent = 0);
4748 ~Powerd();
4849
50+ Status status() const;
51+
4952Q_SIGNALS:
50− void displayPowerStateChange(int status, int reason);
53+ void statusChanged(DisplayStateChangeReason reason);
54+
55+private Q_SLOTS:
56+ void handleDisplayPowerStateChange(int status, int reason);
5157
5258private:
5359 QDBusInterface *unityScreen;
5460 GSettings *systemSettings;
61+ Status cachedStatus;
5562};
5663
5764#endif
plugins/Powerd/Powerd.qmltypes+3−3
@@ -30,10 +30,10 @@ Module {
3030 "On": 1
3131 }
3232 }
33+ Property { name: "status"; type: "Status"; isReadonly: true }
3334 Signal {
34− name: "displayPowerStateChange"
35− Parameter { name: "status"; type: "int" }
36− Parameter { name: "reason"; type: "int" }
35+ name: "statusChanged"
36+ Parameter { name: "reason"; type: "DisplayStateChangeReason" }
3737 }
3838 }
3939}
plugins/Ubuntu/SystemImage/SystemImage.qmltypes+2
@@ -11,6 +11,8 @@ Module {
1111 name: "SystemImage"
1212 prototype: "QObject"
1313 exports: ["Ubuntu.SystemImage/SystemImage 0.1"]
14+ isCreatable: false
15+ isSingleton: true
1416 exportMetaObjectRevisions: [0]
1517 Method { name: "factoryReset" }
1618 }
plugins/Unity/DashCommunicator/dashcommunicator.cpp+2−2
@@ -31,7 +31,7 @@ DashCommunicator::~DashCommunicator()
3131}
3232
3333
34−void DashCommunicator::setCurrentScope(const QString &scopeId, bool animate, bool reset)
34+void DashCommunicator::setCurrentScope(const QString &scopeId, bool animate, bool isSwipe)
3535{
3636 QDBusConnection connection = QDBusConnection::sessionBus();
3737 QDBusInterface dashIface ("com.canonical.UnityDash",
@@ -39,5 +39,5 @@ void DashCommunicator::setCurrentScope(const QString &scopeId, bool animate, boo
3939 "",
4040 connection);
4141
42− dashIface.call("SetCurrentScope", scopeId, animate, reset);
42+ dashIface.call("SetCurrentScope", scopeId, animate, isSwipe);
4343}
plugins/Unity/DashCommunicator/dashcommunicator.h+1−1
@@ -29,7 +29,7 @@ public:
2929 ~DashCommunicator();
3030
3131public Q_SLOTS:
32− void setCurrentScope(const QString &scopeId, bool animate, bool reset);
32+ void setCurrentScope(const QString &scopeId, bool animate, bool isSwipe);
3333};
3434
3535#endif
plugins/Unity/DashCommunicator/dashcommunicatorservice.h+1−1
@@ -29,7 +29,7 @@ public:
2929 ~DashCommunicatorService();
3030
3131Q_SIGNALS:
32− void setCurrentScopeRequested(const QString &scopeId, bool animate, bool reset);
32+ void setCurrentScopeRequested(const QString &scopeId, bool animate, bool isSwipe);
3333
3434private:
3535 DBusDashCommunicatorService *m_dbusService;
plugins/Unity/DashCommunicator/dbusdashcommunicatorservice.cpp+2−2
@@ -33,7 +33,7 @@ DBusDashCommunicatorService::~DBusDashCommunicatorService()
3333{
3434}
3535
36−void DBusDashCommunicatorService::SetCurrentScope(const QString &scopeId, bool animate, bool reset)
36+void DBusDashCommunicatorService::SetCurrentScope(const QString &scopeId, bool animate, bool isSwipe)
3737{
38− Q_EMIT setCurrentScopeRequested(scopeId, animate, reset);
38+ Q_EMIT setCurrentScopeRequested(scopeId, animate, isSwipe);
3939}
plugins/Unity/DashCommunicator/dbusdashcommunicatorservice.h+2−2
@@ -29,10 +29,10 @@ public:
2929 ~DBusDashCommunicatorService();
3030
3131Q_SIGNALS:
32− void setCurrentScopeRequested(const QString &scopeId, bool animate, bool reset);
32+ void setCurrentScopeRequested(const QString &scopeId, bool animate, bool isSwipe);
3333
3434public Q_SLOTS:
35− Q_SCRIPTABLE void SetCurrentScope(const QString &scopeId, bool animate, bool reset);
35+ Q_SCRIPTABLE void SetCurrentScope(const QString &scopeId, bool animate, bool isSwipe);
3636
3737};
3838
plugins/Unity/Indicators/Indicators.qmltypes+6−4
@@ -219,12 +219,14 @@ Module {
219219 Method {
220220 name: "model"
221221 type: "UnityMenuModel*"
222− Parameter { name: "path"; type: "string" }
222+ Parameter { name: "bus"; type: "QByteArray" }
223+ Parameter { name: "path"; type: "QByteArray" }
224+ Parameter { name: "actions"; type: "QVariantMap" }
223225 }
224226 Method {
225− name: "registerModel"
226− Parameter { name: "path"; type: "string" }
227− Parameter { name: "menuModel"; type: "UnityMenuModel"; isPointer: true }
227+ name: "contains"
228+ type: "bool"
229+ Parameter { name: "path"; type: "QByteArray" }
228230 }
229231 }
230232 Component {
plugins/Unity/Launcher/CMakeLists.txt+1−1
@@ -32,6 +32,6 @@ add_library(UnityLauncher-qml MODULE
3232
3333target_link_libraries(UnityLauncher-qml ${GSETTINGS_QT_LDFLAGS})
3434
35−qt5_use_modules(UnityLauncher-qml DBus Qml)
35+qt5_use_modules(UnityLauncher-qml DBus Qml Gui)
3636
3737add_unity8_plugin(Unity.Launcher 0.1 Unity/Launcher TARGETS UnityLauncher-qml)
plugins/Unity/Launcher/launcheritem.cpp+1
@@ -37,6 +37,7 @@ LauncherItem::LauncherItem(const QString &appId, const QString &name, const QStr
3737 m_quickList(new QuickListModel(this))
3838{
3939 QuickListEntry nameAction;
40+ nameAction.setActionId("launch_item");
4041 nameAction.setText(m_name);
4142 m_quickList->appendAction(nameAction);
4243 QuickListEntry pinningAction;
plugins/Unity/Launcher/launchermodel.cpp+3
@@ -25,6 +25,7 @@
2525
2626#include <unity/shell/application/ApplicationInfoInterface.h>
2727
28+#include <QDesktopServices>
2829#include <QDebug>
2930
3031using namespace unity::shell::application;
@@ -210,6 +211,8 @@ void LauncherModel::quickListActionInvoked(const QString &appId, int actionIndex
210211 } else {
211212 pin(appId);
212213 }
214+ } else if (actionId == "launch_item") {
215+ QDesktopServices::openUrl(getUrlForAppId(appId));
213216
214217 // Nope, we don't know this action, let the backend forward it to the application
215218 } else {
po/am.po+18−13
@@ -8,14 +8,14 @@ msgstr ""
88"Project-Id-Version: unity8\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2014-08-26 18:24+0200\n"
11−"PO-Revision-Date: 2014-08-30 14:40+0000\n"
11+"PO-Revision-Date: 2014-09-02 01:51+0000\n"
1212"Last-Translator: samson <Unknown>\n"
1313"Language-Team: Amharic <am@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: 2014-08-31 07:30+0000\n"
18−"X-Generator: Launchpad (build 17176)\n"
17+"X-Launchpad-Export-Date: 2014-09-03 07:05+0000\n"
18+"X-Generator: Launchpad (build 17196)\n"
1919
2020#: plugins/LightDM/Greeter.cpp:130
2121msgid "Password: "
@@ -129,6 +129,7 @@ msgid ""
129129"You have now mastered the edge gestures and can start using the "
130130"phone<br><br>Tap on the screen to start"
131131msgstr ""
132+"አሁን የ ጠርዝ እንቅስቃሴን አውቀዋል እና መጀመር ይችላሉ ስልኩን መጠቀም <br><br>መመልከቻውን መታ ያድርጉ ለመጀመር"
132133
133134#: qml/Components/Lockscreen.qml:167
134135msgid "Please wait"
@@ -202,7 +203,7 @@ msgstr "መላኪያ"
202203
203204#: qml/Dash/ScopesOverview.qml:201
204205msgid "Manage Dash"
205−msgstr ""
206+msgstr "የ ዳሽ አስተዳዳሪ"
206207
207208#: qml/Dash/ScopesOverview.qml:417
208209msgid "Done"
@@ -250,11 +251,11 @@ msgstr "የመግቢያ ቃል ማሳያ"
250251
251252#: qml/Notifications/NotificationMenuItemFactory.qml:120
252253msgid "Enter SIM PIN"
253−msgstr ""
254+msgstr "ሲም ፒን ያስገቡ"
254255
255256#: qml/Notifications/NotificationMenuItemFactory.qml:121
256257msgid "Sorry, incorrect PIN"
257−msgstr ""
258+msgstr "አዝናለሁ የተሳሳተ ፒን"
258259
259260#: qml/Panel/ActiveCallHint.qml:77
260261msgid "Tap to return to call..."
@@ -290,11 +291,11 @@ msgstr "አልተቻለም: እንደገና ለመሞከር መታ ያድርጉ"
290291
291292#: qml/Panel/Indicators/ModemInfoItem.qml:105
292293msgid "Unlock SIM"
293−msgstr ""
294+msgstr "ሲም መክፈቻ"
294295
295296#: qml/Panel/Indicators/RoamingIndication.qml:27
296297msgid "Roaming"
297−msgstr ""
298+msgstr "ማዘዋወሪያ"
298299
299300#: qml/Shell.qml:279
300301msgid "Enter your passphrase"
@@ -302,15 +303,15 @@ msgstr "የማለፊያ ሐረግ ያስገቡ"
302303
303304#: qml/Shell.qml:280
304305msgid "Sorry, incorrect passphrase"
305−msgstr ""
306+msgstr "አዝናለሁ የተሳሳተ የማለፊያ ሐረግ"
306307
307308#: qml/Shell.qml:282
308309msgid "Enter your passcode"
309−msgstr ""
310+msgstr "የ እርስዎን የማለፊያ ኮድ ያስገቡ"
310311
311312#: qml/Shell.qml:283
312313msgid "Sorry, incorrect passcode"
313−msgstr ""
314+msgstr "አዝናለሁ የተሳሳተ የማለፊያ ኮድ"
314315
315316#: qml/Shell.qml:286
316317#, qt-format
@@ -324,11 +325,11 @@ msgstr "አዝናለሁ: የተሳሳተ%1"
324325
325326#: qml/Shell.qml:323
326327msgid "Sorry, incorrect passphrase."
327−msgstr ""
328+msgstr "አዝናለሁ የተሳሳተ የማለፊያ ሐረግ"
328329
329330#: qml/Shell.qml:324
330331msgid "Sorry, incorrect passcode."
331−msgstr ""
332+msgstr "አዝናለሁ የተሳሳተ የማለፊያ ኮድ"
332333
333334#: qml/Shell.qml:325
334335msgid "This will be your last attempt."
@@ -339,9 +340,13 @@ msgid ""
339340"If passphrase is entered incorrectly, your phone will conduct a factory "
340341"reset and all personal data will be deleted."
341342msgstr ""
343+"የተሳሳተ የማለፊያ ሐረግ ካስገቡ የ እርስዎ ስልክ ወደ ነበረበት ወደ ፋክቶሪው ዘዴ ይመለሳል: እና የ ግል ዳታ በሙሉ "
344+"ይጠፋል"
342345
343346#: qml/Shell.qml:328
344347msgid ""
345348"If passcode is entered incorrectly, your phone will conduct a factory reset "
346349"and all personal data will be deleted."
347350msgstr ""
351+"የተሳሳተ የማለፊያ ኮድ ካስገቡ የ እርስዎ ስልክ ወደ ነበረበት ወደ ፋክቶሪው ዘዴ ይመለሳል: እና የ ግል ዳታ በሙሉ "
352+"ይጠፋል"
po/ast.po+62−55
@@ -8,18 +8,18 @@ msgstr ""
88"Project-Id-Version: unity8\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2014-08-26 18:24+0200\n"
11−"PO-Revision-Date: 2014-07-25 16:51+0000\n"
11+"PO-Revision-Date: 2014-08-31 12:51+0000\n"
1212"Last-Translator: ivarela <ivarela@ubuntu.com>\n"
1313"Language-Team: Asturian <ast@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: 2014-08-28 06:29+0000\n"
18−"X-Generator: Launchpad (build 17174)\n"
17+"X-Launchpad-Export-Date: 2014-09-01 07:33+0000\n"
18+"X-Generator: Launchpad (build 17176)\n"
1919
20−#: plugins/LightDM/Greeter.cpp:129
20+#: plugins/LightDM/Greeter.cpp:130
2121msgid "Password: "
22−msgstr ""
22+msgstr "Contraseña: "
2323
2424#: plugins/Unity/Launcher/launcheritem.cpp:43
2525#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -32,55 +32,57 @@ msgstr "Desanclar"
3232
3333#: qml/Components/Dialogs.qml:70
3434msgid "Log out"
35−msgstr ""
35+msgstr "Zarrar sesión"
3636
3737#: qml/Components/Dialogs.qml:71
3838msgid "Are you sure you want to log out?"
39−msgstr ""
39+msgstr "De xuru que quies zarrar la sesión?"
4040
4141#: qml/Components/Dialogs.qml:73 qml/Components/Dialogs.qml:97
4242#: qml/Components/Dialogs.qml:122
4343msgid "No"
44−msgstr ""
44+msgstr "Non"
4545
4646#: qml/Components/Dialogs.qml:80 qml/Components/Dialogs.qml:104
4747#: qml/Components/Dialogs.qml:129
4848msgid "Yes"
49−msgstr ""
49+msgstr "Sí"
5050
5151#: qml/Components/Dialogs.qml:94
5252msgid "Shut down"
53−msgstr ""
53+msgstr "Apagar"
5454
5555#: qml/Components/Dialogs.qml:95
5656msgid "Are you sure you want to shut down?"
57−msgstr ""
57+msgstr "De xuru que quies apagar?"
5858
5959#: qml/Components/Dialogs.qml:119
6060msgid "Reboot"
61−msgstr ""
61+msgstr "Reaniciar"
6262
6363#: qml/Components/Dialogs.qml:120
6464msgid "Are you sure you want to reboot?"
65−msgstr ""
65+msgstr "De xuru que quies reaniciar?"
6666
6767#: qml/Components/Dialogs.qml:144
6868msgid "Power"
69−msgstr ""
69+msgstr "Enerxía"
7070
7171#: qml/Components/Dialogs.qml:145
7272msgid ""
7373"Are you sure you would like\n"
7474"to power off?"
7575msgstr ""
76+"De xuru que quies\n"
77+"apagar?"
7678
77−#: qml/Components/Dialogs.qml:144
79+#: qml/Components/Dialogs.qml:147
7880msgid "Power off"
79−msgstr ""
81+msgstr "Apagar"
8082
81−#: qml/Components/Dialogs.qml:162
83+#: qml/Components/Dialogs.qml:157
8284msgid "Cancel"
83−msgstr ""
85+msgstr "Encaboxar"
8486
8587#: qml/Components/EdgeDemoOverlay.qml:151
8688msgid "Skip intro"
@@ -134,11 +136,11 @@ msgstr ""
134136
135137#: qml/Components/Lockscreen.qml:167
136138msgid "Please wait"
137−msgstr ""
139+msgstr "Espera un segundu"
138140
139141#: qml/Components/Lockscreen.qml:172
140142msgid "Too many incorrect attempts"
141−msgstr ""
143+msgstr "Munchos intentos incorreutos"
142144
143145#: qml/Components/Lockscreen.qml:206
144146msgid "Emergency Call"
@@ -165,21 +167,22 @@ msgstr "Ver menos"
165167msgid "See all"
166168msgstr "Ver too"
167169
168−#: qml/Dash/GenericScopeView.qml:424 qml/Panel/SearchIndicator.qml:27
170+#: qml/Dash/GenericScopeView.qml:424 qml/Dash/PageHeader.qml:260
171+#: qml/Panel/SearchIndicator.qml:27
169172msgid "Search"
170173msgstr "Guetar"
171174
172175#: qml/Dash/PageHeader.qml:270
173176msgid "Settings"
174−msgstr ""
177+msgstr "Axustes"
175178
176179#: qml/Dash/PageHeader.qml:279
177180msgid "Remove from Favorites"
178−msgstr ""
181+msgstr "Desaniciar de favoritos"
179182
180183#: qml/Dash/PageHeader.qml:279
181184msgid "Add to Favorites"
182−msgstr ""
185+msgstr "Amestar a favoritos"
183186
184187#: qml/Dash/Previews/PreviewActionCombo.qml:34
185188msgid "More..."
@@ -203,29 +206,29 @@ msgstr "Unviar"
203206
204207#: qml/Dash/ScopesOverview.qml:201
205208msgid "Manage Dash"
206−msgstr ""
209+msgstr "Xestionar tableru"
207210
208−#: qml/Dash/ScopesOverview.qml:408
211+#: qml/Dash/ScopesOverview.qml:417
209212msgid "Done"
210−msgstr ""
213+msgstr "Fecho"
211214
212−#: qml/Dash/ScopesOverview.qml:434
215+#: qml/Dash/ScopesOverview.qml:443
213216msgid "Store"
214−msgstr ""
217+msgstr "Tienda"
215218
216219#: qml/Dash/ScopesOverviewTab.qml:36
217220msgid "Favorites"
218−msgstr ""
221+msgstr "Favoritos"
219222
220223#: qml/Dash/ScopesOverviewTab.qml:54
221224msgid "All"
222−msgstr ""
225+msgstr "Too"
223226
224227#: qml/Greeter/Greeter.qml:157
225228msgid "Swipe to unlock"
226229msgstr "Esliza pa desbloquiar"
227230
228−#: qml/Hud/HudParametrizedActionsPage.qml:132
231+#: qml/Hud/HudParametrizedActionsPage.qml:139
229232msgid "Confirm"
230233msgstr "Confirmar"
231234
@@ -251,11 +254,11 @@ msgstr "Amosar contraseña"
251254
252255#: qml/Notifications/NotificationMenuItemFactory.qml:120
253256msgid "Enter SIM PIN"
254−msgstr ""
257+msgstr "Escribi'l PIN de la SIM"
255258
256−#: qml/Notifications/NotificationMenuItemFactory.qml:121 qml/Shell.qml:270
259+#: qml/Notifications/NotificationMenuItemFactory.qml:121
257260msgid "Sorry, incorrect PIN"
258−msgstr ""
261+msgstr "PIN incorreutu"
259262
260263#: qml/Panel/ActiveCallHint.qml:77
261264msgid "Tap to return to call..."
@@ -291,58 +294,62 @@ msgstr "Falló, toca pa reintentar"
291294
292295#: qml/Panel/Indicators/ModemInfoItem.qml:105
293296msgid "Unlock SIM"
294−msgstr ""
297+msgstr "Desbloquiar SIM"
295298
296299#: qml/Panel/Indicators/RoamingIndication.qml:27
297300msgid "Roaming"
298−msgstr ""
301+msgstr "Roaming"
299302
300−#: qml/Shell.qml:266
303+#: qml/Shell.qml:279
301304msgid "Enter your passphrase"
302−msgstr ""
305+msgstr "Introduz contraseña"
303306
304−#: qml/Shell.qml:267
307+#: qml/Shell.qml:280
305308msgid "Sorry, incorrect passphrase"
306−msgstr ""
309+msgstr "Sentímoslo, contraseña incorreuta"
307310
308311#: qml/Shell.qml:282
309312msgid "Enter your passcode"
310−msgstr ""
313+msgstr "Introduz códigu de pasu"
311314
312315#: qml/Shell.qml:283
313316msgid "Sorry, incorrect passcode"
314−msgstr ""
317+msgstr "Sentímoslo, códigu de pasu incorreutu"
315318
316−#: qml/Shell.qml:273
319+#: qml/Shell.qml:286
317320#, qt-format
318321msgid "Enter your %1"
319−msgstr ""
322+msgstr "Introduz %1"
320323
321−#: qml/Shell.qml:274
324+#: qml/Shell.qml:287
322325#, qt-format
323326msgid "Sorry, incorrect %1"
324−msgstr ""
327+msgstr "Sentímoslo, %1 incorreutu"
325328
326−#: qml/Shell.qml:310
329+#: qml/Shell.qml:323
327330msgid "Sorry, incorrect passphrase."
328−msgstr ""
331+msgstr "Fras de pasu incorreuta"
329332
330−#: qml/Shell.qml:311
333+#: qml/Shell.qml:324
331334msgid "Sorry, incorrect passcode."
332−msgstr ""
335+msgstr "Códigu de pasu incorreutu"
333336
334−#: qml/Shell.qml:312
337+#: qml/Shell.qml:325
335338msgid "This will be your last attempt."
336−msgstr ""
339+msgstr "Esti ye'l caberu intentu."
337340
338−#: qml/Shell.qml:314
341+#: qml/Shell.qml:327
339342msgid ""
340343"If passphrase is entered incorrectly, your phone will conduct a factory "
341344"reset and all personal data will be deleted."
342345msgstr ""
346+"Si s'inxerta la fras incorreutamente, el teléfonu va volver a la "
347+"configuración de fábrica y van perdese tolos datos personales."
343348
344−#: qml/Shell.qml:315
349+#: qml/Shell.qml:328
345350msgid ""
346351"If passcode is entered incorrectly, your phone will conduct a factory reset "
347352"and all personal data will be deleted."
348353msgstr ""
354+"Si s'inxerta'l códigu incorreutamente, el teléfonu va volver a la "
355+"configuración de fábrica y van perdese tolos datos personales."
po/az.po+56−64
@@ -8,18 +8,18 @@ msgstr ""
88"Project-Id-Version: unity\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2014-08-26 18:24+0200\n"
11−"PO-Revision-Date: 2014-08-26 22:12+0000\n"
12−"Last-Translator: Turan Mahmudov <turan.mahmudov@gmail.com>\n"
11+"PO-Revision-Date: 2014-09-03 16:39+0000\n"
12+"Last-Translator: Nicat Məmmədov <n1c4t97@gmail.com>\n"
1313"Language-Team: Azerbaijani <az@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: 2014-08-28 06:29+0000\n"
18−"X-Generator: Launchpad (build 17174)\n"
17+"X-Launchpad-Export-Date: 2014-09-04 08:35+0000\n"
18+"X-Generator: Launchpad (build 17196)\n"
1919
20−#: plugins/LightDM/Greeter.cpp:129
20+#: plugins/LightDM/Greeter.cpp:130
2121msgid "Password: "
22−msgstr "Parol: "
22+msgstr "Şifrә: "
2323
2424#: plugins/Unity/Launcher/launcheritem.cpp:43
2525#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -32,37 +32,37 @@ msgstr "Açma qısayolu"
3232
3333#: qml/Components/Dialogs.qml:70
3434msgid "Log out"
35−msgstr ""
35+msgstr "Çıxış"
3636
3737#: qml/Components/Dialogs.qml:71
3838msgid "Are you sure you want to log out?"
39−msgstr ""
39+msgstr "Çıxmaq istәdiyinizdәn әminsiniz?"
4040
4141#: qml/Components/Dialogs.qml:73 qml/Components/Dialogs.qml:97
4242#: qml/Components/Dialogs.qml:122
4343msgid "No"
44−msgstr ""
44+msgstr "Yox"
4545
4646#: qml/Components/Dialogs.qml:80 qml/Components/Dialogs.qml:104
4747#: qml/Components/Dialogs.qml:129
4848msgid "Yes"
49−msgstr ""
49+msgstr "Hə"
5050
5151#: qml/Components/Dialogs.qml:94
5252msgid "Shut down"
53−msgstr ""
53+msgstr "Sistemi Söndür"
5454
5555#: qml/Components/Dialogs.qml:95
5656msgid "Are you sure you want to shut down?"
57−msgstr ""
57+msgstr "Sistemi söndürmәk istәdiyinizә әminsiniz?"
5858
5959#: qml/Components/Dialogs.qml:119
6060msgid "Reboot"
61−msgstr ""
61+msgstr "Yenidən yüklə"
6262
6363#: qml/Components/Dialogs.qml:120
6464msgid "Are you sure you want to reboot?"
65−msgstr ""
65+msgstr "Yenidәn başlatmaq istәdiyinizә әminsiniz?"
6666
6767#: qml/Components/Dialogs.qml:144
6868msgid "Power"
@@ -74,17 +74,17 @@ msgid ""
7474"to power off?"
7575msgstr ""
7676
77−#: qml/Components/Dialogs.qml:144
77+#: qml/Components/Dialogs.qml:147
7878msgid "Power off"
7979msgstr "Söndür"
8080
81−#: qml/Components/Dialogs.qml:162
81+#: qml/Components/Dialogs.qml:157
8282msgid "Cancel"
8383msgstr "İmtina"
8484
8585#: qml/Components/EdgeDemoOverlay.qml:151
8686msgid "Skip intro"
87−msgstr "Intro -nu keç"
87+msgstr "Tәqdimatı keç"
8888
8989#: qml/Components/EdgeDemo.qml:112
9090msgid "Right edge"
@@ -92,7 +92,7 @@ msgstr "Sağ Künc"
9292
9393#: qml/Components/EdgeDemo.qml:113
9494msgid "Try swiping from the right edge to unlock the phone"
95−msgstr "Kilidi açmaq üçün sağ küncdən çəkin"
95+msgstr "Kilidi açmaq üçün sağ küncdən sürüşdürün"
9696
9797#: qml/Components/EdgeDemo.qml:144
9898msgid "Top edge"
@@ -100,7 +100,7 @@ msgstr "Yuxarı künc"
100100
101101#: qml/Components/EdgeDemo.qml:145
102102msgid "Try swiping from the top edge to access the indicators"
103−msgstr "Göstəricilərə keçid üçün yuxarı küncdən çəkin"
103+msgstr "Göstəriciləri görmәk üçün yuxarı küncdən sürüşdürün"
104104
105105#: qml/Components/EdgeDemo.qml:170
106106msgid "Close"
@@ -108,7 +108,7 @@ msgstr "Bağla"
108108
109109#: qml/Components/EdgeDemo.qml:171
110110msgid "Swipe up again to close the settings screen"
111−msgstr "Nizamlamalar ekranını bağlamaq üçün yenidən yuxarı çəkin"
111+msgstr "Nizamlamalar ekranını bağlamaq üçün yenidən yuxarı sürüşdürün"
112112
113113#: qml/Components/EdgeDemo.qml:198
114114msgid "Left edge"
@@ -128,16 +128,16 @@ msgid ""
128128"You have now mastered the edge gestures and can start using the "
129129"phone<br><br>Tap on the screen to start"
130130msgstr ""
131−"Siz künc jestlərini mənimsəmisiniz və telefonu istifadə etməyə başlaya "
131+"Siz künc hәrәkәtlәrini öyrәndiniz və telefonu istifadə etməyə başlaya "
132132"bilərsiniz.<br><br>Başlamaq üçün ekrana toxunun"
133133
134134#: qml/Components/Lockscreen.qml:167
135135msgid "Please wait"
136−msgstr "Lütfən gözləyin"
136+msgstr "Xahiş edirik gözləyin"
137137
138138#: qml/Components/Lockscreen.qml:172
139139msgid "Too many incorrect attempts"
140−msgstr "Çoxlu yanlış cəhd"
140+msgstr "Çoxlu yanlış cəhdlәr"
141141
142142#: qml/Components/Lockscreen.qml:206
143143msgid "Emergency Call"
@@ -145,44 +145,45 @@ msgstr "Zərurət zəngi"
145145
146146#: qml/Components/Lockscreen.qml:226
147147msgid "OK"
148−msgstr "ОК"
148+msgstr "Oldu"
149149
150150#: qml/Components/PassphraseLockscreen.qml:61
151151#, qt-format
152152msgid "Hello %1"
153−msgstr "Xoş gördük %1"
153+msgstr "Salam %1"
154154
155155#: qml/Components/PassphraseLockscreen.qml:61
156156msgid "Hello"
157−msgstr "Xoş gördük"
157+msgstr "Salam"
158158
159159#: qml/Dash/GenericScopeView.qml:361
160160msgid "See less"
161−msgstr "Daha az gör"
161+msgstr "Daha azını gör"
162162
163163#: qml/Dash/GenericScopeView.qml:361
164164msgid "See all"
165165msgstr "Hamısını gör"
166166
167−#: qml/Dash/GenericScopeView.qml:424 qml/Panel/SearchIndicator.qml:27
167+#: qml/Dash/GenericScopeView.qml:424 qml/Dash/PageHeader.qml:260
168+#: qml/Panel/SearchIndicator.qml:27
168169msgid "Search"
169170msgstr "Axtar"
170171
171172#: qml/Dash/PageHeader.qml:270
172173msgid "Settings"
173−msgstr ""
174+msgstr "Tənzimləmələr"
174175
175176#: qml/Dash/PageHeader.qml:279
176177msgid "Remove from Favorites"
177−msgstr ""
178+msgstr "Seçilmişlәrdәn çıxart"
178179
179180#: qml/Dash/PageHeader.qml:279
180181msgid "Add to Favorites"
181−msgstr ""
182+msgstr "Seçilmişlәrә әlavә et"
182183
183184#: qml/Dash/Previews/PreviewActionCombo.qml:34
184185msgid "More..."
185−msgstr "Ətraflı..."
186+msgstr "Daha çox..."
186187
187188#: qml/Dash/Previews/PreviewActionCombo.qml:34
188189msgid "Less..."
@@ -190,7 +191,7 @@ msgstr "Az..."
190191
191192#: qml/Dash/Previews/PreviewRatingInput.qml:81
192193msgid "Rate this"
193−msgstr "Qiymət ver"
194+msgstr "Qiymәtlәndir"
194195
195196#: qml/Dash/Previews/PreviewRatingInput.qml:126
196197msgid "Add a review"
@@ -204,13 +205,13 @@ msgstr "Göndər"
204205msgid "Manage Dash"
205206msgstr ""
206207
207−#: qml/Dash/ScopesOverview.qml:408
208+#: qml/Dash/ScopesOverview.qml:417
208209msgid "Done"
209210msgstr "Başa çatdı"
210211
211−#: qml/Dash/ScopesOverview.qml:434
212+#: qml/Dash/ScopesOverview.qml:443
212213msgid "Store"
213−msgstr "Saxla"
214+msgstr ""
214215
215216#: qml/Dash/ScopesOverviewTab.qml:36
216217msgid "Favorites"
@@ -224,13 +225,13 @@ msgstr "Hamısı"
224225msgid "Swipe to unlock"
225226msgstr "Kilidi açmaq üçün sürüşdürün"
226227
227−#: qml/Hud/HudParametrizedActionsPage.qml:132
228+#: qml/Hud/HudParametrizedActionsPage.qml:139
228229msgid "Confirm"
229230msgstr "Təsdiqlə"
230231
231232#: qml/Hud/Hud.qml:61 qml/Hud/Hud.qml:99 qml/Hud/Hud.qml:372
232233msgid "Type or say a command"
233−msgstr "Əmri söyləyin və ya yazın"
234+msgstr "Bir әmr söyləyin və ya yazın"
234235
235236#: qml/Hud/Hud.qml:84
236237msgid "Loading. Please Wait..."
@@ -246,15 +247,15 @@ msgstr "Danışır..."
246247
247248#: qml/Notifications/NotificationMenuItemFactory.qml:105
248249msgid "Show password"
249−msgstr "Parolu göstər"
250+msgstr "Şifrәni göstәr"
250251
251252#: qml/Notifications/NotificationMenuItemFactory.qml:120
252253msgid "Enter SIM PIN"
253254msgstr "SIM PIN kodunuzu daxil edin"
254255
255−#: qml/Notifications/NotificationMenuItemFactory.qml:121 qml/Shell.qml:270
256+#: qml/Notifications/NotificationMenuItemFactory.qml:121
256257msgid "Sorry, incorrect PIN"
257−msgstr "Təəssüf ki, PIN yanlışdır"
258+msgstr "Bağışlayın, PIN yanlışdır"
258259
259260#: qml/Panel/ActiveCallHint.qml:77
260261msgid "Tap to return to call..."
@@ -274,7 +275,7 @@ msgstr "Endirilir"
274275
275276#: qml/Panel/Indicators/MenuItemFactory.qml:657
276277msgid "Paused, tap to resume"
277−msgstr "Saxlanıldı, davam etmək üçün toxunun"
278+msgstr "Dayandırıldı. Davam etmək üçün toxunun"
278279
279280#: qml/Panel/Indicators/MenuItemFactory.qml:659
280281msgid "Canceled"
@@ -286,7 +287,7 @@ msgstr "Bitdi"
286287
287288#: qml/Panel/Indicators/MenuItemFactory.qml:663
288289msgid "Failed, tap to retry"
289−msgstr "Alınmadı, davam etmək üçün toxunun"
290+msgstr "Alınmadı. Yenidәn cәhd etmək üçün toxunun"
290291
291292#: qml/Panel/Indicators/ModemInfoItem.qml:105
292293msgid "Unlock SIM"
@@ -296,13 +297,13 @@ msgstr "SIM kilidini aç"
296297msgid "Roaming"
297298msgstr "Rominq"
298299
299−#: qml/Shell.qml:266
300+#: qml/Shell.qml:279
300301msgid "Enter your passphrase"
301302msgstr "Açar sözünüzü daxil edin"
302303
303−#: qml/Shell.qml:267
304+#: qml/Shell.qml:280
304305msgid "Sorry, incorrect passphrase"
305−msgstr "Təəssüf ki, açar söz yanlışdır"
306+msgstr "Bağışlayın, açar söz yanlışdır"
306307
307308#: qml/Shell.qml:282
308309msgid "Enter your passcode"
@@ -312,29 +313,29 @@ msgstr ""
312313msgid "Sorry, incorrect passcode"
313314msgstr ""
314315
315−#: qml/Shell.qml:273
316+#: qml/Shell.qml:286
316317#, qt-format
317318msgid "Enter your %1"
318319msgstr "%1 daxil edin"
319320
320−#: qml/Shell.qml:274
321+#: qml/Shell.qml:287
321322#, qt-format
322323msgid "Sorry, incorrect %1"
323−msgstr "Təəssüf ki, %1 yanlışdır"
324+msgstr "Bağışlayın, %1 yanlışdır"
324325
325−#: qml/Shell.qml:310
326+#: qml/Shell.qml:323
326327msgid "Sorry, incorrect passphrase."
327−msgstr "Təəssüf ki, açar söz yanlışdır."
328+msgstr "Bağışlayın, açar söz yanlışdır."
328329
329−#: qml/Shell.qml:311
330+#: qml/Shell.qml:324
330331msgid "Sorry, incorrect passcode."
331332msgstr "Təəssüf ki, açar kod yanlışdır."
332333
333−#: qml/Shell.qml:312
334+#: qml/Shell.qml:325
334335msgid "This will be your last attempt."
335336msgstr "Bu sizin son cəhdiniz olacaq."
336337
337−#: qml/Shell.qml:314
338+#: qml/Shell.qml:327
338339msgid ""
339340"If passphrase is entered incorrectly, your phone will conduct a factory "
340341"reset and all personal data will be deleted."
@@ -342,19 +343,10 @@ msgstr ""
342343"Əgər açar söz yanlış daxil edilibsə, onda telefonunuz fabrika parametrlərinə "
343344"geri qayıdacaq və bütün şəxsi məlumatlarınız silinəcək."
344345
345−#: qml/Shell.qml:315
346+#: qml/Shell.qml:328
346347msgid ""
347348"If passcode is entered incorrectly, your phone will conduct a factory reset "
348349"and all personal data will be deleted."
349350msgstr ""
350351"Əgər açar kod yanlış daxil edilibsə, onda telefonunuz fabrika parametrlərinə "
351352"geri qayıdacaq və bütün şəxsi məlumatlarınız silinəcək."
352−
353−#~ msgid "Are you sure you would like to turn power off?"
354−#~ msgstr "Söndürmək istədiyinizə əminsiniz?"
355−
356−#~ msgid "Restart"
357−#~ msgstr "Yenidən Başlat"
358−
359−#~ msgid "Enter your PIN"
360−#~ msgstr "PIN kodunuzu daxil edin"
po/ca.po+39−45
@@ -8,16 +8,16 @@ msgstr ""
88"Project-Id-Version: unity\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2014-08-26 18:24+0200\n"
11−"PO-Revision-Date: 2014-08-27 14:23+0000\n"
11+"PO-Revision-Date: 2014-09-07 04:05+0000\n"
1212"Last-Translator: David Planella <david.planella@ubuntu.com>\n"
1313"Language-Team: Catalan <ca@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: 2014-08-28 06:30+0000\n"
18−"X-Generator: Launchpad (build 17174)\n"
17+"X-Launchpad-Export-Date: 2014-09-08 06:58+0000\n"
18+"X-Generator: Launchpad (build 17196)\n"
1919
20−#: plugins/LightDM/Greeter.cpp:129
20+#: plugins/LightDM/Greeter.cpp:130
2121msgid "Password: "
2222msgstr "Contrasenya: "
2323
@@ -32,53 +32,55 @@ msgstr "Desenganxa la drecera"
3232
3333#: qml/Components/Dialogs.qml:70
3434msgid "Log out"
35−msgstr ""
35+msgstr "Surt"
3636
3737#: qml/Components/Dialogs.qml:71
3838msgid "Are you sure you want to log out?"
39−msgstr ""
39+msgstr "Segur que voleu sortir?"
4040
4141#: qml/Components/Dialogs.qml:73 qml/Components/Dialogs.qml:97
4242#: qml/Components/Dialogs.qml:122
4343msgid "No"
44−msgstr ""
44+msgstr "No"
4545
4646#: qml/Components/Dialogs.qml:80 qml/Components/Dialogs.qml:104
4747#: qml/Components/Dialogs.qml:129
4848msgid "Yes"
49−msgstr ""
49+msgstr "Sí"
5050
5151#: qml/Components/Dialogs.qml:94
5252msgid "Shut down"
53−msgstr ""
53+msgstr "Apaga"
5454
5555#: qml/Components/Dialogs.qml:95
5656msgid "Are you sure you want to shut down?"
57−msgstr ""
57+msgstr "Segur que voleu apagar?"
5858
5959#: qml/Components/Dialogs.qml:119
6060msgid "Reboot"
61−msgstr ""
61+msgstr "Reinicia"
6262
6363#: qml/Components/Dialogs.qml:120
6464msgid "Are you sure you want to reboot?"
65−msgstr ""
65+msgstr "Segur que voleu reiniciar?"
6666
6767#: qml/Components/Dialogs.qml:144
6868msgid "Power"
69−msgstr ""
69+msgstr "Energia"
7070
7171#: qml/Components/Dialogs.qml:145
7272msgid ""
7373"Are you sure you would like\n"
7474"to power off?"
7575msgstr ""
76+"Segur que voleu\n"
77+"apagar?"
7678
77−#: qml/Components/Dialogs.qml:144
79+#: qml/Components/Dialogs.qml:147
7880msgid "Power off"
79−msgstr "Apaga'l"
81+msgstr "Apaga"
8082
81−#: qml/Components/Dialogs.qml:162
83+#: qml/Components/Dialogs.qml:157
8284msgid "Cancel"
8385msgstr "Cancel·la"
8486
@@ -169,21 +171,22 @@ msgstr "Mostra'n menys"
169171msgid "See all"
170172msgstr "Mostra-ho tot"
171173
172−#: qml/Dash/GenericScopeView.qml:424 qml/Panel/SearchIndicator.qml:27
174+#: qml/Dash/GenericScopeView.qml:424 qml/Dash/PageHeader.qml:260
175+#: qml/Panel/SearchIndicator.qml:27
173176msgid "Search"
174177msgstr "Cerca"
175178
176179#: qml/Dash/PageHeader.qml:270
177180msgid "Settings"
178−msgstr ""
181+msgstr "Paràmetres"
179182
180183#: qml/Dash/PageHeader.qml:279
181184msgid "Remove from Favorites"
182−msgstr ""
185+msgstr "Suprimeix dels preferits"
183186
184187#: qml/Dash/PageHeader.qml:279
185188msgid "Add to Favorites"
186−msgstr ""
189+msgstr "Afegeix als preferits"
187190
188191#: qml/Dash/Previews/PreviewActionCombo.qml:34
189192msgid "More..."
@@ -209,11 +212,11 @@ msgstr "Envia"
209212msgid "Manage Dash"
210213msgstr "Gestiona el tauler"
211214
212−#: qml/Dash/ScopesOverview.qml:408
215+#: qml/Dash/ScopesOverview.qml:417
213216msgid "Done"
214217msgstr "Fet"
215218
216−#: qml/Dash/ScopesOverview.qml:434
219+#: qml/Dash/ScopesOverview.qml:443
217220msgid "Store"
218221msgstr "Botiga"
219222
@@ -229,7 +232,7 @@ msgstr "Totes"
229232msgid "Swipe to unlock"
230233msgstr "Feu lliscar el dit per desbloquejar"
231234
232−#: qml/Hud/HudParametrizedActionsPage.qml:132
235+#: qml/Hud/HudParametrizedActionsPage.qml:139
233236msgid "Confirm"
234237msgstr "Confirma"
235238
@@ -255,9 +258,9 @@ msgstr "Mostra la contrasenya"
255258
256259#: qml/Notifications/NotificationMenuItemFactory.qml:120
257260msgid "Enter SIM PIN"
258−msgstr "Introduïu el PIN de la tarjeta SIM"
261+msgstr "Introduïu el PIN de la targeta SIM"
259262
260−#: qml/Notifications/NotificationMenuItemFactory.qml:121 qml/Shell.qml:270
263+#: qml/Notifications/NotificationMenuItemFactory.qml:121
261264msgid "Sorry, incorrect PIN"
262265msgstr "El PIN no és correcte"
263266
@@ -301,45 +304,45 @@ msgstr "Desbloca la SIM"
301304msgid "Roaming"
302305msgstr "Itinerància"
303306
304−#: qml/Shell.qml:266
307+#: qml/Shell.qml:279
305308msgid "Enter your passphrase"
306309msgstr "Escriviu la contrasenya"
307310
308−#: qml/Shell.qml:267
311+#: qml/Shell.qml:280
309312msgid "Sorry, incorrect passphrase"
310313msgstr "La contrasenya no és correcta"
311314
312315#: qml/Shell.qml:282
313316msgid "Enter your passcode"
314−msgstr ""
317+msgstr "Introduïu el codi d'accés"
315318
316319#: qml/Shell.qml:283
317320msgid "Sorry, incorrect passcode"
318−msgstr ""
321+msgstr "El codi d'accés no és correcte"
319322
320−#: qml/Shell.qml:273
323+#: qml/Shell.qml:286
321324#, qt-format
322325msgid "Enter your %1"
323326msgstr "Introduïu la %1"
324327
325−#: qml/Shell.qml:274
328+#: qml/Shell.qml:287
326329#, qt-format
327330msgid "Sorry, incorrect %1"
328331msgstr "Incorrecte (%1)"
329332
330−#: qml/Shell.qml:310
333+#: qml/Shell.qml:323
331334msgid "Sorry, incorrect passphrase."
332335msgstr "La contrasenya és incorrecta"
333336
334−#: qml/Shell.qml:311
337+#: qml/Shell.qml:324
335338msgid "Sorry, incorrect passcode."
336339msgstr "La clau és incorrecta"
337340
338−#: qml/Shell.qml:312
341+#: qml/Shell.qml:325
339342msgid "This will be your last attempt."
340343msgstr "Aquest serà el darrer intent."
341344
342−#: qml/Shell.qml:314
345+#: qml/Shell.qml:327
343346msgid ""
344347"If passphrase is entered incorrectly, your phone will conduct a factory "
345348"reset and all personal data will be deleted."
@@ -348,19 +351,10 @@ msgstr ""
348351"reinicialitzarà a l'estat de fàbrica i se suprimiran totes les dades "
349352"personals."
350353
351−#: qml/Shell.qml:315
354+#: qml/Shell.qml:328
352355msgid ""
353356"If passcode is entered incorrectly, your phone will conduct a factory reset "
354357"and all personal data will be deleted."
355358msgstr ""
356359"Si la clau s'introdueix de manera incorrecta, el telèfon es reinicialitzarà "
357360"a l'estat de fàbrica i se suprimiran totes les dades personals."
358−
359−#~ msgid "Are you sure you would like to turn power off?"
360−#~ msgstr "Segur que voleu apagar el dispositiu?"
361−
362−#~ msgid "Restart"
363−#~ msgstr "Reinicia'l"
364−
365−#~ msgid "Enter your PIN"
366−#~ msgstr "Escriviu el PIN"
po/de.po+7−7
@@ -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: 2014-08-26 18:24+0200\n"
11−"PO-Revision-Date: 2014-08-29 13:00+0000\n"
12−"Last-Translator: Martin Pitt <martin.pitt@ubuntu.com>\n"
11+"PO-Revision-Date: 2014-09-04 15:02+0000\n"
12+"Last-Translator: Niklas Wenzel <nikwen.developer@gmail.com>\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"
17−"X-Launchpad-Export-Date: 2014-08-30 07:46+0000\n"
18−"X-Generator: Launchpad (build 17176)\n"
17+"X-Launchpad-Export-Date: 2014-09-05 07:50+0000\n"
18+"X-Generator: Launchpad (build 17196)\n"
1919
2020#: plugins/LightDM/Greeter.cpp:130
2121msgid "Password: "
@@ -36,7 +36,7 @@ msgstr "Abmelden"
3636
3737#: qml/Components/Dialogs.qml:71
3838msgid "Are you sure you want to log out?"
39−msgstr "Sind Sie sicher dass Sie sich abmelden wollen?"
39+msgstr "Sind Sie sicher, dass Sie sich abmelden wollen?"
4040
4141#: qml/Components/Dialogs.qml:73 qml/Components/Dialogs.qml:97
4242#: qml/Components/Dialogs.qml:122
@@ -54,7 +54,7 @@ msgstr "Herunterfahren"
5454
5555#: qml/Components/Dialogs.qml:95
5656msgid "Are you sure you want to shut down?"
57−msgstr "Sind Sie sicher dass Sie ausschalten wollen?"
57+msgstr "Sind Sie sicher, dass Sie herunterfahren wollen?"
5858
5959#: qml/Components/Dialogs.qml:119
6060msgid "Reboot"
@@ -62,7 +62,7 @@ msgstr "Neustart"
6262
6363#: qml/Components/Dialogs.qml:120
6464msgid "Are you sure you want to reboot?"
65−msgstr "Sind Sie sicher dass Sie neu starten wollen?"
65+msgstr "Sind Sie sicher, dass Sie neu starten wollen?"
6666
6767#: qml/Components/Dialogs.qml:144
6868msgid "Power"
po/en_AU.po+37−43
@@ -8,16 +8,16 @@ msgstr ""
88"Project-Id-Version: unity\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2014-08-26 18:24+0200\n"
11−"PO-Revision-Date: 2014-08-27 09:59+0000\n"
11+"PO-Revision-Date: 2014-08-31 11:20+0000\n"
1212"Last-Translator: Jared Norris <jarednorris@ubuntu.com>\n"
1313"Language-Team: English (Australia) <en_AU@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: 2014-08-28 06:30+0000\n"
18−"X-Generator: Launchpad (build 17174)\n"
17+"X-Launchpad-Export-Date: 2014-09-01 07:33+0000\n"
18+"X-Generator: Launchpad (build 17176)\n"
1919
20−#: plugins/LightDM/Greeter.cpp:129
20+#: plugins/LightDM/Greeter.cpp:130
2121msgid "Password: "
2222msgstr "Password: "
2323
@@ -32,53 +32,55 @@ msgstr "Unpin shortcut"
3232
3333#: qml/Components/Dialogs.qml:70
3434msgid "Log out"
35−msgstr ""
35+msgstr "Log out"
3636
3737#: qml/Components/Dialogs.qml:71
3838msgid "Are you sure you want to log out?"
39−msgstr ""
39+msgstr "Are you sure you want to log out?"
4040
4141#: qml/Components/Dialogs.qml:73 qml/Components/Dialogs.qml:97
4242#: qml/Components/Dialogs.qml:122
4343msgid "No"
44−msgstr ""
44+msgstr "No"
4545
4646#: qml/Components/Dialogs.qml:80 qml/Components/Dialogs.qml:104
4747#: qml/Components/Dialogs.qml:129
4848msgid "Yes"
49−msgstr ""
49+msgstr "Yes"
5050
5151#: qml/Components/Dialogs.qml:94
5252msgid "Shut down"
53−msgstr ""
53+msgstr "Shut down"
5454
5555#: qml/Components/Dialogs.qml:95
5656msgid "Are you sure you want to shut down?"
57−msgstr ""
57+msgstr "Are you sure you want to shut down?"
5858
5959#: qml/Components/Dialogs.qml:119
6060msgid "Reboot"
61−msgstr ""
61+msgstr "Reboot"
6262
6363#: qml/Components/Dialogs.qml:120
6464msgid "Are you sure you want to reboot?"
65−msgstr ""
65+msgstr "Are you sure you want to reboot?"
6666
6767#: qml/Components/Dialogs.qml:144
6868msgid "Power"
69−msgstr ""
69+msgstr "Power"
7070
7171#: qml/Components/Dialogs.qml:145
7272msgid ""
7373"Are you sure you would like\n"
7474"to power off?"
7575msgstr ""
76+"Are you sure you would like\n"
77+"to power off?"
7678
77−#: qml/Components/Dialogs.qml:144
79+#: qml/Components/Dialogs.qml:147
7880msgid "Power off"
7981msgstr "Power off"
8082
81−#: qml/Components/Dialogs.qml:162
83+#: qml/Components/Dialogs.qml:157
8284msgid "Cancel"
8385msgstr "Cancel"
8486
@@ -163,21 +165,22 @@ msgstr "See less"
163165msgid "See all"
164166msgstr "See all"
165167
166−#: qml/Dash/GenericScopeView.qml:424 qml/Panel/SearchIndicator.qml:27
168+#: qml/Dash/GenericScopeView.qml:424 qml/Dash/PageHeader.qml:260
169+#: qml/Panel/SearchIndicator.qml:27
167170msgid "Search"
168171msgstr "Search"
169172
170173#: qml/Dash/PageHeader.qml:270
171174msgid "Settings"
172−msgstr ""
175+msgstr "Settings"
173176
174177#: qml/Dash/PageHeader.qml:279
175178msgid "Remove from Favorites"
176−msgstr ""
179+msgstr "Remove from Favourites"
177180
178181#: qml/Dash/PageHeader.qml:279
179182msgid "Add to Favorites"
180−msgstr ""
183+msgstr "Add to Favourites"
181184
182185#: qml/Dash/Previews/PreviewActionCombo.qml:34
183186msgid "More..."
@@ -203,11 +206,11 @@ msgstr "Send"
203206msgid "Manage Dash"
204207msgstr "Manage Dash"
205208
206−#: qml/Dash/ScopesOverview.qml:408
209+#: qml/Dash/ScopesOverview.qml:417
207210msgid "Done"
208211msgstr "Done"
209212
210−#: qml/Dash/ScopesOverview.qml:434
213+#: qml/Dash/ScopesOverview.qml:443
211214msgid "Store"
212215msgstr "Store"
213216
@@ -223,7 +226,7 @@ msgstr "All"
223226msgid "Swipe to unlock"
224227msgstr "Swipe to unlock"
225228
226−#: qml/Hud/HudParametrizedActionsPage.qml:132
229+#: qml/Hud/HudParametrizedActionsPage.qml:139
227230msgid "Confirm"
228231msgstr "Confirm"
229232
@@ -251,7 +254,7 @@ msgstr "Show password"
251254msgid "Enter SIM PIN"
252255msgstr "Enter SIM PIN"
253256
254−#: qml/Notifications/NotificationMenuItemFactory.qml:121 qml/Shell.qml:270
257+#: qml/Notifications/NotificationMenuItemFactory.qml:121
255258msgid "Sorry, incorrect PIN"
256259msgstr "Sorry, incorrect PIN"
257260
@@ -295,45 +298,45 @@ msgstr "Unlock SIM"
295298msgid "Roaming"
296299msgstr "Roaming"
297300
298−#: qml/Shell.qml:266
301+#: qml/Shell.qml:279
299302msgid "Enter your passphrase"
300303msgstr "Enter your passphrase"
301304
302−#: qml/Shell.qml:267
305+#: qml/Shell.qml:280
303306msgid "Sorry, incorrect passphrase"
304307msgstr "Sorry, incorrect passphrase"
305308
306309#: qml/Shell.qml:282
307310msgid "Enter your passcode"
308−msgstr ""
311+msgstr "Enter your passcode"
309312
310313#: qml/Shell.qml:283
311314msgid "Sorry, incorrect passcode"
312−msgstr ""
315+msgstr "Sorry, incorrect passcode"
313316
314−#: qml/Shell.qml:273
317+#: qml/Shell.qml:286
315318#, qt-format
316319msgid "Enter your %1"
317320msgstr "Enter your %1"
318321
319−#: qml/Shell.qml:274
322+#: qml/Shell.qml:287
320323#, qt-format
321324msgid "Sorry, incorrect %1"
322325msgstr "Sorry, incorrect %1"
323326
324−#: qml/Shell.qml:310
327+#: qml/Shell.qml:323
325328msgid "Sorry, incorrect passphrase."
326329msgstr "Sorry, incorrect passphrase."
327330
328−#: qml/Shell.qml:311
331+#: qml/Shell.qml:324
329332msgid "Sorry, incorrect passcode."
330333msgstr "Sorry, incorrect passcode."
331334
332−#: qml/Shell.qml:312
335+#: qml/Shell.qml:325
333336msgid "This will be your last attempt."
334337msgstr "This will be your last attempt."
335338
336−#: qml/Shell.qml:314
339+#: qml/Shell.qml:327
337340msgid ""
338341"If passphrase is entered incorrectly, your phone will conduct a factory "
339342"reset and all personal data will be deleted."
@@ -341,19 +344,10 @@ msgstr ""
341344"If passphrase is entered incorrectly, your phone will conduct a factory "
342345"reset and all personal data will be deleted."
343346
344−#: qml/Shell.qml:315
347+#: qml/Shell.qml:328
345348msgid ""
346349"If passcode is entered incorrectly, your phone will conduct a factory reset "
347350"and all personal data will be deleted."
348351msgstr ""
349352"If passcode is entered incorrectly, your phone will conduct a factory reset "
350353"and all personal data will be deleted."
351−
352−#~ msgid "Are you sure you would like to turn power off?"
353−#~ msgstr "Are you sure you would like to turn power off?"
354−
355−#~ msgid "Restart"
356−#~ msgstr "Restart"
357−
358−#~ msgid "Enter your PIN"
359−#~ msgstr "Enter your PIN"
po/es.po+39−45
@@ -8,16 +8,16 @@ msgstr ""
88"Project-Id-Version: unity\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2014-08-26 18:24+0200\n"
11−"PO-Revision-Date: 2014-08-27 15:20+0000\n"
12−"Last-Translator: Leo Arias <leo.arias@canonical.com>\n"
11+"PO-Revision-Date: 2014-09-02 08:16+0000\n"
12+"Last-Translator: Víctor R. Ruiz <Unknown>\n"
1313"Language-Team: Spanish <es@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: 2014-08-28 06:30+0000\n"
18−"X-Generator: Launchpad (build 17174)\n"
17+"X-Launchpad-Export-Date: 2014-09-03 07:05+0000\n"
18+"X-Generator: Launchpad (build 17196)\n"
1919
20−#: plugins/LightDM/Greeter.cpp:129
20+#: plugins/LightDM/Greeter.cpp:130
2121msgid "Password: "
2222msgstr "Contraseña: "
2323
@@ -32,53 +32,55 @@ msgstr "Desanclar"
3232
3333#: qml/Components/Dialogs.qml:70
3434msgid "Log out"
35−msgstr ""
35+msgstr "Cerrar la sesión"
3636
3737#: qml/Components/Dialogs.qml:71
3838msgid "Are you sure you want to log out?"
39−msgstr ""
39+msgstr "̉¿Está seguro de que quiere cerrar la sesión?"
4040
4141#: qml/Components/Dialogs.qml:73 qml/Components/Dialogs.qml:97
4242#: qml/Components/Dialogs.qml:122
4343msgid "No"
44−msgstr ""
44+msgstr "No"
4545
4646#: qml/Components/Dialogs.qml:80 qml/Components/Dialogs.qml:104
4747#: qml/Components/Dialogs.qml:129
4848msgid "Yes"
49−msgstr ""
49+msgstr "Sí"
5050
5151#: qml/Components/Dialogs.qml:94
5252msgid "Shut down"
53−msgstr ""
53+msgstr "Apagar"
5454
5555#: qml/Components/Dialogs.qml:95
5656msgid "Are you sure you want to shut down?"
57−msgstr ""
57+msgstr "¿Está seguro de que quiere apagar?"
5858
5959#: qml/Components/Dialogs.qml:119
6060msgid "Reboot"
61−msgstr ""
61+msgstr "Reiniciar"
6262
6363#: qml/Components/Dialogs.qml:120
6464msgid "Are you sure you want to reboot?"
65−msgstr ""
65+msgstr "¿Esta seguro de que quiere reiniciar?"
6666
6767#: qml/Components/Dialogs.qml:144
6868msgid "Power"
69−msgstr ""
69+msgstr "Encendido"
7070
7171#: qml/Components/Dialogs.qml:145
7272msgid ""
7373"Are you sure you would like\n"
7474"to power off?"
7575msgstr ""
76+"¿Está seguro de que quiere\n"
77+"apagar?"
7678
77−#: qml/Components/Dialogs.qml:144
79+#: qml/Components/Dialogs.qml:147
7880msgid "Power off"
7981msgstr "Apagar"
8082
81−#: qml/Components/Dialogs.qml:162
83+#: qml/Components/Dialogs.qml:157
8284msgid "Cancel"
8385msgstr "Cancelar"
8486
@@ -166,21 +168,22 @@ msgstr "Ver menos"
166168msgid "See all"
167169msgstr "Ver todo"
168170
169−#: qml/Dash/GenericScopeView.qml:424 qml/Panel/SearchIndicator.qml:27
171+#: qml/Dash/GenericScopeView.qml:424 qml/Dash/PageHeader.qml:260
172+#: qml/Panel/SearchIndicator.qml:27
170173msgid "Search"
171174msgstr "Buscar"
172175
173176#: qml/Dash/PageHeader.qml:270
174177msgid "Settings"
175−msgstr ""
178+msgstr "Configuración"
176179
177180#: qml/Dash/PageHeader.qml:279
178181msgid "Remove from Favorites"
179−msgstr ""
182+msgstr "Quitar de favoritos"
180183
181184#: qml/Dash/PageHeader.qml:279
182185msgid "Add to Favorites"
183−msgstr ""
186+msgstr "Añadir a favoritos"
184187
185188#: qml/Dash/Previews/PreviewActionCombo.qml:34
186189msgid "More..."
@@ -206,11 +209,11 @@ msgstr "Enviar"
206209msgid "Manage Dash"
207210msgstr "Gestionar tablero"
208211
209−#: qml/Dash/ScopesOverview.qml:408
212+#: qml/Dash/ScopesOverview.qml:417
210213msgid "Done"
211214msgstr "Hecho"
212215
213−#: qml/Dash/ScopesOverview.qml:434
216+#: qml/Dash/ScopesOverview.qml:443
214217msgid "Store"
215218msgstr "Tienda"
216219
@@ -226,7 +229,7 @@ msgstr "Todo"
226229msgid "Swipe to unlock"
227230msgstr "Deslice para desbloquear"
228231
229−#: qml/Hud/HudParametrizedActionsPage.qml:132
232+#: qml/Hud/HudParametrizedActionsPage.qml:139
230233msgid "Confirm"
231234msgstr "Confirmar"
232235
@@ -254,7 +257,7 @@ msgstr "Mostrar contraseña"
254257msgid "Enter SIM PIN"
255258msgstr "Escriba el PIN de la SIM"
256259
257−#: qml/Notifications/NotificationMenuItemFactory.qml:121 qml/Shell.qml:270
260+#: qml/Notifications/NotificationMenuItemFactory.qml:121
258261msgid "Sorry, incorrect PIN"
259262msgstr "El PIN es incorrecto"
260263
@@ -298,45 +301,45 @@ msgstr "Desbloquear SIM"
298301msgid "Roaming"
299302msgstr "Itinerancia"
300303
301−#: qml/Shell.qml:266
304+#: qml/Shell.qml:279
302305msgid "Enter your passphrase"
303306msgstr "Introudzca su contraseña"
304307
305−#: qml/Shell.qml:267
308+#: qml/Shell.qml:280
306309msgid "Sorry, incorrect passphrase"
307310msgstr "Lo sentimos, contraseña incorrecta"
308311
309312#: qml/Shell.qml:282
310313msgid "Enter your passcode"
311−msgstr ""
314+msgstr "Escriba su código de acceso"
312315
313316#: qml/Shell.qml:283
314317msgid "Sorry, incorrect passcode"
315−msgstr ""
318+msgstr "El código de acceso es incorrecto"
316319
317−#: qml/Shell.qml:273
320+#: qml/Shell.qml:286
318321#, qt-format
319322msgid "Enter your %1"
320323msgstr "Introduzca su %1"
321324
322−#: qml/Shell.qml:274
325+#: qml/Shell.qml:287
323326#, qt-format
324327msgid "Sorry, incorrect %1"
325328msgstr "Lo sentimos, %1 incorrecto"
326329
327−#: qml/Shell.qml:310
330+#: qml/Shell.qml:323
328331msgid "Sorry, incorrect passphrase."
329332msgstr "Frase de paso incorrecta"
330333
331−#: qml/Shell.qml:311
334+#: qml/Shell.qml:324
332335msgid "Sorry, incorrect passcode."
333−msgstr "Código de paso incorrecto"
336+msgstr "Código de acceso incorrecto."
334337
335−#: qml/Shell.qml:312
338+#: qml/Shell.qml:325
336339msgid "This will be your last attempt."
337340msgstr "Este será su último intento."
338341
339−#: qml/Shell.qml:314
342+#: qml/Shell.qml:327
340343msgid ""
341344"If passphrase is entered incorrectly, your phone will conduct a factory "
342345"reset and all personal data will be deleted."
@@ -344,19 +347,10 @@ msgstr ""
344347"Si se introduce la frase incorrectamente, el teléfono volverá a la "
345348"configuración de fábrica y se perderán todos los datos personales."
346349
347−#: qml/Shell.qml:315
350+#: qml/Shell.qml:328
348351msgid ""
349352"If passcode is entered incorrectly, your phone will conduct a factory reset "
350353"and all personal data will be deleted."
351354msgstr ""
352355"Si se introduce el código incorrectamente, el teléfono volverá a la "
353356"configuración de fábrica y se perderán todos los datos personales."
354−
355−#~ msgid "Restart"
356−#~ msgstr "Reiniciar"
357−
358−#~ msgid "Are you sure you would like to turn power off?"
359−#~ msgstr "¿Está seguro de que quiere apagarlo?"
360−
361−#~ msgid "Enter your PIN"
362−#~ msgstr "Escriba el PIN"
po/eu.po+61−56
@@ -8,18 +8,18 @@ msgstr ""
88"Project-Id-Version: unity8\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2014-08-26 18:24+0200\n"
11−"PO-Revision-Date: 2014-08-06 22:51+0000\n"
11+"PO-Revision-Date: 2014-09-02 20:34+0000\n"
1212"Last-Translator: Ibai Oihanguren Sala <Unknown>\n"
1313"Language-Team: Basque <eu@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: 2014-08-28 06:29+0000\n"
18−"X-Generator: Launchpad (build 17174)\n"
17+"X-Launchpad-Export-Date: 2014-09-03 07:05+0000\n"
18+"X-Generator: Launchpad (build 17196)\n"
1919
20−#: plugins/LightDM/Greeter.cpp:129
20+#: plugins/LightDM/Greeter.cpp:130
2121msgid "Password: "
22−msgstr ""
22+msgstr "Pasahitza: "
2323
2424#: plugins/Unity/Launcher/launcheritem.cpp:43
2525#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -32,55 +32,55 @@ msgstr "Askatu lasterbidea"
3232
3333#: qml/Components/Dialogs.qml:70
3434msgid "Log out"
35−msgstr ""
35+msgstr "Amaitu saioa"
3636
3737#: qml/Components/Dialogs.qml:71
3838msgid "Are you sure you want to log out?"
39−msgstr ""
39+msgstr "Ziur saioa amaitu nahi duzula?"
4040
4141#: qml/Components/Dialogs.qml:73 qml/Components/Dialogs.qml:97
4242#: qml/Components/Dialogs.qml:122
4343msgid "No"
44−msgstr ""
44+msgstr "Ez"
4545
4646#: qml/Components/Dialogs.qml:80 qml/Components/Dialogs.qml:104
4747#: qml/Components/Dialogs.qml:129
4848msgid "Yes"
49−msgstr ""
49+msgstr "Bai"
5050
5151#: qml/Components/Dialogs.qml:94
5252msgid "Shut down"
53−msgstr ""
53+msgstr "Itzali"
5454
5555#: qml/Components/Dialogs.qml:95
5656msgid "Are you sure you want to shut down?"
57−msgstr ""
57+msgstr "Ziur itzali nahi duzula?"
5858
5959#: qml/Components/Dialogs.qml:119
6060msgid "Reboot"
61−msgstr ""
61+msgstr "Berrabiarazi"
6262
6363#: qml/Components/Dialogs.qml:120
6464msgid "Are you sure you want to reboot?"
65−msgstr ""
65+msgstr "Ziur berrabiarazi nahi duzula?"
6666
6767#: qml/Components/Dialogs.qml:144
6868msgid "Power"
69−msgstr ""
69+msgstr "Energia"
7070
7171#: qml/Components/Dialogs.qml:145
7272msgid ""
7373"Are you sure you would like\n"
7474"to power off?"
75−msgstr ""
75+msgstr "Ziur itzali nahi duzula?"
7676
77−#: qml/Components/Dialogs.qml:144
77+#: qml/Components/Dialogs.qml:147
7878msgid "Power off"
79−msgstr ""
79+msgstr "Itzali"
8080
81−#: qml/Components/Dialogs.qml:162
81+#: qml/Components/Dialogs.qml:157
8282msgid "Cancel"
83−msgstr ""
83+msgstr "Utzi"
8484
8585#: qml/Components/EdgeDemoOverlay.qml:151
8686msgid "Skip intro"
@@ -135,11 +135,11 @@ msgstr ""
135135
136136#: qml/Components/Lockscreen.qml:167
137137msgid "Please wait"
138−msgstr ""
138+msgstr "Itxaron"
139139
140140#: qml/Components/Lockscreen.qml:172
141141msgid "Too many incorrect attempts"
142−msgstr ""
142+msgstr "Okerreko saiakera gehiegi"
143143
144144#: qml/Components/Lockscreen.qml:206
145145msgid "Emergency Call"
@@ -166,21 +166,22 @@ msgstr "Ikusi gutxiago"
166166msgid "See all"
167167msgstr "Ikusi guztiak"
168168
169−#: qml/Dash/GenericScopeView.qml:424 qml/Panel/SearchIndicator.qml:27
169+#: qml/Dash/GenericScopeView.qml:424 qml/Dash/PageHeader.qml:260
170+#: qml/Panel/SearchIndicator.qml:27
170171msgid "Search"
171172msgstr "Bilatu"
172173
173174#: qml/Dash/PageHeader.qml:270
174175msgid "Settings"
175−msgstr ""
176+msgstr "Ezarpenak"
176177
177178#: qml/Dash/PageHeader.qml:279
178179msgid "Remove from Favorites"
179−msgstr ""
180+msgstr "Kendu gogokoetatik"
180181
181182#: qml/Dash/PageHeader.qml:279
182183msgid "Add to Favorites"
183−msgstr ""
184+msgstr "Gehitu gogokoetara"
184185
185186#: qml/Dash/Previews/PreviewActionCombo.qml:34
186187msgid "More..."
@@ -204,29 +205,29 @@ msgstr "Bidali"
204205
205206#: qml/Dash/ScopesOverview.qml:201
206207msgid "Manage Dash"
207−msgstr ""
208+msgstr "Kudeatu abio-leihoa"
208209
209−#: qml/Dash/ScopesOverview.qml:408
210+#: qml/Dash/ScopesOverview.qml:417
210211msgid "Done"
211−msgstr ""
212+msgstr "Eginda"
212213
213−#: qml/Dash/ScopesOverview.qml:434
214+#: qml/Dash/ScopesOverview.qml:443
214215msgid "Store"
215−msgstr ""
216+msgstr "Denda"
216217
217218#: qml/Dash/ScopesOverviewTab.qml:36
218219msgid "Favorites"
219−msgstr ""
220+msgstr "Gogokoak"
220221
221222#: qml/Dash/ScopesOverviewTab.qml:54
222223msgid "All"
223−msgstr ""
224+msgstr "Guztiak"
224225
225226#: qml/Greeter/Greeter.qml:157
226227msgid "Swipe to unlock"
227228msgstr "Pasatu hatza desblokeatzeko"
228229
229−#: qml/Hud/HudParametrizedActionsPage.qml:132
230+#: qml/Hud/HudParametrizedActionsPage.qml:139
230231msgid "Confirm"
231232msgstr "Baieztatu"
232233
@@ -252,11 +253,11 @@ msgstr "Erakutsi pasahitza"
252253
253254#: qml/Notifications/NotificationMenuItemFactory.qml:120
254255msgid "Enter SIM PIN"
255−msgstr ""
256+msgstr "Sartu SIM PINa"
256257
257−#: qml/Notifications/NotificationMenuItemFactory.qml:121 qml/Shell.qml:270
258+#: qml/Notifications/NotificationMenuItemFactory.qml:121
258259msgid "Sorry, incorrect PIN"
259−msgstr ""
260+msgstr "Sentitzen dugu, PINa okerrekoa da"
260261
261262#: qml/Panel/ActiveCallHint.qml:77
262263msgid "Tap to return to call..."
@@ -292,58 +293,62 @@ msgstr "Huts egin du, sakatu berriro saiatzeko"
292293
293294#: qml/Panel/Indicators/ModemInfoItem.qml:105
294295msgid "Unlock SIM"
295−msgstr ""
296+msgstr "Desblokeatu SIMa"
296297
297298#: qml/Panel/Indicators/RoamingIndication.qml:27
298299msgid "Roaming"
299−msgstr ""
300+msgstr "Ibiltaritza"
300301
301−#: qml/Shell.qml:266
302+#: qml/Shell.qml:279
302303msgid "Enter your passphrase"
303−msgstr ""
304+msgstr "Sartu pasaesaldia"
304305
305−#: qml/Shell.qml:267
306+#: qml/Shell.qml:280
306307msgid "Sorry, incorrect passphrase"
307−msgstr ""
308+msgstr "Sentitzen dugu, pasaesaldia okerrekoa da"
308309
309310#: qml/Shell.qml:282
310311msgid "Enter your passcode"
311−msgstr ""
312+msgstr "Sartu pasakodea"
312313
313314#: qml/Shell.qml:283
314315msgid "Sorry, incorrect passcode"
315−msgstr ""
316+msgstr "Sentitzen dugu, pasakodea okerrekoa da"
316317
317−#: qml/Shell.qml:273
318+#: qml/Shell.qml:286
318319#, qt-format
319320msgid "Enter your %1"
320−msgstr ""
321+msgstr "Sartu %1"
321322
322−#: qml/Shell.qml:274
323+#: qml/Shell.qml:287
323324#, qt-format
324325msgid "Sorry, incorrect %1"
325−msgstr ""
326+msgstr "Sentitzen dugu, %1 okerrekoa da"
326327
327−#: qml/Shell.qml:310
328+#: qml/Shell.qml:323
328329msgid "Sorry, incorrect passphrase."
329−msgstr ""
330+msgstr "Sentitzen dugu, pasaesaldia okerrekoa da."
330331
331−#: qml/Shell.qml:311
332+#: qml/Shell.qml:324
332333msgid "Sorry, incorrect passcode."
333−msgstr ""
334+msgstr "Sentitzen dugu, pasakodea okerrekoa da."
334335
335−#: qml/Shell.qml:312
336+#: qml/Shell.qml:325
336337msgid "This will be your last attempt."
337−msgstr ""
338+msgstr "Hau duzu azken saiakera."
338339
339−#: qml/Shell.qml:314
340+#: qml/Shell.qml:327
340341msgid ""
341342"If passphrase is entered incorrectly, your phone will conduct a factory "
342343"reset and all personal data will be deleted."
343344msgstr ""
345+"Okerreko pasaesaldia sartzen baduzu, telefonoaren jatorrizko ezarpenak "
346+"berrezarri eta datu pertsonal guztiak ezabatuko dira."
344347
345−#: qml/Shell.qml:315
348+#: qml/Shell.qml:328
346349msgid ""
347350"If passcode is entered incorrectly, your phone will conduct a factory reset "
348351"and all personal data will be deleted."
349352msgstr ""
353+"Okerreko pasakodea sartzen baduzu, telefonoaren jatorrizko ezarpenak "
354+"berrezarri eta datu pertsonal guztiak ezabatuko dira."
po/ja.po+37−42
@@ -8,16 +8,16 @@ msgstr ""
88"Project-Id-Version: unity\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2014-08-26 18:24+0200\n"
11−"PO-Revision-Date: 2014-08-18 15:03+0000\n"
11+"PO-Revision-Date: 2014-09-01 06:20+0000\n"
1212"Last-Translator: Mitsuya Shibata <mty.shibata@gmail.com>\n"
1313"Language-Team: Japanese <ja@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: 2014-08-28 06:30+0000\n"
18−"X-Generator: Launchpad (build 17174)\n"
17+"X-Launchpad-Export-Date: 2014-09-02 07:20+0000\n"
18+"X-Generator: Launchpad (build 17192)\n"
1919
20−#: plugins/LightDM/Greeter.cpp:129
20+#: plugins/LightDM/Greeter.cpp:130
2121msgid "Password: "
2222msgstr "パスワード: "
2323
@@ -32,7 +32,7 @@ msgstr "ショートカットを削除する"
3232
3333#: qml/Components/Dialogs.qml:70
3434msgid "Log out"
35−msgstr ""
35+msgstr "ログアウト"
3636
3737#: qml/Components/Dialogs.qml:71
3838msgid "Are you sure you want to log out?"
@@ -41,16 +41,16 @@ msgstr ""
4141#: qml/Components/Dialogs.qml:73 qml/Components/Dialogs.qml:97
4242#: qml/Components/Dialogs.qml:122
4343msgid "No"
44−msgstr ""
44+msgstr "いいえ"
4545
4646#: qml/Components/Dialogs.qml:80 qml/Components/Dialogs.qml:104
4747#: qml/Components/Dialogs.qml:129
4848msgid "Yes"
49−msgstr ""
49+msgstr "はい"
5050
5151#: qml/Components/Dialogs.qml:94
5252msgid "Shut down"
53−msgstr ""
53+msgstr "シャットダウン"
5454
5555#: qml/Components/Dialogs.qml:95
5656msgid "Are you sure you want to shut down?"
@@ -58,7 +58,7 @@ msgstr ""
5858
5959#: qml/Components/Dialogs.qml:119
6060msgid "Reboot"
61−msgstr ""
61+msgstr "再起動"
6262
6363#: qml/Components/Dialogs.qml:120
6464msgid "Are you sure you want to reboot?"
@@ -74,11 +74,11 @@ msgid ""
7474"to power off?"
7575msgstr ""
7676
77−#: qml/Components/Dialogs.qml:144
77+#: qml/Components/Dialogs.qml:147
7878msgid "Power off"
7979msgstr "電源を切る"
8080
81−#: qml/Components/Dialogs.qml:162
81+#: qml/Components/Dialogs.qml:157
8282msgid "Cancel"
8383msgstr "キャンセル"
8484
@@ -156,27 +156,28 @@ msgstr "こんにちは"
156156
157157#: qml/Dash/GenericScopeView.qml:361
158158msgid "See less"
159−msgstr ""
159+msgstr "隠す"
160160
161161#: qml/Dash/GenericScopeView.qml:361
162162msgid "See all"
163163msgstr "すべて表示する"
164164
165−#: qml/Dash/GenericScopeView.qml:424 qml/Panel/SearchIndicator.qml:27
165+#: qml/Dash/GenericScopeView.qml:424 qml/Dash/PageHeader.qml:260
166+#: qml/Panel/SearchIndicator.qml:27
166167msgid "Search"
167168msgstr "検索"
168169
169170#: qml/Dash/PageHeader.qml:270
170171msgid "Settings"
171−msgstr ""
172+msgstr "設定"
172173
173174#: qml/Dash/PageHeader.qml:279
174175msgid "Remove from Favorites"
175−msgstr ""
176+msgstr "お気に入りから削除する"
176177
177178#: qml/Dash/PageHeader.qml:279
178179msgid "Add to Favorites"
179−msgstr ""
180+msgstr "お気に入りに追加する"
180181
181182#: qml/Dash/Previews/PreviewActionCombo.qml:34
182183msgid "More..."
@@ -202,11 +203,11 @@ msgstr "送信"
202203msgid "Manage Dash"
203204msgstr "Dashの管理"
204205
205−#: qml/Dash/ScopesOverview.qml:408
206+#: qml/Dash/ScopesOverview.qml:417
206207msgid "Done"
207208msgstr "完了"
208209
209−#: qml/Dash/ScopesOverview.qml:434
210+#: qml/Dash/ScopesOverview.qml:443
210211msgid "Store"
211212msgstr "保存"
212213
@@ -222,7 +223,7 @@ msgstr "すべて"
222223msgid "Swipe to unlock"
223224msgstr "スワイプしてロック解除"
224225
225−#: qml/Hud/HudParametrizedActionsPage.qml:132
226+#: qml/Hud/HudParametrizedActionsPage.qml:139
226227msgid "Confirm"
227228msgstr "確認"
228229
@@ -250,7 +251,7 @@ msgstr "パスワードを表示"
250251msgid "Enter SIM PIN"
251252msgstr ""
252253
253−#: qml/Notifications/NotificationMenuItemFactory.qml:121 qml/Shell.qml:270
254+#: qml/Notifications/NotificationMenuItemFactory.qml:121
254255msgid "Sorry, incorrect PIN"
255256msgstr ""
256257
@@ -260,11 +261,11 @@ msgstr "タップすると通話に戻ります..."
260261
261262#: qml/Panel/ActiveCallHint.qml:90
262263msgid "Conference"
263−msgstr ""
264+msgstr "グループ通話"
264265
265266#: qml/Panel/Indicators/MenuItemFactory.qml:651
266267msgid "In queue…"
267−msgstr ""
268+msgstr "開始待ち..."
268269
269270#: qml/Panel/Indicators/MenuItemFactory.qml:655
270271msgid "Downloading"
@@ -276,11 +277,11 @@ msgstr "停止中、再開するにはタップしてください"
276277
277278#: qml/Panel/Indicators/MenuItemFactory.qml:659
278279msgid "Canceled"
279−msgstr ""
280+msgstr "中止しました"
280281
281282#: qml/Panel/Indicators/MenuItemFactory.qml:661
282283msgid "Finished"
283−msgstr ""
284+msgstr "完了しました"
284285
285286#: qml/Panel/Indicators/MenuItemFactory.qml:663
286287msgid "Failed, tap to retry"
@@ -294,11 +295,11 @@ msgstr "SIMのアンロック"
294295msgid "Roaming"
295296msgstr "ローミング"
296297
297−#: qml/Shell.qml:266
298+#: qml/Shell.qml:279
298299msgid "Enter your passphrase"
299300msgstr ""
300301
301−#: qml/Shell.qml:267
302+#: qml/Shell.qml:280
302303msgid "Sorry, incorrect passphrase"
303304msgstr ""
304305
@@ -308,44 +309,38 @@ msgstr ""
308309
309310#: qml/Shell.qml:283
310311msgid "Sorry, incorrect passcode"
311−msgstr ""
312+msgstr "ごめんなさい、誤ったパスコードです"
312313
313−#: qml/Shell.qml:273
314+#: qml/Shell.qml:286
314315#, qt-format
315316msgid "Enter your %1"
316317msgstr "%1を入力してください"
317318
318−#: qml/Shell.qml:274
319+#: qml/Shell.qml:287
319320#, qt-format
320321msgid "Sorry, incorrect %1"
321322msgstr ""
322323
323−#: qml/Shell.qml:310
324+#: qml/Shell.qml:323
324325msgid "Sorry, incorrect passphrase."
325326msgstr "パスフレーズが間違っています。"
326327
327−#: qml/Shell.qml:311
328+#: qml/Shell.qml:324
328329msgid "Sorry, incorrect passcode."
329330msgstr "パスコードが間違っています。"
330331
331−#: qml/Shell.qml:312
332+#: qml/Shell.qml:325
332333msgid "This will be your last attempt."
333334msgstr "これが最後のチャンスです。"
334335
335−#: qml/Shell.qml:314
336+#: qml/Shell.qml:327
336337msgid ""
337338"If passphrase is entered incorrectly, your phone will conduct a factory "
338339"reset and all personal data will be deleted."
339−msgstr ""
340+msgstr "パスフレーズが間違っている場合、ファクトリーリセットを実施し、すべての個人データは削除されます。"
340341
341−#: qml/Shell.qml:315
342+#: qml/Shell.qml:328
342343msgid ""
343344"If passcode is entered incorrectly, your phone will conduct a factory reset "
344345"and all personal data will be deleted."
345−msgstr ""
346−
347−#~ msgid "Are you sure you would like to turn power off?"
348−#~ msgstr "本当に電源を切りますか?"
349−
350−#~ msgid "Restart"
351−#~ msgstr "再起動"
346+msgstr "パスコードが間違っている場合、ファクトリーリセットを実施し、すべての個人データは削除されます。"
po/ro.po+7−7
@@ -8,13 +8,13 @@ msgstr ""
88"Project-Id-Version: unity\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2014-08-26 18:24+0200\n"
11−"PO-Revision-Date: 2014-08-29 17:49+0000\n"
11+"PO-Revision-Date: 2014-08-31 09:24+0000\n"
1212"Last-Translator: Meriuță Cornel <meriutacornel@neacornel.eu>\n"
1313"Language-Team: Romanian <ro@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: 2014-08-30 07:46+0000\n"
17+"X-Launchpad-Export-Date: 2014-09-01 07:33+0000\n"
1818"X-Generator: Launchpad (build 17176)\n"
1919
2020#: plugins/LightDM/Greeter.cpp:130
@@ -259,7 +259,7 @@ msgstr "Introduceți codul PIN pentru SIM"
259259
260260#: qml/Notifications/NotificationMenuItemFactory.qml:121
261261msgid "Sorry, incorrect PIN"
262−msgstr ""
262+msgstr "Cod PIN incorect"
263263
264264#: qml/Panel/ActiveCallHint.qml:77
265265msgid "Tap to return to call..."
@@ -307,15 +307,15 @@ msgstr "Introduceți fraza dumneavoastră secretă"
307307
308308#: qml/Shell.qml:280
309309msgid "Sorry, incorrect passphrase"
310−msgstr ""
310+msgstr "Frază secretă incorectă"
311311
312312#: qml/Shell.qml:282
313313msgid "Enter your passcode"
314−msgstr ""
314+msgstr "Introduceți parola"
315315
316316#: qml/Shell.qml:283
317317msgid "Sorry, incorrect passcode"
318−msgstr ""
318+msgstr "Parolă incorectă"
319319
320320#: qml/Shell.qml:286
321321#, qt-format
@@ -325,7 +325,7 @@ msgstr "Introduceți %1"
325325#: qml/Shell.qml:287
326326#, qt-format
327327msgid "Sorry, incorrect %1"
328−msgstr ""
328+msgstr "%1 incorectă"
329329
330330#: qml/Shell.qml:323
331331msgid "Sorry, incorrect passphrase."
po/sv.po+56−52
@@ -8,17 +8,17 @@ msgstr ""
88"Project-Id-Version: unity\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2014-08-26 18:24+0200\n"
11−"PO-Revision-Date: 2014-08-14 18:22+0000\n"
12−"Last-Translator: Erik Simmesgård <Unknown>\n"
11+"PO-Revision-Date: 2014-09-08 15:57+0000\n"
12+"Last-Translator: Josef Andersson <Unknown>\n"
1313"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\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: 2014-08-28 06:30+0000\n"
18−"X-Generator: Launchpad (build 17174)\n"
17+"X-Launchpad-Export-Date: 2014-09-10 08:02+0000\n"
18+"X-Generator: Launchpad (build 17196)\n"
1919"Language: sv\n"
2020
21−#: plugins/LightDM/Greeter.cpp:129
21+#: plugins/LightDM/Greeter.cpp:130
2222msgid "Password: "
2323msgstr "Lösenord: "
2424
@@ -33,53 +33,55 @@ msgstr "Släpp genväg"
3333
3434#: qml/Components/Dialogs.qml:70
3535msgid "Log out"
36−msgstr ""
36+msgstr "Logga ut"
3737
3838#: qml/Components/Dialogs.qml:71
3939msgid "Are you sure you want to log out?"
40−msgstr ""
40+msgstr "Är du säker på att du vill logga ut?"
4141
4242#: qml/Components/Dialogs.qml:73 qml/Components/Dialogs.qml:97
4343#: qml/Components/Dialogs.qml:122
4444msgid "No"
45−msgstr ""
45+msgstr "Nej"
4646
4747#: qml/Components/Dialogs.qml:80 qml/Components/Dialogs.qml:104
4848#: qml/Components/Dialogs.qml:129
4949msgid "Yes"
50−msgstr ""
50+msgstr "Ja"
5151
5252#: qml/Components/Dialogs.qml:94
5353msgid "Shut down"
54−msgstr ""
54+msgstr "Stäng av"
5555
5656#: qml/Components/Dialogs.qml:95
5757msgid "Are you sure you want to shut down?"
58−msgstr ""
58+msgstr "Är du säker på att du vill stänga av?"
5959
6060#: qml/Components/Dialogs.qml:119
6161msgid "Reboot"
62−msgstr ""
62+msgstr "Starta om"
6363
6464#: qml/Components/Dialogs.qml:120
6565msgid "Are you sure you want to reboot?"
66−msgstr ""
66+msgstr "Är du säker på att du vill starta om?"
6767
6868#: qml/Components/Dialogs.qml:144
6969msgid "Power"
70−msgstr ""
70+msgstr "Ström"
7171
7272#: qml/Components/Dialogs.qml:145
7373msgid ""
7474"Are you sure you would like\n"
7575"to power off?"
7676msgstr ""
77+"Är du säker på att du vill \n"
78+"stänga av?"
7779
78−#: qml/Components/Dialogs.qml:144
80+#: qml/Components/Dialogs.qml:147
7981msgid "Power off"
80−msgstr ""
82+msgstr "Stäng av"
8183
82−#: qml/Components/Dialogs.qml:162
84+#: qml/Components/Dialogs.qml:157
8385msgid "Cancel"
8486msgstr "Avbryt"
8587
@@ -137,7 +139,7 @@ msgstr "Var god vänta"
137139
138140#: qml/Components/Lockscreen.qml:172
139141msgid "Too many incorrect attempts"
140−msgstr ""
142+msgstr "För många felaktiga försök"
141143
142144#: qml/Components/Lockscreen.qml:206
143145msgid "Emergency Call"
@@ -164,21 +166,22 @@ msgstr "Visa mindre"
164166msgid "See all"
165167msgstr "Visa alla"
166168
167−#: qml/Dash/GenericScopeView.qml:424 qml/Panel/SearchIndicator.qml:27
169+#: qml/Dash/GenericScopeView.qml:424 qml/Dash/PageHeader.qml:260
170+#: qml/Panel/SearchIndicator.qml:27
168171msgid "Search"
169172msgstr "Sök"
170173
171174#: qml/Dash/PageHeader.qml:270
172175msgid "Settings"
173−msgstr ""
176+msgstr "Inställningar"
174177
175178#: qml/Dash/PageHeader.qml:279
176179msgid "Remove from Favorites"
177−msgstr ""
180+msgstr "Ta bort från Favoriter"
178181
179182#: qml/Dash/PageHeader.qml:279
180183msgid "Add to Favorites"
181−msgstr ""
184+msgstr "Lägg till Favoriter"
182185
183186#: qml/Dash/Previews/PreviewActionCombo.qml:34
184187msgid "More..."
@@ -202,15 +205,15 @@ msgstr "Skicka"
202205
203206#: qml/Dash/ScopesOverview.qml:201
204207msgid "Manage Dash"
205−msgstr ""
208+msgstr "Hantera Dash"
206209
207−#: qml/Dash/ScopesOverview.qml:408
210+#: qml/Dash/ScopesOverview.qml:417
208211msgid "Done"
209−msgstr ""
212+msgstr "Klar"
210213
211−#: qml/Dash/ScopesOverview.qml:434
214+#: qml/Dash/ScopesOverview.qml:443
212215msgid "Store"
213−msgstr ""
216+msgstr "Butik"
214217
215218#: qml/Dash/ScopesOverviewTab.qml:36
216219msgid "Favorites"
@@ -218,13 +221,13 @@ msgstr "Favoriter"
218221
219222#: qml/Dash/ScopesOverviewTab.qml:54
220223msgid "All"
221−msgstr ""
224+msgstr "Alla"
222225
223226#: qml/Greeter/Greeter.qml:157
224227msgid "Swipe to unlock"
225228msgstr "Svep för att låsa upp"
226229
227−#: qml/Hud/HudParametrizedActionsPage.qml:132
230+#: qml/Hud/HudParametrizedActionsPage.qml:139
228231msgid "Confirm"
229232msgstr "Bekräfta"
230233
@@ -250,11 +253,11 @@ msgstr "Visa lösenord"
250253
251254#: qml/Notifications/NotificationMenuItemFactory.qml:120
252255msgid "Enter SIM PIN"
253−msgstr ""
256+msgstr "Ange SIM PIN-kod"
254257
255−#: qml/Notifications/NotificationMenuItemFactory.qml:121 qml/Shell.qml:270
258+#: qml/Notifications/NotificationMenuItemFactory.qml:121
256259msgid "Sorry, incorrect PIN"
257−msgstr ""
260+msgstr "Felaktig PIN"
258261
259262#: qml/Panel/ActiveCallHint.qml:77
260263msgid "Tap to return to call..."
@@ -296,55 +299,56 @@ msgstr "Lås upp SIM-kort"
296299msgid "Roaming"
297300msgstr "Roaming"
298301
299−#: qml/Shell.qml:266
302+#: qml/Shell.qml:279
300303msgid "Enter your passphrase"
301−msgstr ""
304+msgstr "Ange din lösenfras"
302305
303−#: qml/Shell.qml:267
306+#: qml/Shell.qml:280
304307msgid "Sorry, incorrect passphrase"
305−msgstr ""
308+msgstr "Felaktig lösenfras"
306309
307310#: qml/Shell.qml:282
308311msgid "Enter your passcode"
309−msgstr ""
312+msgstr "Ange din lösenkod"
310313
311314#: qml/Shell.qml:283
312315msgid "Sorry, incorrect passcode"
313−msgstr ""
316+msgstr "Felaktig lösenkod"
314317
315−#: qml/Shell.qml:273
318+#: qml/Shell.qml:286
316319#, qt-format
317320msgid "Enter your %1"
318321msgstr "Skriv in din %1"
319322
320−#: qml/Shell.qml:274
323+#: qml/Shell.qml:287
321324#, qt-format
322325msgid "Sorry, incorrect %1"
323−msgstr ""
326+msgstr "Felaktig %1"
324327
325−#: qml/Shell.qml:310
328+#: qml/Shell.qml:323
326329msgid "Sorry, incorrect passphrase."
327−msgstr ""
330+msgstr "Felaktig lösenfras."
328331
329−#: qml/Shell.qml:311
332+#: qml/Shell.qml:324
330333msgid "Sorry, incorrect passcode."
331−msgstr ""
334+msgstr "Felaktig lösenkod."
332335
333−#: qml/Shell.qml:312
336+#: qml/Shell.qml:325
334337msgid "This will be your last attempt."
335−msgstr ""
338+msgstr "Detta är ditt sista försök."
336339
337−#: qml/Shell.qml:314
340+#: qml/Shell.qml:327
338341msgid ""
339342"If passphrase is entered incorrectly, your phone will conduct a factory "
340343"reset and all personal data will be deleted."
341344msgstr ""
345+"Om lösenfrasen anges inkorrekt kommer telefonen att fabrikåterställas och "
346+"all personlig data kommer att tas bort."
342347
343−#: qml/Shell.qml:315
348+#: qml/Shell.qml:328
344349msgid ""
345350"If passcode is entered incorrectly, your phone will conduct a factory reset "
346351"and all personal data will be deleted."
347352msgstr ""
348−
349−#~ msgid "Restart"
350−#~ msgstr "Starta om"
353+"Om lösenkoden anges felaktigt kommer telefonen att fabrikåterställas och all "
354+"personlig data kommer att tas bort."
qml/Components/Background.qml+1−1
@@ -78,7 +78,7 @@ Loader {
7878 Image {
7979 objectName: "image"
8080
81− source: width > 0 && height > 0 && root.style
81+ source: width > 0 && height > 0 && root.style || ""
8282
8383 sourceSize.width: width
8484 sourceSize.height: height
qml/Dash/CardTool.qml+7−10
@@ -169,19 +169,16 @@ Item {
169169
170170 Item {
171171 id: attributesModel
172− property int numOfAttributes: 0
173− property var model: []
174− property bool hasAttributes: {
172+ property int numOfAttributes: {
175173 var attributes = components["attributes"];
176− var hasAttributesFlag = (attributes != undefined) && attributes["field"];
177−
178− if (hasAttributesFlag) {
174+ if ((attributes != undefined) && attributes["field"]) {
179175 if (attributes["max-count"]) {
180− numOfAttributes = attributes["max-count"];
176+ return attributes["max-count"];
181177 }
182178 }
183− return hasAttributesFlag
179+ return 0;
184180 }
181+ property var model: []
185182
186183 onNumOfAttributesChanged: {
187184 model = []
@@ -195,8 +192,8 @@ Item {
195192 id: cardLoader
196193 property var fields: ["art", "mascot", "title", "subtitle", "summary", "attributes"]
197194 property var maxData: {
198− "art": Qt.resolvedUrl("graphics/checkers.png"),
199− "mascot": Qt.resolvedUrl("graphics/checkers.png"),
195+ "art": Qt.resolvedUrl("graphics/pixel.png"),
196+ "mascot": Qt.resolvedUrl("graphics/pixel.png"),
200197 "title": "—\n—",
201198 "subtitle": "—",
202199 "summary": "—\n—\n—\n—\n—",
qml/Dash/Dash.qml+12−1
@@ -34,7 +34,17 @@ Showable {
3434 DashCommunicatorService {
3535 objectName: "dashCommunicatorService"
3636 onSetCurrentScopeRequested: {
37− dash.setCurrentScope(scopeId, animate, reset)
37+ if (!isSwipe || !window.active || overviewController.progress != 0) {
38+ if (overviewController.progress != 0 && window.active) animate = false;
39+ dash.setCurrentScope(scopeId, animate, isSwipe)
40+ if (overviewController.progress != 0) {
41+ if (window.active) {
42+ dashContentCache.scheduleUpdate();
43+ }
44+ overviewController.enableAnimation = window.active;
45+ overviewController.progress = 0;
46+ }
47+ }
3848 }
3949 }
4050
@@ -344,6 +354,7 @@ Showable {
344354 enabled: !dashContent.subPageShown &&
345355 dashContent.currentScope &&
346356 dashContent.currentScope.searchQuery == "" &&
357+ !scopeItem.subPageShown &&
347358 (overviewController.progress == 0 || dragging)
348359
349360 readonly property real fullMovement: units.gu(20)
qml/Dash/GenericScopeView.qml+1−2
@@ -25,7 +25,7 @@ import "../Components/ListItems" as ListItems
2525FocusScope {
2626 id: scopeView
2727
28− readonly property bool navigationShown: pageHeaderLoader.item ? pageHeaderLoader.item.bottomItem[0].showList : false
28+ readonly property bool navigationShown: pageHeaderLoader.item ? pageHeaderLoader.item.bottomItem[0].openList : false
2929 property var scope: null
3030 property SortFilterProxyModel categories: categoryFilter
3131 property bool isCurrent: false
@@ -151,7 +151,6 @@ FocusScope {
151151 model: scopeView.categories
152152 forceNoClip: subPageLoader.open
153153 pixelAligned: true
154− interactive: !navigationShown
155154
156155 property Item expandedCategoryItem: null
157156
qml/Dash/PageHeader.qml+19−14
@@ -64,9 +64,12 @@ Item {
6464 }
6565 }
6666
67− function closePopup() {
67+ function closePopup(keepFocus) {
6868 if (headerContainer.popover != null) {
69+ headerContainer.popover.unfocusOnDestruction = !keepFocus;
6970 PopupUtils.close(headerContainer.popover);
71+ } else if (!keepFocus) {
72+ unfocus();
7073 }
7174 }
7275
@@ -74,11 +77,8 @@ Item {
7477 if (searchHistory) {
7578 searchHistory.addQuery(searchTextField.text);
7679 }
77− if (!keepFocus) {
78− unfocus();
79− }
8080 searchTextField.text = "";
81− closePopup();
81+ closePopup(keepFocus);
8282 }
8383
8484 function unfocus() {
@@ -102,7 +102,7 @@ Item {
102102 }
103103
104104 function refreshLogo() {
105− if (scopeStyle ? scopeStyle.headerLogo != "" : false) {
105+ if (root.scopeStyle ? root.scopeStyle.headerLogo != "" : false) {
106106 header.contents = imageComponent.createObject();
107107 } else if (header.contents) {
108108 header.contents.destroy();
@@ -119,11 +119,10 @@ Item {
119119 anchors { fill: parent; margins: units.gu(1); bottomMargin: units.gu(3) + bottomContainer.height }
120120 visible: headerContainer.showSearch
121121 onPressed: {
122− closePopup();
122+ closePopup(/* keepFocus */false);
123123 if (!searchTextField.text) {
124124 headerContainer.showSearch = false;
125125 }
126− searchTextField.focus = false;
127126 mouse.accepted = false;
128127 }
129128 }
@@ -228,7 +227,7 @@ Item {
228227
229228 onTextChanged: {
230229 if (text != "") {
231− closePopup();
230+ closePopup(/* keepFocus */true);
232231 }
233232 }
234233 }
@@ -310,8 +309,13 @@ Item {
310309 id: popover
311310 autoClose: false
312311
312+ property bool unfocusOnDestruction: false
313+
313314 Component.onDestruction: {
314315 headerContainer.popover = null;
316+ if (unfocusOnDestruction) {
317+ root.unfocus();
318+ }
315319 }
316320
317321 Column {
@@ -332,8 +336,7 @@ Item {
332336 onClicked: {
333337 searchHistory.addQuery(text);
334338 searchTextField.text = text;
335− closePopup();
336− unfocus();
339+ closePopup(/* keepFocus */false);
337340 }
338341 }
339342 }
@@ -350,7 +353,7 @@ Item {
350353 bottom: bottomContainer.top
351354 }
352355
353− color: scopeStyle ? scopeStyle.headerDividerColor : "#e0e0e0"
356+ color: root.scopeStyle ? root.scopeStyle.headerDividerColor : "#e0e0e0"
354357
355358 Rectangle {
356359 anchors {
@@ -404,8 +407,10 @@ Item {
404407 Qt.lighter(Qt.rgba(bottomItem.background.topColor.r,
405408 bottomItem.background.topColor.g,
406409 bottomItem.background.topColor.b, 1.0), 1.2);
407− } else if (!bottomItem && scopeStyle) {
408− Qt.lighter(Qt.rgba(scopeStyle.background.r, scopeStyle.background.g, scopeStyle.background.b, 1.0), 1.2);
410+ } else if (!bottomItem && root.scopeStyle) {
411+ Qt.lighter(Qt.rgba(root.scopeStyle.background.r,
412+ root.scopeStyle.background.g,
413+ root.scopeStyle.background.b, 1.0), 1.2);
409414 } else "#CCFFFFFF"
410415 }
411416 }
qml/Dash/PreviewListView.qml+2−2
@@ -44,7 +44,7 @@ Item {
4444 id: header
4545 objectName: "pageHeader"
4646 width: parent.width
47− title: scope ? scope.name : ""
47+ title: root.scope ? root.scope.name : ""
4848 showBackButton: true
4949 searchEntryEnabled: false
5050 scopeStyle: root.scopeStyle
@@ -78,7 +78,7 @@ Item {
7878 if (previewListView.currentItem && previewListView.currentItem.previewData !== undefined) {
7979 previewListView.currentItem.previewData.cancelAction();
8080 }
81− scope.cancelActivation();
81+ root.scope.cancelActivation();
8282 model = undefined;
8383 }
8484 }
qml/Dash/Previews/PreviewPayments.qml+2
@@ -49,6 +49,7 @@ PreviewWidget {
4949
5050 Payments {
5151 id: paymentClient
52+ objectName: "paymentClient"
5253
5354 property var source: widgetData["source"]
5455
@@ -59,6 +60,7 @@ PreviewWidget {
5960 root.triggered(widgetId, "purchaseCompleted", source);
6061 }
6162 onPurchaseError: {
63+ paymentButton.opacity = 1;
6264 root.triggered(widgetId, "purchaseError", source);
6365 }
6466 }
qml/Dash/ScopesOverview.qml+6
@@ -386,6 +386,7 @@ Item {
386386
387387 Rectangle {
388388 id: bottomBar
389+ objectName: "bottomBar"
389390 color: "black"
390391 height: units.gu(8)
391392 width: parent.width
@@ -400,6 +401,11 @@ Item {
400401 }
401402 }
402403
404+ MouseArea {
405+ // Just eat any other press since this parent is black opaque
406+ anchors.fill: parent
407+ }
408+
403409 AbstractButton {
404410 objectName: "scopesOverviewDoneButton"
405411 width: Math.max(label.width + units.gu(2), units.gu(10))
qml/Dash/graphics/checkers.pngdeleted

Binary file not shown.

qml/Dash/graphics/pixel.pngnew file

Binary file not shown.

qml/Notifications/Notification.qml+132−46
@@ -39,19 +39,17 @@ Item {
3939 property bool fullscreen: false
4040 property int maxHeight
4141 property int margins
42− property Gradient greenGradient : Gradient {
43− GradientStop { position: 0.0; color: "#3fb24f" }
44− GradientStop { position: 1.0; color: "#3fb24f" }
45− }
46− property Gradient darkgreyGradient: Gradient {
47− GradientStop { position: 0.0; color: "#4d4745" }
48− GradientStop { position: 1.0; color: "#4d4745" }
49− }
42+ readonly property color red: "#fc4949"
43+ readonly property color green: "#3fb24f"
44+ readonly property color sdLightGrey: "#eaeaea"
45+ readonly property color sdDarkGrey: "#dddddd"
46+ readonly property color sdFontColor: "#5d5d5d"
47+ readonly property real contentSpacing: units.gu(2)
5048
5149 objectName: "background"
52− implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : contentColumn.height + contentColumn.spacing * 2) : 0
50+ implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : outterColumn.height + contentSpacing * 2) : 0
5351
54− color: Qt.rgba(0.132, 0.117, 0.109, 0.97)
52+ color: type == Notification.SnapDecision ? sdLightGrey : Qt.rgba(0.132, 0.117, 0.109, 0.97)
5553 opacity: 1 // FIXME: 1 because of LP: #1354406 workaround, has to be 0 really
5654
5755 state: {
@@ -107,7 +105,7 @@ Item {
107105 states:[
108106 State {
109107 name: "contracted"
110− PropertyChanges {target: notification; height: units.gu(8)}
108+ PropertyChanges {target: notification; height: units.gu(10)}
111109 },
112110 State {
113111 name: "expanded"
@@ -131,6 +129,7 @@ Item {
131129 color: parent.color
132130 opacity: parent.opacity
133131 radius: "medium"
132+ borderSource: "none"
134133 }
135134
136135 Rectangle {
@@ -199,50 +198,41 @@ Item {
199198 }
200199
201200 Column {
202− id: contentColumn
203− objectName: "contentColumn"
201+ id: outterColumn
204202
205203 anchors {
206204 left: parent.left
207205 right: parent.right
208206 top: parent.top
209− margins: fullscreen ? 0 : spacing
207+ margins: 0
208+ topMargin: fullscreen ? 0 : units.gu(2)
210209 }
211210
212− spacing: units.gu(1)
211+ spacing: units.gu(2)
213212
214213 Row {
215214 id: topRow
216215
217− spacing: contentColumn.spacing
216+ spacing: contentSpacing
218217 anchors {
219218 left: parent.left
220219 right: parent.right
220+ margins: contentSpacing
221221 }
222222
223223 ShapedIcon {
224224 id: icon
225225
226226 objectName: "icon"
227− width: units.gu(6)
228− height: units.gu(6)
227+ width: type == Notification.Ephemeral && !bodyLabel.visible ? units.gu(3) : units.gu(6)
228+ height: width
229229 shaped: notification.hints["x-canonical-non-shaped-icon"] == "true" ? false : true
230230 visible: iconSource !== undefined && iconSource != ""
231− }
232−
233− Image {
234− id: secondaryIcon
235−
236− objectName: "secondaryIcon"
237− width: units.gu(2)
238− height: units.gu(2)
239− visible: source !== undefined && source != ""
240− fillMode: Image.PreserveAspectCrop
241− }
231+ }
242232
243233 Column {
244234 id: labelColumn
245− width: parent.width - x
235+ width: secondaryIcon.visible ? parent.width - x - units.gu(4.5) : parent.width - x
246236
247237 anchors.verticalCenter: (icon.visible && !bodyLabel.visible) ? icon.verticalCenter : undefined
248238
@@ -255,8 +245,7 @@ Item {
255245 right: parent.right
256246 }
257247 fontSize: "medium"
258− font.bold: true
259− color: Theme.palette.selected.backgroundText
248+ color: type == Notification.SnapDecision ? sdFontColor : Theme.palette.selected.backgroundText
260249 elide: Text.ElideRight
261250 textFormat: Text.PlainText
262251 }
@@ -271,14 +260,27 @@ Item {
271260 }
272261 visible: body != ""
273262 fontSize: "small"
274− color: Theme.palette.selected.backgroundText
275− opacity: 0.6
263+ color: type == Notification.SnapDecision ? sdFontColor : Theme.palette.selected.backgroundText
276264 wrapMode: Text.WordWrap
277− maximumLineCount: 10
265+ maximumLineCount: 2
278266 elide: Text.ElideRight
279267 textFormat: Text.PlainText
280268 }
281269 }
270+
271+ Image {
272+ id: secondaryIcon
273+
274+ objectName: "secondaryIcon"
275+ width: units.gu(3)
276+ height: units.gu(3)
277+ visible: status === Image.Ready
278+ fillMode: Image.PreserveAspectCrop
279+ }
280+ }
281+
282+ ListItem.ThinDivider {
283+ visible: type == Notification.SnapDecision
282284 }
283285
284286 Column {
@@ -321,6 +323,74 @@ Item {
321323 }
322324 }
323325
326+ Column {
327+ id: oneOverTwoCase
328+
329+ anchors {
330+ left: parent.left
331+ right: parent.right
332+ margins: contentSpacing
333+ }
334+
335+ spacing: contentSpacing
336+
337+ visible: notification.type == Notification.SnapDecision && oneOverTwoRepeaterTop.count == 3
338+
339+ Repeater {
340+ id: oneOverTwoRepeaterTop
341+
342+ model: notification.actions
343+ delegate: Loader {
344+ id: oneOverTwoLoaderTop
345+
346+ property string actionId: id
347+ property string actionLabel: label
348+
349+ Component {
350+ id: oneOverTwoButtonTop
351+
352+ Button {
353+ objectName: "notify_oot_button" + index
354+ width: oneOverTwoCase.width
355+ text: oneOverTwoLoaderTop.actionLabel
356+ color: notification.hints["x-canonical-private-affirmative-tint"] == "true" ? green : sdDarkGrey
357+ onClicked: notification.notification.invokeAction(oneOverTwoLoaderTop.actionId)
358+ }
359+ }
360+ sourceComponent: index == 0 ? oneOverTwoButtonTop : undefined
361+ }
362+ }
363+
364+ Row {
365+ spacing: contentSpacing
366+
367+ Repeater {
368+ id: oneOverTwoRepeaterBottom
369+
370+ model: notification.actions
371+ delegate: Loader {
372+ id: oneOverTwoLoaderBottom
373+
374+ property string actionId: id
375+ property string actionLabel: label
376+
377+ Component {
378+ id: oneOverTwoButtonBottom
379+
380+ Button {
381+ objectName: "notify_oot_button" + index
382+ width: oneOverTwoCase.width / 2 - spacing * 2
383+ text: oneOverTwoLoaderBottom.actionLabel
384+ color: index == 1 && notification.hints["x-canonical-private-rejection-tint"] == "true" ? red : sdDarkGrey
385+ onClicked: notification.notification.invokeAction(oneOverTwoLoaderBottom.actionId)
386+ }
387+ }
388+ sourceComponent: (index == 1 || index == 2) ? oneOverTwoButtonBottom : undefined
389+ }
390+ }
391+ }
392+ }
393+
324394 Row {
325395 id: buttonRow
326396
@@ -328,9 +398,10 @@ Item {
328398 anchors {
329399 left: parent.left
330400 right: parent.right
401+ margins: contentSpacing
331402 }
332− visible: notification.type == Notification.SnapDecision && actionRepeater.count > 0
333− spacing: units.gu(1)
403+ visible: notification.type == Notification.SnapDecision && actionRepeater.count > 0 && !oneOverTwoCase.visible
404+ spacing: units.gu(2)
334405 layoutDirection: Qt.RightToLeft
335406
336407 Repeater {
@@ -347,10 +418,19 @@ Item {
347418 id: actionButton
348419
349420 Button {
350− objectName: "button" + index
351− width: buttonRow.width / 2 - spacing
421+ objectName: "notify_button" + index
422+ width: buttonRow.width / 2 - spacing*2
352423 text: loader.actionLabel
353− gradient: notification.hints["x-canonical-private-button-tint"] == "true" && index == 0 ? greenGradient : darkgreyGradient
424+ color: {
425+ var result = sdDarkGrey;
426+ if (index == 0 && notification.hints["x-canonical-private-affirmative-tint"] == "true") {
427+ result = green;
428+ }
429+ if (index == 1 && notification.hints["x-canonical-private-rejection-tint"] == "true") {
430+ result = red;
431+ }
432+ return result;
433+ }
354434 onClicked: notification.notification.invokeAction(loader.actionId)
355435 }
356436 }
@@ -362,10 +442,16 @@ Item {
362442 ComboButton {
363443 id: comboButton
364444
365− objectName: "button2"
445+ objectName: "notify_button2"
366446 width: parent.width
367− visible: notification.type == Notification.SnapDecision && actionRepeater.count > 3
368− gradient: darkgreyGradient
447+ anchors {
448+ left: parent.left
449+ right: parent.right
450+ margins: contentSpacing
451+ }
452+
453+ visible: notification.type == Notification.SnapDecision && actionRepeater.count > 3 && !oneOverTwoCase.visible
454+ color: sdDarkGrey
369455 onClicked: notification.notification.invokeAction(comboRepeater.itemAt(2).actionId)
370456 expanded: false
371457 expandedHeight: (comboRepeater.count - 2) * units.gu(4) + units.gu(.5)
@@ -399,7 +485,7 @@ Item {
399485 MouseArea {
400486 id: comboInputArea
401487
402− objectName: "button" + index
488+ objectName: "notify_button" + index
403489 width: comboButton.width
404490 height: comboIcon.height + units.gu(2)
405491
@@ -421,7 +507,7 @@ Item {
421507 }
422508 width: units.gu(2)
423509 height: units.gu(2)
424− color: "white"
510+ color: sdFontColor
425511 name: splitLabel[2]
426512 }
427513
@@ -434,7 +520,7 @@ Item {
434520 verticalCenter: comboIcon.verticalCenter
435521 }
436522 fontSize: "small"
437− color: "white"
523+ color: sdFontColor
438524 text: splitLabel[3]
439525 }
440526 }
qml/Notifications/NotificationMenuItemFactory.qml+4
@@ -55,6 +55,7 @@ Loader {
5555 anchors {
5656 left: parent.left
5757 right: parent.right
58+ margins: spacing
5859 }
5960
6061 Component.onCompleted: {
@@ -65,6 +66,7 @@ Loader {
6566
6667 Label {
6768 text: menuData.label
69+ color: notification.sdFontColor
6870 }
6971
7072 TextField {
@@ -98,11 +100,13 @@ Loader {
98100 id: checkBox
99101
100102 checked: false
103+ activeFocusOnPress: false
101104 }
102105
103106 Label {
104107 anchors.verticalCenter: checkBox.verticalCenter
105108 text: i18n.tr("Show password")
109+ color: notification.sdFontColor
106110 }
107111 }
108112 }
qml/Notifications/Notifications.qml+1−1
@@ -33,7 +33,7 @@ ListView {
3333 id: snapDecisionProxyModel
3434
3535 model: notificationList.model
36− filterRole: UnityNotifications.ModelInterface.RoleType
36+ filterRole: UnityNotifications.ModelInterface != undefined ? UnityNotifications.ModelInterface.RoleType : 0
3737 filterRegExp: RegExp(UnityNotifications.Notification.SnapDecision)
3838 }
3939
qml/Panel/Indicators/IndicatorsLight.qml+4−7
@@ -27,12 +27,9 @@ QtObject {
2727 Component.onDestruction: Lights.state = Lights.Off
2828
2929 // QtObject does not have children
30− property var _connections: Connections {
31− id: powerConnection
32−
33− target: Powerd
34− onDisplayPowerStateChange: {
35− Lights.state = (status === Powerd.Off) ? Lights.On : Lights.Off
36− }
30+ property var _binding: Binding {
31+ target: Lights
32+ property: "state"
33+ value: (Powerd.status === Powerd.Off) ? Lights.On : Lights.Off
3734 }
3835}
qml/Shell.qml+18−14
@@ -22,6 +22,7 @@ import Ubuntu.Components 0.1
2222import Ubuntu.Components.Popups 1.0
2323import Ubuntu.Gestures 0.1
2424import Ubuntu.SystemImage 0.1
25+import Ubuntu.Telephony 0.1 as Telephony
2526import Unity.Connectivity 0.1
2627import Unity.Launcher 0.1
2728import Utils 0.1
@@ -146,6 +147,7 @@ Item {
146147 lockscreen.show();
147148 }
148149 greeter.hide();
150+ launcher.hide();
149151 }
150152
151153 onFocusedApplicationIdChanged: {
@@ -164,6 +166,7 @@ Item {
164166 // for an emergency call or accepted an incoming call.
165167 setFakeActiveForApp(appId)
166168 }
169+ launcher.hide();
167170 }
168171 }
169172
@@ -233,6 +236,15 @@ Item {
233236 }
234237 }
235238 }
239+ Connections {
240+ target: SessionManager
241+ onSessionStopping: {
242+ if (!session.parentSession && !session.application) {
243+ // nothing is using it. delete it right away
244+ session.release();
245+ }
246+ }
247+ }
236248
237249 Lockscreen {
238250 id: lockscreen
@@ -448,18 +460,9 @@ Item {
448460 id: powerConnection
449461 target: Powerd
450462
451− onDisplayPowerStateChange: {
452− // We ignore any display-off signals when the proximity sensor
453− // is active. This usually indicates something like a phone call.
454− if (status == Powerd.Off && reason != Powerd.Proximity && !edgeDemo.running) {
455− greeter.showNow();
456− }
457−
458− // No reason to chew demo CPU when user isn't watching
459− if (status == Powerd.Off) {
460− edgeDemo.paused = true;
461− } else if (status == Powerd.On) {
462− edgeDemo.paused = false;
463+ onStatusChanged: {
464+ if (Powerd.status === Powerd.Off && !callManager.hasCalls && !edgeDemo.running) {
465+ greeter.showNow()
463466 }
464467 }
465468 }
@@ -535,7 +538,7 @@ Item {
535538 onShowDashHome: showHome()
536539 onDash: showDash()
537540 onDashSwipeChanged: {
538− if (dashSwipe && ApplicationManager.focusedApplicationId !== "unity8-dash") {
541+ if (dashSwipe) {
539542 dash.setCurrentScope("clickscope", false, true)
540543 }
541544 }
@@ -559,7 +562,7 @@ Item {
559562 visible: notifications.useModal && !greeter.shown && (notifications.state == "narrow")
560563 color: "#000000"
561564 anchors.fill: parent
562− opacity: 0.5
565+ opacity: 0.9
563566
564567 MouseArea {
565568 anchors.fill: parent
@@ -622,6 +625,7 @@ Item {
622625 EdgeDemo {
623626 id: edgeDemo
624627 z: alphaDisclaimerLabel.z + 10
628+ paused: Powerd.status === Powerd.Off // Saves power
625629 greeter: greeter
626630 launcher: launcher
627631 indicators: panel.indicators
qml/Stages/Animations/BaseSurfaceAnimation.qml → qml/Stages/Animations/BaseSessionAnimation.qmlrenamed+23−20
@@ -37,57 +37,60 @@ import QtQuick 2.0
3737 */
3838Item {
3939 id: base
40− property Item surface: null
40+ property var container
41+ objectName: "sessionAnimation"
4142
42− // changes applied when state changes to "in"
43− property list<QtObject> outChanges
44− // transition animations when changing state to "in"
45− property list<QtObject> outAnimations
43+ // changes applied when state changes to "from"
44+ property list<QtObject> fromChanges
45+ // transition animations when changing state to "from"
46+ property list<QtObject> fromAnimations
4647
47− // changes applied when state changes to "out"
48− property list<QtObject> inChanges
49− // transition animations when changing state to "out"
50− property list<QtObject> inAnimations
48+ // changes applied when state changes to "to"
49+ property list<QtObject> toChanges
50+ // transition animations when changing state to "to"
51+ property list<QtObject> toAnimations
5152
5253 function start() {
53− // "prep" state forces outChanges without transition animations.
54+ // "prep" state forces toChanges without transition animations.
5455 state = "prep"
55− state = "in";
56+ state = "to";
5657 }
5758 function end() {
58− state = "out";
59+ state = "from";
5960 }
6061
62+ signal completed()
63+
6164 states: [
6265 State {
6366 name: "baseAnimation"
64− PropertyChanges { target: base.surface; anchors.fill: undefined }
67+ PropertyChanges { target: container; anchors.fill: undefined }
6568 },
6669
6770 State {
6871 name: "prep"
6972 extend: "baseAnimation"
70− changes: outChanges
73+ changes: fromChanges
7174 },
7275 State {
73− name: "out"
76+ name: "from"
7477 extend: "prep"
7578 },
7679 State {
7780 name: "in"
7881 extend: "baseAnimation"
79− changes: inChanges
82+ changes: toChanges
8083 }
8184 ]
8285
8386 transitions: [
8487 Transition {
85− to: "out"
86− animations: outAnimations
88+ to: "from"
89+ animations: fromAnimations
8790 },
8891 Transition {
89− to: "in"
90− animations: inAnimations
92+ to: "to"
93+ animations: toAnimations
9194 }
9295 ]
9396}
qml/Stages/Animations/DarkenAndFadeInAnimation.qmldeleted−48
@@ -1,48 +0,0 @@
1−/*
2− * Copyright (C) 2014 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 1.1
19−
20−BaseSurfaceAnimation {
21− id: animation
22−
23− property Rectangle darkenItem: Rectangle {
24− parent: animation.surface.parent
25− anchors.fill: parent
26− color: Qt.rgba(0,0,0,0.0)
27− }
28−
29− outChanges: [ PropertyChanges { target: animation.surface; opacity: 0.0 } ]
30− outAnimations: [
31− SequentialAnimation {
32− UbuntuNumberAnimation { target: animation.surface; property: "opacity"; duration: UbuntuAnimation.FastDuration }
33− ColorAnimation { target: darkenItem; duration: UbuntuAnimation.FastDuration }
34− ScriptAction { script: { if (animation.parent.removing) animation.surface.release(); } }
35− }
36− ]
37−
38− inChanges: [
39− PropertyChanges { target: darkenItem; color: Qt.rgba(0,0,0,0.7) },
40− PropertyChanges { target: animation.surface; opacity: 1.0 }
41− ]
42− inAnimations: [
43− SequentialAnimation {
44− ColorAnimation { target: darkenItem; duration: UbuntuAnimation.FastDuration }
45− UbuntuNumberAnimation { target: animation.surface; property: "opacity"; duration: UbuntuAnimation.FastDuration }
46− }
47− ]
48−}
qml/Stages/Animations/SwipeFromBottomAnimation.qml+24−19
@@ -15,34 +15,39 @@
1515 */
1616
1717import QtQuick 2.0
18+import Ubuntu.Components 1.1
1819
19−BaseSurfaceAnimation {
20+BaseSessionAnimation {
2021 id: animation
2122
22− outChanges: [ AnchorChanges { target: animation.surface; anchors.top: animation.parent.bottom } ]
23− outAnimations: [
23+ fromChanges: [
24+ AnchorChanges {
25+ target: container;
26+ anchors.top: container.parent.bottom
27+ }
28+ ]
29+ fromAnimations: [
2430 SequentialAnimation {
25− PropertyAction { target: animation.parent; property: "clip"; value: true }
26− AnchorAnimation { easing.type: Easing.InOutQuad; duration: 400 }
27− PropertyAction { target: animation.surface; property: "visible"; value: !animation.parent.removing }
28− PropertyAction { target: animation.parent; property: "clip"; value: false }
29− ScriptAction { script: { if (animation.parent.removing) animation.surface.release(); } }
31+ // clip so we don't go out of parent's bounds during spread
32+ PropertyAction { target: container.parent; property: "clip"; value: true }
33+ AnchorAnimation { easing: UbuntuAnimation.StandardEasing; duration: UbuntuAnimation.BriskDuration }
34+ PropertyAction { target: container.parent; property: "clip"; value: false }
35+ ScriptAction { script: { animation.completed(); } }
3036 }
3137 ]
3238
33− inChanges: [
39+ toChanges: [
3440 AnchorChanges {
35− target: animation.surface;
36− anchors.top: animation.parent.top
37− anchors.right: undefined
38− anchors.bottom: undefined
39− anchors.left: undefined
40− } ]
41− inAnimations: [
41+ target: container;
42+ anchors.top: container.parent.top
43+ }
44+ ]
45+ toAnimations: [
4246 SequentialAnimation {
43− PropertyAction { target: animation.parent; property: "clip"; value: true }
44− AnchorAnimation { easing.type: Easing.InOutQuad; duration: 400 }
45− PropertyAction { target: animation.parent; property: "clip"; value: false }
47+ // clip so we don't go out of parent's bounds during spread
48+ PropertyAction { target: container.parent; property: "clip"; value: true }
49+ AnchorAnimation { easing: UbuntuAnimation.StandardEasing; duration: UbuntuAnimation.BriskDuration }
50+ PropertyAction { target: container.parent; property: "clip"; value: false }
4651 }
4752 ]
4853}
qml/Stages/Animations/SwipeUpAnimation.qmldeleted−49
@@ -1,49 +0,0 @@
1−/*
2− * Copyright (C) 2014 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−
19−BaseSurfaceAnimation {
20− id: animation
21−
22− outAnimations: [
23− SequentialAnimation {
24− PropertyAction { target: animation.parent; property: "clip"; value: true }
25− PropertyAction { target: animation.surface; property: "visible"; value: true }
26− AnchorAnimation { easing.type: Easing.InOutQuad; duration: 400 }
27− PropertyAction { target: animation.parent; property: "clip"; value: false }
28− ScriptAction { script: { if (animation.parent.removing) animation.surface.release(); } }
29− }
30− ]
31−
32− inChanges: [
33− AnchorChanges {
34− target: animation.surface;
35− anchors.top: undefined
36− anchors.right: undefined
37− anchors.bottom: animation.parent.top
38− anchors.left: undefined
39− }
40− ]
41− inAnimations: [
42− SequentialAnimation {
43− PropertyAction { target: animation.parent; property: "clip"; value: true }
44− AnchorAnimation { easing.type: Easing.InOutQuad; duration: 400 }
45− PropertyAction { target: animation.surface; property: "visible"; value: false}
46− PropertyAction { target: animation.parent; property: "clip"; value: false }
47− }
48− ]
49−}
qml/Stages/ApplicationWindow.qml+51−71
@@ -23,9 +23,9 @@ Item {
2323
2424 // to be read from outside
2525 readonly property bool fullscreen: application ? application.fullscreen : false
26+ property alias interactive: sessionContainer.interactive
2627
2728 // to be set from outside
28− property bool interactive: true
2929 property QtObject application
3030
3131 QtObject {
@@ -35,16 +35,14 @@ Item {
3535 // (in order to avoid breaking qml binding due to a javascript exception)
3636 readonly property string name: root.application ? root.application.name : ""
3737 readonly property url icon: root.application ? root.application.icon : ""
38− readonly property Item surface: root.application ? root.application.surface : null
3938 readonly property int applicationState: root.application ? root.application.state : -1
40− readonly property var promptSurfaces: root.application ? root.application.promptSurfaces : null
4139
4240 // Whether the Application had a surface before but lost it.
43− property bool hadSurface: false
41+ property bool hadSurface: sessionContainer.surfaceContainer.hadSurface
4442
4543 property bool needToTakeScreenshot:
46− d.surface && d.surfaceInitialized && screenshotImage.status === Image.Null
47− && d.applicationState === ApplicationInfo.Stopped
44+ sessionContainer.surface && d.surfaceInitialized && screenshotImage.status === Image.Null
45+ && d.applicationState === ApplicationInfoInterface.Stopped
4846 onNeedToTakeScreenshotChanged: {
4947 if (needToTakeScreenshot) {
5048 screenshotImage.take();
@@ -55,12 +53,13 @@ Item {
5553 // might show the UI accommodating due to surface resizes on startup.
5654 // Remove this when possible
5755 property bool surfaceInitialized: false
58− onSurfaceChanged: {
59− if (surface) {
60− surfaceInitTimer.start();
61− } else {
62− hadSurface = true;
63− surfaceInitialized = false;
56+
57+ function forceSurfaceActiveFocusIfReady() {
58+ if (sessionContainer.surface !== null &&
59+ sessionContainer.surface.focus &&
60+ sessionContainer.surface.parent === sessionContainer.surfaceContainer &&
61+ sessionContainer.surface.enabled) {
62+ sessionContainer.surface.forceActiveFocus();
6463 }
6564 }
6665 }
@@ -68,40 +67,16 @@ Item {
6867 Timer {
6968 id: surfaceInitTimer
7069 interval: 100
71− onTriggered: { if (d.surface) {d.surfaceInitialized = true;} }
70+ onTriggered: { if (sessionContainer.surface) {d.surfaceInitialized = true;} }
7271 }
7372
74− Binding {
75− target: d.surface
76− when: d.surface
77− property: "enabled"
78− value: root.interactive
79− }
80− Binding {
81− target: d.surface
82− when: d.surface
83− property: "focus"
84− value: root.interactive
85− }
8673 Connections {
87− target: d.surface
74+ target: sessionContainer.surface
8875 // FIXME: I would rather not need to do this, but currently it doesn't get
8976 // active focus without it and I don't know why.
90− onFocusChanged: forceSurfaceActiveFocusIfReady();
91− onParentChanged: forceSurfaceActiveFocusIfReady();
92− onEnabledChanged: forceSurfaceActiveFocusIfReady();
93− function forceSurfaceActiveFocusIfReady() {
94− if (d.surface.focus && d.surface.parent === surfaceContainer && d.surface.enabled) {
95− d.surface.forceActiveFocus();
96− }
97− }
98− }
99−
100− SurfaceContainer {
101− id: surfaceContainer
102− objectName: "surfaceContainer"
103− anchors.fill: parent
104− surface: d.surface
77+ onFocusChanged: d.forceSurfaceActiveFocusIfReady();
78+ onParentChanged: d.forceSurfaceActiveFocusIfReady();
79+ onEnabledChanged: d.forceSurfaceActiveFocusIfReady();
10580 }
10681
10782 Image {
@@ -126,24 +101,23 @@ Item {
126101 id: splashLoader
127102 visible: active
128103 active: false
129− anchors.fill: surfaceContainer
104+ anchors.fill: parent
130105 sourceComponent: Component {
131106 Splash { name: d.name; image: d.icon }
132107 }
133108 }
134109
135− Repeater {
136− model: d.promptSurfaces
137−
138− delegate: SurfaceContainer {
139− anchors {
140− fill: surfaceContainer
141− }
142−
143− surface: modelData
110+ SessionContainer {
111+ id: sessionContainer
112+ session: application ? application.session : null
113+ anchors.fill: parent
144114
145− Component.onCompleted: {
146− animateIn();
115+ onSurfaceChanged: {
116+ if (sessionContainer.surface) {
117+ surfaceInitTimer.start();
118+ d.forceSurfaceActiveFocusIfReady();
119+ } else {
120+ d.surfaceInitialized = false;
147121 }
148122 }
149123 }
@@ -154,23 +128,23 @@ Item {
154128 State {
155129 name: "void"
156130 when:
157− d.hadSurface && (!d.surface || !d.surfaceInitialized)
131+ d.hadSurface && (!sessionContainer.surface || !d.surfaceInitialized)
158132 &&
159133 screenshotImage.status !== Image.Ready
160134 },
161135 State {
162136 name: "splashScreen"
163137 when:
164− !d.hadSurface && (!d.surface || !d.surfaceInitialized)
138+ !d.hadSurface && (!sessionContainer.surface || !d.surfaceInitialized)
165139 &&
166140 screenshotImage.status !== Image.Ready
167141 },
168142 State {
169143 name: "surface"
170144 when:
171− (d.surface && d.surfaceInitialized)
145+ (sessionContainer.surface && d.surfaceInitialized)
172146 &&
173− (d.applicationState !== ApplicationInfo.Stopped
147+ (d.applicationState !== ApplicationInfoInterface.Stopped
174148 || screenshotImage.status !== Image.Ready)
175149 },
176150 State {
@@ -178,8 +152,8 @@ Item {
178152 when:
179153 screenshotImage.status === Image.Ready
180154 &&
181− (d.applicationState === ApplicationInfo.Stopped
182− || !d.surface || !d.surfaceInitialized)
155+ (d.applicationState === ApplicationInfoInterface.Stopped
156+ || !sessionContainer.surface || !d.surfaceInitialized)
183157 }
184158 ]
185159
@@ -187,14 +161,18 @@ Item {
187161 Transition {
188162 from: ""; to: "splashScreen"
189163 PropertyAction { target: splashLoader; property: "active"; value: true }
164+ PropertyAction { target: sessionContainer.surfaceContainer
165+ property: "visible"; value: false }
190166 },
191167 Transition {
192168 from: "splashScreen"; to: "surface"
193169 SequentialAnimation {
194− PropertyAction { target: surfaceContainer
170+ PropertyAction { target: sessionContainer.surfaceContainer
171+ property: "opacity"; value: 0.0 }
172+ PropertyAction { target: sessionContainer.surfaceContainer
195173 property: "visible"; value: true }
196− UbuntuNumberAnimation { target: splashLoader; property: "opacity";
197− from: 1.0; to: 0.0
174+ UbuntuNumberAnimation { target: sessionContainer.surfaceContainer; property: "opacity";
175+ from: 0.0; to: 1.0
198176 duration: UbuntuAnimation.BriskDuration }
199177 PropertyAction { target: splashLoader; property: "active"; value: false }
200178 }
@@ -203,11 +181,13 @@ Item {
203181 from: "surface"; to: "splashScreen"
204182 SequentialAnimation {
205183 PropertyAction { target: splashLoader; property: "active"; value: true }
206− PropertyAction { target: surfaceContainer
184+ PropertyAction { target: sessionContainer.surfaceContainer
207185 property: "visible"; value: true }
208186 UbuntuNumberAnimation { target: splashLoader; property: "opacity";
209187 from: 0.0; to: 1.0
210188 duration: UbuntuAnimation.BriskDuration }
189+ PropertyAction { target: sessionContainer.surfaceContainer
190+ property: "visible"; value: false }
211191 }
212192 },
213193 Transition {
@@ -218,15 +198,15 @@ Item {
218198 UbuntuNumberAnimation { target: screenshotImage; property: "opacity";
219199 from: 0.0; to: 1.0
220200 duration: UbuntuAnimation.BriskDuration }
221− PropertyAction { target: surfaceContainer
201+ PropertyAction { target: sessionContainer.surfaceContainer
222202 property: "visible"; value: false }
223− ScriptAction { script: { if (d.surface) { d.surface.release(); } } }
203+ ScriptAction { script: { if (sessionContainer.session) { sessionContainer.session.release(); } } }
224204 }
225205 },
226206 Transition {
227207 from: "screenshot"; to: "surface"
228208 SequentialAnimation {
229− PropertyAction { target: surfaceContainer
209+ PropertyAction { target: sessionContainer.surfaceContainer
230210 property: "visible"; value: true }
231211 UbuntuNumberAnimation { target: screenshotImage; property: "opacity";
232212 from: 1.0; to: 0.0
@@ -238,16 +218,16 @@ Item {
238218 Transition {
239219 from: "surface"; to: "void"
240220 SequentialAnimation {
241− PropertyAction { target: surfaceContainer; property: "visible"; value: false }
242− ScriptAction { script: { if (d.surface) { d.surface.release(); } } }
221+ PropertyAction { target: sessionContainer.surfaceContainer; property: "visible"; value: false }
222+ ScriptAction { script: { if (sessionContainer.session) { sessionContainer.session.release(); } } }
243223 }
244224 },
245225 Transition {
246226 from: "void"; to: "surface"
247227 SequentialAnimation {
248− PropertyAction { target: surfaceContainer; property: "opacity"; value: 0.0 }
249− PropertyAction { target: surfaceContainer; property: "visible"; value: true }
250− UbuntuNumberAnimation { target: surfaceContainer; property: "opacity";
228+ PropertyAction { target: sessionContainer.surfaceContainer; property: "opacity"; value: 0.0 }
229+ PropertyAction { target: sessionContainer.surfaceContainer; property: "visible"; value: true }
230+ UbuntuNumberAnimation { target: sessionContainer.surfaceContainer; property: "opacity";
251231 from: 0.0; to: 1.0
252232 duration: UbuntuAnimation.BriskDuration }
253233 }
qml/Stages/PhoneStage.qml+6−1
@@ -44,6 +44,9 @@ Rectangle {
4444 }
4545
4646 onInverseProgressChanged: {
47+ // This can't be a simple binding because that would be triggered after this handler
48+ // while we need it active before doing the anition left/right
49+ priv.animateX = (inverseProgress == 0)
4750 if (inverseProgress == 0 && priv.oldInverseProgress > 0) {
4851 // left edge drag released. Minimum distance is given by design.
4952 if (priv.oldInverseProgress > units.gu(22)) {
@@ -92,6 +95,7 @@ Rectangle {
9295 property var focusedAppDelegate: null
9396
9497 property real oldInverseProgress: 0
98+ property bool animateX: true
9599
96100 onFocusedAppIdChanged: focusedAppDelegate = spreadRepeater.itemAt(0);
97101
@@ -311,7 +315,8 @@ Rectangle {
311315 Behavior on x {
312316 enabled: root.spreadEnabled &&
313317 !spreadView.active &&
314− !snapAnimation.running
318+ !snapAnimation.running &&
319+ priv.animateX
315320 UbuntuNumberAnimation {
316321 duration: UbuntuAnimation.FastDuration
317322 onRunningChanged: {
qml/Stages/SessionContainer.qmlnew file+143
@@ -0,0 +1,143 @@
1+/*
2+ * Copyright 2014 Canonical Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU Lesser General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU Lesser General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU Lesser General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+*/
16+
17+import QtQuick 2.0
18+import "Animations"
19+
20+Item {
21+ id: root
22+ objectName: "sessionContainer"
23+ property QtObject session
24+ readonly property var childSessions: session ? session.childSessions : null
25+ readonly property alias surface: _surfaceContainer.surface
26+ property bool interactive: true
27+
28+ readonly property alias surfaceContainer: _surfaceContainer
29+ SurfaceContainer {
30+ id: _surfaceContainer
31+ anchors.fill: parent
32+ surface: session ? session.surface : null
33+ }
34+
35+ Binding {
36+ target: surfaceContainer.surface
37+ when: surfaceContainer.surface
38+ property: "enabled"
39+ value: root.interactive
40+ }
41+ Binding {
42+ target: surfaceContainer.surface
43+ when: surfaceContainer.surface
44+ property: "focus"
45+ value: root.interactive
46+ }
47+
48+ Repeater {
49+ model: root.childSessions
50+
51+ delegate: Loader {
52+ objectName: "childDelegate" + index
53+ anchors.fill: surfaceContainer
54+
55+ // Only way to do recursive qml items.
56+ source: Qt.resolvedUrl("SessionContainer.qml")
57+
58+ Binding {
59+ target: item; when: item
60+ property: "interactive"; value: root.interactive
61+ }
62+
63+ Binding {
64+ target: item; when: item
65+ property: "session"; value: modelData
66+ }
67+
68+ Binding {
69+ target: item; when: item
70+ property: "width"; value: root.width
71+ }
72+
73+ Binding {
74+ target: item; when: item
75+ property: "height"; value: root.height
76+ }
77+ }
78+ }
79+
80+ states: [
81+ State {
82+ name: "rootSession"
83+ when: root.session && !root.session.parentSession
84+ },
85+
86+ State {
87+ name: "childSession"
88+ when: root.session && root.session.parentSession !== null && root.session.live
89+ && !root.session.surface
90+ },
91+
92+ State {
93+ name: "childSessionReady"
94+ when: root.session && root.session.parentSession !== null && root.session.live
95+ && root.session.surface !== null
96+ },
97+
98+ State {
99+ name: "childSessionZombie"
100+ when: root.session && root.session.parentSession !== null && !root.session.live
101+ }
102+ ]
103+
104+ transitions: [
105+ Transition {
106+ to: "childSessionReady"
107+ ScriptAction { script: { if (!surfaceContainer.hadSurface) { animateIn(swipeFromBottom); } } }
108+ },
109+ Transition {
110+ to: "childSessionZombie"
111+ ScriptAction { script: { animateOut(); } }
112+ }
113+ ]
114+
115+ function animateIn(component) {
116+ var animation = component.createObject(root, { "container": root, });
117+ animation.start();
118+
119+ var tmp = d.animations;
120+ tmp.push(animation);
121+ d.animations = tmp;
122+ }
123+
124+ function animateOut() {
125+ if (d.animations.length > 0) {
126+ var tmp = d.animations;
127+ var popped = tmp.pop();
128+ popped.completed.connect(function() { root.session.release(); } );
129+ popped.end();
130+ d.animations = tmp;
131+ }
132+ }
133+
134+ Component {
135+ id: swipeFromBottom
136+ SwipeFromBottomAnimation {}
137+ }
138+
139+ QtObject {
140+ id: d
141+ property var animations: []
142+ }
143+}
qml/Stages/SurfaceContainer.qml+22−67
@@ -15,86 +15,41 @@
1515*/
1616
1717import QtQuick 2.0
18−import "Animations"
18+import Ubuntu.Components 1.1
1919
2020Item {
21− id: container
21+ id: root
22+ objectName: "surfaceContainer"
2223 property Item surface: null
23− property bool removing: false
24+ property bool hadSurface: false
2425
2526 onSurfaceChanged: {
2627 if (surface) {
27− surface.parent = container;
28− surface.z = 1;
28+ surface.parent = root;
29+ } else {
30+ hadSurface = true;
2931 }
3032 }
3133 Binding {
3234 target: surface
33− property: "anchors.fill"; value: container
35+ property: "anchors.fill"; value: root
3436 }
3537
36− Connections {
37− target: surface
38− onRemoved: {
39− container.removing = true;
40−
41− var childSurfaces = surface.childSurfaces;
42− for (var i=0; i<childSurfaces.length; i++) {
43− childSurfaces[i].removed();
44− }
45−
46− animateOut();
38+ states: [
39+ State {
40+ name: "zombie"
41+ when: surface && !surface.live
4742 }
48− }
49−
50− Repeater {
51− model: surface ? surface.childSurfaces : null
52−
53− delegate: Loader {
54− z: 2
55− anchors {
56− fill: container
57− topMargin: container.surface.anchors.topMargin
58− rightMargin: container.surface.anchors.rightMargin
59− bottomMargin: container.surface.anchors.bottomMargin
60− leftMargin: container.surface.anchors.leftMargin
43+ ]
44+ transitions: [
45+ Transition {
46+ from: ""; to: "zombie"
47+ SequentialAnimation {
48+ UbuntuNumberAnimation { target: surface; property: "opacity"; to: 0.0
49+ duration: UbuntuAnimation.BriskDuration }
50+ PropertyAction { target: surface; property: "visible"; value: false }
51+ ScriptAction { script: { if (root.surface) { root.surface.release(); } } }
6152 }
62−
63− // Only way to do recursive qml items.
64− source: Qt.resolvedUrl("SurfaceContainer.qml")
65− onLoaded: {
66− item.surface = modelData;
67− item.animateIn();
68− }
69− }
70− }
71−
72− function animateIn() {
73− var animation = swipeFromBottom.createObject(container, { "surface": container.surface });
74− animation.start();
75−
76− var tmp = d.animations;
77− tmp.push(animation);
78− d.animations = tmp;
79− }
80−
81− function animateOut() {
82− if (d.animations.length > 0) {
83− var tmp = d.animations;
84− var popped = tmp.pop();
85− popped.end();
86− d.animations = tmp;
8753 }
88− }
89−
90− QtObject {
91− id: d
92− property var animations: []
93− property var currentAnimation: animations.length > 0 ? animations[animations.length-1] : undefined
94− }
95−
96− Component {
97− id: swipeFromBottom
98− SwipeFromBottomAnimation {}
99− }
54+ ]
10055}
qml/Stages/TabletStage.qml+5
@@ -36,6 +36,9 @@ Rectangle {
3636 property real inverseProgress: 0 // This is the progress for left edge drags, in pixels.
3737
3838 onInverseProgressChanged: {
39+ // This can't be a simple binding because that would be triggered after this handler
40+ // while we need it active before doing the anition left/right
41+ spreadView.animateX = (inverseProgress == 0)
3942 if (inverseProgress == 0 && priv.oldInverseProgress > 0) {
4043 // left edge drag released. Minimum distance is given by design.
4144 if (priv.oldInverseProgress > units.gu(22)) {
@@ -193,6 +196,8 @@ Rectangle {
193196 property int draggedDelegateCount: 0
194197 property int closingIndex: -1
195198
199+ property bool animateX: true
200+
196201 property bool sideStageDragging: sideStageDragHandle.dragging
197202 property real sideStageDragProgress: sideStageDragHandle.progress
198203
qml/Stages/TransformedTabletSpreadDelegate.qml+2−1
@@ -138,7 +138,8 @@ SpreadDelegate {
138138 enabled: !spreadView.active &&
139139 !snapAnimation.running &&
140140 model.appId !== "unity8-dash" &&
141− !spreadView.sideStageDragging
141+ !spreadView.sideStageDragging &&
142+ spreadView.animateX
142143 UbuntuNumberAnimation {
143144 duration: UbuntuAnimation.FastDuration
144145 }
run_on_device.sh+43−41
@@ -4,8 +4,8 @@ USER=phablet
44USER_ID=32011
55PACKAGE=unity8
66BINARY=unity8
7−TARGET_IP=${TARGET_IP-127.0.0.1}
8−TARGET_SSH_PORT=${TARGET_SSH_PORT-2222}
7+TARGET_IP=127.0.0.1
8+TARGET_SSH_PORT=2222
99TARGET_DEBUG_PORT=3768
1010RUN_OPTIONS=-qmljsdebugger=port:$TARGET_DEBUG_PORT
1111SETUP=false
@@ -14,18 +14,23 @@ PINLOCK=false
1414KEYLOCK=false
1515NUM_JOBS='$(( `grep -c ^processor /proc/cpuinfo` + 1 ))'
1616FLIPPED=false
17−CHROOT_PREFIX="/data/ubuntu"
1817SSH_WAS_STARTED=0
1918SSH_STARTED=0
19+PASSWORD=""
20+PASSFILE=""
2021
2122usage() {
22− echo "usage: run_on_device [OPTIONS]\n"
23− echo "Script to setup a build environment for the shell and sync build and run it on the device\n"
23+ echo "usage: run_on_device -a SUDO_PASSWORD [OPTIONS]"
24+ echo
25+ echo "Script to setup a build environment for the shell and sync build and run it on the device"
26+ echo
2427 echo "OPTIONS:"
25− echo " -s, --setup Setup the build environment"
26− echo " -p, --pinlock Enable a PIN lock screen when running"
27− echo " -k, --keylock Enable a Keyboard lock screen when running"
28− echo ""
28+ echo " -a, --password The sudo password to use"
29+ echo " -s, --setup Setup the build environment"
30+ echo " -g, --gdb Run with gdb"
31+ echo " -p, --pinlock Enable a PIN lock screen when running"
32+ echo " -k, --keylock Enable a Keyboard lock screen when running"
33+ echo
2934 echo "IMPORTANT:"
3035 echo " * Make sure to have networking setup on the device beforehand."
3136 echo " * Execute that script from a directory containing unity8 code."
@@ -34,7 +39,7 @@ usage() {
3439
3540start_ssh() {
3641 if [ $SSH_STARTED -eq 0 ]; then
37− exec_with_adb initctl start ssh
42+ adb_sudo initctl start ssh
3843 SSH_STARTED=1
3944 fi
4045}
@@ -44,25 +49,13 @@ exec_with_ssh() {
4449 ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -t $USER@$TARGET_IP -p $TARGET_SSH_PORT sudo -u $USER -i bash -ic \"$@\"
4550}
4651
47−exec_with_adb() {
48− if $FLIPPED; then
49− adb shell $@
50− else
51− adb shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin "$@"
52− fi
53−}
54−
55−adb_root() {
56− adb root
57− adb wait-for-device
52+adb_sudo() {
53+ adb shell "SUDO_ASKPASS=${PASSFILE} sudo --askpass $@"
5854}
5955
6056install_ssh_key() {
61− ssh-keygen -R $TARGET_IP
62− HOME_DIR="${CHROOT_PREFIX}/home/phablet"
57+ HOME_DIR="/home/phablet"
6358 adb push ~/.ssh/id_rsa.pub $HOME_DIR/.ssh/authorized_keys
64− adb shell chown $USER_ID:$USER_ID $HOME_DIR/.ssh
65− adb shell chown $USER_ID:$USER_ID $HOME_DIR/.ssh/authorized_keys
6659 adb shell chmod 700 $HOME_DIR/.ssh
6760 adb shell chmod 600 $HOME_DIR/.ssh/authorized_keys
6861}
@@ -73,8 +66,14 @@ setup_adb_forwarding() {
7366}
7467
7568install_dependencies() {
76− exec_with_adb apt-get update
77− exec_with_adb apt-get -y --force-yes install build-essential rsync bzr ccache gdb ninja-build devscripts equivs unity-plugin-scopes
69+ phablet-config writable-image --remotepassword ${PASSWORD} -p build-essential \
70+ -p rsync \
71+ -p bzr \
72+ -p ccache \
73+ -p gdb \
74+ -p ninja-build \
75+ -p devscripts \
76+ -p equivs
7877}
7978
8079sync_code() {
@@ -108,12 +107,13 @@ run() {
108107 exec_with_ssh "start unity8"
109108}
110109
111−set -- `getopt -n$0 -u -a --longoptions="setup,gdb,pinlock,keylock,help" "sgpkh" "$@"`
110+set -- `getopt -n$0 -u -a --longoptions="password:,setup,gdb,pinlock,keylock,help" "a:sgpkh" "$@"`
112111
113112# FIXME: giving incorrect arguments does not call usage and exit
114113while [ $# -gt 0 ]
115114do
116115 case "$1" in
116+ -a|--password) PASSWORD=$2;;
117117 -s|--setup) SETUP=true;;
118118 -g|--gdb) GDB=true;;
119119 -p|--pinlock) PINLOCK=true;;
@@ -124,21 +124,21 @@ do
124124 shift
125125done
126126
127+if [ -z "${PASSWORD}" ]; then
128+ echo "ERROR: You need to provide a sudo password..."
129+ echo
130+ usage
131+fi
127132
128−adb_root
129−[ "${TARGET_IP}" = "127.0.0.1" ] && setup_adb_forwarding
133+PASSFILE=$( adb shell "FILE=\`mktemp\`
134+ echo \"#!/bin/sh\" > \$FILE
135+ echo \"echo \\\"${PASSWORD}\\\"\" >> \$FILE
136+ chmod +x \$FILE
137+ echo \$FILE" | tr -d '\r' )
130138
131−if [ "`adb shell 'grep -q Ubuntu /etc/lsb-release 2> /dev/null && echo -n FLIPPED'`" = "FLIPPED" ]; then
132− FLIPPED=true
133− CHROOT_PREFIX=""
134− if [ "${TARGET_IP}" != "127.0.0.1" ]; then
135− echo "ERROR: Flipped image detected, adb over TCP/IP isn't supported, yet :/"
136− echo "Unset TARGET_IP and try again."
137− exit 2
138− fi
139−fi
139+setup_adb_forwarding
140140
141−status_output=$(exec_with_adb initctl status ssh)
141+status_output=$(adb_sudo initctl status ssh)
142142if [[ $status_output == "ssh start/running, process "* ]]; then
143143 SSH_WAS_STARTED=1
144144fi
@@ -158,6 +158,8 @@ else
158158 run
159159fi
160160
161+adb shell "rm ${PASSFILE}"
162+
161163if [ $SSH_WAS_STARTED -eq 0 ]; then
162− exec_with_adb initctl stop ssh
164+ adb_sudo initctl stop ssh
163165fi
tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py+4−2
@@ -97,7 +97,8 @@ class ApplicationLifecycleTests(tests.ApplicationLifeCycleTestCase):
9797 self.assertThat(greeter.created, Eventually(Equals(True)))
9898
9999 application_name = self.launch_fake_app()
100− self.assertThat(greeter.created, Eventually(Equals(False)))
100+ greeter.wait_swiped_away()
101+ process_helpers.unlock_unity()
101102 self.assert_current_focused_application(application_name)
102103
103104 def test_greeter_hides_on_app_focus(self):
@@ -113,7 +114,8 @@ class ApplicationLifecycleTests(tests.ApplicationLifeCycleTestCase):
113114 self.assertThat(greeter.created, Eventually(Equals(True)))
114115
115116 self.launch_upstart_application(application_name)
116− self.assertThat(greeter.created, Eventually(Equals(False)))
117+ greeter.wait_swiped_away()
118+ process_helpers.unlock_unity()
117119 self.assert_current_focused_application(application_name)
118120
119121 def test_click_dash_icon_must_unfocus_application(self):
tests/autopilot/unity8/process_helpers.py+12−17
@@ -20,6 +20,7 @@
2020import logging
2121import subprocess
2222import sys
23+import dbus
2324
2425# This has to work in both python 3 (ap 1.5) and py2 (ap legacy 1.4.1) so we
2526# pick the correct location in each case. Remove the py2 branch once we no
@@ -82,22 +83,16 @@ def unlock_unity(unity_proxy_obj=None):
8283 if greeter.created is False:
8384 raise RuntimeWarning("Greeter appears to be already unlocked.")
8485
85− # Because of potential input jerkiness under heavy load,
86− # retry unlocking the greeter two times.
87− # https://bugs.launchpad.net/ubuntu/+bug/1260113
88−
89− retries = 3
90− while retries > 0:
91− try:
92− greeter.swipe()
93− except AssertionError:
94− retries -= 1
95− if retries == 0:
96− raise
97− logger.info("Failed to unlock greeter, trying again...")
98− else:
99− logger.info("Greeter unlocked, continuing.")
100− break
86+ bus = dbus.SessionBus()
87+ dbus_proxy = bus.get_object("com.canonical.UnityGreeter", "/")
88+ try:
89+ dbus_proxy.HideGreeter()
90+ except dbus.DBusException:
91+ logger.info("Failed to unlock greeter")
92+ raise
93+ else:
94+ greeter.created.wait_for(False)
95+ logger.info("Greeter unlocked, continuing.")
10196
10297
10398def lock_unity(unity_proxy_obj=None):
@@ -198,7 +193,7 @@ def get_job_status(name):
198193 ], universal_newlines=True)
199194 except subprocess.CalledProcessError as error:
200195 raise JobError(
201− "Unable to get {}'s status: {}".format(name, error)
196+ "Unable to get {}'s status: {}".format(name, error)
202197 )
203198
204199
tests/autopilot/unity8/shell/emulators/greeter.py+4−1
@@ -25,6 +25,9 @@ from unity8.shell.emulators import UnityEmulatorBase
2525class Greeter(UnityEmulatorBase):
2626 """An emulator that understands the greeter screen."""
2727
28+ def wait_swiped_away(self):
29+ self.showProgress.wait_for(0)
30+
2831 def swipe(self):
2932 """Swipe the greeter screen away."""
3033 self.created.wait_for(True)
@@ -37,7 +40,7 @@ class Greeter(UnityEmulatorBase):
3740 stop_y = start_y
3841 self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
3942
40− self.showProgress.wait_for(0)
43+ self.wait_swiped_away()
4144
4245 def get_prompt(self):
4346 return self.select_single(
tests/autopilot/unity8/shell/tests/test_lock_screen.py+8−9
@@ -20,7 +20,6 @@
2020
2121from __future__ import absolute_import
2222
23−from unity8.process_helpers import unlock_unity
2423from unity8.shell import with_lightdm_mock
2524from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
2625
@@ -45,11 +44,11 @@ class TestLockscreen(UnityTestCase):
4544 @with_lightdm_mock("single-pin")
4645 def test_can_unlock_pin_screen(self):
4746 """Must be able to unlock the PIN entry lock screen."""
48− unity_proxy = self.launch_unity()
47+ self.launch_unity()
4948 greeter = self.main_window.get_greeter()
5049
5150 if greeter.narrowMode:
52− unlock_unity(unity_proxy)
51+ greeter.swipe()
5352 lockscreen = self._wait_for_lockscreen()
5453 self.main_window.enter_pin_code("1234")
5554 self.assertThat(lockscreen.shown, Eventually(Equals(False)))
@@ -60,11 +59,11 @@ class TestLockscreen(UnityTestCase):
6059 @with_lightdm_mock("single-passphrase")
6160 def test_can_unlock_passphrase_screen(self):
6261 """Must be able to unlock the passphrase entry screen."""
63− unity_proxy = self.launch_unity()
62+ self.launch_unity()
6463 greeter = self.main_window.get_greeter()
6564
6665 if greeter.narrowMode:
67− unlock_unity(unity_proxy)
66+ greeter.swipe()
6867 lockscreen = self._wait_for_lockscreen()
6968 self._enter_pin_passphrase("password")
7069 self.assertThat(lockscreen.shown, Eventually(Equals(False)))
@@ -75,11 +74,11 @@ class TestLockscreen(UnityTestCase):
7574 @with_lightdm_mock("single-pin")
7675 def test_pin_screen_wrong_code(self):
7776 """Entering the wrong pin code must not dismiss the lock screen."""
78− unity_proxy = self.launch_unity()
77+ self.launch_unity()
7978 greeter = self.main_window.get_greeter()
8079
8180 if greeter.narrowMode:
82− unlock_unity(unity_proxy)
81+ greeter.swipe()
8382 lockscreen = self._wait_for_lockscreen()
8483 self.main_window.enter_pin_code("4321")
8584 pinentryField = self.main_window.get_pinentryField()
@@ -94,11 +93,11 @@ class TestLockscreen(UnityTestCase):
9493 @with_lightdm_mock("single-passphrase")
9594 def test_passphrase_screen_wrong_password(self):
9695 """Entering the wrong password must not dismiss the lock screen."""
97− unity_proxy = self.launch_unity()
96+ self.launch_unity()
9897 greeter = self.main_window.get_greeter()
9998
10099 if greeter.narrowMode:
101− unlock_unity(unity_proxy)
100+ greeter.swipe()
102101 lockscreen = self._wait_for_lockscreen()
103102 self._enter_pin_passphrase("foobar")
104103 pinentryField = self.main_window.get_pinentryField()
tests/autopilot/unity8/shell/tests/test_notifications.py+61−97
@@ -135,10 +135,7 @@ class InteractiveNotificationBase(NotificationsBase):
135135 actions = [("action_id", "dummy")]
136136 hints = [
137137 ("x-canonical-switch-to-application", "true"),
138− (
139− "x-canonical-secondary-icon",
140− self._get_icon_path('applicationIcons/dialer-app.png')
141− )
138+ ("x-canonical-secondary-icon","dialer")
142139 ]
143140
144141 self._create_interactive_notification(
@@ -170,20 +167,19 @@ class InteractiveNotificationBase(NotificationsBase):
170167 body = "Frank Zappa\n+44 (0)7736 027340"
171168 icon_path = self._get_icon_path('avatars/anna_olsson.png')
172169 hints = [
173− (
174− "x-canonical-secondary-icon",
175− self._get_icon_path('applicationIcons/dialer-app.png')
176− ),
170+ ("x-canonical-secondary-icon", "incoming-call"),
177171 ("x-canonical-snap-decisions", "true"),
172+ ("x-canonical-private-affirmative-tint", "true"),
173+ ("x-canonical-private-rejection-tint", "true"),
178174 ]
179175
180176 actions = [
181177 ('action_accept', 'Hold + Answer'),
182178 ('action_decline_1', 'End + Answer'),
183179 ('action_decline_2', 'Decline'),
184− ('action_decline_3', 'messages:I missed your call - can you call me now?'),
185− ('action_decline_4', 'messages:I\'m running late. I\'m on my way.'),
186− ('action_decline_5', 'messages:I\'m busy at the moment. I\'ll call later.'),
180+ ('action_decline_3', 'message:I missed your call - can you call me now?'),
181+ ('action_decline_4', 'message:I\'m running late. I\'m on my way.'),
182+ ('action_decline_5', 'message:I\'m busy at the moment. I\'ll call later.'),
187183 ('action_decline_6', 'edit:Custom'),
188184 ]
189185
@@ -204,13 +200,53 @@ class InteractiveNotificationBase(NotificationsBase):
204200 notification.pointing_device.click_object(
205201 notification.select_single(objectName="combobutton_dropdown"))
206202 self.assertThat(
207− notification.select_single(objectName="button2").expanded,
203+ notification.select_single(objectName="notify_button2").expanded,
208204 Eventually(Equals(True)))
209205 time.sleep(2)
210206 notification.pointing_device.click_object(
211− notification.select_single(objectName="button4"))
207+ notification.select_single(objectName="notify_button4"))
212208 self.assert_notification_action_id_was_called("action_decline_4")
213209
210+
211+ def test_sd_one_over_two_layout(self):
212+ """Snap-decision with three actions should use one-over two button layout."""
213+ unity_proxy = self.launch_unity()
214+ unlock_unity(unity_proxy)
215+
216+ summary = "Theatre at Ferria Stadium"
217+ body = "at Ferria Stadium in Bilbao, Spain\n07578545317"
218+ hints = [
219+ ("x-canonical-snap-decisions", "true"),
220+ ("x-canonical-non-shaped-icon", "true"),
221+ ("x-canonical-private-affirmative-tint", "true")
222+ ]
223+
224+ actions = [
225+ ('action_accept', 'Ok'),
226+ ('action_decline_1', 'Snooze'),
227+ ('action_decline_2', 'View'),
228+ ]
229+
230+ self._create_interactive_notification(
231+ summary,
232+ body,
233+ None,
234+ "NORMAL",
235+ actions,
236+ hints
237+ )
238+
239+ # verify and interact with the triggered snap-decision notification
240+ notify_list = self._get_notifications_list()
241+ get_notification = lambda: notify_list.wait_select_single(
242+ 'Notification', objectName='notification1')
243+ notification = get_notification()
244+ self._assert_notification(
245+ notification, summary, body, False, False, 1.0)
246+ notification.pointing_device.click_object(
247+ notification.select_single(objectName="notify_oot_button0"))
248+ self.assert_notification_action_id_was_called("action_accept")
249+
214250 def test_modal_sd_without_greeter(self):
215251 """Snap-decision should block input to shell without greeter."""
216252 unity_proxy = self.launch_unity()
@@ -222,6 +258,8 @@ class InteractiveNotificationBase(NotificationsBase):
222258 hints = [
223259 ("x-canonical-snap-decisions", "true"),
224260 ("x-canonical-non-shaped-icon", "true"),
261+ ("x-canonical-private-affirmative-tint", "true"),
262+ ("x-canonical-private-rejection-tint", "true"),
225263 ]
226264
227265 actions = [
@@ -253,7 +291,7 @@ class InteractiveNotificationBase(NotificationsBase):
253291 self._assert_notification(
254292 notification, summary, body, True, False, 1.0)
255293 notification.pointing_device.click_object(
256− notification.select_single(objectName="button0"))
294+ notification.select_single(objectName="notify_button0"))
257295 self.assert_notification_action_id_was_called("action_accept")
258296
259297 def test_modal_sd_with_greeter(self):
@@ -266,6 +304,8 @@ class InteractiveNotificationBase(NotificationsBase):
266304 hints = [
267305 ("x-canonical-snap-decisions", "true"),
268306 ("x-canonical-non-shaped-icon", "true"),
307+ ("x-canonical-private-affirmative-tint", "true"),
308+ ("x-canonical-private-rejection-tint", "true"),
269309 ]
270310
271311 actions = [
@@ -296,7 +336,7 @@ class InteractiveNotificationBase(NotificationsBase):
296336 self._assert_notification(
297337 notification, summary, body, True, False, 1.0)
298338 notification.pointing_device.click_object(
299− notification.select_single(objectName="button0"))
339+ notification.select_single(objectName="notify_button0"))
300340 self.assert_notification_action_id_was_called("action_accept")
301341
302342 def _create_interactive_notification(
@@ -438,10 +478,7 @@ class EphemeralNotificationsTests(NotificationsBase):
438478 "join me and Anna?"
439479 icon_path = self._get_icon_path('avatars/anna_olsson.png')
440480 hints = [
441− (
442− "x-canonical-secondary-icon",
443− self._get_icon_path('applicationIcons/dialer-app.png')
444− )
481+ ("x-canonical-secondary-icon", "message")
445482 ]
446483
447484 notification = shell.create_ephemeral_notification(
@@ -474,17 +511,13 @@ class EphemeralNotificationsTests(NotificationsBase):
474511 notify_list = self._get_notifications_list()
475512
476513 summary = "Upload of image completed"
477− hints = [
478− (
479− "x-canonical-secondary-icon",
480− self._get_icon_path('applicationIcons/facebook.png')
481− )
482− ]
514+ icon_path = self._get_icon_path('applicationIcons/facebook.png')
515+ hints=[]
483516
484517 notification = shell.create_ephemeral_notification(
485518 summary,
486519 None,
487− None,
520+ icon_path,
488521 hints,
489522 "NORMAL",
490523 )
@@ -497,8 +530,8 @@ class EphemeralNotificationsTests(NotificationsBase):
497530 notification(),
498531 summary,
499532 None,
500− False,
501533 True,
534+ False,
502535 1.0
503536 )
504537
@@ -683,7 +716,7 @@ class EphemeralNotificationsTests(NotificationsBase):
683716 body = 'This bubble uses the icon-title-body layout with a ' \
684717 'secondary icon.'
685718 icon_path = self._get_icon_path('avatars/anna_olsson.png')
686− hint_icon = self._get_icon_path('applicationIcons/dialer-app.png')
719+ hint_icon = 'dialer'
687720
688721 notification = shell.create_ephemeral_notification(
689722 summary,
@@ -718,72 +751,3 @@ class EphemeralNotificationsTests(NotificationsBase):
718751 self.assertThat(get_notification, Eventually(NotEquals(None)))
719752 self._assert_notification(
720753 get_notification(), summary, body, False, False, 1.0)
721−
722− def test_append_hint(self):
723− """Notification has to accumulate body-text using append-hint."""
724− unity_proxy = self.launch_unity()
725− unlock_unity(unity_proxy)
726−
727− notify_list = self._get_notifications_list()
728−
729− summary = 'Cole Raby'
730− body = 'Hey Bro Coly!'
731− icon_path = self._get_icon_path('avatars/amanda.png')
732− body_sum = body
733− notification = shell.create_ephemeral_notification(
734− summary,
735− body,
736− icon_path,
737− hints=[('x-canonical-append', 'true')]
738− )
739−
740− notification.show()
741−
742− get_notification = lambda: notify_list.wait_select_single(
743− 'Notification', objectName='notification1')
744−
745− notification = get_notification()
746− self._assert_notification(
747− notification,
748− summary,
749− body_sum,
750− True,
751− False,
752− 1.0
753− )
754−
755− bodies = [
756− 'What\'s up dude?',
757− 'Did you watch the air-race in Oshkosh last week?',
758− 'Phil owned the place like no one before him!',
759− 'Did really everything in the race work according to regulations?',
760− 'Somehow I think to remember Burt Williams did cut corners and '
761− 'was not punished for this.',
762− 'Hopefully the referees will watch the videos of the race.',
763− 'Burt could get fined with US$ 50000 for that rule-violation :)'
764− ]
765−
766− for new_body in bodies:
767− body = new_body
768− body_sum += '\n' + body
769− notification = shell.create_ephemeral_notification(
770− summary,
771− body,
772− icon_path,
773− hints=[('x-canonical-append', 'true')]
774− )
775− notification.show()
776−
777− get_notification = lambda: notify_list.wait_select_single(
778− 'Notification',
779− objectName='notification1'
780− )
781− notification = get_notification()
782− self._assert_notification(
783− notification,
784− summary,
785− body_sum,
786− True,
787− False,
788− 1.0
789− )
tests/mocks/AccountsService/AccountsService.qmltypes+1
@@ -26,5 +26,6 @@ Module {
2626 Property { name: "backgroundFile"; type: "string" }
2727 Property { name: "statsWelcomeScreen"; type: "bool" }
2828 Property { name: "passwordDisplayHint"; type: "PasswordDisplayHint"; isReadonly: true }
29+ Property { name: "failedLogins"; type: "uint" }
2930 }
3031}
tests/mocks/LightDM/LightDM.qmltypes+2
@@ -27,6 +27,7 @@ Module {
2727 name: "showPrompt"
2828 Parameter { name: "text"; type: "string" }
2929 Parameter { name: "isSecret"; type: "bool" }
30+ Parameter { name: "isDefaultPrompt"; type: "bool" }
3031 }
3132 Signal { name: "authenticationComplete" }
3233 Signal {
@@ -34,6 +35,7 @@ Module {
3435 Parameter { name: "user"; type: "string" }
3536 }
3637 Signal { name: "isActiveChanged" }
38+ Signal { name: "isAuthenticatedChanged" }
3739 Signal { name: "showGreeter" }
3840 Signal {
3941 name: "requestAuthenticationUser"
tests/mocks/Powerd/Powerd.cpp+15−1
@@ -19,6 +19,20 @@
1919#include "Powerd.h"
2020
2121Powerd::Powerd(QObject* parent)
22− : QObject(parent)
22+ : QObject(parent),
23+ m_status(Powerd::Status::On)
2324{
2425}
26+
27+void Powerd::setStatus(Powerd::Status status)
28+{
29+ if (m_status != status) {
30+ m_status = status;
31+ Q_EMIT statusChanged(DisplayStateChangeReason::Unknown);
32+ }
33+}
34+
35+Powerd::Status Powerd::status() const
36+{
37+ return m_status;
38+}
tests/mocks/Powerd/Powerd.h+8−1
@@ -26,6 +26,7 @@ class Powerd: public QObject
2626 Q_OBJECT
2727 Q_ENUMS(Status)
2828 Q_ENUMS(DisplayStateChangeReason)
29+ Q_PROPERTY(Status status READ status WRITE setStatus NOTIFY statusChanged) // write only exists for tests
2930
3031public:
3132 enum DisplayStateChangeReason {
@@ -42,8 +43,14 @@ public:
4243
4344 explicit Powerd(QObject *parent = 0);
4445
46+ Status status() const;
47+ void setStatus(Status status);
48+
4549Q_SIGNALS:
46− void displayPowerStateChange(int status, int reason);
50+ void statusChanged(DisplayStateChangeReason reason);
51+
52+private:
53+ Status m_status;
4754};
4855
4956#endif
tests/mocks/Powerd/Powerd.qmltypes+3−3
@@ -30,10 +30,10 @@ Module {
3030 "On": 1
3131 }
3232 }
33+ Property { name: "status"; type: "Status" }
3334 Signal {
34− name: "displayPowerStateChange"
35− Parameter { name: "status"; type: "int" }
36− Parameter { name: "reason"; type: "int" }
35+ name: "statusChanged"
36+ Parameter { name: "reason"; type: "DisplayStateChangeReason" }
3737 }
3838 }
3939}
tests/mocks/Ubuntu/Payments/MockPayments.cpp+10−7
@@ -77,13 +77,16 @@ void MockPayments::setStoreItemId(const QString &store_item_id)
7777
7878void MockPayments::start()
7979{
80− if (!m_store_item_id.isEmpty()) {
81− if (m_store_item_id == "com.example.invalid") {
82− Q_EMIT purchaseError("Purchase failed.");
83− } else {
84− Q_EMIT purchaseCompleted();
85− }
86− } else {
80+ if (m_store_item_id.isEmpty()) {
8781 Q_EMIT purchaseError("No item ID supplied.");
8882 }
8983}
84+
85+void MockPayments::process()
86+{
87+ if (m_store_item_id == "com.example.invalid") {
88+ Q_EMIT purchaseError("Purchase failed.");
89+ } else {
90+ Q_EMIT purchaseCompleted();
91+ }
92+}
tests/mocks/Ubuntu/Payments/MockPayments.h+1
@@ -41,6 +41,7 @@ public:
4141 void setPrice(const double price);
4242 void setStoreItemId(const QString& store_item_id);
4343 Q_INVOKABLE void start();
44+ Q_INVOKABLE void process(); // only available for testing
4445
4546Q_SIGNALS:
4647 void currencyChanged(const QString& currency);
tests/mocks/Ubuntu/SystemImage/SystemImage.qmltypes+3−1
@@ -4,13 +4,15 @@ import QtQuick.tooling 1.1
44// It is used for QML tooling purposes only.
55//
66// This file was auto-generated by:
7−// 'qmlplugindump -notrelocatable Ubuntu.SystemImage 0.1 plugins'
7+// 'qmlplugindump -notrelocatable Ubuntu.SystemImage 0.1 tests/mocks'
88
99Module {
1010 Component {
1111 name: "MockSystemImage"
1212 prototype: "QObject"
1313 exports: ["Ubuntu.SystemImage/SystemImage 0.1"]
14+ isCreatable: false
15+ isSingleton: true
1416 exportMetaObjectRevisions: [0]
1517 Signal { name: "resettingDevice" }
1618 Method { name: "factoryReset" }
tests/mocks/Unity/Application/Application.qmltypes+115−70
@@ -13,58 +13,24 @@ Module {
1313 exports: ["Unity.Application/ApplicationInfo 0.1"]
1414 exportMetaObjectRevisions: [0]
1515 Property { name: "fullscreen"; type: "bool" }
16− Property { name: "stage"; type: "Stage" }
17− Property { name: "surface"; type: "MirSurfaceItem"; isReadonly: true; isPointer: true }
18− Property { name: "promptSurfaces"; type: "MirSurfaceItem"; isList: true; isReadonly: true }
19− Property { name: "imageQml"; type: "string" }
20− Property { name: "windowQml"; type: "string" }
21− Signal {
22− name: "appIdChanged"
23− Parameter { type: "string" }
24− }
25− Signal {
26− name: "nameChanged"
27− Parameter { type: "string" }
28− }
29− Signal {
30− name: "commentChanged"
31− Parameter { type: "string" }
32− }
33− Signal {
34− name: "iconChanged"
35− Parameter { type: "QUrl" }
36− }
16+ Property { name: "session"; type: "Session"; isReadonly: true; isPointer: true }
17+ Property { name: "manualSurfaceCreation"; type: "bool" }
3718 Signal {
38− name: "stageChanged"
39− Parameter { type: "Stage" }
40− }
41− Signal {
42− name: "stateChanged"
43− Parameter { type: "State" }
44− }
45− Signal {
46− name: "focusedChanged"
47− Parameter { type: "bool" }
19+ name: "sessionChanged"
20+ Parameter { type: "Session"; isPointer: true }
4821 }
4922 Signal {
5023 name: "fullscreenChanged"
51− Parameter { type: "bool" }
52− }
53− Signal {
54− name: "imageQmlChanged"
55− Parameter { type: "string" }
56− }
57− Signal {
58− name: "windowQmlChanged"
59− Parameter { type: "string" }
24+ Parameter { name: "value"; type: "bool" }
6025 }
6126 Signal {
62− name: "screenshotChanged"
63− Parameter { type: "QUrl" }
27+ name: "manualSurfaceCreationChanged"
28+ Parameter { name: "value"; type: "bool" }
6429 }
65− Signal {
66− name: "surfaceChanged"
67− Parameter { type: "MirSurfaceItem"; isPointer: true }
30+ Method { name: "createSession" }
31+ Method {
32+ name: "setState"
33+ Parameter { name: "value"; type: "State" }
6834 }
6935 }
7036 Component {
@@ -198,17 +164,50 @@ Module {
198164 type: "bool"
199165 Parameter { name: "appId"; type: "string" }
200166 }
167+ Method { name: "availableApplications"; type: "QStringList" }
201168 Method {
202− name: "updateScreenshot"
203− type: "bool"
169+ name: "add"
170+ type: "ApplicationInfo*"
204171 Parameter { name: "appId"; type: "string" }
205172 }
206− Method { name: "availableApplications"; type: "QStringList" }
173+ }
174+ Component {
175+ name: "ApplicationTestInterface"
176+ prototype: "QDBusAbstractAdaptor"
177+ exports: ["Unity.Application/ApplicationTest 0.1"]
178+ isCreatable: false
179+ isSingleton: true
180+ exportMetaObjectRevisions: [0]
181+ Method {
182+ name: "addChildSession"
183+ type: "uint"
184+ Parameter { name: "appId"; type: "string" }
185+ Parameter { name: "existingSessionId"; type: "uint" }
186+ Parameter { name: "surfaceImage"; type: "string" }
187+ }
188+ Method {
189+ name: "removeSession"
190+ Parameter { name: "sessionId"; type: "uint" }
191+ }
192+ Method {
193+ name: "addChildSession"
194+ type: "Session*"
195+ Parameter { name: "existingSession"; type: "Session"; isPointer: true }
196+ Parameter { name: "surfaceImage"; type: "string" }
197+ }
198+ Method {
199+ name: "removeSession"
200+ Parameter { name: "existingSession"; type: "Session"; isPointer: true }
201+ }
202+ Method {
203+ name: "removeSurface"
204+ Parameter { name: "existingSurface"; type: "MirSurfaceItem"; isPointer: true }
205+ }
207206 }
208207 Component {
209208 name: "MirSurfaceItem"
210209 defaultProperty: "data"
211− prototype: "QQuickPaintedItem"
210+ prototype: "QQuickItem"
212211 exports: ["Unity.Application/MirSurfaceItem 0.1"]
213212 isCreatable: false
214213 exportMetaObjectRevisions: [0]
@@ -238,8 +237,7 @@ Module {
238237 Property { name: "type"; type: "Type"; isReadonly: true }
239238 Property { name: "state"; type: "State"; isReadonly: true }
240239 Property { name: "name"; type: "string"; isReadonly: true }
241− Property { name: "parentSurface"; type: "MirSurfaceItem"; isReadonly: true; isPointer: true }
242− Property { name: "childSurfaces"; type: "MirSurfaceItem"; isList: true; isReadonly: true }
240+ Property { name: "live"; type: "bool"; isReadonly: true }
243241 Signal {
244242 name: "typeChanged"
245243 Parameter { type: "Type" }
@@ -249,22 +247,72 @@ Module {
249247 Parameter { type: "State" }
250248 }
251249 Signal {
252− name: "nameChanged"
253− Parameter { type: "string" }
254− }
255− Signal {
256− name: "parentSurfaceChanged"
257− Parameter { type: "MirSurfaceItem"; isPointer: true }
250+ name: "liveChanged"
251+ Parameter { name: "live"; type: "bool" }
258252 }
259− Signal { name: "removed" }
260253 Signal { name: "inputMethodRequested" }
261254 Signal { name: "inputMethodDismissed" }
255+ Signal { name: "deregister" }
262256 Method {
263257 name: "setState"
264258 Parameter { name: "newState"; type: "State" }
265259 }
266260 Method { name: "release" }
267261 }
262+ Component { name: "QDBusAbstractAdaptor"; prototype: "QObject" }
263+ Component {
264+ name: "Session"
265+ prototype: "QObject"
266+ exports: ["Unity.Application/Session 0.1"]
267+ isCreatable: false
268+ exportMetaObjectRevisions: [0]
269+ Property { name: "name"; type: "string"; isReadonly: true }
270+ Property { name: "surface"; type: "MirSurfaceItem"; isReadonly: true; isPointer: true }
271+ Property { name: "parentSession"; type: "Session"; isReadonly: true; isPointer: true }
272+ Property { name: "childSessions"; type: "SessionModel"; isReadonly: true; isPointer: true }
273+ Property { name: "live"; type: "bool"; isReadonly: true }
274+ Signal {
275+ name: "surfaceChanged"
276+ Parameter { type: "MirSurfaceItem"; isPointer: true }
277+ }
278+ Signal {
279+ name: "parentSessionChanged"
280+ Parameter { type: "Session"; isPointer: true }
281+ }
282+ Signal {
283+ name: "liveChanged"
284+ Parameter { name: "live"; type: "bool" }
285+ }
286+ Signal { name: "deregister" }
287+ Method { name: "createSurface" }
288+ Method { name: "release" }
289+ Method {
290+ name: "addChildSession"
291+ Parameter { name: "session"; type: "Session"; isPointer: true }
292+ }
293+ }
294+ Component {
295+ name: "SessionManager"
296+ prototype: "QObject"
297+ exports: ["Unity.Application/SessionManager 0.1"]
298+ isCreatable: false
299+ isSingleton: true
300+ exportMetaObjectRevisions: [0]
301+ Signal {
302+ name: "sessionStarting"
303+ Parameter { name: "session"; type: "Session"; isPointer: true }
304+ }
305+ Signal {
306+ name: "sessionStopping"
307+ Parameter { name: "session"; type: "Session"; isPointer: true }
308+ }
309+ Method {
310+ name: "createSession"
311+ type: "Session*"
312+ Parameter { name: "name"; type: "string" }
313+ Parameter { name: "screenshot"; type: "QUrl" }
314+ }
315+ }
268316 Component {
269317 name: "SurfaceManager"
270318 prototype: "QObject"
@@ -281,6 +329,14 @@ Module {
281329 name: "surfaceDestroyed"
282330 Parameter { name: "surface"; type: "MirSurfaceItem"; isPointer: true }
283331 }
332+ Method {
333+ name: "createSurface"
334+ type: "MirSurfaceItem*"
335+ Parameter { name: "name"; type: "string" }
336+ Parameter { name: "type"; type: "MirSurfaceItem::Type" }
337+ Parameter { name: "state"; type: "MirSurfaceItem::State" }
338+ Parameter { name: "screenshot"; type: "QUrl" }
339+ }
284340 Method { name: "inputMethodSurface"; type: "MirSurfaceItem*" }
285341 }
286342 Component {
@@ -312,7 +368,6 @@ Module {
312368 Property { name: "stage"; type: "Stage"; isReadonly: true }
313369 Property { name: "state"; type: "State"; isReadonly: true }
314370 Property { name: "focused"; type: "bool"; isReadonly: true }
315− Property { name: "screenshot"; type: "QUrl"; isReadonly: true }
316371 Signal {
317372 name: "nameChanged"
318373 Parameter { name: "name"; type: "string" }
@@ -337,10 +392,6 @@ Module {
337392 name: "focusedChanged"
338393 Parameter { name: "focused"; type: "bool" }
339394 }
340− Signal {
341− name: "screenshotChanged"
342− Parameter { name: "screenshot"; type: "QUrl" }
343− }
344395 }
345396 Component {
346397 name: "unity::shell::application::ApplicationManagerInterface"
@@ -357,8 +408,7 @@ Module {
357408 "RoleIcon": 259,
358409 "RoleStage": 260,
359410 "RoleState": 261,
360− "RoleFocused": 262,
361− "RoleScreenshot": 263
411+ "RoleFocused": 262
362412 }
363413 }
364414 Property { name: "count"; type: "int"; isReadonly: true }
@@ -408,10 +458,5 @@ Module {
408458 type: "bool"
409459 Parameter { name: "appId"; type: "string" }
410460 }
411− Method {
412− name: "updateScreenshot"
413− type: "bool"
414− Parameter { name: "appId"; type: "string" }
415− }
416461 }
417462}
tests/mocks/Unity/Application/ApplicationDBusAdaptor.cppdeleted−81
@@ -1,81 +0,0 @@
1−/*
2− * Copyright (C) 2014 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−#include "ApplicationInfo.h"
18−#include "ApplicationDBusAdaptor.h"
19−#include "ApplicationManager.h"
20−#include "SurfaceManager.h"
21−#include "MirSurfaceItem.h"
22−
23−quint32 nextId = 0;
24−
25−ApplicationDBusAdaptor::ApplicationDBusAdaptor(ApplicationManager* applicationManager)
26− : QDBusAbstractAdaptor(applicationManager)
27− , m_applicationManager(applicationManager)
28−{
29−}
30−
31−MirSurfaceItem* topSurface(MirSurfaceItem* surface)
32−{
33− if (!surface)
34− return nullptr;
35−
36− MirSurfaceItem* child = nullptr;
37− Q_FOREACH (MirSurfaceItem *childSurface, surface->childSurfaceList()) {
38− child = topSurface(childSurface);
39− if (child) {
40− break;
41− }
42− }
43− return child ? child : surface;
44−}
45−
46−quint32 ApplicationDBusAdaptor::addPromptSurface(const QString &appId, const QString &surfaceImage)
47−{
48− qDebug() << "ApplicationDBusAdaptor::addPromptSurface to " << appId;
49−
50− ApplicationInfo* application = m_applicationManager->findApplication(appId);
51− if (!application) {
52− qDebug() << "ApplicationDBusAdaptor::addChildSurface - No application found for " << appId;
53− return 0;
54− }
55− quint32 surfaceId = ++nextId;
56− MirSurfaceItem* surface = new MirSurfaceItem(QString("%1-ChildSurface%2").arg(appId).arg(surfaceId),
57− MirSurfaceItem::Normal,
58− MirSurfaceItem::Maximized,
59− QUrl(surfaceImage));
60− m_childItems[surfaceId] = surface;
61−
62− if (application->promptSurfaceList().count() > 0) {
63− surface->setParentSurface(topSurface(application->promptSurfaceList()[0]));
64− } else {
65− application->addPromptSurface(surface);
66− }
67−
68− return surfaceId;
69−}
70−
71−void ApplicationDBusAdaptor::removeChildSurface(int surfaceId)
72−{
73− qDebug() << "ApplicationDBusAdaptor::removeChildSurface - " << surfaceId;
74−
75− if (!m_childItems.contains(surfaceId)) {
76− qDebug() << "ApplicationDBusAdaptor::removeChildSurface - No added surface for " << surfaceId;
77− return;
78− }
79− MirSurfaceItem* surface = m_childItems.take(surfaceId);
80− Q_EMIT surface->removed();
81−}
tests/mocks/Unity/Application/ApplicationInfo.cpp+36−85
@@ -15,8 +15,8 @@
1515 */
1616
1717#include "ApplicationInfo.h"
18−#include "MirSurfaceItem.h"
19−#include "SurfaceManager.h"
18+#include "Session.h"
19+#include "SessionManager.h"
2020
2121#include <paths.h>
2222
@@ -33,9 +33,8 @@ ApplicationInfo::ApplicationInfo(const QString &appId, QObject *parent)
3333 , m_state(Starting)
3434 , m_focused(false)
3535 , m_fullscreen(false)
36− , m_surface(0)
36+ , m_session(0)
3737 , m_manualSurfaceCreation(false)
38− , m_parentItem(0)
3938{
4039}
4140
@@ -45,107 +44,50 @@ ApplicationInfo::ApplicationInfo(QObject *parent)
4544 , m_state(Starting)
4645 , m_focused(false)
4746 , m_fullscreen(false)
48− , m_surface(0)
47+ , m_session(0)
4948 , m_manualSurfaceCreation(false)
50− , m_parentItem(0)
5149{
5250}
5351
5452ApplicationInfo::~ApplicationInfo()
5553{
56− if (m_surface) {
57− Q_EMIT SurfaceManager::singleton()->surfaceDestroyed(m_surface);
58− m_surface->deleteLater();
59− setSurface(nullptr);
60− }
54+ delete m_session;
6155}
6256
63−void ApplicationInfo::createSurface()
57+void ApplicationInfo::createSession()
6458{
65− if (m_surface || state() == ApplicationInfo::Stopped) return;
59+ if (m_session || state() == ApplicationInfo::Stopped) { return; }
6660
6761 QUrl screenshotUrl = QString("file://%1").arg(m_screenshotFileName);
68−
69− setSurface(new MirSurfaceItem(name(),
70− MirSurfaceItem::Normal,
71− fullscreen() ? MirSurfaceItem::Fullscreen : MirSurfaceItem::Maximized,
72− screenshotUrl));
62+ setSession(SessionManager::singleton()->createSession(appId(), screenshotUrl));
7363}
7464
75−void ApplicationInfo::setSurface(MirSurfaceItem* surface)
65+void ApplicationInfo::setSession(Session* session)
7666{
77− qDebug() << "Application::setSurface - appId=" << appId() << "surface=" << surface;
78− if (m_surface == surface)
67+ qDebug() << "Application::setSession - appId=" << appId() << "session=" << session;
68+ if (m_session == session)
7969 return;
8070
81− if (m_surface) {
82− m_surface->setApplication(nullptr);
83− m_surface->setParent(nullptr);
84− SurfaceManager::singleton()->unregisterSurface(m_surface);
85− }
86−
87− m_surface = surface;
88−
89− if (m_surface) {
90− m_surface->setApplication(this);
91− m_surface->setParent(this);
92− SurfaceManager::singleton()->registerSurface(m_surface);
71+ if (m_session) {
72+ disconnect(this, 0, m_session, 0);
73+ m_session->setApplication(nullptr);
74+ m_session->setParent(nullptr);
75+ Q_EMIT m_session->deregister();
9376 }
9477
95− Q_EMIT surfaceChanged(m_surface);
96− SurfaceManager::singleton()->registerSurface(m_surface);
97−}
78+ m_session = session;
9879
99−void ApplicationInfo::addPromptSurface(MirSurfaceItem* surface)
100−{
101− qDebug() << "ApplicationInfo::addPromptSurface " << surface->name() << " to " << name();
102− if (surface == m_surface || m_promptSurfaces.contains(surface)) return;
80+ if (m_session) {
81+ m_session->setApplication(this);
82+ m_session->setParent(this);
83+ SessionManager::singleton()->registerSession(m_session);
10384
104− surface->setApplication(this);
105− m_promptSurfaces.append(surface);
106− Q_EMIT promptSurfacesChanged();
107−}
108−
109−void ApplicationInfo::removeSurface(MirSurfaceItem* surface)
110−{
111− if (m_surface == surface) {
112− setSurface(nullptr);
113− } else if (m_promptSurfaces.contains(surface)) {
114− qDebug() << "Application::removeSurface " << surface->name() << " from " << name();
115−
116− m_promptSurfaces.removeAll(surface);
117− surface->setApplication(nullptr);
118−
119− Q_EMIT promptSurfacesChanged();
85+ if (!m_manualSurfaceCreation) {
86+ QTimer::singleShot(500, m_session, SLOT(createSurface()));
87+ }
12088 }
121−}
12289
123−QList<MirSurfaceItem*> ApplicationInfo::promptSurfaceList() const
124−{
125− return m_promptSurfaces;
126−}
127−
128−QQmlListProperty<MirSurfaceItem> ApplicationInfo::promptSurfaces()
129−{
130− return QQmlListProperty<MirSurfaceItem>(this,
131− 0,
132− ApplicationInfo::promptSurfaceCount,
133− ApplicationInfo::promptSurfaceAt);
134−}
135−
136−int ApplicationInfo::promptSurfaceCount(QQmlListProperty<MirSurfaceItem> *prop)
137−{
138− ApplicationInfo *p = qobject_cast<ApplicationInfo*>(prop->object);
139− return p->m_promptSurfaces.count();
140−}
141−
142−MirSurfaceItem* ApplicationInfo::promptSurfaceAt(QQmlListProperty<MirSurfaceItem> *prop, int index)
143−{
144− ApplicationInfo *p = qobject_cast<ApplicationInfo*>(prop->object);
145−
146− if (index < 0 || index >= p->m_promptSurfaces.count())
147− return nullptr;
148− return p->m_promptSurfaces[index];
90+ Q_EMIT sessionChanged(m_session);
14991}
15092
15193void ApplicationInfo::setIconId(const QString &iconId)
@@ -157,9 +99,18 @@ void ApplicationInfo::setIconId(const QString &iconId)
15799
158100void ApplicationInfo::setScreenshotId(const QString &screenshotId)
159101{
160− m_screenshotFileName = QString("%1/Dash/graphics/phone/screenshots/%2@12.png")
102+ QString screenshotFileName = QString("%1/Dash/graphics/phone/screenshots/%2@12.png")
161103 .arg(qmlDirectory())
162104 .arg(screenshotId);
105+
106+ if (screenshotFileName != m_screenshotFileName) {
107+ m_screenshotFileName = screenshotFileName;
108+
109+ QUrl screenshotUrl = QString("file://%1").arg(m_screenshotFileName);
110+ if (m_session) {
111+ m_session->setScreenshot(screenshotUrl);
112+ }
113+ }
163114}
164115
165116void ApplicationInfo::setName(const QString &value)
@@ -193,7 +144,7 @@ void ApplicationInfo::setState(State value)
193144 Q_EMIT stateChanged(value);
194145
195146 if (!m_manualSurfaceCreation && m_state == ApplicationInfo::Running) {
196− QTimer::singleShot(1000, this, SLOT(createSurface()));
147+ QTimer::singleShot(500, this, SLOT(createSession()));
197148 }
198149 }
199150}
tests/mocks/Unity/Application/ApplicationInfo.h+11−23
@@ -17,8 +17,10 @@
1717#ifndef APPLICATION_H
1818#define APPLICATION_H
1919
20+#include "SurfaceManager.h"
21+#include "MirSurfaceItemModel.h"
22+
2023#include <QObject>
21−#include <QQmlComponent>
2224
2325class QQuickItem;
2426class MirSurfaceItem;
@@ -32,8 +34,7 @@ class ApplicationInfo : public ApplicationInfoInterface {
3234 Q_OBJECT
3335
3436 Q_PROPERTY(bool fullscreen READ fullscreen WRITE setFullscreen NOTIFY fullscreenChanged)
35− Q_PROPERTY(MirSurfaceItem* surface READ surface NOTIFY surfaceChanged)
36− Q_PROPERTY(QQmlListProperty<MirSurfaceItem> promptSurfaces READ promptSurfaces NOTIFY promptSurfacesChanged DESIGNABLE false)
37+ Q_PROPERTY(Session* session READ session NOTIFY sessionChanged)
3738
3839 // Only exists in this fake implementation
3940
@@ -72,32 +73,23 @@ public:
7273 void setFullscreen(bool value);
7374 bool fullscreen() const { return m_fullscreen; }
7475
75− void setSurface(MirSurfaceItem* surface);
76− MirSurfaceItem* surface() const { return m_surface; }
77−
78− void removeSurface(MirSurfaceItem* surface);
79−
80− void addPromptSurface(MirSurfaceItem* surface);
81− QList<MirSurfaceItem*> promptSurfaceList() const;
82− QQmlListProperty<MirSurfaceItem> promptSurfaces();
83−
8476 bool manualSurfaceCreation() const { return m_manualSurfaceCreation; }
8577 void setManualSurfaceCreation(bool value);
8678
79+public:
80+ void setSession(Session* session);
81+ Session* session() const { return m_session; }
82+
8783Q_SIGNALS:
88− void surfaceChanged(MirSurfaceItem*);
89− void promptSurfacesChanged();
84+ void sessionChanged(Session*);
9085 void fullscreenChanged(bool value);
9186 void manualSurfaceCreationChanged(bool value);
9287
9388public Q_SLOTS:
94− Q_INVOKABLE void createSurface();
89+ Q_INVOKABLE void createSession();
9590
9691private:
97− static int promptSurfaceCount(QQmlListProperty<MirSurfaceItem> *prop);
98− static MirSurfaceItem* promptSurfaceAt(QQmlListProperty<MirSurfaceItem> *prop, int index);
9992 void setIcon(const QUrl &value);
100− void setScreenshot(const QUrl &value);
10193
10294 QString m_screenshotFileName;
10395
@@ -108,15 +100,11 @@ private:
108100 State m_state;
109101 bool m_focused;
110102 bool m_fullscreen;
111− MirSurfaceItem* m_surface;
103+ Session* m_session;
112104
113105 bool m_manualSurfaceCreation;
114−
115− QQuickItem *m_parentItem;
116− QList<MirSurfaceItem*> m_promptSurfaces;
117106};
118107
119108Q_DECLARE_METATYPE(ApplicationInfo*)
120−Q_DECLARE_METATYPE(QQmlListProperty<MirSurfaceItem>)
121109
122110#endif // APPLICATION_H
tests/mocks/Unity/Application/ApplicationManager.cpp+9−16
@@ -15,9 +15,9 @@
1515 */
1616
1717#include "ApplicationManager.h"
18−#include "ApplicationDBusAdaptor.h"
1918#include "ApplicationInfo.h"
20−#include "MirSurfaceItem.h"
19+#include "Session.h"
20+#include "ApplicationTestInterface.h"
2121
2222#include <paths.h>
2323
@@ -36,11 +36,6 @@ ApplicationManager *ApplicationManager::singleton()
3636{
3737 if (!the_application_manager) {
3838 the_application_manager = new ApplicationManager();
39− new ApplicationDBusAdaptor(the_application_manager);
40−
41− QDBusConnection connection = QDBusConnection::sessionBus();
42− connection.registerService("com.canonical.Unity8");
43− connection.registerObject("/com/canonical/Unity8/Mocks", the_application_manager);
4439 }
4540 return the_application_manager;
4641}
@@ -49,9 +44,8 @@ ApplicationManager::ApplicationManager(QObject *parent)
4944 : ApplicationManagerInterface(parent)
5045 , m_suspended(false)
5146{
52− m_roleNames.insert(RoleSurface, "surface");
47+ m_roleNames.insert(RoleSession, "session");
5348 m_roleNames.insert(RoleFullscreen, "fullscreen");
54− m_roleNames.insert(RoleApplication, "application");
5549
5650 buildListOfAvailableApplications();
5751
@@ -105,12 +99,10 @@ QVariant ApplicationManager::data(const QModelIndex& index, int role) const {
10599 return app->state();
106100 case RoleFocused:
107101 return app->focused();
108− case RoleSurface:
109− return QVariant::fromValue(app->surface());
102+ case RoleSession:
103+ return QVariant::fromValue(app->session());
110104 case RoleFullscreen:
111105 return app->fullscreen();
112− case RoleApplication:
113− return QVariant::fromValue(app);
114106 default:
115107 return QVariant();
116108 }
@@ -154,10 +146,10 @@ void ApplicationManager::add(ApplicationInfo *application) {
154146 Q_EMIT countChanged();
155147 if (count() == 1) Q_EMIT emptyChanged(isEmpty()); // was empty but not anymore
156148
157− connect(application, &ApplicationInfo::surfaceChanged, this, [application, this]() {
149+ connect(application, &ApplicationInfo::sessionChanged, this, [application, this]() {
158150 QModelIndex appIndex = findIndex(application);
159151 if (!appIndex.isValid()) return;
160− Q_EMIT dataChanged(appIndex, appIndex, QVector<int>() << ApplicationManager::RoleSurface);
152+ Q_EMIT dataChanged(appIndex, appIndex, QVector<int>() << ApplicationManager::RoleSession);
161153 });
162154 connect(application, &ApplicationInfo::focusedChanged, this, [application, this]() {
163155 QModelIndex appIndex = findIndex(application);
@@ -181,7 +173,7 @@ void ApplicationManager::remove(ApplicationInfo *application) {
181173 Q_EMIT countChanged();
182174 if (isEmpty()) Q_EMIT emptyChanged(isEmpty());
183175 }
184− disconnect(application, 0, this, 0);
176+ application->disconnect(this);
185177}
186178
187179void ApplicationManager::move(int from, int to) {
@@ -464,6 +456,7 @@ void ApplicationManager::buildListOfAvailableApplications()
464456 m_availableApplications.append(application);
465457}
466458
459+
467460QStringList ApplicationManager::availableApplications()
468461{
469462 QStringList appIds;
tests/mocks/Unity/Application/ApplicationManager.h+1−2
@@ -52,9 +52,8 @@ class ApplicationManager : public ApplicationManagerInterface {
5252 static ApplicationManager *singleton();
5353
5454 enum MoreRoles {
55− RoleSurface = RoleFocused+1,
55+ RoleSession = RoleFocused+1,
5656 RoleFullscreen,
57− RoleApplication,
5857 };
5958 enum Role {
6059 Dash, Default, Indicators, Notifications, Greeter, Launcher, OnScreenKeyboard,
tests/mocks/Unity/Application/ApplicationTestInterface.cppnew file+117
@@ -0,0 +1,117 @@
1+/*
2+ * Copyright (C) 2014 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+#include "ApplicationInfo.h"
18+#include "ApplicationTestInterface.h"
19+#include "ApplicationManager.h"
20+#include "SessionManager.h"
21+#include "SurfaceManager.h"
22+#include "Session.h"
23+#include "MirSurfaceItem.h"
24+
25+#include <paths.h>
26+
27+#include <QtDBus/QtDBus>
28+
29+quint32 nextId = 0;
30+
31+ApplicationTestInterface::ApplicationTestInterface(QObject* parent)
32+ : QDBusAbstractAdaptor(parent)
33+{
34+ QDBusConnection connection = QDBusConnection::sessionBus();
35+ connection.registerService("com.canonical.Unity8");
36+ connection.registerObject("/com/canonical/Unity8/Mocks", parent);
37+}
38+
39+Session* ApplicationTestInterface::addChildSession(Session* existingSession, const QString& surfaceImage)
40+{
41+ if (!existingSession) return nullptr;
42+
43+ QUrl screenshotUrl = QString("file://%1/Dash/graphics/phone/screenshots/%2@12.png")
44+ .arg(qmlDirectory())
45+ .arg(surfaceImage);
46+
47+ Session* session = SessionManager::singleton()->createSession(
48+ QString("%1-Child%2").arg(existingSession->name())
49+ .arg(existingSession->childSessions()->count()),
50+ screenshotUrl);
51+ existingSession->addChildSession(session);
52+ session->createSurface();
53+
54+ return session;
55+}
56+
57+void ApplicationTestInterface::removeSession(Session* existingSession)
58+{
59+ qDebug() << "ApplicationTestInterface::removeSession - " << existingSession;
60+
61+ if (existingSession)
62+ existingSession->setLive(false);
63+}
64+
65+void ApplicationTestInterface::removeSurface(MirSurfaceItem* existingSurface)
66+{
67+ qDebug() << "ApplicationTestInterface::removeSurface - " << existingSurface;
68+
69+ if (existingSurface)
70+ existingSurface->setLive(false);
71+}
72+
73+quint32 ApplicationTestInterface::addChildSession(const QString& appId, quint32 existingSessionId, const QString& surfaceImage)
74+{
75+ qDebug() << "ApplicationTestInterface::addChildSession to " << appId;
76+
77+ ApplicationInfo* application = ApplicationManager::singleton()->findApplication(appId);
78+ if (!application) {
79+ qDebug() << "ApplicationTestInterface::addChildSession - No application found for " << appId;
80+ return 0;
81+ }
82+
83+ Session* parentSession = nullptr;
84+ if (m_childSessions.contains(existingSessionId)) {
85+ parentSession = m_childSessions[existingSessionId];
86+ } else if (application->session()) {
87+ parentSession = application->session();
88+ } else {
89+ qDebug() << "ApplicationTestInterface::addChildSession - No session for " << appId << ":" << existingSessionId;
90+ return 0;
91+ }
92+
93+ QUrl screenshotUrl = QString("file://%1/Dash/graphics/phone/screenshots/%2@12.png")
94+ .arg(qmlDirectory())
95+ .arg(surfaceImage);
96+
97+ quint32 sessionId = ++nextId;
98+ Session* session = SessionManager::singleton()->createSession(
99+ QString("%1-Child%2").arg(parentSession->name())
100+ .arg(parentSession->childSessions()->count()),
101+ screenshotUrl);
102+ parentSession->addChildSession(session);
103+ session->createSurface();
104+ m_childSessions[sessionId] = session;
105+
106+ return sessionId;
107+}
108+
109+void ApplicationTestInterface::removeSession(quint32 sessionId)
110+{
111+ if (!m_childSessions.contains(sessionId)) {
112+ qDebug() << "ApplicationTestInterface::removeSession - No added session for " << sessionId;
113+ return;
114+ }
115+ Session* session = m_childSessions.take(sessionId);
116+ removeSession(session);
117+}
tests/mocks/Unity/Application/ApplicationDBusAdaptor.h → tests/mocks/Unity/Application/ApplicationTestInterface.hrenamed+13−11
@@ -14,30 +14,32 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−#ifndef APPLICATIONDBUSADAPTOR_H
18−#define APPLICATIONDBUSADAPTOR_H
17+#ifndef APPLICATIONTESTINTERFACE_H
18+#define APPLICATIONTESTINTERFACE_H
1919
2020#include <QtDBus/QtDBus>
2121
2222class ApplicationManager;
23−class SurfaceManager;
23+class Session;
2424class MirSurfaceItem;
2525
26−class ApplicationDBusAdaptor : public QDBusAbstractAdaptor
26+class ApplicationTestInterface : public QDBusAbstractAdaptor
2727{
2828 Q_OBJECT
2929 Q_CLASSINFO("D-Bus Interface", "com.canonical.Unity8.Mocks.Application")
3030public:
31− ApplicationDBusAdaptor(ApplicationManager* applicationManager);
31+ ApplicationTestInterface(QObject* parent = 0);
32+
33+ Q_INVOKABLE Session* addChildSession(Session* existingSession, const QString& surfaceImage);
34+ Q_INVOKABLE void removeSession(Session* existingSession);
35+ Q_INVOKABLE void removeSurface(MirSurfaceItem* existingSurface);
3236
3337public Q_SLOTS:
34− quint32 addPromptSurface(const QString& appId, const QString& surfaceImage);
35− void removeChildSurface(int surfaceId);
38+ quint32 addChildSession(const QString& appId, quint32 existingSessionId, const QString& surfaceImage);
39+ void removeSession(quint32 sessionId);
3640
3741private:
38− ApplicationManager* m_applicationManager;
39−
40− QHash<quint32, MirSurfaceItem*> m_childItems;
42+ QHash<quint32, Session*> m_childSessions;
4143};
4244
43−#endif // APPLICATIONDBUSADAPTOR_H
45+#endif // APPLICATIONTESTINTERFACE_H
tests/mocks/Unity/Application/CMakeLists.txt+6−1
@@ -2,12 +2,17 @@ pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=3)
22
33set(FakeUnityApplicationQml_SOURCES
44 plugin.cpp
5− ApplicationDBusAdaptor.cpp
65 ApplicationInfo.cpp
76 ApplicationManager.cpp
87 ApplicationScreenshotProvider.cpp
8+ ApplicationTestInterface.cpp
99 MirSurfaceItem.cpp
10+ MirSurfaceItemModel.h
11+ ObjectListModel.h
12+ Session.cpp
13+ SessionManager.cpp
1014 SurfaceManager.cpp
15+ SessionModel.h
1116 ${APPLICATION_API_INCLUDEDIR}/unity/shell/application/ApplicationInfoInterface.h
1217 ${APPLICATION_API_INCLUDEDIR}/unity/shell/application/ApplicationManagerInterface.h
1318)
tests/mocks/Unity/Application/MirSurfaceItem.cpp+19−79
@@ -15,7 +15,7 @@
1515 */
1616
1717#include "MirSurfaceItem.h"
18−#include "ApplicationInfo.h"
18+#include "Session.h"
1919
2020#include <paths.h>
2121
@@ -34,11 +34,11 @@ MirSurfaceItem::MirSurfaceItem(const QString& name,
3434 const QString &qmlFilePath,
3535 QQuickItem *parent)
3636 : QQuickItem(parent)
37− , m_application(nullptr)
37+ , m_session(nullptr)
3838 , m_name(name)
3939 , m_type(type)
4040 , m_state(state)
41− , m_parentSurface(nullptr)
41+ , m_live(true)
4242 , m_qmlItem(nullptr)
4343 , m_screenshotUrl(screenshot)
4444{
@@ -83,16 +83,9 @@ MirSurfaceItem::MirSurfaceItem(const QString& name,
8383MirSurfaceItem::~MirSurfaceItem()
8484{
8585 qDebug() << "MirSurfaceItem::~MirSurfaceItem() " << name();
86−
87− QList<MirSurfaceItem*> children(m_children);
88− for (MirSurfaceItem* child : children) {
89− child->setParentSurface(nullptr);
86+ if (m_session) {
87+ m_session->setSurface(nullptr);
9088 }
91− if (m_parentSurface)
92− m_parentSurface->removeChildSurface(this);
93−
94− if (m_application)
95− m_application->removeSurface(this);
9689}
9790
9891void MirSurfaceItem::printComponentErrors()
@@ -105,91 +98,38 @@ void MirSurfaceItem::printComponentErrors()
10598
10699void MirSurfaceItem::release()
107100{
108− QList<MirSurfaceItem*> children(m_children);
109− for (MirSurfaceItem* child : children) {
110− child->release();
111− }
112− if (m_parentSurface) {
113− m_parentSurface->removeChildSurface(this);
114− }
101+ qDebug() << "MirSurfaceItem::release " << name();
115102
116− if (m_application) {
117− m_application->removeSurface(this);
103+ if (m_session) {
104+ m_session->setSurface(nullptr);
118105 }
119106 if (!parent()) {
120107 deleteLater();
121108 }
122109}
123110
124−void MirSurfaceItem::setApplication(ApplicationInfo* application)
111+void MirSurfaceItem::setSession(Session* session)
125112{
126− m_application = application;
113+ m_session = session;
127114}
128115
129−void MirSurfaceItem::setParentSurface(MirSurfaceItem* surface)
116+void MirSurfaceItem::setScreenshot(const QUrl& screenshot)
130117{
131− if (m_parentSurface == surface || surface == this)
132− return;
133−
134− if (m_parentSurface) {
135− m_parentSurface->removeChildSurface(this);
136− }
137−
138− m_parentSurface = surface;
139−
140− if (m_parentSurface) {
141− m_parentSurface->addChildSurface(this);
118+ m_screenshotUrl = screenshot;
119+ if (m_qmlItem) {
120+ QQmlProperty screenshotSource(m_qmlItem, "screenshotSource");
121+ screenshotSource.write(QVariant::fromValue(m_screenshotUrl));
142122 }
143− Q_EMIT parentSurfaceChanged(surface);
144123}
145124
146−void MirSurfaceItem::addChildSurface(MirSurfaceItem* surface)
125+void MirSurfaceItem::setLive(bool live)
147126{
148− qDebug() << "MirSurfaceItem::addChildSurface " << surface->name() << " to " << name();
149−
150− m_children.append(surface);
151− Q_EMIT childSurfacesChanged();
152−}
153−
154−void MirSurfaceItem::removeChildSurface(MirSurfaceItem* surface)
155−{
156− qDebug() << "MirSurfaceItem::removeChildSurface " << surface->name() << " from " << name();
157−
158− if (m_children.contains(surface)) {
159− m_children.removeOne(surface);
160− Q_EMIT childSurfacesChanged();
127+ if (m_live != live) {
128+ m_live = live;
129+ Q_EMIT liveChanged(m_live);
161130 }
162131}
163132
164−QList<MirSurfaceItem*> MirSurfaceItem::childSurfaceList()
165−{
166− return m_children;
167−}
168−
169−QQmlListProperty<MirSurfaceItem> MirSurfaceItem::childSurfaces()
170−{
171− return QQmlListProperty<MirSurfaceItem>(this,
172− 0,
173− MirSurfaceItem::childSurfaceCount,
174− MirSurfaceItem::childSurfaceAt);
175−}
176−
177−int MirSurfaceItem::childSurfaceCount(QQmlListProperty<MirSurfaceItem> *prop)
178−{
179− MirSurfaceItem *p = qobject_cast<MirSurfaceItem*>(prop->object);
180− return p->m_children.count();
181−}
182−
183−MirSurfaceItem* MirSurfaceItem::childSurfaceAt(QQmlListProperty<MirSurfaceItem> *prop, int index)
184−{
185− MirSurfaceItem *p = qobject_cast<MirSurfaceItem*>(prop->object);
186−
187− if (index < 0 || index >= p->m_children.count())
188− return nullptr;
189− return p->m_children[index];
190−}
191−
192−
193133void MirSurfaceItem::onQmlWantInputMethodChanged()
194134{
195135 QQmlProperty prop(m_qmlItem, "wantInputMethod");
tests/mocks/Unity/Application/MirSurfaceItem.h+24−31
@@ -17,11 +17,12 @@
1717#ifndef MIRSURFACEITEM_H
1818#define MIRSURFACEITEM_H
1919
20+#include "MirSurfaceItemModel.h"
21+
2022#include <QQuickItem>
21−#include <QQmlComponent>
2223#include <QUrl>
2324
24−class ApplicationInfo;
25+class Session;
2526
2627class MirSurfaceItem : public QQuickItem
2728{
@@ -31,9 +32,8 @@ class MirSurfaceItem : public QQuickItem
3132
3233 Q_PROPERTY(Type type READ type NOTIFY typeChanged)
3334 Q_PROPERTY(State state READ state NOTIFY stateChanged)
34− Q_PROPERTY(QString name READ name NOTIFY nameChanged)
35− Q_PROPERTY(MirSurfaceItem* parentSurface READ parentSurface NOTIFY parentSurfaceChanged)
36− Q_PROPERTY(QQmlListProperty<MirSurfaceItem> childSurfaces READ childSurfaces NOTIFY childSurfacesChanged DESIGNABLE false)
35+ Q_PROPERTY(QString name READ name CONSTANT)
36+ Q_PROPERTY(bool live READ live NOTIFY liveChanged)
3737
3838public:
3939 enum Type {
@@ -56,24 +56,18 @@ public:
5656 Fullscreen,
5757 };
5858
59− explicit MirSurfaceItem(const QString& name,
60− Type type,
61− State state,
62− const QUrl& screenshot,
63− const QString &qmlFilePath = QString(),
64− QQuickItem *parent = 0);
6559 ~MirSurfaceItem();
6660
6761 //getters
68− ApplicationInfo* application() const { return m_application; }
62+ Session* session() const { return m_session; }
6963 Type type() const { return m_type; }
7064 State state() const { return m_state; }
7165 QString name() const { return m_name; }
72− MirSurfaceItem* parentSurface() const { return m_parentSurface; }
73− QList<MirSurfaceItem*> childSurfaceList();
66+ bool live() const { return m_live; }
7467
75− void setApplication(ApplicationInfo* item);
76− void setParentSurface(MirSurfaceItem* item);
68+ void setSession(Session* item);
69+ void setScreenshot(const QUrl& screenshot);
70+ void setLive(bool live);
7771
7872 Q_INVOKABLE void setState(State newState);
7973 Q_INVOKABLE void release();
@@ -81,42 +75,41 @@ public:
8175Q_SIGNALS:
8276 void typeChanged(Type);
8377 void stateChanged(State);
84− void nameChanged(QString);
85− void parentSurfaceChanged(MirSurfaceItem*);
86− void childSurfacesChanged();
87−
88− void removed();
78+ void liveChanged(bool live);
8979
9080 void inputMethodRequested();
9181 void inputMethodDismissed();
9282
83+ // internal mock use
84+ void deregister();
85+
9386private Q_SLOTS:
9487 void onFocusChanged();
9588 void onComponentStatusChanged(QQmlComponent::Status status);
9689 void onQmlWantInputMethodChanged();
9790
9891private:
99− void addChildSurface(MirSurfaceItem* surface);
100− void removeChildSurface(MirSurfaceItem* surface);
101−
102− QQmlListProperty<MirSurfaceItem> childSurfaces();
103− static int childSurfaceCount(QQmlListProperty<MirSurfaceItem> *prop);
104− static MirSurfaceItem* childSurfaceAt(QQmlListProperty<MirSurfaceItem> *prop, int index);
92+ explicit MirSurfaceItem(const QString& name,
93+ Type type,
94+ State state,
95+ const QUrl& screenshot,
96+ const QString &qmlFilePath = QString(),
97+ QQuickItem *parent = 0);
10598
10699 void createQmlContentItem();
107100 void printComponentErrors();
108101
109− ApplicationInfo* m_application;
102+ Session* m_session;
110103 const QString m_name;
111104 const Type m_type;
112105 State m_state;
113−
114− MirSurfaceItem* m_parentSurface;
115− QList<MirSurfaceItem*> m_children;
106+ bool m_live;
116107
117108 QQmlComponent *m_qmlContentComponent;
118109 QQuickItem *m_qmlItem;
119110 QUrl m_screenshotUrl;
111+
112+ friend class SurfaceManager;
120113};
121114
122115Q_DECLARE_METATYPE(MirSurfaceItem*)
tests/mocks/Unity/Application/MirSurfaceItemModel.hnew file+35
@@ -0,0 +1,35 @@
1+/*
2+ * Copyright (C) 2014 Canonical, Ltd.
3+ *
4+ * This program is free software: you can redistribute it and/or modify it under
5+ * the terms of the GNU Lesser General Public License version 3, as published by
6+ * the Free Software Foundation.
7+ *
8+ * This program is distributed in the hope that it will be useful, but WITHOUT
9+ * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
10+ * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11+ * Lesser General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU Lesser General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+#ifndef MIRSURFACEITEMMODEL_H
18+#define MIRSURFACEITEMMODEL_H
19+
20+// Local
21+#include "ObjectListModel.h"
22+
23+class MirSurfaceItem;
24+class MirSurfaceItemModel: public ObjectListModel<MirSurfaceItem>
25+{
26+ Q_OBJECT
27+public:
28+ MirSurfaceItemModel(QObject *parent = 0): ObjectListModel(parent) {}
29+
30+ Q_INVOKABLE int count() const { return rowCount(); }
31+};
32+
33+Q_DECLARE_METATYPE(MirSurfaceItemModel*)
34+
35+#endif // MIRSURFACEITEMMODEL_H
tests/mocks/Unity/Application/ObjectListModel.hnew file+106
@@ -0,0 +1,106 @@
1+/*
2+ * Copyright (C) 2014 Canonical, Ltd.
3+ *
4+ * This program is free software: you can redistribute it and/or modify it under
5+ * the terms of the GNU Lesser General Public License version 3, as published by
6+ * the Free Software Foundation.
7+ *
8+ * This program is distributed in the hope that it will be useful, but WITHOUT
9+ * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
10+ * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11+ * Lesser General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU Lesser General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+#ifndef OBJECTLISTMODEL_H
18+#define OBJECTLISTMODEL_H
19+
20+// Qt
21+#include <QAbstractListModel>
22+
23+template<class TYPE>
24+class ObjectListModel : public QAbstractListModel
25+{
26+public:
27+ ObjectListModel(QObject *parent = 0)
28+ : QAbstractListModel(parent)
29+ {}
30+
31+ enum Roles {
32+ RoleModelData = Qt::UserRole,
33+ };
34+
35+ const QList<TYPE*>& list() const { return m_items; }
36+ bool contains(TYPE* item) const { return m_items.contains(item); }
37+
38+ void insert(uint index, TYPE* item)
39+ {
40+ index = qMin(index, (uint)m_items.count());
41+
42+ int existingIndex = m_items.indexOf(item);
43+ if (existingIndex != -1) {
44+ move(existingIndex, qMin(index, (uint)(m_items.count()-1)));
45+ } else {
46+ beginInsertRows(QModelIndex(), index, index);
47+ m_items.insert(index, item);
48+ endInsertRows();
49+ }
50+ }
51+
52+ void remove(TYPE* item)
53+ {
54+ int existingIndex = m_items.indexOf(item);
55+ if (existingIndex != -1) {
56+ beginRemoveRows(QModelIndex(), existingIndex, existingIndex);
57+ m_items.removeAt(existingIndex);
58+ endRemoveRows();
59+ }
60+ }
61+
62+ // from QAbstractItemModel
63+ int rowCount(const QModelIndex& = QModelIndex()) const override
64+ {
65+ return m_items.count();
66+ }
67+
68+ QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const override
69+ {
70+ if (index.row() >= 0 && index.row() < m_items.count()) {
71+ if (role == RoleModelData) {
72+ TYPE *item = m_items.at(index.row());
73+ return QVariant::fromValue(item);
74+ }
75+ }
76+ return QVariant();
77+ }
78+
79+ QHash<int, QByteArray> roleNames() const
80+ {
81+ QHash<int, QByteArray> roleNames;
82+ roleNames.insert(RoleModelData, "modelData");
83+ return roleNames;
84+ }
85+
86+protected:
87+ void move(int from, int to)
88+ {
89+ if (from == to) return;
90+
91+ if (from >= 0 && from < m_items.size() && to >= 0 && to < m_items.size()) {
92+ QModelIndex parent;
93+ /* When moving an item down, the destination index needs to be incremented
94+ by one, as explained in the documentation:
95+ http://qt-project.org/doc/qt-5.0/qtcore/qabstractitemmodel.html#beginMoveRows */
96+
97+ beginMoveRows(parent, from, from, parent, to + (to > from ? 1 : 0));
98+ m_items.move(from, to);
99+ endMoveRows();
100+ }
101+ }
102+
103+ QList<TYPE*> m_items;
104+};
105+
106+#endif // OBJECTLISTMODEL_H
tests/mocks/Unity/Application/Session.cppnew file+174
@@ -0,0 +1,174 @@
1+/*
2+ * Copyright (C) 2014 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+#include "Session.h"
18+#include "ApplicationInfo.h"
19+#include "SessionManager.h"
20+#include "SurfaceManager.h"
21+
22+#include <QPainter>
23+#include <QQmlEngine>
24+#include <QTimer>
25+
26+Session::Session(const QString &name,
27+ const QUrl& screenshot,
28+ QObject *parent)
29+ : QObject(parent)
30+ , m_name(name)
31+ , m_live(true)
32+ , m_screenshot(screenshot)
33+ , m_application(nullptr)
34+ , m_surface(nullptr)
35+ , m_parentSession(nullptr)
36+ , m_children(new SessionModel(this))
37+{
38+ qDebug() << "Session::Session() " << this->name();
39+
40+ QQmlEngine::setObjectOwnership(this, QQmlEngine::CppOwnership);
41+}
42+
43+Session::~Session()
44+{
45+ qDebug() << "Session::~Session() " << name();
46+
47+ QList<Session*> children(m_children->list());
48+ for (Session* child : children) {
49+ delete child;
50+ }
51+ if (m_parentSession) {
52+ m_parentSession->removeChildSession(this);
53+ }
54+ if (m_application) {
55+ m_application->setSession(nullptr);
56+ }
57+ delete m_surface;
58+ delete m_children;
59+}
60+
61+void Session::release()
62+{
63+ qDebug() << "Session::release " << name();
64+
65+ if (m_parentSession) {
66+ m_parentSession->removeChildSession(this);
67+ }
68+ if (m_application) {
69+ m_application->setSession(nullptr);
70+ }
71+ if (!parent()) {
72+ deleteLater();
73+ }
74+}
75+
76+void Session::setApplication(ApplicationInfo* application)
77+{
78+ if (m_application == application)
79+ return;
80+
81+ m_application = application;
82+ Q_EMIT applicationChanged(application);
83+}
84+
85+void Session::setSurface(MirSurfaceItem* surface)
86+{
87+ qDebug() << "Session::setSurface - session=" << name() << "surface=" << surface;
88+ if (m_surface == surface)
89+ return;
90+
91+ if (m_surface) {
92+ m_surface->setSession(nullptr);
93+ m_surface->setParent(nullptr);
94+ Q_EMIT m_surface->deregister();
95+ }
96+
97+ m_surface = surface;
98+
99+ if (m_surface) {
100+ m_surface->setSession(this);
101+ m_surface->setParent(this);
102+ SurfaceManager::singleton()->registerSurface(m_surface);
103+ }
104+
105+ Q_EMIT surfaceChanged(m_surface);
106+}
107+
108+void Session::setScreenshot(const QUrl& screenshot)
109+{
110+ if (screenshot != m_screenshot) {
111+ m_screenshot = screenshot;
112+ if (m_surface) {
113+ m_surface->setScreenshot(m_screenshot);
114+ }
115+ }
116+}
117+
118+void Session::setLive(bool live)
119+{
120+ if (m_live != live) {
121+ m_live = live;
122+ Q_EMIT liveChanged(m_live);
123+ }
124+}
125+
126+void Session::setParentSession(Session* session)
127+{
128+ if (m_parentSession == session || session == this)
129+ return;
130+
131+ m_parentSession = session;
132+ Q_EMIT parentSessionChanged(session);
133+}
134+
135+void Session::createSurface()
136+{
137+ if (m_surface) return;
138+
139+ setSurface(SurfaceManager::singleton()->createSurface(name(),
140+ MirSurfaceItem::Normal,
141+ m_application && m_application->fullscreen() ? MirSurfaceItem::Fullscreen :
142+ MirSurfaceItem::Maximized,
143+ m_screenshot));
144+}
145+
146+void Session::addChildSession(Session* session)
147+{
148+ insertChildSession(m_children->rowCount(), session);
149+}
150+
151+void Session::insertChildSession(uint index, Session* session)
152+{
153+ qDebug() << "Session::insertChildSession - " << session->name() << " to " << name() << " @ " << index;
154+
155+ session->setParentSession(this);
156+ m_children->insert(index, session);
157+ SessionManager::singleton()->registerSession(session);
158+}
159+
160+void Session::removeChildSession(Session* session)
161+{
162+ qDebug() << "Session::removeChildSession - " << session->name() << " from " << name();
163+
164+ if (m_children->contains(session)) {
165+ m_children->remove(session);
166+ session->setParentSession(nullptr);
167+ Q_EMIT session->deregister();
168+ }
169+}
170+
171+SessionModel* Session::childSessions() const
172+{
173+ return m_children;
174+}
tests/mocks/Unity/Application/Session.hnew file+90
@@ -0,0 +1,90 @@
1+/*
2+ * Copyright (C) 2014 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+#ifndef SESSION_H
18+#define SESSION_H
19+
20+#include "SessionModel.h"
21+
22+#include <QQuickItem>
23+
24+class ApplicationInfo;
25+class MirSurfaceItem;
26+
27+class Session : public QObject
28+{
29+ Q_OBJECT
30+ Q_PROPERTY(QString name READ name CONSTANT)
31+ Q_PROPERTY(MirSurfaceItem* surface READ surface NOTIFY surfaceChanged)
32+ Q_PROPERTY(ApplicationInfo* application READ application NOTIFY applicationChanged)
33+ Q_PROPERTY(Session* parentSession READ parentSession NOTIFY parentSessionChanged DESIGNABLE false)
34+ Q_PROPERTY(SessionModel* childSessions READ childSessions DESIGNABLE false CONSTANT)
35+ Q_PROPERTY(bool live READ live NOTIFY liveChanged)
36+
37+public:
38+ explicit Session(const QString &name,
39+ const QUrl& screenshot,
40+ QObject *parent = 0);
41+ ~Session();
42+
43+ Q_INVOKABLE void release();
44+
45+ //getters
46+ QString name() const { return m_name; }
47+ bool live() const { return m_live; }
48+ ApplicationInfo* application() const { return m_application; }
49+ MirSurfaceItem* surface() const { return m_surface; }
50+ Session* parentSession() const { return m_parentSession; }
51+
52+ void setApplication(ApplicationInfo* item);
53+ void setSurface(MirSurfaceItem* surface);
54+ void setScreenshot(const QUrl& m_screenshot);
55+ void setLive(bool live);
56+
57+ Q_INVOKABLE void addChildSession(Session* session);
58+ void insertChildSession(uint index, Session* session);
59+ void removeChildSession(Session* session);
60+
61+Q_SIGNALS:
62+ void applicationChanged(ApplicationInfo*);
63+ void surfaceChanged(MirSurfaceItem*);
64+ void parentSessionChanged(Session*);
65+ void liveChanged(bool live);
66+
67+ // internal mock use
68+ void deregister();
69+
70+public Q_SLOTS:
71+ Q_INVOKABLE void createSurface();
72+
73+private:
74+ SessionModel* childSessions() const;
75+ void setParentSession(Session* session);
76+
77+ QString m_name;
78+ bool m_live;
79+ QUrl m_screenshot;
80+ ApplicationInfo* m_application;
81+ MirSurfaceItem* m_surface;
82+ Session* m_parentSession;
83+ SessionModel* m_children;
84+
85+ friend class ApplicationTestInterface;
86+};
87+
88+Q_DECLARE_METATYPE(Session*)
89+
90+#endif // SESSION_H
tests/mocks/Unity/Application/SessionManager.cppnew file+55
@@ -0,0 +1,55 @@
1+/*
2+ * Copyright (C) 2014 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+#include "SessionManager.h"
18+
19+#include "Session.h"
20+
21+SessionManager *SessionManager::the_session_manager = nullptr;
22+
23+SessionManager *SessionManager::singleton()
24+{
25+ if (!the_session_manager) {
26+ the_session_manager = new SessionManager();
27+ }
28+ return the_session_manager;
29+}
30+
31+SessionManager::SessionManager(QObject *parent) :
32+ QObject(parent)
33+{
34+}
35+
36+
37+Session *SessionManager::createSession(const QString& name,
38+ const QUrl& screenshot)
39+{
40+ Session* session = new Session(name, screenshot);
41+ Q_EMIT sessionStarting(session);
42+ return session;
43+}
44+
45+void SessionManager::registerSession(Session *session)
46+{
47+ connect(session, &Session::deregister, this, [this] {
48+ Session* session = qobject_cast<Session*>(sender());
49+
50+ disconnect(session, 0, this, 0);
51+
52+ session->setLive(false);
53+ Q_EMIT sessionStopping(session);
54+ });
55+}
tests/mocks/Unity/Application/SessionManager.hnew file+44
@@ -0,0 +1,44 @@
1+/*
2+ * Copyright (C) 2014 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+#ifndef SESSIONMANAGER_H
18+#define SESSIONMANAGER_H
19+
20+#include <QObject>
21+
22+class Session;
23+
24+class SessionManager : public QObject
25+{
26+ Q_OBJECT
27+public:
28+ explicit SessionManager(QObject *parent = 0);
29+
30+ static SessionManager *singleton();
31+
32+ Q_INVOKABLE Session* createSession(const QString& name, const QUrl& screenshot);
33+
34+ void registerSession(Session *session);
35+
36+Q_SIGNALS:
37+ void sessionStarting(Session *session);
38+ void sessionStopping(Session *session);
39+
40+private:
41+ static SessionManager *the_session_manager;
42+};
43+
44+#endif // SESSIONMANAGER_H
tests/mocks/Unity/Application/SessionModel.hnew file+35
@@ -0,0 +1,35 @@
1+/*
2+ * Copyright (C) 2014 Canonical, Ltd.
3+ *
4+ * This program is free software: you can redistribute it and/or modify it under
5+ * the terms of the GNU Lesser General Public License version 3, as published by
6+ * the Free Software Foundation.
7+ *
8+ * This program is distributed in the hope that it will be useful, but WITHOUT
9+ * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
10+ * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11+ * Lesser General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU Lesser General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+#ifndef SESSIONMODEL_H
18+#define SESSIONMODEL_H
19+
20+// Local
21+#include "ObjectListModel.h"
22+
23+class Session;
24+class SessionModel: public ObjectListModel<Session>
25+{
26+ Q_OBJECT
27+public:
28+ SessionModel(QObject *parent = 0): ObjectListModel(parent) {}
29+
30+ Q_INVOKABLE int count() const { return rowCount(); }
31+};
32+
33+Q_DECLARE_METATYPE(SessionModel*)
34+
35+#endif // SESSIONMODEL_H
tests/mocks/Unity/Application/SurfaceManager.cpp+20−7
@@ -35,19 +35,32 @@ SurfaceManager::SurfaceManager(QObject *parent) :
3535{
3636}
3737
38+MirSurfaceItem *SurfaceManager::createSurface(const QString& name,
39+ MirSurfaceItem::Type type,
40+ MirSurfaceItem::State state,
41+ const QUrl& screenshot)
42+{
43+ MirSurfaceItem* surface = new MirSurfaceItem(name,
44+ type,
45+ state,
46+ screenshot);
47+ Q_EMIT surfaceCreated(surface);
48+ return surface;
49+}
50+
3851void SurfaceManager::registerSurface(MirSurfaceItem *surface)
3952{
53+ connect(surface, &MirSurfaceItem::deregister, this, [this] {
54+ MirSurfaceItem* surface = qobject_cast<MirSurfaceItem*>(sender());
55+ disconnect(surface, 0, this, 0);
56+
57+ surface->setLive(false);
58+ Q_EMIT surfaceDestroyed(surface);
59+ });
4060 connect(surface, &MirSurfaceItem::inputMethodRequested,
4161 this, &SurfaceManager::showInputMethod);
4262 connect(surface, &MirSurfaceItem::inputMethodDismissed,
4363 this, &SurfaceManager::hideInputMethod);
44− Q_EMIT surfaceCreated(surface);
45−}
46−
47−void SurfaceManager::unregisterSurface(MirSurfaceItem *surface)
48−{
49− disconnect(surface, 0, this, 0);
50− Q_EMIT surfaceDestroyed(surface);
5164}
5265
5366void SurfaceManager::showInputMethod()
tests/mocks/Unity/Application/SurfaceManager.h+6−2
@@ -19,7 +19,7 @@
1919
2020#include <QObject>
2121
22−class MirSurfaceItem;
22+#include "MirSurfaceItem.h"
2323
2424class SurfaceManager : public QObject
2525{
@@ -29,9 +29,13 @@ public:
2929
3030 static SurfaceManager *singleton();
3131
32+ Q_INVOKABLE MirSurfaceItem *createSurface(const QString& name,
33+ MirSurfaceItem::Type type,
34+ MirSurfaceItem::State state,
35+ const QUrl& screenshot);
36+
3237 // Internal mock use
3338 void registerSurface(MirSurfaceItem *surface);
34− void unregisterSurface(MirSurfaceItem *surface);
3539
3640 // To be used in the tests
3741 Q_INVOKABLE MirSurfaceItem *inputMethodSurface();
tests/mocks/Unity/Application/plugin.cpp+37−4
@@ -18,8 +18,12 @@
1818#include "ApplicationInfo.h"
1919#include "ApplicationManager.h"
2020#include "ApplicationScreenshotProvider.h"
21+#include "Session.h"
2122#include "MirSurfaceItem.h"
23+#include "MirSurfaceItemModel.h"
2224#include "SurfaceManager.h"
25+#include "SessionManager.h"
26+#include "ApplicationTestInterface.h"
2327
2428#include <qqml.h>
2529#include <QQmlEngine>
@@ -36,18 +40,45 @@ static QObject* surfaceManagerSingleton(QQmlEngine* engine, QJSEngine* scriptEng
3640 return SurfaceManager::singleton();
3741}
3842
43+static QObject* sessionManagerSingleton(QQmlEngine* engine, QJSEngine* scriptEngine) {
44+ Q_UNUSED(engine);
45+ Q_UNUSED(scriptEngine);
46+ return SessionManager::singleton();
47+}
48+
49+ApplicationTestInterface* s_appTestInterface = nullptr;
50+
51+static QObject* applicationTestInterface(QQmlEngine* engine, QJSEngine* scriptEngine) {
52+ Q_UNUSED(engine);
53+ Q_UNUSED(scriptEngine);
54+ if (!s_appTestInterface) {
55+ s_appTestInterface = new ApplicationTestInterface(engine);
56+ }
57+ return s_appTestInterface;
58+}
59+
3960void FakeUnityApplicationQmlPlugin::registerTypes(const char *uri)
4061{
62+ qRegisterMetaType<Session*>("Session*");
63+ qRegisterMetaType<ApplicationInfo*>("ApplicationInfo*");
64+ qRegisterMetaType<MirSurfaceItemModel*>("SessionModel*");
4165 qRegisterMetaType<MirSurfaceItem*>("MirSurfaceItem*");
66+ qRegisterMetaType<MirSurfaceItemModel*>("MirSurfaceItemModel*");
4267
4368 qmlRegisterUncreatableType<unity::shell::application::ApplicationManagerInterface>(uri, 0, 1, "ApplicationManagerInterface", "Abstract interface. Cannot be created in QML");
44− qmlRegisterSingletonType<ApplicationManager>(uri, 0, 1, "ApplicationManager", applicationManagerSingleton);
45− qmlRegisterSingletonType<SurfaceManager>(uri, 0, 1, "SurfaceManager", surfaceManagerSingleton);
46−
4769 qmlRegisterUncreatableType<unity::shell::application::ApplicationInfoInterface>(uri, 0, 1, "ApplicationInfoInterface", "Abstract interface. Cannot be created in QML");
70+ qmlRegisterUncreatableType<Session>(uri, 0, 1, "Session", "Session can't be instantiated from QML");
71+ qmlRegisterUncreatableType<MirSurfaceItem>(uri, 0, 1, "MirSurfaceItem", "MirSurfaceItem can't be instantiated from QML");
72+
4873 qmlRegisterType<ApplicationInfo>(uri, 0, 1, "ApplicationInfo");
4974
50− qmlRegisterUncreatableType<MirSurfaceItem>(uri, 0, 1, "MirSurfaceItem", "MirSurfaceItem can't be instantiated from QML");
75+ qmlRegisterSingletonType<ApplicationManager>(uri, 0, 1, "ApplicationManager", applicationManagerSingleton);
76+ qmlRegisterSingletonType<SurfaceManager>(uri, 0, 1, "SurfaceManager", surfaceManagerSingleton);
77+ qmlRegisterSingletonType<SessionManager>(uri, 0, 1, "SessionManager", sessionManagerSingleton);
78+ qmlRegisterSingletonType<ApplicationTestInterface>(uri, 0, 1, "ApplicationTest", applicationTestInterface);
79+
80+ qRegisterMetaType<MirSurfaceItem::Type>("MirSurfaceItem::Type");
81+ qRegisterMetaType<MirSurfaceItem::State>("MirSurfaceItem::State");
5182}
5283
5384void FakeUnityApplicationQmlPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
@@ -55,4 +86,6 @@ void FakeUnityApplicationQmlPlugin::initializeEngine(QQmlEngine *engine, const c
5586 QQmlExtensionPlugin::initializeEngine(engine, uri);
5687
5788 engine->addImageProvider(QLatin1String("application"), new ApplicationScreenshotProvider(ApplicationManager::singleton()));
89+ // make sure we initialise our test interface.
90+ applicationTestInterface(engine, nullptr);
5891}
tests/mocks/Unity/DashCommunicator/dashcommunicatorservice.cpp+2−2
@@ -27,7 +27,7 @@ DashCommunicatorService::~DashCommunicatorService()
2727
2828}
2929
30−void DashCommunicatorService::mockSetCurrentScope(const QString &scopeId, bool animate, bool reset)
30+void DashCommunicatorService::mockSetCurrentScope(const QString &scopeId, bool animate, bool isSwipe)
3131{
32− Q_EMIT setCurrentScopeRequested(scopeId, animate, reset);
32+ Q_EMIT setCurrentScopeRequested(scopeId, animate, isSwipe);
3333}
tests/mocks/Unity/DashCommunicator/dashcommunicatorservice.h+2−2
@@ -27,10 +27,10 @@ public:
2727 ~DashCommunicatorService();
2828
2929Q_SIGNALS:
30− void setCurrentScopeRequested(const QString &scopeId, bool animate, bool reset);
30+ void setCurrentScopeRequested(const QString &scopeId, bool animate, bool isSwipe);
3131
3232public Q_SLOTS:
33− void mockSetCurrentScope(const QString &scopeId, bool animate, bool reset);
33+ void mockSetCurrentScope(const QString &scopeId, bool animate, bool isSwipe);
3434};
3535
3636#endif // DBUSUNITYSESSIONSERVICE_H
tests/mocks/Unity/Indicators/Indicators.qmltypes+20
@@ -159,6 +159,26 @@ Module {
159159 Property { name: "sourceModel"; type: "QAbstractItemModel"; isPointer: true }
160160 }
161161 Component { name: "QIdentityProxyModel"; prototype: "QAbstractProxyModel" }
162+ Component {
163+ name: "UnityMenuModelCache"
164+ prototype: "QObject"
165+ exports: ["Unity.Indicators/UnityMenuModelCache 0.1"]
166+ isCreatable: false
167+ isSingleton: true
168+ exportMetaObjectRevisions: [0]
169+ Method {
170+ name: "model"
171+ type: "UnityMenuModel*"
172+ Parameter { name: "bus"; type: "QByteArray" }
173+ Parameter { name: "path"; type: "QByteArray" }
174+ Parameter { name: "actions"; type: "QVariantMap" }
175+ }
176+ Method {
177+ name: "contains"
178+ type: "bool"
179+ Parameter { name: "path"; type: "QByteArray" }
180+ }
181+ }
162182 Component {
163183 name: "UnityMenuModelStack"
164184 prototype: "QObject"
tests/mocks/Unity/Unity.qmltypes+30−2
@@ -36,6 +36,10 @@ Module {
3636 prototype: "unity::shell::scopes::PreviewModelInterface"
3737 exports: ["Unity/FakePreviewModel 0.2"]
3838 exportMetaObjectRevisions: [0]
39+ Method {
40+ name: "setLoaded"
41+ Parameter { type: "bool" }
42+ }
3943 }
4044 Component {
4145 name: "PreviewStack"
@@ -59,9 +63,9 @@ Module {
5963 Component {
6064 name: "ResultsModel"
6165 prototype: "unity::shell::scopes::ResultsModelInterface"
62− exports: ["Unity/ResultsModel 0.2"]
66+ exports: ["Unity/FakeResultsModel 0.2", "Unity/ResultsModel 0.2"]
6367 isCreatable: false
64− exportMetaObjectRevisions: [0]
68+ exportMetaObjectRevisions: [0, 0]
6569 }
6670 Component {
6771 name: "Scope"
@@ -134,7 +138,13 @@ Module {
134138 }
135139 Method { name: "clear" }
136140 Method { name: "load" }
141+ Method {
142+ name: "getScopeFromAll"
143+ type: "Scope*"
144+ Parameter { name: "scope_id"; type: "string" }
145+ }
137146 }
147+ Component { name: "SettingsModel"; prototype: "unity::shell::scopes::SettingsModelInterface" }
138148 Component {
139149 name: "unity::shell::scopes::CategoriesInterface"
140150 prototype: "QAbstractListModel"
@@ -402,4 +412,22 @@ Module {
402412 Parameter { name: "scopeId"; type: "string" }
403413 }
404414 }
415+ Component {
416+ name: "unity::shell::scopes::SettingsModelInterface"
417+ prototype: "QAbstractListModel"
418+ exports: ["Unity/SettingsModel 0.2"]
419+ isCreatable: false
420+ exportMetaObjectRevisions: [0]
421+ Enum {
422+ name: "Roles"
423+ values: {
424+ "RoleSettingId": 0,
425+ "RoleDisplayName": 1,
426+ "RoleType": 2,
427+ "RoleProperties": 3,
428+ "RoleValue": 4
429+ }
430+ }
431+ Property { name: "count"; type: "int"; isReadonly: true }
432+ }
405433}
tests/mocks/Unity/fake_scope.cpp+1−1
@@ -24,7 +24,7 @@
2424#include "fake_scopes.h"
2525#include "fake_settingsmodel.h"
2626
27−Scope::Scope(Scopes* parent) : Scope(QString(), QString(), false, parent)
27+Scope::Scope(Scopes* parent) : Scope("MockScope5", "Mock Scope", false, parent)
2828{
2929}
3030
tests/plugins/Dash/cardcreator/2.res+2−2
@@ -94,7 +94,7 @@ Image {
9494 wrapMode: Text.Wrap;
9595 maximumLineCount: 2;
9696 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
97− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
97+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
9898 visible: showHeader ;
9999 text: root.title;
100100 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -112,7 +112,7 @@ Image {
112112 elide: Text.ElideRight;
113113 fontSize: "small";
114114 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
115− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
115+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
116116 visible: titleLabel.visible && titleLabel.text;
117117 text: cardData && cardData["subtitle"] || "";
118118 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/5.res+2−2
@@ -114,7 +114,7 @@ Label {
114114 wrapMode: Text.Wrap;
115115 maximumLineCount: 2;
116116 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
117− color: root.scopeStyle ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
117+ color: root.scopeStyle && overlayLoader.item ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item && overlayLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
118118 visible: showHeader && overlayLoader.active;
119119 text: root.title;
120120 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -133,7 +133,7 @@ Label {
133133 elide: Text.ElideRight;
134134 fontSize: "small";
135135 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
136− color: root.scopeStyle ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
136+ color: root.scopeStyle && overlayLoader.item ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item && overlayLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
137137 visible: titleLabel.visible && titleLabel.text;
138138 text: cardData && cardData["subtitle"] || "";
139139 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/6.res+3−3
@@ -70,7 +70,7 @@ Item {
7070 wrapMode: Text.Wrap;
7171 maximumLineCount: 2;
7272 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
73− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
73+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
7474 visible: showHeader ;
7575 text: root.title;
7676 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -88,7 +88,7 @@ Item {
8888 elide: Text.ElideRight;
8989 fontSize: "small";
9090 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
91− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
91+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
9292 visible: titleLabel.visible && titleLabel.text;
9393 text: cardData && cardData["subtitle"] || "";
9494 font.weight: Font.Light;
@@ -103,7 +103,7 @@ Item {
103103 rightMargin: units.gu(1);
104104 }
105105 source: cardData && cardData["emblem"] || "";
106− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
106+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
107107 width: height;
108108 height: source != "" ? titleLabel.font.pixelSize : 0;
109109 }
tests/plugins/Dash/cardcreator/7.res+3−3
@@ -95,7 +95,7 @@ Image {
9595 wrapMode: Text.Wrap;
9696 maximumLineCount: 2;
9797 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
98− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
98+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
9999 visible: showHeader ;
100100 text: root.title;
101101 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -113,7 +113,7 @@ Image {
113113 elide: Text.ElideRight;
114114 fontSize: "small";
115115 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
116− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
116+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
117117 visible: titleLabel.visible && titleLabel.text;
118118 text: cardData && cardData["subtitle"] || "";
119119 font.weight: Font.Light;
@@ -127,7 +127,7 @@ Image {
127127 rightMargin: units.gu(1);
128128 top: subtitleLabel.bottom;
129129 }
130− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
130+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
131131 fontScale: root.fontScale;
132132 model: cardData && cardData["attributes"];
133133 }
tests/plugins/Unity/Launcher/CMakeLists.txt+1−1
@@ -35,7 +35,7 @@ add_executable(launchermodeltestExec
3535 ${LAUNCHER_API_INCLUDEDIR}/unity/shell/application/ApplicationInfoInterface.h
3636 )
3737target_link_libraries(launchermodeltestExec ${GSETTINGS_QT_LDFLAGS})
38−qt5_use_modules(launchermodeltestExec Test Core DBus Xml)
38+qt5_use_modules(launchermodeltestExec Test Core DBus Xml Gui)
3939
4040# copy .desktop files into build directory for shadow builds
4141file(GLOB DESKTOP_FILES *.desktop)
tests/qmltests/CMakeLists.txt+1
@@ -86,3 +86,4 @@ add_qml_test(Stages ApplicationWindow ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINAR
8686add_qml_test(Stages PhoneStage ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/libusermetrics:${CMAKE_BINARY_DIR}/tests/mocks/LightDM/single")
8787add_qml_test(Stages SpreadDelegate ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/libusermetrics:${CMAKE_BINARY_DIR}/tests/mocks/LightDM/single")
8888add_qml_test(Stages SurfaceContainer ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/libusermetrics:${CMAKE_BINARY_DIR}/tests/mocks/LightDM/single")
89+add_qml_test(Stages SessionContainer ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/libusermetrics:${CMAKE_BINARY_DIR}/tests/mocks/LightDM/single")
tests/qmltests/Dash/Previews/tst_PreviewPayments.qml+49−9
@@ -48,19 +48,28 @@ Rectangle {
4848 UT.UnityTestCase {
4949 name: "PreviewPaymentsTest"
5050 when: windowShown
51+ property var paymentClient
52+
53+ function init()
54+ {
55+ paymentClient = findInvisibleChild(previewPayments, "paymentClient");
56+ verify(paymentClient, "Could not find the payment client object.");
57+ }
5158
5259 function cleanup()
5360 {
61+ paymentClient = null;
62+ previewPayments.widgetData = null;
5463 spy.clear();
55− var button = findChild(root, "paymentButton");
64+ var button = findChild(previewPayments, "paymentButton");
5665 button.opacity = 1;
5766 }
5867
5968 function test_purchase_text_display() {
6069 previewPayments.widgetData = jsonPurchase;
6170
62− var button = findChild(root, "paymentButton");
63− verify(button != null, "Button not found.");
71+ var button = findChild(previewPayments, "paymentButton");
72+ verify(button, "Button not found.");
6473 compare(button.text, "0.99USD");
6574 }
6675
@@ -68,11 +77,12 @@ Rectangle {
6877 // Exercise the purchaseCompleted signal here.
6978 previewPayments.widgetData = jsonPurchase;
7079
71− var button = findChild(root, "paymentButton");
72− verify(button != null, "Button not found.");
80+ var button = findChild(previewPayments, "paymentButton");
81+ verify(button, "Button not found.");
7382
7483 mouseClick(button, button.width / 2, button.height / 2);
7584
85+ paymentClient.process();
7686 spy.wait();
7787
7888 var args = spy.signalArguments[0];
@@ -85,8 +95,8 @@ Rectangle {
8595 // Make sure the progress bar is shown.
8696 previewPayments.widgetData = jsonPurchase;
8797
88− var button = findChild(root, "paymentButton");
89− var progress = findChild(root, "loadingBar");
98+ var button = findChild(previewPayments, "paymentButton");
99+ var progress = findChild(previewPayments, "loadingBar");
90100
91101 tryCompare(progress, "visible", false);
92102 tryCompare(progress, "opacity", 0);
@@ -95,6 +105,7 @@ Rectangle {
95105
96106 mouseClick(button, button.width / 2, button.height / 2);
97107
108+ paymentClient.process();
98109 spy.wait();
99110
100111 tryCompare(progress, "visible", true);
@@ -103,16 +114,45 @@ Rectangle {
103114 tryCompare(button, "opacity", 0);
104115 }
105116
117+ function test_progress_show_cancel() {
118+ // Make sure the progress bar is shown.
119+ previewPayments.widgetData = jsonPurchaseError;
120+
121+ var button = findChild(previewPayments, "paymentButton");
122+ var progress = findChild(previewPayments, "loadingBar");
123+
124+ tryCompare(progress, "visible", false);
125+ tryCompare(progress, "opacity", 0);
126+ tryCompare(button, "visible", true);
127+ tryCompare(button, "opacity", 1);
128+
129+ mouseClick(button, button.width / 2, button.height / 2);
130+
131+ tryCompare(progress, "visible", true);
132+ tryCompare(progress, "opacity", 1);
133+ tryCompare(button, "visible", false);
134+ tryCompare(button, "opacity", 0);
135+
136+ paymentClient.process();
137+ spy.wait();
138+
139+ tryCompare(progress, "visible", false);
140+ tryCompare(progress, "opacity", 0);
141+ tryCompare(button, "visible", true);
142+ tryCompare(button, "opacity", 1);
143+ }
144+
106145 function test_purchase_error() {
107146 // The mock Payments triggers an error when com.example.invalid is
108147 // passed to it as store_item_id. Exercise it here
109148 previewPayments.widgetData = jsonPurchaseError;
110149
111− var button = findChild(root, "paymentButton");
112− verify(button != null, "Button not found.");
150+ var button = findChild(previewPayments, "paymentButton");
151+ verify(button, "Button not found.");
113152
114153 mouseClick(button, button.width / 2, button.height / 2);
115154
155+ paymentClient.process();
116156 spy.wait();
117157
118158 var args = spy.signalArguments[0];
tests/qmltests/Dash/tst_Dash.qml+9−2
@@ -189,6 +189,14 @@ Item {
189189 var scopesOverviewAllView = findChild(dash, "scopesOverviewRepeaterChild1");
190190 tryCompare(scopesOverviewAllView, "enabled", true);
191191
192+ // Click in the middle of the black bar (nothing happens)
193+ var bottomBar = findChild(scopesOverview, "bottomBar");
194+ mouseClick(bottomBar, bottomBar.width / 2, bottomBar.height / 2);
195+ // Check temp scope is not there
196+ var scopesOverviewTempScopeItem = findChild(dash, "scopesOverviewTempScopeItem");
197+ expectFailContinue("", "Clicking in the middle of bottom bar should not open a temp scope");
198+ tryCompareFunction( function() { return scopesOverviewTempScopeItem.scope != null; }, true);
199+
192200 // Click on a temp scope
193201 var tempScopeCard = findChild(scopesOverviewAllView, "delegate1");
194202 mouseClick(tempScopeCard, 0, 0);
@@ -198,7 +206,6 @@ Item {
198206 compare(overviewDragHandle.enabled, false);
199207
200208 // Check temp scope is there
201− var scopesOverviewTempScopeItem = findChild(dash, "scopesOverviewTempScopeItem");
202209 tryCompareFunction( function() { return scopesOverviewTempScopeItem.scope != null; }, true);
203210 tryCompare(scopesOverviewTempScopeItem, "enabled", true);
204211
@@ -328,7 +335,7 @@ Item {
328335 mouseFlick(dash, startX, startY, stopX, stopY);
329336 compare(dashContentList.currentIndex, 2, "Could not flick to scope id 2");
330337 var dashCommunicatorService = findInvisibleChild(dash, "dashCommunicatorService");
331− dashCommunicatorService.mockSetCurrentScope("clickscope", true, true);
338+ dashCommunicatorService.mockSetCurrentScope("clickscope", true, false);
332339 tryCompare(dashContentList, "currentIndex", 1)
333340 }
334341
tests/qmltests/Dash/tst_PreviewListView.qml+29−1
@@ -16,6 +16,7 @@
1616
1717import QtQuick 2.0
1818import QtTest 1.0
19+import Ubuntu.Components 1.1
1920import "../../../qml/Dash"
2021import Unity.Test 0.1 as UT
2122import Unity 0.2 as Unity
@@ -39,7 +40,9 @@ Rectangle {
3940 id: listView
4041 anchors.fill: parent
4142 scope: mockScope
42− scopeStyle: ScopeStyle { }
43+ scopeStyle: ScopeStyle {
44+ style: mockScope.customizations
45+ }
4346 }
4447
4548 UT.UnityTestCase {
@@ -83,5 +86,30 @@ Rectangle {
8386 mouseClick(listView, listView.width / 2, listView.height / 2);
8487 clickedSpy.wait();
8588 }
89+
90+ function test_title() {
91+ var header = findChild(listView, "innerPageHeader");
92+ verify(header, "Could not find the preview header");
93+
94+ compare(header.title, "Mock Scope");
95+ }
96+
97+ function test_header_style() {
98+ var header = findChild(listView, "pageHeader");
99+ verify(header, "Could not find the header");
100+
101+ var innerHeader = findChild(header, "innerPageHeader");
102+ verify(innerHeader, "Could not find the inner header");
103+ verify(Qt.colorEqual(innerHeader.textColor, UbuntuColors.darkGrey),
104+ "Foreground color not equal: %1 != %2".arg(innerHeader.textColor).arg(UbuntuColors.darkGrey));
105+
106+ var background = findChild(header, "headerBackground");
107+ verify(background, "Could not find the background");
108+ compare(background.style, "gradient:///lightgrey/grey");
109+
110+ var image = findChild(header, "titleImage");
111+ verify(image, "Could not find the title image.");
112+ compare(image.source, Qt.resolvedUrl("../Dash/tst_PageHeader/logo-ubuntu-orange.svg"), "Title image has the wrong source");
113+ }
86114 }
87115}
tests/qmltests/Notifications/tst_Notifications.qml+59−17
@@ -64,7 +64,7 @@ Row {
6464 function addSnapDecisionNotification() {
6565 var n = {
6666 type: Notification.SnapDecision,
67− hints: {"x-canonical-private-button-tint": "true"},
67+ hints: {"x-canonical-private-affirmative-tint": "true"},
6868 summary: "Tom Ato",
6969 body: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.",
7070 icon: "../graphics/avatars/funky.png",
@@ -79,6 +79,22 @@ Row {
7979 mockModel.append(n)
8080 }
8181
82+ function add2over1SnapDecisionNotification() {
83+ var n = {
84+ type: Notification.SnapDecision,
85+ hints: {"x-canonical-private-affirmative-tint": "true",},
86+ summary: "Theatre at Ferria Stadium",
87+ body: "at Ferria Stadium in Bilbao, Spain\n07578545317",
88+ icon: "",
89+ secondaryIcon: "",
90+ actions: [{ id: "ok_id", label: "Ok"},
91+ { id: "snooze_id", label: "Snooze"},
92+ { id: "view_id", label: "View"}]
93+ }
94+
95+ mockModel.append(n)
96+ }
97+
8298 function addEphemeralNotification() {
8399 var n = {
84100 type: Notification.Ephemeral,
@@ -181,6 +197,12 @@ Row {
181197 onClicked: addSnapDecisionNotification()
182198 }
183199
200+ Button {
201+ width: parent.width
202+ text: "add a 2over1 snap-decision"
203+ onClicked: add2over1SnapDecisionNotification()
204+ }
205+
184206 Button {
185207 width: parent.width
186208 text: "add an ephemeral"
@@ -229,7 +251,7 @@ Row {
229251 {
230252 tag: "Snap Decision with secondary icon and button-tint",
231253 type: Notification.SnapDecision,
232− hints: {"x-canonical-private-button-tint": "true"},
254+ hints: {"x-canonical-private-affirmative-tint": "true"},
233255 summary: "Tom Ato",
234256 body: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.",
235257 icon: "../graphics/avatars/funky.png",
@@ -249,10 +271,31 @@ Row {
249271 buttonTinted: true,
250272 hasSound: false
251273 },
274+ {
275+ tag: "2-over-1 Snap Decision with button-tint",
276+ type: Notification.SnapDecision,
277+ hints: {"x-canonical-private-affirmative-tint": "true"},
278+ summary: "Theatre at Ferria Stadium",
279+ body: "at Ferria Stadium in Bilbao, Spain\n07578545317",
280+ icon: "",
281+ secondaryIcon: "",
282+ actions: [{ id: "ok_id", label: "Ok"},
283+ { id: "snooze_id", label: "Snooze"},
284+ { id: "view_id", label: "View"}],
285+ summaryVisible: true,
286+ bodyVisible: true,
287+ iconVisible: false,
288+ shapedIcon: false,
289+ nonShapedIcon: false,
290+ secondaryIconVisible: false,
291+ buttonRowVisible: false,
292+ buttonTinted: true,
293+ hasSound: false
294+ },
252295 {
253296 tag: "Ephemeral notification - icon-summary layout",
254297 type: Notification.Ephemeral,
255− hints: {"x-canonical-private-button-tint": "false"},
298+ hints: {"x-canonical-private-affirmative-tint": "false"},
256299 summary: "Photo upload completed",
257300 body: "",
258301 icon: "",
@@ -271,7 +314,7 @@ Row {
271314 {
272315 tag: "Ephemeral notification - check suppression of secondary icon for icon-summary layout",
273316 type: Notification.Ephemeral,
274− hints: {"x-canonical-private-button-tint": "false",
317+ hints: {"x-canonical-private-affirmative-tint": "false",
275318 "sound-file": "dummy.ogg",
276319 "suppress-sound": "true"},
277320 summary: "New comment successfully published",
@@ -293,7 +336,7 @@ Row {
293336 {
294337 tag: "Interactive notification",
295338 type: Notification.Interactive,
296− hints: {"x-canonical-private-button-tint": "false",
339+ hints: {"x-canonical-private-affirmative-tint": "false",
297340 "sound-file": "dummy.ogg"},
298341 summary: "Interactive notification",
299342 body: "This is a notification that can be clicked",
@@ -313,7 +356,7 @@ Row {
313356 {
314357 tag: "Snap Decision without secondary icon and no button-tint",
315358 type: Notification.SnapDecision,
316− hints: {"x-canonical-private-button-tint": "false",
359+ hints: {"x-canonical-private-affirmative-tint": "false",
317360 "sound-file": "dummy.ogg"},
318361 summary: "Bro Coly",
319362 body: "At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.",
@@ -334,7 +377,7 @@ Row {
334377 {
335378 tag: "Ephemeral notification",
336379 type: Notification.Ephemeral,
337− hints: {"x-canonical-private-button-tint": "false",
380+ hints: {"x-canonical-private-affirmative-tint": "false",
338381 "sound-file": "dummy.ogg"},
339382 summary: "Cole Raby",
340383 body: "I did not expect it to be that late.",
@@ -354,9 +397,8 @@ Row {
354397 {
355398 tag: "Ephemeral notification with non-shaped icon",
356399 type: Notification.Ephemeral,
357− hints: {"x-canonical-private-button-tint": "false",
358− "x-canonical-non-shaped-icon": "true",
359− "sound-file": "dummy.ogg"},
400+ hints: {"x-canonical-private-affirmative-tint": "false",
401+ "x-canonical-non-shaped-icon": "true"},
360402 summary: "Contacts",
361403 body: "Synchronised contacts-database with cloud-storage.",
362404 icon: "../graphics/applicationIcons/contacts-app.png",
@@ -370,7 +412,7 @@ Row {
370412 secondaryIconVisible: false,
371413 buttonRowVisible: false,
372414 buttonTinted: false,
373− hasSound: true
415+ hasSound: false
374416 }
375417 ]
376418 }
@@ -437,8 +479,8 @@ Row {
437479 tryCompare(audioItem, "playbackState", data.hasSound ? Audio.PlayingState : Audio.StoppedState)
438480
439481 if(data.buttonRowVisible) {
440− var buttonCancel = findChild(buttonRow, "button1")
441− var buttonAccept = findChild(buttonRow, "button0")
482+ var buttonCancel = findChild(buttonRow, "notify_button1")
483+ var buttonAccept = findChild(buttonRow, "notify_button0")
442484
443485 // only test the left/cancel-button if two actions have been passed in
444486 if (data.actions.length == 2) {
@@ -448,7 +490,7 @@ Row {
448490 }
449491
450492 // check the tinting of the positive/right button
451− verify(buttonAccept.gradient === data.buttonTinted ? UbuntuColors.orangeGradient : UbuntuColors.greyGradient, "button has the wrong color-tint")
493+ verify(buttonAccept.color === data.buttonTinted ? "#3fb24f" : "#dddddd", "button has the wrong color-tint")
452494
453495 // click the positive/right button
454496 tryCompareFunction(function() { mouseClick(buttonAccept, buttonAccept.width / 2, buttonAccept.height / 2); return actionSpy.signalArguments.length > 0; }, true);
@@ -458,19 +500,19 @@ Row {
458500
459501 // check if there's a ComboButton created due to more actions being passed
460502 if (data.actions.length > 2) {
461− var comboButton = findChild(notification, "button2")
503+ var comboButton = findChild(notification, "notify_button2")
462504 tryCompareFunction(function() { return comboButton.expanded == false; }, true);
463505
464506 // click to expand
465507 tryCompareFunction(function() { mouseClick(comboButton, comboButton.width - comboButton.__styleInstance.dropDownWidth / 2, comboButton.height / 2); return comboButton.expanded == true; }, true);
466508
467509 // try clicking on choices in expanded comboList
468− var choiceButton1 = findChild(notification, "button3")
510+ var choiceButton1 = findChild(notification, "notify_button3")
469511 tryCompareFunction(function() { mouseClick(choiceButton1, choiceButton1.width / 2, choiceButton1.height / 2); return actionSpy.signalArguments.length > 0; }, true);
470512 compare(actionSpy.signalArguments[0][0], data.actions[3]["id"], "got wrong id choice action 1")
471513 actionSpy.clear()
472514
473− var choiceButton2 = findChild(notification, "button4")
515+ var choiceButton2 = findChild(notification, "notify_button4")
474516 tryCompareFunction(function() { mouseClick(choiceButton2, choiceButton2.width / 2, choiceButton2.height / 2); return actionSpy.signalArguments.length > 0; }, true);
475517 compare(actionSpy.signalArguments[0][0], data.actions[4]["id"], "got wrong id choice action 2")
476518 actionSpy.clear()
tests/qmltests/Panel/tst_ActiveCallHint.qml+1−1
@@ -97,7 +97,7 @@ Item {
9797 var application = ApplicationManager.startApplication("dialer-app");
9898 ApplicationManager.focusApplication("dialer-app");
9999 tryCompare(ApplicationManager, "focusedApplicationId", "dialer-app");
100− tryCompare(application, "state", ApplicationInfo.Running);
100+ tryCompare(application, "state", ApplicationInfoInterface.Running);
101101
102102 if (!data.focused) { ApplicationManager.unfocusCurrentApplication(); }
103103 }
tests/qmltests/Stages/RecursingChildSessionControl.qmlnew file+142
@@ -0,0 +1,142 @@
1+/*
2+ * Copyright 2014 Canonical Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.1
18+import QtQuick.Layouts 1.1
19+import Ubuntu.Components 0.1
20+import Unity.Application 0.1
21+
22+ColumnLayout {
23+ id: root
24+
25+ property var session
26+ property var childSessions: session ? session.childSessions : 0
27+ property bool removable: false
28+ property alias surfaceCheckbox: _surfaceCheckbox
29+
30+ property var screenshotIds: [ "gallery", "map", "facebook", "camera", "browser", "music", "twitter"]
31+
32+ onSessionChanged: {
33+ if (!session) surfaceCheckbox.checked = false;
34+ }
35+
36+ Column {
37+ id: column
38+ Layout.fillWidth: true
39+ visible: repeater.count
40+ spacing: units.gu(1)
41+
42+ Repeater {
43+ id: repeater
44+ model: root.childSessions
45+ delegate: Rectangle {
46+ border {
47+ color: "black"
48+ width: 1
49+ }
50+ anchors {
51+ left: column.left
52+ right: column.right
53+ leftMargin: units.gu(1)
54+ rightMargin: units.gu(1)
55+ }
56+ height: loader.height
57+
58+ Rectangle {
59+ anchors.fill: parent
60+ color: Qt.rgba(Math.random(), Math.random(), Math.random(), 0.4 )
61+ }
62+
63+ Loader {
64+ id: loader
65+ visible: status == Loader.Ready
66+ source: Qt.resolvedUrl("RecursingChildSessionControl.qml")
67+
68+ anchors {
69+ left: parent.left
70+ right: parent.right
71+ }
72+
73+ onLoaded: {
74+ item.session = modelData;
75+ item.removable = true;
76+ }
77+ }
78+ }
79+ }
80+ }
81+
82+ ColumnLayout {
83+ Layout.fillWidth: true
84+ spacing: units.gu(1)
85+
86+ RowLayout {
87+ Layout.fillWidth: true
88+
89+ CheckBox {
90+ id: _surfaceCheckbox;
91+ checked: false;
92+ enabled: root.session
93+ onCheckedChanged: {
94+ if (checked) {
95+ root.session.createSurface();
96+ } else if (root.session.surface) {
97+ ApplicationTest.removeSurface(root.session.surface);
98+ }
99+ }
100+
101+ Connections {
102+ target: root.session ? root.session : null
103+ onSurfaceChanged: {
104+ surfaceCheckbox.checked = root.session.surface !== null
105+ }
106+ }
107+ }
108+
109+ Label {
110+ text: "Surface"
111+ anchors.verticalCenter: parent.verticalCenter
112+ }
113+ }
114+
115+ RowLayout {
116+ id: buttonLayout
117+
118+ Button {
119+ enabled: root.session
120+ text: removable ? "Remove" : "Release"
121+ onClicked: {
122+ if (removable) {
123+ // release the surface first. simulates mir app closing
124+ if (root.session.surface) ApplicationTest.removeSurface(root.session.surface);
125+ ApplicationTest.removeSession(root.session);
126+ } else {
127+ root.session.release();
128+ }
129+ }
130+ }
131+
132+ Button {
133+ enabled: root.session !== null
134+ text: "Add Child"
135+ onClicked: {
136+ var screenshot = Math.round(Math.random()*100 % (screenshotIds.length-1));
137+ var session = ApplicationTest.addChildSession(root.session, root.screenshotIds[screenshot]);
138+ }
139+ }
140+ }
141+ }
142+}
tests/qmltests/Stages/tst_ApplicationWindow.qml+99−47
@@ -14,7 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.1
18+import QtQuick.Layouts 1.1
1819import QtTest 1.0
1920import Unity.Test 0.1 as UT
2021import ".."
@@ -32,14 +33,15 @@ Rectangle {
3233 Component.onCompleted: {
3334 root.fakeApplication = ApplicationManager.add("gallery-app");
3435 root.fakeApplication.manualSurfaceCreation = true;
35− root.fakeApplication.setState(ApplicationInfo.Starting);
36+ root.fakeApplication.setState(ApplicationInfoInterface.Starting);
3637 }
3738 property QtObject fakeApplication: null
39+ readonly property var fakeSession: fakeApplication ? fakeApplication.session : null
3840
3941 Connections {
4042 target: fakeApplication
41− onSurfaceChanged: {
42− surfaceCheckbox.checked = fakeApplication.surface !== null;
43+ onSessionChanged: {
44+ sessionCheckbox.checked = fakeApplication.session !== null
4345 }
4446 }
4547
@@ -50,15 +52,20 @@ Rectangle {
5052 application: fakeApplication
5153 }
5254 }
53− Loader {
54− id: applicationWindowLoader
55+ FocusScope {
56+ id: appFocus
5557 anchors {
5658 top: parent.top
5759 bottom: parent.bottom
5860 left: parent.left
5961 }
6062 width: units.gu(40)
61− sourceComponent: applicationWindowComponent
63+
64+ Loader {
65+ id: applicationWindowLoader
66+ anchors.fill: parent
67+ sourceComponent: applicationWindowComponent
68+ }
6269 }
6370
6471 Rectangle {
@@ -66,30 +73,55 @@ Rectangle {
6673 anchors {
6774 top: parent.top
6875 bottom: parent.bottom
69− left: applicationWindowLoader.right
76+ left: appFocus.right
7077 right: parent.right
7178 }
7279
73− Column {
80+ ColumnLayout {
7481 anchors { left: parent.left; right: parent.right; top: parent.top; margins: units.gu(1) }
7582 spacing: units.gu(1)
76− Row {
77− anchors { left: parent.left; right: parent.right }
83+
84+ RowLayout {
85+ Layout.fillWidth: true
86+
7887 CheckBox {
79− id: surfaceCheckbox; checked: false
88+ id: sessionCheckbox; checked: false
8089 onCheckedChanged: {
8190 if (applicationWindowLoader.status !== Loader.Ready)
8291 return;
8392
84− if (checked && !fakeApplication.surface) {
85− fakeApplication.createSurface();
86− } else if (!checked && fakeApplication.surface) {
87− fakeApplication.surface.release();
93+ if (checked && !fakeApplication.session) {
94+ fakeApplication.createSession();
95+ } else if (!checked && fakeApplication.session) {
96+ fakeApplication.session.release();
8897 }
8998 }
9099 }
91− Label { text: "Surface" }
100+ Label {
101+ text: "Session"
102+ anchors.verticalCenter: parent.verticalCenter
103+ }
92104 }
105+
106+ Rectangle {
107+ border {
108+ color: "black"
109+ width: 1
110+ }
111+ anchors {
112+ left: parent.left
113+ right: parent.right
114+ }
115+ Layout.preferredHeight: sessionControl.height
116+
117+ RecursingChildSessionControl {
118+ id: sessionControl
119+ anchors { left: parent.left; right: parent.right; }
120+
121+ session: fakeSession
122+ }
123+ }
124+
93125 ListItem.ItemSelector {
94126 id: appStateSelector
95127 anchors { left: parent.left; right: parent.right }
@@ -100,13 +132,13 @@ Rectangle {
100132 "Stopped"]
101133 property int selectedApplicationState: {
102134 if (model[selectedIndex] === "Starting") {
103− return ApplicationInfo.Starting;
135+ return ApplicationInfoInterface.Starting;
104136 } else if (model[selectedIndex] === "Running") {
105− return ApplicationInfo.Running;
137+ return ApplicationInfoInterface.Running;
106138 } else if (model[selectedIndex] === "Suspended") {
107− return ApplicationInfo.Suspended;
139+ return ApplicationInfoInterface.Suspended;
108140 } else {
109− return ApplicationInfo.Stopped;
141+ return ApplicationInfoInterface.Stopped;
110142 }
111143 }
112144 onSelectedApplicationStateChanged: {
@@ -114,6 +146,7 @@ Rectangle {
114146 fakeApplication.setState(selectedApplicationState);
115147 }
116148 }
149+
117150 }
118151 }
119152
@@ -123,10 +156,10 @@ Rectangle {
123156 when: windowShown
124157
125158 // just to make them shorter
126− property int appStarting: ApplicationInfo.Starting
127− property int appRunning: ApplicationInfo.Running
128− property int appSuspended: ApplicationInfo.Suspended
129− property int appStopped: ApplicationInfo.Stopped
159+ property int appStarting: ApplicationInfoInterface.Starting
160+ property int appRunning: ApplicationInfoInterface.Running
161+ property int appSuspended: ApplicationInfoInterface.Suspended
162+ property int appStopped: ApplicationInfoInterface.Stopped
130163
131164 function setApplicationState(appState) {
132165 switch (appState) {
@@ -170,6 +203,14 @@ Rectangle {
170203 findInterestingApplicationWindowChildren();
171204 }
172205
206+ function initSession() {
207+ sessionCheckbox.checked = true;
208+ sessionControl.surfaceCheckbox.checked = true;
209+ }
210+ function cleanupSession() {
211+ sessionCheckbox.checked = false;
212+ }
213+
173214 function cleanup() {
174215 forgetApplicationWindowChildren();
175216
@@ -177,10 +218,10 @@ Rectangle {
177218 applicationWindowLoader.active = false;
178219
179220 appStateSelector.selectedIndex = 0;
180− surfaceCheckbox.checked = false;
221+ cleanupSession();
181222
182− if (fakeApplication.surface)
183− fakeApplication.surface.release();
223+ if (fakeApplication.session)
224+ fakeApplication.session.release();
184225
185226 applicationWindowLoader.active = true;
186227 }
@@ -197,7 +238,7 @@ Rectangle {
197238 verify(stateGroup.state === "splashScreen");
198239
199240 if (data.swapInitOrder) {
200− surfaceCheckbox.checked = true;
241+ initSession();
201242 } else {
202243 setApplicationState(appRunning);
203244 }
@@ -207,14 +248,14 @@ Rectangle {
207248 if (data.swapInitOrder) {
208249 setApplicationState(appRunning);
209250 } else {
210− surfaceCheckbox.checked = true;
251+ initSession();
211252 }
212253
213254 tryCompare(stateGroup, "state", "surface");
214255 }
215256
216257 function test_suspendedAppShowsSurface() {
217− surfaceCheckbox.checked = true;
258+ initSession();
218259 setApplicationState(appRunning);
219260
220261 tryCompare(stateGroup, "state", "surface");
@@ -228,7 +269,7 @@ Rectangle {
228269 }
229270
230271 function test_killedAppShowsScreenshot() {
231− surfaceCheckbox.checked = true;
272+ initSession();
232273 setApplicationState(appRunning);
233274 tryCompare(stateGroup, "state", "surface");
234275
@@ -241,13 +282,13 @@ Rectangle {
241282 setApplicationState(appStopped);
242283
243284 tryCompare(stateGroup, "state", "screenshot");
244− tryCompare(fakeApplication, "surface", null);
285+ tryCompare(fakeApplication, "session", null);
245286 }
246287
247288 function test_restartApp() {
248289 var screenshotImage = findChild(applicationWindowLoader.item, "screenshotImage");
249290
250− surfaceCheckbox.checked = true;
291+ initSession();
251292 setApplicationState(appRunning);
252293 tryCompare(stateGroup, "state", "surface");
253294 waitUntilTransitionsEnd();
@@ -259,28 +300,28 @@ Rectangle {
259300
260301 tryCompare(stateGroup, "state", "screenshot");
261302 waitUntilTransitionsEnd();
262− tryCompare(fakeApplication, "surface", null);
303+ tryCompare(fakeApplication, "session", null);
263304
264305 // and restart it
265306 setApplicationState(appStarting);
266307
267308 waitUntilTransitionsEnd();
268309 verify(stateGroup.state === "screenshot");
269− verify(fakeApplication.surface === null);
310+ verify(fakeSession === null);
270311
271312 setApplicationState(appRunning);
272313
273314 waitUntilTransitionsEnd();
274315 verify(stateGroup.state === "screenshot");
275316
276− surfaceCheckbox.checked = true;
317+ initSession();
277318
278319 tryCompare(stateGroup, "state", "surface");
279320 tryCompare(screenshotImage, "status", Image.Null);
280321 }
281322
282323 function test_appCrashed() {
283− surfaceCheckbox.checked = true;
324+ initSession();
284325 setApplicationState(appRunning);
285326 tryCompare(stateGroup, "state", "surface");
286327 waitUntilTransitionsEnd();
@@ -289,39 +330,39 @@ Rectangle {
289330 setApplicationState(appStopped);
290331
291332 tryCompare(stateGroup, "state", "screenshot");
292− tryCompare(fakeApplication, "surface", null);
333+ tryCompare(fakeApplication, "session", null);
293334 }
294335
295336 function test_keepSurfaceWhileInvisible() {
296− surfaceCheckbox.checked = true;
337+ initSession();
297338 setApplicationState(appRunning);
298339 tryCompare(stateGroup, "state", "surface");
299340 waitUntilTransitionsEnd();
300− verify(fakeApplication.surface !== null);
341+ verify(fakeSession.surface !== null);
301342
302343 applicationWindowLoader.item.visible = false;
303344
304345 waitUntilTransitionsEnd();
305346 verify(stateGroup.state === "surface");
306− verify(fakeApplication.surface !== null);
347+ verify(fakeSession.surface !== null);
307348
308349 applicationWindowLoader.item.visible = true;
309350
310351 waitUntilTransitionsEnd();
311352 verify(stateGroup.state === "surface");
312− verify(fakeApplication.surface !== null);
353+ verify(fakeSession.surface !== null);
313354 }
314355
315356 function test_touchesReachSurfaceWhenItsShown() {
316357 setApplicationState(appRunning);
317− surfaceCheckbox.checked = true;
358+ initSession();
318359
319360 tryCompare(stateGroup, "state", "surface");
320361
321362 waitUntilTransitionsEnd();
322363
323364 // Because doing stuff in C++ is a PITA we keep the counter in the interal qml impl.
324− var fakeSurface = findChild(fakeApplication.surface, "fakeSurfaceQML");
365+ var fakeSurface = findChild(fakeSession.surface, "fakeSurfaceQML");
325366 fakeSurface.touchPressCount = 0;
326367 fakeSurface.touchReleaseCount = 0;
327368
@@ -333,14 +374,25 @@ Rectangle {
333374 }
334375
335376 function test_showNothingOnSuddenSurfaceLoss() {
336− surfaceCheckbox.checked = true;
377+ initSession();
337378 setApplicationState(appRunning);
338379 tryCompare(stateGroup, "state", "surface");
339380 waitUntilTransitionsEnd();
340381
341− surfaceCheckbox.checked = false;
382+ cleanupSession();
342383
343384 verify(stateGroup.state === "void");
344385 }
386+
387+ // should be forcing active focus when interactive changes,
388+ // which will cause a FocusScope higher in the object hierarchy tp be given the focus
389+ function test_forceActiveFocusFollowsInterative() {
390+ fakeApplication.createSession();
391+ applicationWindowLoader.item.interactive = false;
392+ applicationWindowLoader.item.interactive = true;
393+ fakeSession.createSurface();
394+
395+ compare(appFocus.focus, true);
396+ }
345397 }
346398}
tests/qmltests/Stages/tst_PhoneStage.qml+1−1
@@ -64,7 +64,7 @@ Item {
6464 anchors { left: parent.left; right: parent.right }
6565 text: "Stop Selected"
6666 onClicked: {
67− ApplicationManager.get(appList.selectedAppIndex).setState(ApplicationInfo.Stopped);
67+ ApplicationManager.get(appList.selectedAppIndex).setState(ApplicationInfoInterface.Stopped);
6868 }
6969 }
7070 }
tests/qmltests/Stages/tst_SessionContainer.qmlnew file+267
@@ -0,0 +1,267 @@
1+/*
2+ * Copyright 2014 Canonical Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.1
18+import QtQuick.Layouts 1.1
19+import QtTest 1.0
20+import Unity.Test 0.1 as UT
21+import Ubuntu.Components 0.1
22+import Unity.Application 0.1
23+import "../../../qml/Stages"
24+
25+Rectangle {
26+ color: "red"
27+ id: root
28+ width: units.gu(80)
29+ height: units.gu(70)
30+
31+ Connections {
32+ target: sessionContainerLoader.status === Loader.Ready ? sessionContainerLoader.item : null
33+ onSessionChanged: {
34+ sessionCheckbox.checked = sessionContainerLoader.item.session !== null
35+ }
36+ }
37+
38+ Component {
39+ id: sessionContainerComponent
40+
41+ SessionContainer {
42+ id: sessionContainer
43+ anchors.fill: parent
44+ }
45+ }
46+
47+ Loader {
48+ id: sessionContainerLoader
49+ anchors {
50+ top: parent.top
51+ bottom: parent.bottom
52+ left: parent.left
53+ }
54+ width: units.gu(40)
55+ sourceComponent: sessionContainerComponent
56+ }
57+
58+ Rectangle {
59+ color: "white"
60+ anchors {
61+ top: parent.top
62+ bottom: parent.bottom
63+ left: sessionContainerLoader.right
64+ right: parent.right
65+ }
66+
67+ ColumnLayout {
68+ anchors { left: parent.left; right: parent.right; top: parent.top; margins: units.gu(1) }
69+ spacing: units.gu(1)
70+
71+ RowLayout {
72+ Layout.fillWidth: true
73+
74+ CheckBox {
75+ id: sessionCheckbox;
76+ checked: false;
77+ onCheckedChanged: {
78+ if (sessionContainerLoader.status !== Loader.Ready)
79+ return;
80+
81+ if (checked) {
82+ var fakeSession = SessionManager.createSession("music-player", Qt.resolvedUrl("../Dash/artwork/music-player-design.png"));
83+ sessionContainerLoader.item.session = fakeSession;
84+ fakeSession.createSurface();
85+ } else {
86+ sessionContainerLoader.item.session.release();
87+ }
88+ }
89+ }
90+
91+ Label {
92+ text: "session"
93+ anchors.verticalCenter: parent.verticalCenter
94+ }
95+ }
96+
97+ Rectangle {
98+ border {
99+ color: "black"
100+ width: 1
101+ }
102+ anchors {
103+ left: parent.left
104+ right: parent.right
105+ }
106+ Layout.preferredHeight: sessionChildrenControl.height
107+
108+ RecursingChildSessionControl {
109+ id: sessionChildrenControl
110+ anchors { left: parent.left; right: parent.right; }
111+
112+ session: sessionContainerLoader.item ? sessionContainerLoader.item.session : null
113+ }
114+ }
115+ }
116+ }
117+
118+ SignalSpy {
119+ id: sessionSpy
120+ target: SessionManager
121+ signalName: "sessionStopping"
122+ }
123+
124+ UT.UnityTestCase {
125+ id: testCase
126+ name: "SessionContainer"
127+
128+ function init() {
129+ // reload our test subject to get it in a fresh state once again
130+ sessionContainerLoader.active = false;
131+ sessionCheckbox.checked = false;
132+ sessionContainerLoader.active = true;
133+
134+ tryCompare(sessionContainerLoader.item, "session", null);
135+ sessionSpy.clear();
136+ }
137+
138+ when: windowShown
139+
140+ function test_addChildSession_data() {
141+ return [ { tag: "count=1", count: 1 },
142+ { tag: "count=4", count: 4 } ];
143+ }
144+
145+ function test_addChildSession(data) {
146+ sessionCheckbox.checked = true;
147+ var sessionContainer = sessionContainerLoader.item;
148+ compare(sessionContainer.childSessions.count(), 0);
149+
150+ var i;
151+ var sessions = [];
152+ for (i = 0; i < data.count; i++) {
153+ var session = ApplicationTest.addChildSession(sessionContainer.session,
154+ "gallery");
155+ session.createSurface();
156+ sessionContainer.session.addChildSession(session);
157+ compare(sessionContainer.childSessions.count(), i+1);
158+
159+ sessions.push(session);
160+ }
161+
162+ for (i = data.count-1; i >= 0; i--) {
163+ ApplicationTest.removeSession(sessions[i]);
164+ tryCompareFunction(function() { return sessionContainer.childSessions.count(); }, i);
165+ }
166+ tryCompare(sessionSpy, "count", data.count);
167+ }
168+
169+ function test_nestedChildSessions_data() {
170+ return [ { tag: "depth=2", depth: 2 },
171+ { tag: "depth=8", depth: 8 }
172+ ];
173+ }
174+
175+ function test_nestedChildSessions(data) {
176+ sessionCheckbox.checked = true;
177+ var sessionContainer = sessionContainerLoader.item;
178+ compare(sessionContainer.childSessions.count(), 0);
179+
180+ var i;
181+ var sessions = [];
182+ var lastSession = sessionContainer.session;
183+ var delegate;
184+ var container = sessionContainer;
185+ for (i = 0; i < data.depth; i++) {
186+ var session = ApplicationTest.addChildSession(lastSession,
187+ "gallery");
188+ session.createSurface();
189+ lastSession.addChildSession(session);
190+ compare(container.childSessions.count(), 1);
191+ sessions.push(session);
192+
193+ delegate = findChild(container, "childDelegate0");
194+ container = findChild(delegate, "sessionContainer");
195+ lastSession = session;
196+ }
197+
198+ for (i = data.depth-1; i >= 0; i--) {
199+ ApplicationTest.removeSession(sessions[i]);
200+ }
201+
202+ tryCompareFunction(function() { return sessionContainer.childSessions.count(); }, 0);
203+ tryCompare(sessionSpy, "count", data.depth);
204+ }
205+
206+ function test_childrenAdjustForParentSize() {
207+ sessionCheckbox.checked = true;
208+ var sessionContainer = sessionContainerLoader.item;
209+
210+ var session = ApplicationTest.addChildSession(sessionContainer.session,
211+ "gallery");
212+ session.createSurface();
213+ sessionContainer.session.addChildSession(session);
214+
215+ var delegate = findChild(sessionContainer, "childDelegate0");
216+ var childContainer = findChild(delegate, "sessionContainer");
217+
218+ tryCompareFunction(function() { return childContainer.height === sessionContainer.height; }, true);
219+ tryCompareFunction(function() { return childContainer.width === sessionContainer.width; }, true);
220+ tryCompareFunction(function() { return childContainer.x === 0; }, true);
221+ tryCompareFunction(function() { return childContainer.y === 0; }, true);
222+
223+ sessionContainer.anchors.margins = units.gu(2);
224+
225+ tryCompareFunction(function() { return childContainer.height === sessionContainer.height; }, true);
226+ tryCompareFunction(function() { return childContainer.width === sessionContainer.width; }, true);
227+ tryCompareFunction(function() { return childContainer.x === 0; }, true);
228+ tryCompareFunction(function() { return childContainer.y === 0; }, true);
229+ }
230+
231+ function isContainerAnimating(container) {
232+ var animation = findInvisibleChild(container, "sessionAnimation");
233+ if (!animation) return false;
234+
235+ var animating = false;
236+ for (var i = 0; i < animation.transitions.length; ++i) {
237+ if (animation.transitions[i].running) {
238+ return true;
239+ }
240+ }
241+ return false;
242+ }
243+
244+ function test_childrenAnimate() {
245+ sessionCheckbox.checked = true;
246+ var sessionContainer = sessionContainerLoader.item;
247+
248+ var session = ApplicationTest.addChildSession(sessionContainer.session,
249+ "gallery");
250+
251+ var delegate = findChild(sessionContainer, "childDelegate0");
252+ var childContainer = findChild(delegate, "sessionContainer");
253+
254+ // wait for animation to begin
255+ tryCompareFunction(function() { return isContainerAnimating(childContainer); }, true);
256+ // wait for animation to end
257+ tryCompareFunction(function() { return isContainerAnimating(childContainer); }, false);
258+
259+ ApplicationTest.removeSession(session);
260+
261+ // wait for animation to begin
262+ tryCompareFunction(function() { return isContainerAnimating(childContainer); }, true);
263+ // wait for animation to end
264+ tryCompareFunction(function() { return isContainerAnimating(childContainer); }, false);
265+ }
266+ }
267+}
tests/qmltests/Stages/tst_SurfaceContainer.qml+28−43
@@ -28,43 +28,6 @@ Rectangle {
2828 width: units.gu(70)
2929 height: units.gu(70)
3030
31− Component {
32− id: fakeSurfaceComponent
33− Rectangle {
34− color: "green"
35−
36− Rectangle {
37− color: "blue"
38− anchors.fill: parent
39− anchors.margins: units.gu(2)
40− Text {
41− anchors.fill: parent
42− text: "Surface"
43− color: "green"
44− font.bold: true
45− fontSizeMode: Text.Fit
46− minimumPixelSize: 10; font.pixelSize: 200
47− verticalAlignment: Text.AlignVCenter
48− }
49− }
50−
51− width: units.gu(1)
52− height: units.gu(1)
53−
54− property int type: MirSurfaceItem.Normal
55− property int state: MirSurfaceItem.Restored
56− property string name: "Fake Surface"
57− property Item parentSurface: null
58− property list<Item> childSurfaces
59− function release() {}
60− signal removed();
61− }
62− }
63−
64− Item {
65− id: tempSurfaceHolder
66− }
67−
6831 Component {
6932 id: surfaceContainerComponent
7033 SurfaceContainer {
@@ -98,19 +61,20 @@ Rectangle {
9861 Row {
9962 anchors { left: parent.left; right: parent.right }
10063 CheckBox {
101− id: surfaceCheckbox; checked: false;
64+ id: surfaceCheckbox;
65+ checked: false;
10266 onCheckedChanged: {
10367 if (surfaceContainerLoader.status !== Loader.Ready)
10468 return;
10569
10670 if (checked) {
107− var fakeSurface = fakeSurfaceComponent.createObject(tempSurfaceHolder);
71+ var fakeSurface = SurfaceManager.createSurface("fake-surface",
72+ MirSurfaceItem.Normal,
73+ MirSurfaceItem.Restored,
74+ Qt.resolvedUrl("../Dash/artwork/music-player-design.png"));
10875 surfaceContainerLoader.item.surface = fakeSurface;
10976 } else {
110− var fakeSurface = surfaceContainerLoader.item.surface;
111− surfaceContainerLoader.item.surface = null;
112− fakeSurface.parent = null;
113− fakeSurface.destroy();
77+ ApplicationTest.removeSurface(surfaceContainerLoader.item.surface);
11478 }
11579 }
11680 }
@@ -124,6 +88,12 @@ Rectangle {
12488 }
12589 }
12690
91+ SignalSpy {
92+ id: surfaceSpy
93+ target: SurfaceManager
94+ signalName: "surfaceDestroyed"
95+ }
96+
12797 UT.UnityTestCase {
12898 id: testCase
12999 name: "SurfaceContainer"
@@ -134,6 +104,9 @@ Rectangle {
134104 surfaceContainerLoader.active = false;
135105 surfaceCheckbox.checked = false;
136106 surfaceContainerLoader.active = true;
107+
108+ tryCompare(surfaceContainerLoader.item, "surface", null);
109+ surfaceSpy.clear();
137110 }
138111
139112 /*
@@ -150,5 +123,17 @@ Rectangle {
150123 compare(fakeSurface.width, surfaceContainerLoader.item.width);
151124 compare(fakeSurface.height, surfaceContainerLoader.item.height);
152125 }
126+
127+ function test_animateRemoval() {
128+ surfaceCheckbox.checked = true;
129+ var surfaceContainer = surfaceContainerLoader.item;
130+
131+ verify(surfaceContainer.surface !== null);
132+
133+ ApplicationTest.removeSurface(surfaceContainer.surface);
134+
135+ compare(surfaceContainer.state, "zombie");
136+ tryCompare(surfaceContainer, "surface", null);
137+ }
153138 }
154139}
tests/qmltests/tst_Shell.qml+23−16
@@ -21,6 +21,7 @@ import QtQuick 2.0
2121import QtTest 1.0
2222import GSettings 1.0
2323import LightDM 0.1 as LightDM
24+import Ubuntu.Telephony 0.1 as Telephony
2425import Unity.Application 0.1
2526import Unity.Connectivity 0.1
2627import Unity.Test 0.1 as UT
@@ -74,6 +75,11 @@ Item {
7475 signalName: "unlockingAllModems"
7576 }
7677
78+ Telephony.CallEntry {
79+ id: phoneCall
80+ phoneNumber: "+447812221111"
81+ }
82+
7783 UT.UnityTestCase {
7884 name: "Shell"
7985 when: windowShown
@@ -144,29 +150,30 @@ Item {
144150 verify(mainAppId != "");
145151 var mainApp = ApplicationManager.findApplication(mainAppId);
146152 verify(mainApp);
147− tryCompare(mainApp, "state", ApplicationInfo.Running);
153+ tryCompare(mainApp, "state", ApplicationInfoInterface.Running);
148154
149− // Try to suspend while proximity is engaged...
150− Powerd.displayPowerStateChange(Powerd.Off, Powerd.Proximity);
155+ // Suspend while call is active...
156+ callManager.foregroundCall = phoneCall;
157+ Powerd.status = Powerd.Off;
151158 tryCompare(greeter, "showProgress", 0);
152159
153− // Now really suspend
154− print("suspending")
155− Powerd.displayPowerStateChange(Powerd.Off, 0);
156− print("done suspending")
160+ // Now try again after ending call
161+ callManager.foregroundCall = null;
162+ Powerd.status = Powerd.On;
163+ Powerd.status = Powerd.Off;
157164 tryCompare(greeter, "showProgress", 1);
158165
159166 tryCompare(ApplicationManager, "suspended", true);
160− compare(mainApp.state, ApplicationInfo.Suspended);
167+ compare(mainApp.state, ApplicationInfoInterface.Suspended);
161168
162169 // And wake up
163− Powerd.displayPowerStateChange(Powerd.On, 0);
170+ Powerd.status = Powerd.On;
164171 tryCompare(greeter, "showProgress", 1);
165172
166173 // Swipe away greeter to focus app
167174 swipeAwayGreeter();
168175 tryCompare(ApplicationManager, "suspended", false);
169− compare(mainApp.state, ApplicationInfo.Running);
176+ compare(mainApp.state, ApplicationInfoInterface.Running);
170177 tryCompare(ApplicationManager, "focusedApplicationId", mainAppId);
171178 }
172179
@@ -237,9 +244,9 @@ Item {
237244 function test_surfaceLosesFocusWhilePanelIsOpen() {
238245 var app = ApplicationManager.startApplication("dialer-app");
239246 // wait until the app is fully loaded (ie, real surface replaces splash screen)
240− tryCompareFunction(function() { return app.surface != null }, true);
247+ tryCompareFunction(function() { return app.session !== null && app.session.surface !== null }, true);
241248
242− tryCompare(app.surface, "focus", true);
249+ tryCompare(app.session.surface, "focus", true);
243250
244251 // Drag the indicators panel half-open
245252 var touchX = shell.width / 2;
@@ -250,7 +257,7 @@ Item {
250257 true /* beginTouch */, false /* endTouch */);
251258 verify(indicators.partiallyOpened);
252259
253− tryCompare(app.surface, "focus", false);
260+ tryCompare(app.session.surface, "focus", false);
254261
255262 // And finish getting it open
256263 touchFlick(indicators,
@@ -259,11 +266,11 @@ Item {
259266 false /* beginTouch */, true /* endTouch */);
260267 tryCompare(indicators, "fullyOpened", true);
261268
262− tryCompare(app.surface, "focus", false);
269+ tryCompare(app.session.surface, "focus", false);
263270
264271 dragToCloseIndicatorsPanel();
265272
266− tryCompare(app.surface, "focus", true);
273+ tryCompare(app.session.surface, "focus", true);
267274 }
268275
269276 // Wait for the whole UI to settle down
@@ -361,7 +368,7 @@ Item {
361368
362369 var app = ApplicationManager.startApplication("dialer-app");
363370 // wait until the app is fully loaded (ie, real surface replaces splash screen)
364− tryCompareFunction(function() { return app.surface != null }, true);
371+ tryCompareFunction(function() { return app.session !== null && app.session.surface !== null }, true);
365372
366373 // Minimize the application we just launched
367374 swipeFromLeftEdge(units.gu(26) + 1);
tools/unlock-device+4−5
@@ -19,13 +19,12 @@ done
1919
2020eval "$WAIT_COMMAND"
2121
22−# Force a sleep of twenty no matter what, since we may need to wait for unity8
22+# Force a sleep no matter what, since we may need to wait for unity8
2323# to finish coming up (it's hard to tell when the greeter is actually rendered)
24−sleep 20
24+sleep 30
2525
26−GDBUS_CMD="gdbus call --session --dest com.canonical.UnityGreeter --object-path / --method com.canonical.UnityGreeter.HideGreeter && echo Greeter unlocked"
27−
28−UNLOCK_OUTPUT=$(adb shell "if [ \"\$(id -u)\" = 0 ]; then sudo -u phablet -i $GDBUS_CMD; else $GDBUS_CMD; fi" 2>&1)
26+# We need to go through sudo to get a proper environment for dbus set up
27+UNLOCK_OUTPUT=$(adb shell "gdbus call --session --dest com.canonical.UnityGreeter --object-path / --method com.canonical.UnityGreeter.HideGreeter && echo Greeter unlocked" 2>&1)
2928if echo "$UNLOCK_OUTPUT" | grep 'Greeter unlocked' >/dev/null; then
3029 echo "I: Unlock passed"
3130 exit 0