on xenial help sign in
Merged trunk
2764051Marcus Tomlinson
debian/changelog+62
@@ -1,3 +1,65 @@
1+unity8 (8.00+14.10.20140910.1-0ubuntu1) utopic; urgency=low
2+
3+ [ Pete Woods ]
4+ * Disable OEM and Click scopes when system scopes are disabled
5+
6+ [ CI bot ]
7+ * Resync trunk
8+
9+ [ Pawel Stolowski ]
10+ * Set UNITY_SCOPES_NO_FAVORITES environment variable to make scopes
11+ plugin ignore favorite scopes and fix basic functionality of unity-
12+ scope-tool.
13+
14+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 10 Sep 2014 08:53:57 +0000
15+
16+unity8 (8.00+14.10.20140908.1-0ubuntu1) utopic; urgency=low
17+
18+ [ Michał Sawicz ]
19+ * Use a single white pixel instead of the heavier checkers image.
20+ * Add support to unlock-device for the new adbd coming down the
21+ pipeline. Also fix autopilot tests and run scripts for that.
22+ * Make LVWPH non interactive while on header animation
23+ * Improve references to scope/scopeStyle in PreviewListView and
24+ PageHeader, add tests.
25+
26+ [ Nick Dedekind ]
27+ * Support for nested prompt session. (LP: #1358388)
28+
29+ [ Albert Astals ]
30+ * Remove unused hasAttributes variable
31+ * Disable dash overview if in temp scope preview
32+ * Block mouse events under scope overview bottombar (LP: #1362206)
33+ * Fix regression in focus handling due to SDK change
34+ * Fix warning 'Background.qml:81:21: Unable to assign bool to QUrl'
35+ * Fix launcher internationalization
36+ * Make swipe and home button press in the launcher dismiss the
37+ overview
38+ * GSV: Use proper variable since altnav renames
39+ * Fix some "Cannot read property 'luminance' of null" warnings
40+ * Make LVWPH non interactive while on header animation
41+
42+ [ Mirco Müller ]
43+ * Implemented the needed visual updates on notifications requested by
44+ Design for RTM. (LP: #1348092)
45+
46+ [ Michael Terry ]
47+ * Don't show greeter when screen turns off during a call, even if
48+ proximity sensor isn't active. (LP: #1347001)
49+ * Add support to unlock-device for the new adbd coming down the
50+ pipeline. Also fix autopilot tests and run scripts for that.
51+
52+ [ Michael Zanetti ]
53+ * open the application when clicking on the title entry in the
54+ quicklist (LP: #1336380)
55+ * Don't animate x while dragging apps from the left edge (LP:
56+ #1360105)
57+
58+ [ Diego Sarmentero ]
59+ * Reset button state on cancel (LP: #1362622)
60+
61+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 08 Sep 2014 14:16:42 +0000
62+
1unity8 (8.00+14.10.20140903.1-0ubuntu1) utopic; urgency=low
63unity8 (8.00+14.10.20140903.1-0ubuntu1) utopic; urgency=low
2
64
3 [ Nick Dedekind ]
65 [ Nick Dedekind ]
plugins/Dash/CardCreator.js+2−2
@@ -440,14 +440,14 @@ function cardString(template, components) {
440 mascotCode = kMascotImageCode.arg(mascotAnchors).arg(mascotImageVisible);
440 mascotCode = kMascotImageCode.arg(mascotAnchors).arg(mascotImageVisible);
441 }
441 }
442
442
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")';
444
444
445 var hasTitleContainer = hasTitle && (hasEmblem || (hasMascot && (hasSubtitle || hasAttributes)));
445 var hasTitleContainer = hasTitle && (hasEmblem || (hasMascot && (hasSubtitle || hasAttributes)));
446 var titleSubtitleCode = '';
446 var titleSubtitleCode = '';
447 if (hasTitle) {
447 if (hasTitle) {
448 var titleColor;
448 var titleColor;
449 if (headerAsOverlay) {
449 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")';
451 } else if (hasSummary) {
451 } else if (hasSummary) {
452 titleColor = 'summary.color';
452 titleColor = 'summary.color';
453 } else if (hasBackground) {
453 } else if (hasBackground) {
plugins/Dash/listviewwithpageheader.cpp+7−4
@@ -172,7 +172,7 @@ ListViewWithPageHeader::ListViewWithPageHeader()
172 connect(this, SIGNAL(contentWidthChanged()), this, SLOT(onContentWidthChanged()));
172 connect(this, SIGNAL(contentWidthChanged()), this, SLOT(onContentWidthChanged()));
173 connect(this, SIGNAL(contentHeightChanged()), this, SLOT(onContentHeightChanged()));
173 connect(this, SIGNAL(contentHeightChanged()), this, SLOT(onContentHeightChanged()));
174 connect(this, SIGNAL(heightChanged()), this, SLOT(onHeightChanged()));
174 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)));
176
176
177 setFlickableDirection(VerticalFlick);
177 setFlickableDirection(VerticalFlick);
178}
178}
@@ -1056,10 +1056,13 @@ void ListViewWithPageHeader::onModelUpdated(const QQmlChangeSet &changeSet, bool
1056 m_contentHeightDirty = true;
1056 m_contentHeightDirty = true;
1057}
1057}
1058
1058
1059−void ListViewWithPageHeader::onShowHeaderAnimationFinished()
1059+void ListViewWithPageHeader::contentYAnimationRunningChanged(bool running)
1060{
1060{
1061+ setInteractive(!running);
1062+ if (!running) {
1061− m_contentHeightDirty = true;
1063+ m_contentHeightDirty = true;
1062− polish();
1064+ polish();
1065+ }
1063}
1066}
1064
1067
1065void ListViewWithPageHeader::itemGeometryChanged(QQuickItem * /*item*/, const QRectF &newGeometry, const QRectF &oldGeometry)
1068void ListViewWithPageHeader::itemGeometryChanged(QQuickItem * /*item*/, const QRectF &newGeometry, const QRectF &oldGeometry)
plugins/Dash/listviewwithpageheader.h+1−1
@@ -118,7 +118,7 @@ private Q_SLOTS:
118 void onContentWidthChanged();
118 void onContentWidthChanged();
119 void onHeightChanged();
119 void onHeightChanged();
120 void onModelUpdated(const QQmlChangeSet &changeSet, bool reset);
120 void onModelUpdated(const QQmlChangeSet &changeSet, bool reset);
121− void onShowHeaderAnimationFinished();
121+ void contentYAnimationRunningChanged(bool running);
122
122
123private:
123private:
124 class ListItem
124 class ListItem
plugins/Powerd/Powerd.cpp+16−2
@@ -39,7 +39,8 @@ void dimTimeoutChanged(GSettings *settings, const gchar *key, QDBusInterface *un
39
39
40Powerd::Powerd(QObject* parent)
40Powerd::Powerd(QObject* parent)
41 : QObject(parent),
41 : QObject(parent),
42− unityScreen(nullptr)
42+ unityScreen(nullptr),
43+ cachedStatus(Status::On)
43{
44{
44 unityScreen = new QDBusInterface("com.canonical.Unity.Screen",
45 unityScreen = new QDBusInterface("com.canonical.Unity.Screen",
45 "/com/canonical/Unity/Screen",
46 "/com/canonical/Unity/Screen",
@@ -51,7 +52,7 @@ Powerd::Powerd(QObject* parent)
51 "com.canonical.Unity.Screen",
52 "com.canonical.Unity.Screen",
52 "DisplayPowerStateChange",
53 "DisplayPowerStateChange",
53 this,
54 this,
54− SIGNAL(displayPowerStateChange(int, int)));
55+ SLOT(handleDisplayPowerStateChange(int, int)));
55
56
56 systemSettings = g_settings_new("com.ubuntu.touch.system");
57 systemSettings = g_settings_new("com.ubuntu.touch.system");
57 g_signal_connect(systemSettings, "changed::auto-brightness", G_CALLBACK(autoBrightnessChanged), unityScreen);
58 g_signal_connect(systemSettings, "changed::auto-brightness", G_CALLBACK(autoBrightnessChanged), unityScreen);
@@ -67,3 +68,16 @@ Powerd::~Powerd()
67 g_signal_handlers_disconnect_by_data(systemSettings, unityScreen);
68 g_signal_handlers_disconnect_by_data(systemSettings, unityScreen);
68 g_object_unref(systemSettings);
69 g_object_unref(systemSettings);
69}
70}
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
29 Q_OBJECT
29 Q_OBJECT
30 Q_ENUMS(Status)
30 Q_ENUMS(Status)
31 Q_ENUMS(DisplayStateChangeReason)
31 Q_ENUMS(DisplayStateChangeReason)
32+ Q_PROPERTY(Status status READ status NOTIFY statusChanged)
32
33
33public:
34public:
34 enum DisplayStateChangeReason {
35 enum DisplayStateChangeReason {
@@ -46,12 +47,18 @@ public:
46 explicit Powerd(QObject *parent = 0);
47 explicit Powerd(QObject *parent = 0);
47 ~Powerd();
48 ~Powerd();
48
49
50+ Status status() const;
51+
49Q_SIGNALS:
52Q_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);
51
57
52private:
58private:
53 QDBusInterface *unityScreen;
59 QDBusInterface *unityScreen;
54 GSettings *systemSettings;
60 GSettings *systemSettings;
61+ Status cachedStatus;
55};
62};
56
63
57#endif
64#endif
plugins/Powerd/Powerd.qmltypes+3−3
@@ -30,10 +30,10 @@ Module {
30 "On": 1
30 "On": 1
31 }
31 }
32 }
32 }
33+ Property { name: "status"; type: "Status"; isReadonly: true }
33 Signal {
34 Signal {
34− name: "displayPowerStateChange"
35+ name: "statusChanged"
35− Parameter { name: "status"; type: "int" }
36− Parameter { name: "reason"; type: "int" }
36+ Parameter { name: "reason"; type: "DisplayStateChangeReason" }
37 }
37 }
38 }
38 }
39}
39}
plugins/Unity/DashCommunicator/dashcommunicator.cpp+2−2
@@ -31,7 +31,7 @@ DashCommunicator::~DashCommunicator()
31}
31}
32
32
33
33
34−void DashCommunicator::setCurrentScope(const QString &scopeId, bool animate, bool reset)
34+void DashCommunicator::setCurrentScope(const QString &scopeId, bool animate, bool isSwipe)
35{
35{
36 QDBusConnection connection = QDBusConnection::sessionBus();
36 QDBusConnection connection = QDBusConnection::sessionBus();
37 QDBusInterface dashIface ("com.canonical.UnityDash",
37 QDBusInterface dashIface ("com.canonical.UnityDash",
@@ -39,5 +39,5 @@ void DashCommunicator::setCurrentScope(const QString &scopeId, bool animate, boo
39 "",
39 "",
40 connection);
40 connection);
41
41
42− dashIface.call("SetCurrentScope", scopeId, animate, reset);
42+ dashIface.call("SetCurrentScope", scopeId, animate, isSwipe);
43}
43}
plugins/Unity/DashCommunicator/dashcommunicator.h+1−1
@@ -29,7 +29,7 @@ public:
29 ~DashCommunicator();
29 ~DashCommunicator();
30
30
31public Q_SLOTS:
31public Q_SLOTS:
32− void setCurrentScope(const QString &scopeId, bool animate, bool reset);
32+ void setCurrentScope(const QString &scopeId, bool animate, bool isSwipe);
33};
33};
34
34
35#endif
35#endif
plugins/Unity/DashCommunicator/dashcommunicatorservice.h+1−1
@@ -29,7 +29,7 @@ public:
29 ~DashCommunicatorService();
29 ~DashCommunicatorService();
30
30
31Q_SIGNALS:
31Q_SIGNALS:
32− void setCurrentScopeRequested(const QString &scopeId, bool animate, bool reset);
32+ void setCurrentScopeRequested(const QString &scopeId, bool animate, bool isSwipe);
33
33
34private:
34private:
35 DBusDashCommunicatorService *m_dbusService;
35 DBusDashCommunicatorService *m_dbusService;
plugins/Unity/DashCommunicator/dbusdashcommunicatorservice.cpp+2−2
@@ -33,7 +33,7 @@ DBusDashCommunicatorService::~DBusDashCommunicatorService()
33{
33{
34}
34}
35
35
36−void DBusDashCommunicatorService::SetCurrentScope(const QString &scopeId, bool animate, bool reset)
36+void DBusDashCommunicatorService::SetCurrentScope(const QString &scopeId, bool animate, bool isSwipe)
37{
37{
38− Q_EMIT setCurrentScopeRequested(scopeId, animate, reset);
38+ Q_EMIT setCurrentScopeRequested(scopeId, animate, isSwipe);
39}
39}
plugins/Unity/DashCommunicator/dbusdashcommunicatorservice.h+2−2
@@ -29,10 +29,10 @@ public:
29 ~DBusDashCommunicatorService();
29 ~DBusDashCommunicatorService();
30
30
31Q_SIGNALS:
31Q_SIGNALS:
32− void setCurrentScopeRequested(const QString &scopeId, bool animate, bool reset);
32+ void setCurrentScopeRequested(const QString &scopeId, bool animate, bool isSwipe);
33
33
34public Q_SLOTS:
34public 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);
36
36
37};
37};
38
38
plugins/Unity/Launcher/CMakeLists.txt+1−1
@@ -30,6 +30,6 @@ add_library(UnityLauncher-qml MODULE
30
30
31target_link_libraries(UnityLauncher-qml ${GSETTINGS_QT_LDFLAGS})
31target_link_libraries(UnityLauncher-qml ${GSETTINGS_QT_LDFLAGS})
32
32
33−qt5_use_modules(UnityLauncher-qml DBus Qml)
33+qt5_use_modules(UnityLauncher-qml DBus Qml Gui)
34
34
35add_unity8_plugin(Unity.Launcher 0.1 Unity/Launcher TARGETS UnityLauncher-qml)
35add_unity8_plugin(Unity.Launcher 0.1 Unity/Launcher TARGETS UnityLauncher-qml)
plugins/Unity/Launcher/backend/launcherbackend.cpp+7
@@ -28,6 +28,8 @@
28#include <QDebug>
28#include <QDebug>
29#include <QStandardPaths>
29#include <QStandardPaths>
30
30
31+#include <libintl.h>
32+
31class LauncherBackendItem
33class LauncherBackendItem
32{
34{
33public:
35public:
@@ -350,7 +352,12 @@ LauncherBackendItem* LauncherBackend::parseDesktopFile(const QString &desktopFil
350 QSettings settings(desktopFile, QSettings::IniFormat);
352 QSettings settings(desktopFile, QSettings::IniFormat);
351
353
352 LauncherBackendItem* item = new LauncherBackendItem();
354 LauncherBackendItem* item = new LauncherBackendItem();
355+
353 item->displayName = settings.value("Desktop Entry/Name").toString();
356 item->displayName = settings.value("Desktop Entry/Name").toString();
357+ const QString domain = settings.value("Desktop Entry/X-Ubuntu-Gettext-Domain").toString();
358+ if (!domain.isEmpty()) {
359+ item->displayName = dgettext(domain.toUtf8().constData(), item->displayName.toUtf8().constData());
360+ }
354
361
355 QString iconString = settings.value("Desktop Entry/Icon").toString();
362 QString iconString = settings.value("Desktop Entry/Icon").toString();
356 QString pathString = settings.value("Desktop Entry/Path").toString();
363 QString pathString = settings.value("Desktop Entry/Path").toString();
plugins/Unity/Launcher/launcheritem.cpp+1
@@ -36,6 +36,7 @@ LauncherItem::LauncherItem(const QString &appId, const QString &name, const QStr
36 m_quickList(new QuickListModel(this))
36 m_quickList(new QuickListModel(this))
37{
37{
38 QuickListEntry nameAction;
38 QuickListEntry nameAction;
39+ nameAction.setActionId("launch_item");
39 nameAction.setText(m_name);
40 nameAction.setText(m_name);
40 m_quickList->appendAction(nameAction);
41 m_quickList->appendAction(nameAction);
41 QuickListEntry pinningAction;
42 QuickListEntry pinningAction;
plugins/Unity/Launcher/launchermodel.cpp+3
@@ -23,6 +23,7 @@
23
23
24#include <unity/shell/application/ApplicationInfoInterface.h>
24#include <unity/shell/application/ApplicationInfoInterface.h>
25
25
26+#include <QDesktopServices>
26#include <QDebug>
27#include <QDebug>
27
28
28using namespace unity::shell::application;
29using namespace unity::shell::application;
@@ -191,6 +192,8 @@ void LauncherModel::quickListActionInvoked(const QString &appId, int actionIndex
191 } else {
192 } else {
192 pin(appId);
193 pin(appId);
193 }
194 }
195+ } else if (actionId == "launch_item") {
196+ QDesktopServices::openUrl(getUrlForAppId(appId));
194
197
195 // Nope, we don't know this action, let the backend forward it to the application
198 // Nope, we don't know this action, let the backend forward it to the application
196 } else {
199 } else {
po/ca.po+8−6
@@ -8,14 +8,14 @@ msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2014-08-26 18:24+0200\n"
10"POT-Creation-Date: 2014-08-26 18:24+0200\n"
11−"PO-Revision-Date: 2014-09-01 01:01+0000\n"
11+"PO-Revision-Date: 2014-09-07 04:05+0000\n"
12"Last-Translator: David Planella <david.planella@ubuntu.com>\n"
12"Last-Translator: David Planella <david.planella@ubuntu.com>\n"
13"Language-Team: Catalan <ca@li.org>\n"
13"Language-Team: Catalan <ca@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-09-01 07:33+0000\n"
17+"X-Launchpad-Export-Date: 2014-09-08 06:58+0000\n"
18−"X-Generator: Launchpad (build 17176)\n"
18+"X-Generator: Launchpad (build 17196)\n"
19
19
20#: plugins/LightDM/Greeter.cpp:130
20#: plugins/LightDM/Greeter.cpp:130
21msgid "Password: "
21msgid "Password: "
@@ -50,11 +50,11 @@ msgstr "Sí"
50
50
51#: qml/Components/Dialogs.qml:94
51#: qml/Components/Dialogs.qml:94
52msgid "Shut down"
52msgid "Shut down"
53−msgstr ""
53+msgstr "Apaga"
54
54
55#: qml/Components/Dialogs.qml:95
55#: qml/Components/Dialogs.qml:95
56msgid "Are you sure you want to shut down?"
56msgid "Are you sure you want to shut down?"
57−msgstr ""
57+msgstr "Segur que voleu apagar?"
58
58
59#: qml/Components/Dialogs.qml:119
59#: qml/Components/Dialogs.qml:119
60msgid "Reboot"
60msgid "Reboot"
@@ -73,10 +73,12 @@ msgid ""
73"Are you sure you would like\n"
73"Are you sure you would like\n"
74"to power off?"
74"to power off?"
75msgstr ""
75msgstr ""
76+"Segur que voleu\n"
77+"apagar?"
76
78
77#: qml/Components/Dialogs.qml:147
79#: qml/Components/Dialogs.qml:147
78msgid "Power off"
80msgid "Power off"
79−msgstr "Apaga'l"
81+msgstr "Apaga"
80
82
81#: qml/Components/Dialogs.qml:157
83#: qml/Components/Dialogs.qml:157
82msgid "Cancel"
84msgid "Cancel"
po/de.po+7−7
@@ -8,14 +8,14 @@ msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2014-08-26 18:24+0200\n"
10"POT-Creation-Date: 2014-08-26 18:24+0200\n"
11−"PO-Revision-Date: 2014-08-29 13:00+0000\n"
11+"PO-Revision-Date: 2014-09-04 15:02+0000\n"
12−"Last-Translator: Martin Pitt <martin.pitt@ubuntu.com>\n"
12+"Last-Translator: Niklas Wenzel <nikwen.developer@gmail.com>\n"
13"Language-Team: German <de@li.org>\n"
13"Language-Team: German <de@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-08-30 07:46+0000\n"
17+"X-Launchpad-Export-Date: 2014-09-05 07:50+0000\n"
18−"X-Generator: Launchpad (build 17176)\n"
18+"X-Generator: Launchpad (build 17196)\n"
19
19
20#: plugins/LightDM/Greeter.cpp:130
20#: plugins/LightDM/Greeter.cpp:130
21msgid "Password: "
21msgid "Password: "
@@ -36,7 +36,7 @@ msgstr "Abmelden"
36
36
37#: qml/Components/Dialogs.qml:71
37#: qml/Components/Dialogs.qml:71
38msgid "Are you sure you want to log out?"
38msgid "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?"
40
40
41#: qml/Components/Dialogs.qml:73 qml/Components/Dialogs.qml:97
41#: qml/Components/Dialogs.qml:73 qml/Components/Dialogs.qml:97
42#: qml/Components/Dialogs.qml:122
42#: qml/Components/Dialogs.qml:122
@@ -54,7 +54,7 @@ msgstr "Herunterfahren"
54
54
55#: qml/Components/Dialogs.qml:95
55#: qml/Components/Dialogs.qml:95
56msgid "Are you sure you want to shut down?"
56msgid "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?"
58
58
59#: qml/Components/Dialogs.qml:119
59#: qml/Components/Dialogs.qml:119
60msgid "Reboot"
60msgid "Reboot"
@@ -62,7 +62,7 @@ msgstr "Neustart"
62
62
63#: qml/Components/Dialogs.qml:120
63#: qml/Components/Dialogs.qml:120
64msgid "Are you sure you want to reboot?"
64msgid "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?"
66
66
67#: qml/Components/Dialogs.qml:144
67#: qml/Components/Dialogs.qml:144
68msgid "Power"
68msgid "Power"
po/gd.po+57−54
@@ -8,19 +8,19 @@ msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2014-08-26 18:24+0200\n"
10"POT-Creation-Date: 2014-08-26 18:24+0200\n"
11−"PO-Revision-Date: 2014-08-13 00:21+0000\n"
11+"PO-Revision-Date: 2014-09-12 16:34+0000\n"
12−"Last-Translator: Akerbeltz <fios@akerbeltz.org>\n"
12+"Last-Translator: GunChleoc <Unknown>\n"
13−"Language-Team: Fòram na Gàidhlig http://www.foramnagaidhlig.net\n"
13+"Language-Team: Fòram na Gàidhlig\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-08-28 06:30+0000\n"
17+"X-Launchpad-Export-Date: 2014-09-13 08:40+0000\n"
18−"X-Generator: Launchpad (build 17174)\n"
18+"X-Generator: Launchpad (build 17196)\n"
19"Language: gd\n"
19"Language: gd\n"
20
20
21−#: plugins/LightDM/Greeter.cpp:129
21+#: plugins/LightDM/Greeter.cpp:130
22msgid "Password: "
22msgid "Password: "
23−msgstr ""
23+msgstr "Facal-faire: "
24
24
25#: plugins/Unity/Launcher/launcheritem.cpp:43
25#: plugins/Unity/Launcher/launcheritem.cpp:43
26#: plugins/Unity/Launcher/launcheritem.cpp:73
26#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -33,53 +33,55 @@ msgstr "Neo-phrìnich an ath-ghoirid"
33
33
34#: qml/Components/Dialogs.qml:70
34#: qml/Components/Dialogs.qml:70
35msgid "Log out"
35msgid "Log out"
36−msgstr ""
36+msgstr "Clàraich a-mach"
37
37
38#: qml/Components/Dialogs.qml:71
38#: qml/Components/Dialogs.qml:71
39msgid "Are you sure you want to log out?"
39msgid "Are you sure you want to log out?"
40−msgstr ""
40+msgstr "A bheil thu cinnteach gu bheil thu airson clàradh a-mach?"
41
41
42#: qml/Components/Dialogs.qml:73 qml/Components/Dialogs.qml:97
42#: qml/Components/Dialogs.qml:73 qml/Components/Dialogs.qml:97
43#: qml/Components/Dialogs.qml:122
43#: qml/Components/Dialogs.qml:122
44msgid "No"
44msgid "No"
45−msgstr ""
45+msgstr "Chan eil"
46
46
47#: qml/Components/Dialogs.qml:80 qml/Components/Dialogs.qml:104
47#: qml/Components/Dialogs.qml:80 qml/Components/Dialogs.qml:104
48#: qml/Components/Dialogs.qml:129
48#: qml/Components/Dialogs.qml:129
49msgid "Yes"
49msgid "Yes"
50−msgstr ""
50+msgstr "Tha"
51
51
52#: qml/Components/Dialogs.qml:94
52#: qml/Components/Dialogs.qml:94
53msgid "Shut down"
53msgid "Shut down"
54−msgstr ""
54+msgstr "Dùin sìos"
55
55
56#: qml/Components/Dialogs.qml:95
56#: qml/Components/Dialogs.qml:95
57msgid "Are you sure you want to shut down?"
57msgid "Are you sure you want to shut down?"
58−msgstr ""
58+msgstr "A bheil thu cinnteach gu bheil thu airson a dhùnadh sìos?"
59
59
60#: qml/Components/Dialogs.qml:119
60#: qml/Components/Dialogs.qml:119
61msgid "Reboot"
61msgid "Reboot"
62−msgstr ""
62+msgstr "Ath-thòisich an siostam"
63
63
64#: qml/Components/Dialogs.qml:120
64#: qml/Components/Dialogs.qml:120
65msgid "Are you sure you want to reboot?"
65msgid "Are you sure you want to reboot?"
66−msgstr ""
66+msgstr "A bheil thu cinnteach gu bheil thu airson tòiseachadh às ùr?"
67
67
68#: qml/Components/Dialogs.qml:144
68#: qml/Components/Dialogs.qml:144
69msgid "Power"
69msgid "Power"
70−msgstr ""
70+msgstr "Cumhachd"
71
71
72#: qml/Components/Dialogs.qml:145
72#: qml/Components/Dialogs.qml:145
73msgid ""
73msgid ""
74"Are you sure you would like\n"
74"Are you sure you would like\n"
75"to power off?"
75"to power off?"
76msgstr ""
76msgstr ""
77+"A bheil thu cinnteach gu bheil thu\n"
78+"airson a' chumhachd a chur dheth?"
77
79
78−#: qml/Components/Dialogs.qml:144
80+#: qml/Components/Dialogs.qml:147
79msgid "Power off"
81msgid "Power off"
80msgstr "Cuir a' chumhachd dheth"
82msgstr "Cuir a' chumhachd dheth"
81
83
82−#: qml/Components/Dialogs.qml:162
84+#: qml/Components/Dialogs.qml:157
83msgid "Cancel"
85msgid "Cancel"
84msgstr "Sguir dheth"
86msgstr "Sguir dheth"
85
87
@@ -139,11 +141,11 @@ msgstr ""
139
141
140#: qml/Components/Lockscreen.qml:167
142#: qml/Components/Lockscreen.qml:167
141msgid "Please wait"
143msgid "Please wait"
142−msgstr ""
144+msgstr "Fuirich ort"
143
145
144#: qml/Components/Lockscreen.qml:172
146#: qml/Components/Lockscreen.qml:172
145msgid "Too many incorrect attempts"
147msgid "Too many incorrect attempts"
146−msgstr ""
148+msgstr "Cus oidhirpean leis nach do shoirbhich"
147
149
148#: qml/Components/Lockscreen.qml:206
150#: qml/Components/Lockscreen.qml:206
149msgid "Emergency Call"
151msgid "Emergency Call"
@@ -170,21 +172,22 @@ msgstr "Seall nas lugha"
170msgid "See all"
172msgid "See all"
171msgstr "Seall na h-uile"
173msgstr "Seall na h-uile"
172
174
173−#: qml/Dash/GenericScopeView.qml:424 qml/Panel/SearchIndicator.qml:27
175+#: qml/Dash/GenericScopeView.qml:424 qml/Dash/PageHeader.qml:260
176+#: qml/Panel/SearchIndicator.qml:27
174msgid "Search"
177msgid "Search"
175msgstr "Lorg"
178msgstr "Lorg"
176
179
177#: qml/Dash/PageHeader.qml:270
180#: qml/Dash/PageHeader.qml:270
178msgid "Settings"
181msgid "Settings"
179−msgstr ""
182+msgstr "Roghainnean"
180
183
181#: qml/Dash/PageHeader.qml:279
184#: qml/Dash/PageHeader.qml:279
182msgid "Remove from Favorites"
185msgid "Remove from Favorites"
183−msgstr ""
186+msgstr "Thoir air falbh o na h-annsachdan"
184
187
185#: qml/Dash/PageHeader.qml:279
188#: qml/Dash/PageHeader.qml:279
186msgid "Add to Favorites"
189msgid "Add to Favorites"
187−msgstr ""
190+msgstr "Cuir ris na h-annsachdan"
188
191
189#: qml/Dash/Previews/PreviewActionCombo.qml:34
192#: qml/Dash/Previews/PreviewActionCombo.qml:34
190msgid "More..."
193msgid "More..."
@@ -210,11 +213,11 @@ msgstr "Cuir"
210msgid "Manage Dash"
213msgid "Manage Dash"
211msgstr "Stiùirich an deas-bhòrd"
214msgstr "Stiùirich an deas-bhòrd"
212
215
213−#: qml/Dash/ScopesOverview.qml:408
216+#: qml/Dash/ScopesOverview.qml:417
214msgid "Done"
217msgid "Done"
215msgstr "Deiseil"
218msgstr "Deiseil"
216
219
217−#: qml/Dash/ScopesOverview.qml:434
220+#: qml/Dash/ScopesOverview.qml:443
218msgid "Store"
221msgid "Store"
219msgstr "Am bùth"
222msgstr "Am bùth"
220
223
@@ -230,7 +233,7 @@ msgstr "Na h-uile"
230msgid "Swipe to unlock"
233msgid "Swipe to unlock"
231msgstr "Dèan grad-shlaighdeadh gus a' ghlas a thoirt dheth"
234msgstr "Dèan grad-shlaighdeadh gus a' ghlas a thoirt dheth"
232
235
233−#: qml/Hud/HudParametrizedActionsPage.qml:132
236+#: qml/Hud/HudParametrizedActionsPage.qml:139
234msgid "Confirm"
237msgid "Confirm"
235msgstr "Dearbhaich"
238msgstr "Dearbhaich"
236
239
@@ -256,11 +259,11 @@ msgstr "Seall am facal-faire"
256
259
257#: qml/Notifications/NotificationMenuItemFactory.qml:120
260#: qml/Notifications/NotificationMenuItemFactory.qml:120
258msgid "Enter SIM PIN"
261msgid "Enter SIM PIN"
259−msgstr ""
262+msgstr "Cuir a-steach PIN an t-SIM"
260
263
261−#: qml/Notifications/NotificationMenuItemFactory.qml:121 qml/Shell.qml:270
264+#: qml/Notifications/NotificationMenuItemFactory.qml:121
262msgid "Sorry, incorrect PIN"
265msgid "Sorry, incorrect PIN"
263−msgstr ""
266+msgstr "Duilich ach tha a' PIN cearr"
264
267
265#: qml/Panel/ActiveCallHint.qml:77
268#: qml/Panel/ActiveCallHint.qml:77
266msgid "Tap to return to call..."
269msgid "Tap to return to call..."
@@ -302,58 +305,58 @@ msgstr "Thoir a' ghlas far an SIM"
302msgid "Roaming"
305msgid "Roaming"
303msgstr "Air fàrsan"
306msgstr "Air fàrsan"
304
307
305−#: qml/Shell.qml:266
308+#: qml/Shell.qml:279
306msgid "Enter your passphrase"
309msgid "Enter your passphrase"
307−msgstr ""
310+msgstr "Cuir an abairt-fhaire agad a-steach"
308
311
309−#: qml/Shell.qml:267
312+#: qml/Shell.qml:280
310msgid "Sorry, incorrect passphrase"
313msgid "Sorry, incorrect passphrase"
311−msgstr ""
314+msgstr "Duilich ach tha an abairt-fhaire cearr"
312
315
313#: qml/Shell.qml:282
316#: qml/Shell.qml:282
314msgid "Enter your passcode"
317msgid "Enter your passcode"
315−msgstr ""
318+msgstr "Cuir an còd-faire agad a-steach"
316
319
317#: qml/Shell.qml:283
320#: qml/Shell.qml:283
318msgid "Sorry, incorrect passcode"
321msgid "Sorry, incorrect passcode"
319−msgstr ""
322+msgstr "Duilich ach tha an còd-faire cearr"
320
323
321−#: qml/Shell.qml:273
324+#: qml/Shell.qml:286
322#, qt-format
325#, qt-format
323msgid "Enter your %1"
326msgid "Enter your %1"
324−msgstr ""
327+msgstr "Cuir a-steach a' %1 agad"
325
328
326−#: qml/Shell.qml:274
329+#: qml/Shell.qml:287
327#, qt-format
330#, qt-format
328msgid "Sorry, incorrect %1"
331msgid "Sorry, incorrect %1"
329−msgstr ""
332+msgstr "Duilich ach tha a' %1 cearr"
330
333
331−#: qml/Shell.qml:310
334+#: qml/Shell.qml:323
332msgid "Sorry, incorrect passphrase."
335msgid "Sorry, incorrect passphrase."
333−msgstr ""
336+msgstr "Duilich ach tha an abairt-fhaire cearr."
334
337
335−#: qml/Shell.qml:311
338+#: qml/Shell.qml:324
336msgid "Sorry, incorrect passcode."
339msgid "Sorry, incorrect passcode."
337−msgstr ""
340+msgstr "Duilich ach tha an còd-faire cearr."
338
341
339−#: qml/Shell.qml:312
342+#: qml/Shell.qml:325
340msgid "This will be your last attempt."
343msgid "This will be your last attempt."
341−msgstr ""
344+msgstr "Seo an oidhirp mu dheireadh agad."
342
345
343−#: qml/Shell.qml:314
346+#: qml/Shell.qml:327
344msgid ""
347msgid ""
345"If passphrase is entered incorrectly, your phone will conduct a factory "
348"If passphrase is entered incorrectly, your phone will conduct a factory "
346"reset and all personal data will be deleted."
349"reset and all personal data will be deleted."
347msgstr ""
350msgstr ""
351+"Ma thèid an abairt-fhaire a chur a-steach mar bu chòir, thèid an fhòn agad a "
352+"ath-shuidheachadh air roghainnean an fhactaraidh agus thèid gach dàta "
353+"pearsanta a sguabadh às."
348
354
349−#: qml/Shell.qml:315
355+#: qml/Shell.qml:328
350msgid ""
356msgid ""
351"If passcode is entered incorrectly, your phone will conduct a factory reset "
357"If passcode is entered incorrectly, your phone will conduct a factory reset "
352"and all personal data will be deleted."
358"and all personal data will be deleted."
353msgstr ""
359msgstr ""
354−
360+"Ma thèid an còd-faire a chur a-steach mar bu chòir, thèid an fhòn agad a ath-"
355−#~ msgid "Are you sure you would like to turn power off?"
361+"shuidheachadh air roghainnean an fhactaraidh agus thèid gach dàta pearsanta "
356−#~ msgstr "A bheil thu cinnteach gu bheil thu airson a chur dheth?"
362+"a sguabadh às."
357−
358−#~ msgid "Restart"
359−#~ msgstr "Ath-thòisich"
po/ku.ponew file+345
@@ -0,0 +1,345 @@
1+# Kurdish translation for unity8
2+# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
3+# This file is distributed under the same license as the unity8 package.
4+# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
5+#
6+msgid ""
7+msgstr ""
8+"Project-Id-Version: unity8\n"
9+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10+"POT-Creation-Date: 2014-08-26 18:24+0200\n"
11+"PO-Revision-Date: 2014-09-10 13:14+0000\n"
12+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13+"Language-Team: Kurdish <ku@li.org>\n"
14+"MIME-Version: 1.0\n"
15+"Content-Type: text/plain; charset=UTF-8\n"
16+"Content-Transfer-Encoding: 8bit\n"
17+"X-Launchpad-Export-Date: 2014-09-11 07:27+0000\n"
18+"X-Generator: Launchpad (build 17196)\n"
19+
20+#: plugins/LightDM/Greeter.cpp:130
21+msgid "Password: "
22+msgstr "Şîfre: "
23+
24+#: plugins/Unity/Launcher/launcheritem.cpp:43
25+#: plugins/Unity/Launcher/launcheritem.cpp:73
26+msgid "Pin shortcut"
27+msgstr ""
28+
29+#: plugins/Unity/Launcher/launcheritem.cpp:73
30+msgid "Unpin shortcut"
31+msgstr ""
32+
33+#: qml/Components/Dialogs.qml:70
34+msgid "Log out"
35+msgstr "Derkeve"
36+
37+#: qml/Components/Dialogs.qml:71
38+msgid "Are you sure you want to log out?"
39+msgstr "Ji dil dixwazî derkevî?"
40+
41+#: qml/Components/Dialogs.qml:73 qml/Components/Dialogs.qml:97
42+#: qml/Components/Dialogs.qml:122
43+msgid "No"
44+msgstr "Na"
45+
46+#: qml/Components/Dialogs.qml:80 qml/Components/Dialogs.qml:104
47+#: qml/Components/Dialogs.qml:129
48+msgid "Yes"
49+msgstr "Erê"
50+
51+#: qml/Components/Dialogs.qml:94
52+msgid "Shut down"
53+msgstr "Bigire"
54+
55+#: qml/Components/Dialogs.qml:95
56+msgid "Are you sure you want to shut down?"
57+msgstr "Ji dil dixwazî bigirî?"
58+
59+#: qml/Components/Dialogs.qml:119
60+msgid "Reboot"
61+msgstr "Dîsdestpêkirin"
62+
63+#: qml/Components/Dialogs.qml:120
64+msgid "Are you sure you want to reboot?"
65+msgstr "Ji dil dixwazî bidî destpêkirin?"
66+
67+#: qml/Components/Dialogs.qml:144
68+msgid "Power"
69+msgstr ""
70+
71+#: qml/Components/Dialogs.qml:145
72+msgid ""
73+"Are you sure you would like\n"
74+"to power off?"
75+msgstr ""
76+
77+#: qml/Components/Dialogs.qml:147
78+msgid "Power off"
79+msgstr ""
80+
81+#: qml/Components/Dialogs.qml:157
82+msgid "Cancel"
83+msgstr "Betal bike"
84+
85+#: qml/Components/EdgeDemoOverlay.qml:151
86+msgid "Skip intro"
87+msgstr ""
88+
89+#: qml/Components/EdgeDemo.qml:112
90+msgid "Right edge"
91+msgstr ""
92+
93+#: qml/Components/EdgeDemo.qml:113
94+msgid "Try swiping from the right edge to unlock the phone"
95+msgstr ""
96+
97+#: qml/Components/EdgeDemo.qml:144
98+msgid "Top edge"
99+msgstr ""
100+
101+#: qml/Components/EdgeDemo.qml:145
102+msgid "Try swiping from the top edge to access the indicators"
103+msgstr ""
104+
105+#: qml/Components/EdgeDemo.qml:170
106+msgid "Close"
107+msgstr "Bigire"
108+
109+#: qml/Components/EdgeDemo.qml:171
110+msgid "Swipe up again to close the settings screen"
111+msgstr ""
112+
113+#: qml/Components/EdgeDemo.qml:198
114+msgid "Left edge"
115+msgstr ""
116+
117+#: qml/Components/EdgeDemo.qml:199
118+msgid "Swipe from the left to reveal the launcher for quick access to apps"
119+msgstr ""
120+
121+#: qml/Components/EdgeDemo.qml:226
122+msgid "Well done"
123+msgstr "Aferim"
124+
125+#: qml/Components/EdgeDemo.qml:227
126+msgid ""
127+"You have now mastered the edge gestures and can start using the "
128+"phone<br><br>Tap on the screen to start"
129+msgstr ""
130+
131+#: qml/Components/Lockscreen.qml:167
132+msgid "Please wait"
133+msgstr "Tika ye li bendê bimîne"
134+
135+#: qml/Components/Lockscreen.qml:172
136+msgid "Too many incorrect attempts"
137+msgstr ""
138+
139+#: qml/Components/Lockscreen.qml:206
140+msgid "Emergency Call"
141+msgstr "Lêgerîna Lezgîn"
142+
143+#: qml/Components/Lockscreen.qml:226
144+msgid "OK"
145+msgstr "BAŞ E"
146+
147+#: qml/Components/PassphraseLockscreen.qml:61
148+#, qt-format
149+msgid "Hello %1"
150+msgstr "Silav %1"
151+
152+#: qml/Components/PassphraseLockscreen.qml:61
153+msgid "Hello"
154+msgstr "Silav"
155+
156+#: qml/Dash/GenericScopeView.qml:361
157+msgid "See less"
158+msgstr "Hindiktir bibîne"
159+
160+#: qml/Dash/GenericScopeView.qml:361
161+msgid "See all"
162+msgstr "Tevî bibîne"
163+
164+#: qml/Dash/GenericScopeView.qml:424 qml/Dash/PageHeader.qml:260
165+#: qml/Panel/SearchIndicator.qml:27
166+msgid "Search"
167+msgstr "Lêgerîn"
168+
169+#: qml/Dash/PageHeader.qml:270
170+msgid "Settings"
171+msgstr "Eyar"
172+
173+#: qml/Dash/PageHeader.qml:279
174+msgid "Remove from Favorites"
175+msgstr "Ji nav Bijareyan rake"
176+
177+#: qml/Dash/PageHeader.qml:279
178+msgid "Add to Favorites"
179+msgstr "Li Bijareyan zêde bike"
180+
181+#: qml/Dash/Previews/PreviewActionCombo.qml:34
182+msgid "More..."
183+msgstr "Zêdetir..."
184+
185+#: qml/Dash/Previews/PreviewActionCombo.qml:34
186+msgid "Less..."
187+msgstr "Hindiktir..."
188+
189+#: qml/Dash/Previews/PreviewRatingInput.qml:81
190+msgid "Rate this"
191+msgstr ""
192+
193+#: qml/Dash/Previews/PreviewRatingInput.qml:126
194+msgid "Add a review"
195+msgstr ""
196+
197+#: qml/Dash/Previews/PreviewRatingInput.qml:166
198+msgid "Send"
199+msgstr ""
200+
201+#: qml/Dash/ScopesOverview.qml:201
202+msgid "Manage Dash"
203+msgstr ""
204+
205+#: qml/Dash/ScopesOverview.qml:417
206+msgid "Done"
207+msgstr ""
208+
209+#: qml/Dash/ScopesOverview.qml:443
210+msgid "Store"
211+msgstr ""
212+
213+#: qml/Dash/ScopesOverviewTab.qml:36
214+msgid "Favorites"
215+msgstr ""
216+
217+#: qml/Dash/ScopesOverviewTab.qml:54
218+msgid "All"
219+msgstr ""
220+
221+#: qml/Greeter/Greeter.qml:157
222+msgid "Swipe to unlock"
223+msgstr ""
224+
225+#: qml/Hud/HudParametrizedActionsPage.qml:139
226+msgid "Confirm"
227+msgstr ""
228+
229+#: qml/Hud/Hud.qml:61 qml/Hud/Hud.qml:99 qml/Hud/Hud.qml:372
230+msgid "Type or say a command"
231+msgstr ""
232+
233+#: qml/Hud/Hud.qml:84
234+msgid "Loading. Please Wait..."
235+msgstr ""
236+
237+#: qml/Hud/Hud.qml:89
238+msgid "Speak Now..."
239+msgstr ""
240+
241+#: qml/Hud/Hud.qml:94
242+msgid "Speaking..."
243+msgstr ""
244+
245+#: qml/Notifications/NotificationMenuItemFactory.qml:105
246+msgid "Show password"
247+msgstr ""
248+
249+#: qml/Notifications/NotificationMenuItemFactory.qml:120
250+msgid "Enter SIM PIN"
251+msgstr ""
252+
253+#: qml/Notifications/NotificationMenuItemFactory.qml:121
254+msgid "Sorry, incorrect PIN"
255+msgstr ""
256+
257+#: qml/Panel/ActiveCallHint.qml:77
258+msgid "Tap to return to call..."
259+msgstr ""
260+
261+#: qml/Panel/ActiveCallHint.qml:90
262+msgid "Conference"
263+msgstr ""
264+
265+#: qml/Panel/Indicators/MenuItemFactory.qml:651
266+msgid "In queue…"
267+msgstr ""
268+
269+#: qml/Panel/Indicators/MenuItemFactory.qml:655
270+msgid "Downloading"
271+msgstr ""
272+
273+#: qml/Panel/Indicators/MenuItemFactory.qml:657
274+msgid "Paused, tap to resume"
275+msgstr ""
276+
277+#: qml/Panel/Indicators/MenuItemFactory.qml:659
278+msgid "Canceled"
279+msgstr ""
280+
281+#: qml/Panel/Indicators/MenuItemFactory.qml:661
282+msgid "Finished"
283+msgstr ""
284+
285+#: qml/Panel/Indicators/MenuItemFactory.qml:663
286+msgid "Failed, tap to retry"
287+msgstr ""
288+
289+#: qml/Panel/Indicators/ModemInfoItem.qml:105
290+msgid "Unlock SIM"
291+msgstr ""
292+
293+#: qml/Panel/Indicators/RoamingIndication.qml:27
294+msgid "Roaming"
295+msgstr ""
296+
297+#: qml/Shell.qml:279
298+msgid "Enter your passphrase"
299+msgstr ""
300+
301+#: qml/Shell.qml:280
302+msgid "Sorry, incorrect passphrase"
303+msgstr ""
304+
305+#: qml/Shell.qml:282
306+msgid "Enter your passcode"
307+msgstr ""
308+
309+#: qml/Shell.qml:283
310+msgid "Sorry, incorrect passcode"
311+msgstr ""
312+
313+#: qml/Shell.qml:286
314+#, qt-format
315+msgid "Enter your %1"
316+msgstr ""
317+
318+#: qml/Shell.qml:287
319+#, qt-format
320+msgid "Sorry, incorrect %1"
321+msgstr ""
322+
323+#: qml/Shell.qml:323
324+msgid "Sorry, incorrect passphrase."
325+msgstr ""
326+
327+#: qml/Shell.qml:324
328+msgid "Sorry, incorrect passcode."
329+msgstr ""
330+
331+#: qml/Shell.qml:325
332+msgid "This will be your last attempt."
333+msgstr ""
334+
335+#: qml/Shell.qml:327
336+msgid ""
337+"If passphrase is entered incorrectly, your phone will conduct a factory "
338+"reset and all personal data will be deleted."
339+msgstr ""
340+
341+#: qml/Shell.qml:328
342+msgid ""
343+"If passcode is entered incorrectly, your phone will conduct a factory reset "
344+"and all personal data will be deleted."
345+msgstr ""
po/sv.po+56−52
@@ -8,17 +8,17 @@ msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2014-08-26 18:24+0200\n"
10"POT-Creation-Date: 2014-08-26 18:24+0200\n"
11−"PO-Revision-Date: 2014-08-14 18:22+0000\n"
11+"PO-Revision-Date: 2014-09-08 15:57+0000\n"
12−"Last-Translator: Erik Simmesgård <Unknown>\n"
12+"Last-Translator: Josef Andersson <Unknown>\n"
13"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
13"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-08-28 06:30+0000\n"
17+"X-Launchpad-Export-Date: 2014-09-10 08:02+0000\n"
18−"X-Generator: Launchpad (build 17174)\n"
18+"X-Generator: Launchpad (build 17196)\n"
19"Language: sv\n"
19"Language: sv\n"
20
20
21−#: plugins/LightDM/Greeter.cpp:129
21+#: plugins/LightDM/Greeter.cpp:130
22msgid "Password: "
22msgid "Password: "
23msgstr "Lösenord: "
23msgstr "Lösenord: "
24
24
@@ -33,53 +33,55 @@ msgstr "Släpp genväg"
33
33
34#: qml/Components/Dialogs.qml:70
34#: qml/Components/Dialogs.qml:70
35msgid "Log out"
35msgid "Log out"
36−msgstr ""
36+msgstr "Logga ut"
37
37
38#: qml/Components/Dialogs.qml:71
38#: qml/Components/Dialogs.qml:71
39msgid "Are you sure you want to log out?"
39msgid "Are you sure you want to log out?"
40−msgstr ""
40+msgstr "Är du säker på att du vill logga ut?"
41
41
42#: qml/Components/Dialogs.qml:73 qml/Components/Dialogs.qml:97
42#: qml/Components/Dialogs.qml:73 qml/Components/Dialogs.qml:97
43#: qml/Components/Dialogs.qml:122
43#: qml/Components/Dialogs.qml:122
44msgid "No"
44msgid "No"
45−msgstr ""
45+msgstr "Nej"
46
46
47#: qml/Components/Dialogs.qml:80 qml/Components/Dialogs.qml:104
47#: qml/Components/Dialogs.qml:80 qml/Components/Dialogs.qml:104
48#: qml/Components/Dialogs.qml:129
48#: qml/Components/Dialogs.qml:129
49msgid "Yes"
49msgid "Yes"
50−msgstr ""
50+msgstr "Ja"
51
51
52#: qml/Components/Dialogs.qml:94
52#: qml/Components/Dialogs.qml:94
53msgid "Shut down"
53msgid "Shut down"
54−msgstr ""
54+msgstr "Stäng av"
55
55
56#: qml/Components/Dialogs.qml:95
56#: qml/Components/Dialogs.qml:95
57msgid "Are you sure you want to shut down?"
57msgid "Are you sure you want to shut down?"
58−msgstr ""
58+msgstr "Är du säker på att du vill stänga av?"
59
59
60#: qml/Components/Dialogs.qml:119
60#: qml/Components/Dialogs.qml:119
61msgid "Reboot"
61msgid "Reboot"
62−msgstr ""
62+msgstr "Starta om"
63
63
64#: qml/Components/Dialogs.qml:120
64#: qml/Components/Dialogs.qml:120
65msgid "Are you sure you want to reboot?"
65msgid "Are you sure you want to reboot?"
66−msgstr ""
66+msgstr "Är du säker på att du vill starta om?"
67
67
68#: qml/Components/Dialogs.qml:144
68#: qml/Components/Dialogs.qml:144
69msgid "Power"
69msgid "Power"
70−msgstr ""
70+msgstr "Ström"
71
71
72#: qml/Components/Dialogs.qml:145
72#: qml/Components/Dialogs.qml:145
73msgid ""
73msgid ""
74"Are you sure you would like\n"
74"Are you sure you would like\n"
75"to power off?"
75"to power off?"
76msgstr ""
76msgstr ""
77+"Är du säker på att du vill \n"
78+"stänga av?"
77
79
78−#: qml/Components/Dialogs.qml:144
80+#: qml/Components/Dialogs.qml:147
79msgid "Power off"
81msgid "Power off"
80−msgstr ""
82+msgstr "Stäng av"
81
83
82−#: qml/Components/Dialogs.qml:162
84+#: qml/Components/Dialogs.qml:157
83msgid "Cancel"
85msgid "Cancel"
84msgstr "Avbryt"
86msgstr "Avbryt"
85
87
@@ -137,7 +139,7 @@ msgstr "Var god vänta"
137
139
138#: qml/Components/Lockscreen.qml:172
140#: qml/Components/Lockscreen.qml:172
139msgid "Too many incorrect attempts"
141msgid "Too many incorrect attempts"
140−msgstr ""
142+msgstr "För många felaktiga försök"
141
143
142#: qml/Components/Lockscreen.qml:206
144#: qml/Components/Lockscreen.qml:206
143msgid "Emergency Call"
145msgid "Emergency Call"
@@ -164,21 +166,22 @@ msgstr "Visa mindre"
164msgid "See all"
166msgid "See all"
165msgstr "Visa alla"
167msgstr "Visa alla"
166
168
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
168msgid "Search"
171msgid "Search"
169msgstr "Sök"
172msgstr "Sök"
170
173
171#: qml/Dash/PageHeader.qml:270
174#: qml/Dash/PageHeader.qml:270
172msgid "Settings"
175msgid "Settings"
173−msgstr ""
176+msgstr "Inställningar"
174
177
175#: qml/Dash/PageHeader.qml:279
178#: qml/Dash/PageHeader.qml:279
176msgid "Remove from Favorites"
179msgid "Remove from Favorites"
177−msgstr ""
180+msgstr "Ta bort från Favoriter"
178
181
179#: qml/Dash/PageHeader.qml:279
182#: qml/Dash/PageHeader.qml:279
180msgid "Add to Favorites"
183msgid "Add to Favorites"
181−msgstr ""
184+msgstr "Lägg till Favoriter"
182
185
183#: qml/Dash/Previews/PreviewActionCombo.qml:34
186#: qml/Dash/Previews/PreviewActionCombo.qml:34
184msgid "More..."
187msgid "More..."
@@ -202,15 +205,15 @@ msgstr "Skicka"
202
205
203#: qml/Dash/ScopesOverview.qml:201
206#: qml/Dash/ScopesOverview.qml:201
204msgid "Manage Dash"
207msgid "Manage Dash"
205−msgstr ""
208+msgstr "Hantera Dash"
206
209
207−#: qml/Dash/ScopesOverview.qml:408
210+#: qml/Dash/ScopesOverview.qml:417
208msgid "Done"
211msgid "Done"
209−msgstr ""
212+msgstr "Klar"
210
213
211−#: qml/Dash/ScopesOverview.qml:434
214+#: qml/Dash/ScopesOverview.qml:443
212msgid "Store"
215msgid "Store"
213−msgstr ""
216+msgstr "Butik"
214
217
215#: qml/Dash/ScopesOverviewTab.qml:36
218#: qml/Dash/ScopesOverviewTab.qml:36
216msgid "Favorites"
219msgid "Favorites"
@@ -218,13 +221,13 @@ msgstr "Favoriter"
218
221
219#: qml/Dash/ScopesOverviewTab.qml:54
222#: qml/Dash/ScopesOverviewTab.qml:54
220msgid "All"
223msgid "All"
221−msgstr ""
224+msgstr "Alla"
222
225
223#: qml/Greeter/Greeter.qml:157
226#: qml/Greeter/Greeter.qml:157
224msgid "Swipe to unlock"
227msgid "Swipe to unlock"
225msgstr "Svep för att låsa upp"
228msgstr "Svep för att låsa upp"
226
229
227−#: qml/Hud/HudParametrizedActionsPage.qml:132
230+#: qml/Hud/HudParametrizedActionsPage.qml:139
228msgid "Confirm"
231msgid "Confirm"
229msgstr "Bekräfta"
232msgstr "Bekräfta"
230
233
@@ -250,11 +253,11 @@ msgstr "Visa lösenord"
250
253
251#: qml/Notifications/NotificationMenuItemFactory.qml:120
254#: qml/Notifications/NotificationMenuItemFactory.qml:120
252msgid "Enter SIM PIN"
255msgid "Enter SIM PIN"
253−msgstr ""
256+msgstr "Ange SIM PIN-kod"
254
257
255−#: qml/Notifications/NotificationMenuItemFactory.qml:121 qml/Shell.qml:270
258+#: qml/Notifications/NotificationMenuItemFactory.qml:121
256msgid "Sorry, incorrect PIN"
259msgid "Sorry, incorrect PIN"
257−msgstr ""
260+msgstr "Felaktig PIN"
258
261
259#: qml/Panel/ActiveCallHint.qml:77
262#: qml/Panel/ActiveCallHint.qml:77
260msgid "Tap to return to call..."
263msgid "Tap to return to call..."
@@ -296,55 +299,56 @@ msgstr "Lås upp SIM-kort"
296msgid "Roaming"
299msgid "Roaming"
297msgstr "Roaming"
300msgstr "Roaming"
298
301
299−#: qml/Shell.qml:266
302+#: qml/Shell.qml:279
300msgid "Enter your passphrase"
303msgid "Enter your passphrase"
301−msgstr ""
304+msgstr "Ange din lösenfras"
302
305
303−#: qml/Shell.qml:267
306+#: qml/Shell.qml:280
304msgid "Sorry, incorrect passphrase"
307msgid "Sorry, incorrect passphrase"
305−msgstr ""
308+msgstr "Felaktig lösenfras"
306
309
307#: qml/Shell.qml:282
310#: qml/Shell.qml:282
308msgid "Enter your passcode"
311msgid "Enter your passcode"
309−msgstr ""
312+msgstr "Ange din lösenkod"
310
313
311#: qml/Shell.qml:283
314#: qml/Shell.qml:283
312msgid "Sorry, incorrect passcode"
315msgid "Sorry, incorrect passcode"
313−msgstr ""
316+msgstr "Felaktig lösenkod"
314
317
315−#: qml/Shell.qml:273
318+#: qml/Shell.qml:286
316#, qt-format
319#, qt-format
317msgid "Enter your %1"
320msgid "Enter your %1"
318msgstr "Skriv in din %1"
321msgstr "Skriv in din %1"
319
322
320−#: qml/Shell.qml:274
323+#: qml/Shell.qml:287
321#, qt-format
324#, qt-format
322msgid "Sorry, incorrect %1"
325msgid "Sorry, incorrect %1"
323−msgstr ""
326+msgstr "Felaktig %1"
324
327
325−#: qml/Shell.qml:310
328+#: qml/Shell.qml:323
326msgid "Sorry, incorrect passphrase."
329msgid "Sorry, incorrect passphrase."
327−msgstr ""
330+msgstr "Felaktig lösenfras."
328
331
329−#: qml/Shell.qml:311
332+#: qml/Shell.qml:324
330msgid "Sorry, incorrect passcode."
333msgid "Sorry, incorrect passcode."
331−msgstr ""
334+msgstr "Felaktig lösenkod."
332
335
333−#: qml/Shell.qml:312
336+#: qml/Shell.qml:325
334msgid "This will be your last attempt."
337msgid "This will be your last attempt."
335−msgstr ""
338+msgstr "Detta är ditt sista försök."
336
339
337−#: qml/Shell.qml:314
340+#: qml/Shell.qml:327
338msgid ""
341msgid ""
339"If passphrase is entered incorrectly, your phone will conduct a factory "
342"If passphrase is entered incorrectly, your phone will conduct a factory "
340"reset and all personal data will be deleted."
343"reset and all personal data will be deleted."
341msgstr ""
344msgstr ""
345+"Om lösenfrasen anges inkorrekt kommer telefonen att fabrikåterställas och "
346+"all personlig data kommer att tas bort."
342
347
343−#: qml/Shell.qml:315
348+#: qml/Shell.qml:328
344msgid ""
349msgid ""
345"If passcode is entered incorrectly, your phone will conduct a factory reset "
350"If passcode is entered incorrectly, your phone will conduct a factory reset "
346"and all personal data will be deleted."
351"and all personal data will be deleted."
347msgstr ""
352msgstr ""
348−
353+"Om lösenkoden anges felaktigt kommer telefonen att fabrikåterställas och all "
349−#~ msgid "Restart"
354+"personlig data kommer att tas bort."
350−#~ msgstr "Starta om"
qml/Components/Background.qml+1−1
@@ -78,7 +78,7 @@ Loader {
78 Image {
78 Image {
79 objectName: "image"
79 objectName: "image"
80
80
81− source: width > 0 && height > 0 && root.style
81+ source: width > 0 && height > 0 && root.style || ""
82
82
83 sourceSize.width: width
83 sourceSize.width: width
84 sourceSize.height: height
84 sourceSize.height: height
qml/Dash/CardTool.qml+7−10
@@ -169,19 +169,16 @@ Item {
169
169
170 Item {
170 Item {
171 id: attributesModel
171 id: attributesModel
172− property int numOfAttributes: 0
172+ property int numOfAttributes: {
173− property var model: []
174− property bool hasAttributes: {
175 var attributes = components["attributes"];
173 var attributes = components["attributes"];
176− var hasAttributesFlag = (attributes != undefined) && attributes["field"];
174+ if ((attributes != undefined) && attributes["field"]) {
177−
178− if (hasAttributesFlag) {
179 if (attributes["max-count"]) {
175 if (attributes["max-count"]) {
180− numOfAttributes = attributes["max-count"];
176+ return attributes["max-count"];
181 }
177 }
182 }
178 }
183− return hasAttributesFlag
179+ return 0;
184 }
180 }
181+ property var model: []
185
182
186 onNumOfAttributesChanged: {
183 onNumOfAttributesChanged: {
187 model = []
184 model = []
@@ -195,8 +192,8 @@ Item {
195 id: cardLoader
192 id: cardLoader
196 property var fields: ["art", "mascot", "title", "subtitle", "summary", "attributes"]
193 property var fields: ["art", "mascot", "title", "subtitle", "summary", "attributes"]
197 property var maxData: {
194 property var maxData: {
198− "art": Qt.resolvedUrl("graphics/checkers.png"),
195+ "art": Qt.resolvedUrl("graphics/pixel.png"),
199− "mascot": Qt.resolvedUrl("graphics/checkers.png"),
196+ "mascot": Qt.resolvedUrl("graphics/pixel.png"),
200 "title": "—\n—",
197 "title": "—\n—",
201 "subtitle": "—",
198 "subtitle": "—",
202 "summary": "—\n—\n—\n—\n—",
199 "summary": "—\n—\n—\n—\n—",
qml/Dash/Dash.qml+12−1
@@ -34,7 +34,17 @@ Showable {
34 DashCommunicatorService {
34 DashCommunicatorService {
35 objectName: "dashCommunicatorService"
35 objectName: "dashCommunicatorService"
36 onSetCurrentScopeRequested: {
36 onSetCurrentScopeRequested: {
37+ if (!isSwipe || !window.active || overviewController.progress != 0) {
38+ if (overviewController.progress != 0 && window.active) animate = false;
37− dash.setCurrentScope(scopeId, animate, reset)
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+ }
38 }
48 }
39 }
49 }
40
50
@@ -344,6 +354,7 @@ Showable {
344 enabled: !dashContent.subPageShown &&
354 enabled: !dashContent.subPageShown &&
345 dashContent.currentScope &&
355 dashContent.currentScope &&
346 dashContent.currentScope.searchQuery == "" &&
356 dashContent.currentScope.searchQuery == "" &&
357+ !scopeItem.subPageShown &&
347 (overviewController.progress == 0 || dragging)
358 (overviewController.progress == 0 || dragging)
348
359
349 readonly property real fullMovement: units.gu(20)
360 readonly property real fullMovement: units.gu(20)
qml/Dash/DashApplication.qml−6
@@ -24,12 +24,6 @@ MainView {
24
24
25 useDeprecatedToolbar: false
25 useDeprecatedToolbar: false
26
26
27− Binding {
28− target: i18n
29− property: "domain"
30− value: "unity8"
31− }
32−
33 Dash {
27 Dash {
34 anchors.fill: parent
28 anchors.fill: parent
35 }
29 }
qml/Dash/GenericScopeView.qml+1−2
@@ -25,7 +25,7 @@ import "../Components/ListItems" as ListItems
25FocusScope {
25FocusScope {
26 id: scopeView
26 id: scopeView
27
27
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
29 property var scope: null
29 property var scope: null
30 property SortFilterProxyModel categories: categoryFilter
30 property SortFilterProxyModel categories: categoryFilter
31 property bool isCurrent: false
31 property bool isCurrent: false
@@ -160,7 +160,6 @@ FocusScope {
160 model: scopeView.categories
160 model: scopeView.categories
161 forceNoClip: subPageLoader.open
161 forceNoClip: subPageLoader.open
162 pixelAligned: true
162 pixelAligned: true
163− interactive: !navigationShown
164
163
165 property Item expandedCategoryItem: null
164 property Item expandedCategoryItem: null
166
165
qml/Dash/PageHeader.qml+19−14
@@ -64,9 +64,12 @@ Item {
64 }
64 }
65 }
65 }
66
66
67− function closePopup() {
67+ function closePopup(keepFocus) {
68 if (headerContainer.popover != null) {
68 if (headerContainer.popover != null) {
69+ headerContainer.popover.unfocusOnDestruction = !keepFocus;
69 PopupUtils.close(headerContainer.popover);
70 PopupUtils.close(headerContainer.popover);
71+ } else if (!keepFocus) {
72+ unfocus();
70 }
73 }
71 }
74 }
72
75
@@ -74,11 +77,8 @@ Item {
74 if (searchHistory) {
77 if (searchHistory) {
75 searchHistory.addQuery(searchTextField.text);
78 searchHistory.addQuery(searchTextField.text);
76 }
79 }
77− if (!keepFocus) {
78− unfocus();
79− }
80 searchTextField.text = "";
80 searchTextField.text = "";
81− closePopup();
81+ closePopup(keepFocus);
82 }
82 }
83
83
84 function unfocus() {
84 function unfocus() {
@@ -102,7 +102,7 @@ Item {
102 }
102 }
103
103
104 function refreshLogo() {
104 function refreshLogo() {
105− if (scopeStyle ? scopeStyle.headerLogo != "" : false) {
105+ if (root.scopeStyle ? root.scopeStyle.headerLogo != "" : false) {
106 header.contents = imageComponent.createObject();
106 header.contents = imageComponent.createObject();
107 } else if (header.contents) {
107 } else if (header.contents) {
108 header.contents.destroy();
108 header.contents.destroy();
@@ -119,11 +119,10 @@ Item {
119 anchors { fill: parent; margins: units.gu(1); bottomMargin: units.gu(3) + bottomContainer.height }
119 anchors { fill: parent; margins: units.gu(1); bottomMargin: units.gu(3) + bottomContainer.height }
120 visible: headerContainer.showSearch
120 visible: headerContainer.showSearch
121 onPressed: {
121 onPressed: {
122− closePopup();
122+ closePopup(/* keepFocus */false);
123 if (!searchTextField.text) {
123 if (!searchTextField.text) {
124 headerContainer.showSearch = false;
124 headerContainer.showSearch = false;
125 }
125 }
126− searchTextField.focus = false;
127 mouse.accepted = false;
126 mouse.accepted = false;
128 }
127 }
129 }
128 }
@@ -228,7 +227,7 @@ Item {
228
227
229 onTextChanged: {
228 onTextChanged: {
230 if (text != "") {
229 if (text != "") {
231− closePopup();
230+ closePopup(/* keepFocus */true);
232 }
231 }
233 }
232 }
234 }
233 }
@@ -310,8 +309,13 @@ Item {
310 id: popover
309 id: popover
311 autoClose: false
310 autoClose: false
312
311
312+ property bool unfocusOnDestruction: false
313+
313 Component.onDestruction: {
314 Component.onDestruction: {
314 headerContainer.popover = null;
315 headerContainer.popover = null;
316+ if (unfocusOnDestruction) {
317+ root.unfocus();
318+ }
315 }
319 }
316
320
317 Column {
321 Column {
@@ -332,8 +336,7 @@ Item {
332 onClicked: {
336 onClicked: {
333 searchHistory.addQuery(text);
337 searchHistory.addQuery(text);
334 searchTextField.text = text;
338 searchTextField.text = text;
335− closePopup();
339+ closePopup(/* keepFocus */false);
336− unfocus();
337 }
340 }
338 }
341 }
339 }
342 }
@@ -350,7 +353,7 @@ Item {
350 bottom: bottomContainer.top
353 bottom: bottomContainer.top
351 }
354 }
352
355
353− color: scopeStyle ? scopeStyle.headerDividerColor : "#e0e0e0"
356+ color: root.scopeStyle ? root.scopeStyle.headerDividerColor : "#e0e0e0"
354
357
355 Rectangle {
358 Rectangle {
356 anchors {
359 anchors {
@@ -404,8 +407,10 @@ Item {
404 Qt.lighter(Qt.rgba(bottomItem.background.topColor.r,
407 Qt.lighter(Qt.rgba(bottomItem.background.topColor.r,
405 bottomItem.background.topColor.g,
408 bottomItem.background.topColor.g,
406 bottomItem.background.topColor.b, 1.0), 1.2);
409 bottomItem.background.topColor.b, 1.0), 1.2);
407− } else if (!bottomItem && scopeStyle) {
410+ } else if (!bottomItem && root.scopeStyle) {
408− Qt.lighter(Qt.rgba(scopeStyle.background.r, scopeStyle.background.g, scopeStyle.background.b, 1.0), 1.2);
411+ Qt.lighter(Qt.rgba(root.scopeStyle.background.r,
412+ root.scopeStyle.background.g,
413+ root.scopeStyle.background.b, 1.0), 1.2);
409 } else "#CCFFFFFF"
414 } else "#CCFFFFFF"
410 }
415 }
411 }
416 }
qml/Dash/PreviewListView.qml+2−2
@@ -45,7 +45,7 @@ Item {
45 id: header
45 id: header
46 objectName: "pageHeader"
46 objectName: "pageHeader"
47 width: parent.width
47 width: parent.width
48− title: scope ? scope.name : ""
48+ title: root.scope ? root.scope.name : ""
49 showBackButton: true
49 showBackButton: true
50 searchEntryEnabled: false
50 searchEntryEnabled: false
51 scopeStyle: root.scopeStyle
51 scopeStyle: root.scopeStyle
@@ -79,7 +79,7 @@ Item {
79 if (previewListView.currentItem && previewListView.currentItem.previewData !== undefined) {
79 if (previewListView.currentItem && previewListView.currentItem.previewData !== undefined) {
80 previewListView.currentItem.previewData.cancelAction();
80 previewListView.currentItem.previewData.cancelAction();
81 }
81 }
82− scope.cancelActivation();
82+ root.scope.cancelActivation();
83 model = undefined;
83 model = undefined;
84 }
84 }
85 }
85 }
qml/Dash/Previews/PreviewPayments.qml+2
@@ -49,6 +49,7 @@ PreviewWidget {
49
49
50 Payments {
50 Payments {
51 id: paymentClient
51 id: paymentClient
52+ objectName: "paymentClient"
52
53
53 property var source: widgetData["source"]
54 property var source: widgetData["source"]
54
55
@@ -59,6 +60,7 @@ PreviewWidget {
59 root.triggered(widgetId, "purchaseCompleted", source);
60 root.triggered(widgetId, "purchaseCompleted", source);
60 }
61 }
61 onPurchaseError: {
62 onPurchaseError: {
63+ paymentButton.opacity = 1;
62 root.triggered(widgetId, "purchaseError", source);
64 root.triggered(widgetId, "purchaseError", source);
63 }
65 }
64 }
66 }
qml/Dash/ScopesOverview.qml+6
@@ -386,6 +386,7 @@ Item {
386
386
387 Rectangle {
387 Rectangle {
388 id: bottomBar
388 id: bottomBar
389+ objectName: "bottomBar"
389 color: "black"
390 color: "black"
390 height: units.gu(8)
391 height: units.gu(8)
391 width: parent.width
392 width: parent.width
@@ -400,6 +401,11 @@ Item {
400 }
401 }
401 }
402 }
402
403
404+ MouseArea {
405+ // Just eat any other press since this parent is black opaque
406+ anchors.fill: parent
407+ }
408+
403 AbstractButton {
409 AbstractButton {
404 objectName: "scopesOverviewDoneButton"
410 objectName: "scopesOverviewDoneButton"
405 width: Math.max(label.width + units.gu(2), units.gu(10))
411 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 {
39 property bool fullscreen: false
39 property bool fullscreen: false
40 property int maxHeight
40 property int maxHeight
41 property int margins
41 property int margins
42− property Gradient greenGradient : Gradient {
42+ readonly property color red: "#fc4949"
43− GradientStop { position: 0.0; color: "#3fb24f" }
43+ readonly property color green: "#3fb24f"
44− GradientStop { position: 1.0; color: "#3fb24f" }
44+ readonly property color sdLightGrey: "#eaeaea"
45− }
45+ readonly property color sdDarkGrey: "#dddddd"
46− property Gradient darkgreyGradient: Gradient {
46+ readonly property color sdFontColor: "#5d5d5d"
47− GradientStop { position: 0.0; color: "#4d4745" }
47+ readonly property real contentSpacing: units.gu(2)
48− GradientStop { position: 1.0; color: "#4d4745" }
49− }
50
48
51 objectName: "background"
49 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
53
51
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)
55 opacity: 1 // FIXME: 1 because of LP: #1354406 workaround, has to be 0 really
53 opacity: 1 // FIXME: 1 because of LP: #1354406 workaround, has to be 0 really
56
54
57 state: {
55 state: {
@@ -107,7 +105,7 @@ Item {
107 states:[
105 states:[
108 State {
106 State {
109 name: "contracted"
107 name: "contracted"
110− PropertyChanges {target: notification; height: units.gu(8)}
108+ PropertyChanges {target: notification; height: units.gu(10)}
111 },
109 },
112 State {
110 State {
113 name: "expanded"
111 name: "expanded"
@@ -131,6 +129,7 @@ Item {
131 color: parent.color
129 color: parent.color
132 opacity: parent.opacity
130 opacity: parent.opacity
133 radius: "medium"
131 radius: "medium"
132+ borderSource: "none"
134 }
133 }
135
134
136 Rectangle {
135 Rectangle {
@@ -199,50 +198,41 @@ Item {
199 }
198 }
200
199
201 Column {
200 Column {
202− id: contentColumn
201+ id: outterColumn
203− objectName: "contentColumn"
204
202
205 anchors {
203 anchors {
206 left: parent.left
204 left: parent.left
207 right: parent.right
205 right: parent.right
208 top: parent.top
206 top: parent.top
209− margins: fullscreen ? 0 : spacing
207+ margins: 0
208+ topMargin: fullscreen ? 0 : units.gu(2)
210 }
209 }
211
210
212− spacing: units.gu(1)
211+ spacing: units.gu(2)
213
212
214 Row {
213 Row {
215 id: topRow
214 id: topRow
216
215
217− spacing: contentColumn.spacing
216+ spacing: contentSpacing
218 anchors {
217 anchors {
219 left: parent.left
218 left: parent.left
220 right: parent.right
219 right: parent.right
220+ margins: contentSpacing
221 }
221 }
222
222
223 ShapedIcon {
223 ShapedIcon {
224 id: icon
224 id: icon
225
225
226 objectName: "icon"
226 objectName: "icon"
227− width: units.gu(6)
227+ width: type == Notification.Ephemeral && !bodyLabel.visible ? units.gu(3) : units.gu(6)
228− height: units.gu(6)
228+ height: width
229 shaped: notification.hints["x-canonical-non-shaped-icon"] == "true" ? false : true
229 shaped: notification.hints["x-canonical-non-shaped-icon"] == "true" ? false : true
230 visible: iconSource !== undefined && iconSource != ""
230 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+ }
242
232
243 Column {
233 Column {
244 id: labelColumn
234 id: labelColumn
245− width: parent.width - x
235+ width: secondaryIcon.visible ? parent.width - x - units.gu(4.5) : parent.width - x
246
236
247 anchors.verticalCenter: (icon.visible && !bodyLabel.visible) ? icon.verticalCenter : undefined
237 anchors.verticalCenter: (icon.visible && !bodyLabel.visible) ? icon.verticalCenter : undefined
248
238
@@ -255,8 +245,7 @@ Item {
255 right: parent.right
245 right: parent.right
256 }
246 }
257 fontSize: "medium"
247 fontSize: "medium"
258− font.bold: true
259− color: Theme.palette.selected.backgroundText
248+ color: type == Notification.SnapDecision ? sdFontColor : Theme.palette.selected.backgroundText
260 elide: Text.ElideRight
249 elide: Text.ElideRight
261 textFormat: Text.PlainText
250 textFormat: Text.PlainText
262 }
251 }
@@ -271,14 +260,27 @@ Item {
271 }
260 }
272 visible: body != ""
261 visible: body != ""
273 fontSize: "small"
262 fontSize: "small"
274− color: Theme.palette.selected.backgroundText
263+ color: type == Notification.SnapDecision ? sdFontColor : Theme.palette.selected.backgroundText
275− opacity: 0.6
276 wrapMode: Text.WordWrap
264 wrapMode: Text.WordWrap
277− maximumLineCount: 10
265+ maximumLineCount: 2
278 elide: Text.ElideRight
266 elide: Text.ElideRight
279 textFormat: Text.PlainText
267 textFormat: Text.PlainText
280 }
268 }
281 }
269 }
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
282 }
284 }
283
285
284 Column {
286 Column {
@@ -321,6 +323,74 @@ Item {
321 }
323 }
322 }
324 }
323
325
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+
324 Row {
394 Row {
325 id: buttonRow
395 id: buttonRow
326
396
@@ -328,9 +398,10 @@ Item {
328 anchors {
398 anchors {
329 left: parent.left
399 left: parent.left
330 right: parent.right
400 right: parent.right
401+ margins: contentSpacing
331 }
402 }
332− visible: notification.type == Notification.SnapDecision && actionRepeater.count > 0
403+ visible: notification.type == Notification.SnapDecision && actionRepeater.count > 0 && !oneOverTwoCase.visible
333− spacing: units.gu(1)
404+ spacing: units.gu(2)
334 layoutDirection: Qt.RightToLeft
405 layoutDirection: Qt.RightToLeft
335
406
336 Repeater {
407 Repeater {
@@ -347,10 +418,19 @@ Item {
347 id: actionButton
418 id: actionButton
348
419
349 Button {
420 Button {
350− objectName: "button" + index
421+ objectName: "notify_button" + index
351− width: buttonRow.width / 2 - spacing
422+ width: buttonRow.width / 2 - spacing*2
352 text: loader.actionLabel
423 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+ }
354 onClicked: notification.notification.invokeAction(loader.actionId)
434 onClicked: notification.notification.invokeAction(loader.actionId)
355 }
435 }
356 }
436 }
@@ -362,10 +442,16 @@ Item {
362 ComboButton {
442 ComboButton {
363 id: comboButton
443 id: comboButton
364
444
365− objectName: "button2"
445+ objectName: "notify_button2"
366 width: parent.width
446 width: parent.width
447+ anchors {
448+ left: parent.left
449+ right: parent.right
450+ margins: contentSpacing
451+ }
452+
367− visible: notification.type == Notification.SnapDecision && actionRepeater.count > 3
453+ visible: notification.type == Notification.SnapDecision && actionRepeater.count > 3 && !oneOverTwoCase.visible
368− gradient: darkgreyGradient
454+ color: sdDarkGrey
369 onClicked: notification.notification.invokeAction(comboRepeater.itemAt(2).actionId)
455 onClicked: notification.notification.invokeAction(comboRepeater.itemAt(2).actionId)
370 expanded: false
456 expanded: false
371 expandedHeight: (comboRepeater.count - 2) * units.gu(4) + units.gu(.5)
457 expandedHeight: (comboRepeater.count - 2) * units.gu(4) + units.gu(.5)
@@ -399,7 +485,7 @@ Item {
399 MouseArea {
485 MouseArea {
400 id: comboInputArea
486 id: comboInputArea
401
487
402− objectName: "button" + index
488+ objectName: "notify_button" + index
403 width: comboButton.width
489 width: comboButton.width
404 height: comboIcon.height + units.gu(2)
490 height: comboIcon.height + units.gu(2)
405
491
@@ -421,7 +507,7 @@ Item {
421 }
507 }
422 width: units.gu(2)
508 width: units.gu(2)
423 height: units.gu(2)
509 height: units.gu(2)
424− color: "white"
510+ color: sdFontColor
425 name: splitLabel[2]
511 name: splitLabel[2]
426 }
512 }
427
513
@@ -434,7 +520,7 @@ Item {
434 verticalCenter: comboIcon.verticalCenter
520 verticalCenter: comboIcon.verticalCenter
435 }
521 }
436 fontSize: "small"
522 fontSize: "small"
437− color: "white"
523+ color: sdFontColor
438 text: splitLabel[3]
524 text: splitLabel[3]
439 }
525 }
440 }
526 }
qml/Notifications/NotificationMenuItemFactory.qml+4
@@ -55,6 +55,7 @@ Loader {
55 anchors {
55 anchors {
56 left: parent.left
56 left: parent.left
57 right: parent.right
57 right: parent.right
58+ margins: spacing
58 }
59 }
59
60
60 Component.onCompleted: {
61 Component.onCompleted: {
@@ -65,6 +66,7 @@ Loader {
65
66
66 Label {
67 Label {
67 text: menuData.label
68 text: menuData.label
69+ color: notification.sdFontColor
68 }
70 }
69
71
70 TextField {
72 TextField {
@@ -98,11 +100,13 @@ Loader {
98 id: checkBox
100 id: checkBox
99
101
100 checked: false
102 checked: false
103+ activeFocusOnPress: false
101 }
104 }
102
105
103 Label {
106 Label {
104 anchors.verticalCenter: checkBox.verticalCenter
107 anchors.verticalCenter: checkBox.verticalCenter
105 text: i18n.tr("Show password")
108 text: i18n.tr("Show password")
109+ color: notification.sdFontColor
106 }
110 }
107 }
111 }
108 }
112 }
qml/Notifications/Notifications.qml+1−1
@@ -33,7 +33,7 @@ ListView {
33 id: snapDecisionProxyModel
33 id: snapDecisionProxyModel
34
34
35 model: notificationList.model
35 model: notificationList.model
36− filterRole: UnityNotifications.ModelInterface.RoleType
36+ filterRole: UnityNotifications.ModelInterface != undefined ? UnityNotifications.ModelInterface.RoleType : 0
37 filterRegExp: RegExp(UnityNotifications.Notification.SnapDecision)
37 filterRegExp: RegExp(UnityNotifications.Notification.SnapDecision)
38 }
38 }
39
39
qml/Panel/Indicators/IndicatorsLight.qml+4−7
@@ -27,12 +27,9 @@ QtObject {
27 Component.onDestruction: Lights.state = Lights.Off
27 Component.onDestruction: Lights.state = Lights.Off
28
28
29 // QtObject does not have children
29 // QtObject does not have children
30− property var _connections: Connections {
30+ property var _binding: Binding {
31− id: powerConnection
32−
33− target: Powerd
31+ target: Lights
34− onDisplayPowerStateChange: {
32+ property: "state"
35− Lights.state = (status === Powerd.Off) ? Lights.On : Lights.Off
33+ value: (Powerd.status === Powerd.Off) ? Lights.On : Lights.Off
36− }
37 }
34 }
38}
35}
qml/Shell.qml+9−20
@@ -22,6 +22,7 @@ import Ubuntu.Components 0.1
22import Ubuntu.Components.Popups 1.0
22import Ubuntu.Components.Popups 1.0
23import Ubuntu.Gestures 0.1
23import Ubuntu.Gestures 0.1
24import Ubuntu.SystemImage 0.1
24import Ubuntu.SystemImage 0.1
25+import Ubuntu.Telephony 0.1 as Telephony
25import Unity.Connectivity 0.1
26import Unity.Connectivity 0.1
26import Unity.Launcher 0.1
27import Unity.Launcher 0.1
27import Utils 0.1
28import Utils 0.1
@@ -146,6 +147,7 @@ Item {
146 lockscreen.show();
147 lockscreen.show();
147 }
148 }
148 greeter.hide();
149 greeter.hide();
150+ launcher.hide();
149 }
151 }
150
152
151 onFocusedApplicationIdChanged: {
153 onFocusedApplicationIdChanged: {
@@ -164,6 +166,7 @@ Item {
164 // for an emergency call or accepted an incoming call.
166 // for an emergency call or accepted an incoming call.
165 setFakeActiveForApp(appId)
167 setFakeActiveForApp(appId)
166 }
168 }
169+ launcher.hide();
167 }
170 }
168 }
171 }
169
172
@@ -457,18 +460,9 @@ Item {
457 id: powerConnection
460 id: powerConnection
458 target: Powerd
461 target: Powerd
459
462
460− onDisplayPowerStateChange: {
463+ onStatusChanged: {
461− // We ignore any display-off signals when the proximity sensor
462− // is active. This usually indicates something like a phone call.
463− if (status == Powerd.Off && reason != Powerd.Proximity && !edgeDemo.running) {
464+ if (Powerd.status === Powerd.Off && !callManager.hasCalls && !edgeDemo.running) {
464− greeter.showNow();
465+ greeter.showNow()
465− }
466−
467− // No reason to chew demo CPU when user isn't watching
468− if (status == Powerd.Off) {
469− edgeDemo.paused = true;
470− } else if (status == Powerd.On) {
471− edgeDemo.paused = false;
472 }
466 }
473 }
467 }
474 }
468 }
@@ -544,7 +538,7 @@ Item {
544 onShowDashHome: showHome()
538 onShowDashHome: showHome()
545 onDash: showDash()
539 onDash: showDash()
546 onDashSwipeChanged: {
540 onDashSwipeChanged: {
547− if (dashSwipe && ApplicationManager.focusedApplicationId !== "unity8-dash") {
541+ if (dashSwipe) {
548 dash.setCurrentScope("clickscope", false, true)
542 dash.setCurrentScope("clickscope", false, true)
549 }
543 }
550 }
544 }
@@ -568,7 +562,7 @@ Item {
568 visible: notifications.useModal && !greeter.shown && (notifications.state == "narrow")
562 visible: notifications.useModal && !greeter.shown && (notifications.state == "narrow")
569 color: "#000000"
563 color: "#000000"
570 anchors.fill: parent
564 anchors.fill: parent
571− opacity: 0.5
565+ opacity: 0.9
572
566
573 MouseArea {
567 MouseArea {
574 anchors.fill: parent
568 anchors.fill: parent
@@ -601,12 +595,6 @@ Item {
601 }
595 }
602 }
596 }
603
597
604− Binding {
605− target: i18n
606− property: "domain"
607− value: "unity8"
608− }
609−
610 Dialogs {
598 Dialogs {
611 id: dialogs
599 id: dialogs
612 anchors.fill: parent
600 anchors.fill: parent
@@ -637,6 +625,7 @@ Item {
637 EdgeDemo {
625 EdgeDemo {
638 id: edgeDemo
626 id: edgeDemo
639 z: alphaDisclaimerLabel.z + 10
627 z: alphaDisclaimerLabel.z + 10
628+ paused: Powerd.status === Powerd.Off // Saves power
640 greeter: greeter
629 greeter: greeter
641 launcher: launcher
630 launcher: launcher
642 indicators: panel.indicators
631 indicators: panel.indicators
qml/Stages/ApplicationWindow.qml+3−2
@@ -55,7 +55,8 @@ Item {
55 property bool surfaceInitialized: false
55 property bool surfaceInitialized: false
56
56
57 function forceSurfaceActiveFocusIfReady() {
57 function forceSurfaceActiveFocusIfReady() {
58− if (sessionContainer.surface.focus &&
58+ if (sessionContainer.surface !== null &&
59+ sessionContainer.surface.focus &&
59 sessionContainer.surface.parent === sessionContainer.surfaceContainer &&
60 sessionContainer.surface.parent === sessionContainer.surfaceContainer &&
60 sessionContainer.surface.enabled) {
61 sessionContainer.surface.enabled) {
61 sessionContainer.surface.forceActiveFocus();
62 sessionContainer.surface.forceActiveFocus();
@@ -114,10 +115,10 @@ Item {
114 onSurfaceChanged: {
115 onSurfaceChanged: {
115 if (sessionContainer.surface) {
116 if (sessionContainer.surface) {
116 surfaceInitTimer.start();
117 surfaceInitTimer.start();
118+ d.forceSurfaceActiveFocusIfReady();
117 } else {
119 } else {
118 d.surfaceInitialized = false;
120 d.surfaceInitialized = false;
119 }
121 }
120− d.forceSurfaceActiveFocusIfReady();
121 }
122 }
122 }
123 }
123
124
qml/Stages/PhoneStage.qml+6−1
@@ -44,6 +44,9 @@ Rectangle {
44 }
44 }
45
45
46 onInverseProgressChanged: {
46 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)
47 if (inverseProgress == 0 && priv.oldInverseProgress > 0) {
50 if (inverseProgress == 0 && priv.oldInverseProgress > 0) {
48 // left edge drag released. Minimum distance is given by design.
51 // left edge drag released. Minimum distance is given by design.
49 if (priv.oldInverseProgress > units.gu(22)) {
52 if (priv.oldInverseProgress > units.gu(22)) {
@@ -92,6 +95,7 @@ Rectangle {
92 property var focusedAppDelegate: null
95 property var focusedAppDelegate: null
93
96
94 property real oldInverseProgress: 0
97 property real oldInverseProgress: 0
98+ property bool animateX: true
95
99
96 onFocusedAppIdChanged: focusedAppDelegate = spreadRepeater.itemAt(0);
100 onFocusedAppIdChanged: focusedAppDelegate = spreadRepeater.itemAt(0);
97
101
@@ -311,7 +315,8 @@ Rectangle {
311 Behavior on x {
315 Behavior on x {
312 enabled: root.spreadEnabled &&
316 enabled: root.spreadEnabled &&
313 !spreadView.active &&
317 !spreadView.active &&
314− !snapAnimation.running
318+ !snapAnimation.running &&
319+ priv.animateX
315 UbuntuNumberAnimation {
320 UbuntuNumberAnimation {
316 duration: UbuntuAnimation.FastDuration
321 duration: UbuntuAnimation.FastDuration
317 onRunningChanged: {
322 onRunningChanged: {
qml/Stages/TabletStage.qml+5
@@ -36,6 +36,9 @@ Rectangle {
36 property real inverseProgress: 0 // This is the progress for left edge drags, in pixels.
36 property real inverseProgress: 0 // This is the progress for left edge drags, in pixels.
37
37
38 onInverseProgressChanged: {
38 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)
39 if (inverseProgress == 0 && priv.oldInverseProgress > 0) {
42 if (inverseProgress == 0 && priv.oldInverseProgress > 0) {
40 // left edge drag released. Minimum distance is given by design.
43 // left edge drag released. Minimum distance is given by design.
41 if (priv.oldInverseProgress > units.gu(22)) {
44 if (priv.oldInverseProgress > units.gu(22)) {
@@ -193,6 +196,8 @@ Rectangle {
193 property int draggedDelegateCount: 0
196 property int draggedDelegateCount: 0
194 property int closingIndex: -1
197 property int closingIndex: -1
195
198
199+ property bool animateX: true
200+
196 property bool sideStageDragging: sideStageDragHandle.dragging
201 property bool sideStageDragging: sideStageDragHandle.dragging
197 property real sideStageDragProgress: sideStageDragHandle.progress
202 property real sideStageDragProgress: sideStageDragHandle.progress
198
203
qml/Stages/TransformedTabletSpreadDelegate.qml+2−1
@@ -138,7 +138,8 @@ SpreadDelegate {
138 enabled: !spreadView.active &&
138 enabled: !spreadView.active &&
139 !snapAnimation.running &&
139 !snapAnimation.running &&
140 model.appId !== "unity8-dash" &&
140 model.appId !== "unity8-dash" &&
141− !spreadView.sideStageDragging
141+ !spreadView.sideStageDragging &&
142+ spreadView.animateX
142 UbuntuNumberAnimation {
143 UbuntuNumberAnimation {
143 duration: UbuntuAnimation.FastDuration
144 duration: UbuntuAnimation.FastDuration
144 }
145 }
run_on_device.sh+43−41
@@ -4,8 +4,8 @@ USER=phablet
4USER_ID=32011
4USER_ID=32011
5PACKAGE=unity8
5PACKAGE=unity8
6BINARY=unity8
6BINARY=unity8
7−TARGET_IP=${TARGET_IP-127.0.0.1}
7+TARGET_IP=127.0.0.1
8−TARGET_SSH_PORT=${TARGET_SSH_PORT-2222}
8+TARGET_SSH_PORT=2222
9TARGET_DEBUG_PORT=3768
9TARGET_DEBUG_PORT=3768
10RUN_OPTIONS=-qmljsdebugger=port:$TARGET_DEBUG_PORT
10RUN_OPTIONS=-qmljsdebugger=port:$TARGET_DEBUG_PORT
11SETUP=false
11SETUP=false
@@ -14,18 +14,23 @@ PINLOCK=false
14KEYLOCK=false
14KEYLOCK=false
15NUM_JOBS='$(( `grep -c ^processor /proc/cpuinfo` + 1 ))'
15NUM_JOBS='$(( `grep -c ^processor /proc/cpuinfo` + 1 ))'
16FLIPPED=false
16FLIPPED=false
17−CHROOT_PREFIX="/data/ubuntu"
18SSH_WAS_STARTED=0
17SSH_WAS_STARTED=0
19SSH_STARTED=0
18SSH_STARTED=0
19+PASSWORD=""
20+PASSFILE=""
20
21
21usage() {
22usage() {
22− echo "usage: run_on_device [OPTIONS]\n"
23+ echo "usage: run_on_device -a SUDO_PASSWORD [OPTIONS]"
24+ echo
23− echo "Script to setup a build environment for the shell and sync build and run it on the device\n"
25+ echo "Script to setup a build environment for the shell and sync build and run it on the device"
26+ echo
24 echo "OPTIONS:"
27 echo "OPTIONS:"
28+ echo " -a, --password The sudo password to use"
25− echo " -s, --setup Setup the build environment"
29+ echo " -s, --setup Setup the build environment"
30+ echo " -g, --gdb Run with gdb"
26− echo " -p, --pinlock Enable a PIN lock screen when running"
31+ echo " -p, --pinlock Enable a PIN lock screen when running"
27− echo " -k, --keylock Enable a Keyboard lock screen when running"
32+ echo " -k, --keylock Enable a Keyboard lock screen when running"
28− echo ""
33+ echo
29 echo "IMPORTANT:"
34 echo "IMPORTANT:"
30 echo " * Make sure to have networking setup on the device beforehand."
35 echo " * Make sure to have networking setup on the device beforehand."
31 echo " * Execute that script from a directory containing unity8 code."
36 echo " * Execute that script from a directory containing unity8 code."
@@ -34,7 +39,7 @@ usage() {
34
39
35start_ssh() {
40start_ssh() {
36 if [ $SSH_STARTED -eq 0 ]; then
41 if [ $SSH_STARTED -eq 0 ]; then
37− exec_with_adb initctl start ssh
42+ adb_sudo initctl start ssh
38 SSH_STARTED=1
43 SSH_STARTED=1
39 fi
44 fi
40}
45}
@@ -44,25 +49,13 @@ exec_with_ssh() {
44 ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -t $USER@$TARGET_IP -p $TARGET_SSH_PORT sudo -u $USER -i bash -ic \"$@\"
49 ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -t $USER@$TARGET_IP -p $TARGET_SSH_PORT sudo -u $USER -i bash -ic \"$@\"
45}
50}
46
51
47−exec_with_adb() {
52+adb_sudo() {
48− if $FLIPPED; then
53+ adb shell "SUDO_ASKPASS=${PASSFILE} sudo --askpass $@"
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
58}
54}
59
55
60install_ssh_key() {
56install_ssh_key() {
61− ssh-keygen -R $TARGET_IP
62− HOME_DIR="${CHROOT_PREFIX}/home/phablet"
57+ HOME_DIR="/home/phablet"
63 adb push ~/.ssh/id_rsa.pub $HOME_DIR/.ssh/authorized_keys
58 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
66 adb shell chmod 700 $HOME_DIR/.ssh
59 adb shell chmod 700 $HOME_DIR/.ssh
67 adb shell chmod 600 $HOME_DIR/.ssh/authorized_keys
60 adb shell chmod 600 $HOME_DIR/.ssh/authorized_keys
68}
61}
@@ -73,8 +66,14 @@ setup_adb_forwarding() {
73}
66}
74
67
75install_dependencies() {
68install_dependencies() {
76− exec_with_adb apt-get update
69+ phablet-config writable-image --remotepassword ${PASSWORD} -p build-essential \
77− exec_with_adb apt-get -y --force-yes install build-essential rsync bzr ccache gdb ninja-build devscripts equivs unity-plugin-scopes
70+ -p rsync \
71+ -p bzr \
72+ -p ccache \
73+ -p gdb \
74+ -p ninja-build \
75+ -p devscripts \
76+ -p equivs
78}
77}
79
78
80sync_code() {
79sync_code() {
@@ -108,12 +107,13 @@ run() {
108 exec_with_ssh "start unity8"
107 exec_with_ssh "start unity8"
109}
108}
110
109
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" "$@"`
112
111
113# FIXME: giving incorrect arguments does not call usage and exit
112# FIXME: giving incorrect arguments does not call usage and exit
114while [ $# -gt 0 ]
113while [ $# -gt 0 ]
115do
114do
116 case "$1" in
115 case "$1" in
116+ -a|--password) PASSWORD=$2;;
117 -s|--setup) SETUP=true;;
117 -s|--setup) SETUP=true;;
118 -g|--gdb) GDB=true;;
118 -g|--gdb) GDB=true;;
119 -p|--pinlock) PINLOCK=true;;
119 -p|--pinlock) PINLOCK=true;;
@@ -124,21 +124,21 @@ do
124 shift
124 shift
125done
125done
126
126
127+if [ -z "${PASSWORD}" ]; then
128+ echo "ERROR: You need to provide a sudo password..."
129+ echo
130+ usage
131+fi
127
132
128−adb_root
133+PASSFILE=$( adb shell "FILE=\`mktemp\`
129−[ "${TARGET_IP}" = "127.0.0.1" ] && setup_adb_forwarding
134+ echo \"#!/bin/sh\" > \$FILE
135+ echo \"echo \\\"${PASSWORD}\\\"\" >> \$FILE
136+ chmod +x \$FILE
137+ echo \$FILE" | tr -d '\r' )
130
138
131−if [ "`adb shell 'grep -q Ubuntu /etc/lsb-release 2> /dev/null && echo -n FLIPPED'`" = "FLIPPED" ]; then
139+setup_adb_forwarding
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
140
140
141−status_output=$(exec_with_adb initctl status ssh)
141+status_output=$(adb_sudo initctl status ssh)
142if [[ $status_output == "ssh start/running, process "* ]]; then
142if [[ $status_output == "ssh start/running, process "* ]]; then
143 SSH_WAS_STARTED=1
143 SSH_WAS_STARTED=1
144fi
144fi
@@ -158,6 +158,8 @@ else
158 run
158 run
159fi
159fi
160
160
161+adb shell "rm ${PASSFILE}"
162+
161if [ $SSH_WAS_STARTED -eq 0 ]; then
163if [ $SSH_WAS_STARTED -eq 0 ]; then
162− exec_with_adb initctl stop ssh
164+ adb_sudo initctl stop ssh
163fi
165fi
src/Dash/main.cpp+1
@@ -68,6 +68,7 @@ int main(int argc, const char *argv[])
68 }
68 }
69
69
70 bindtextdomain("unity8", translationDirectory().toUtf8().data());
70 bindtextdomain("unity8", translationDirectory().toUtf8().data());
71+ textdomain("unity8");
71
72
72 QQuickView* view = new QQuickView();
73 QQuickView* view = new QQuickView();
73 view->setResizeMode(QQuickView::SizeRootObjectToView);
74 view->setResizeMode(QQuickView::SizeRootObjectToView);
src/main.cpp+1
@@ -108,6 +108,7 @@ Load the testability driver");
108 }
108 }
109
109
110 bindtextdomain("unity8", translationDirectory().toUtf8().data());
110 bindtextdomain("unity8", translationDirectory().toUtf8().data());
111+ textdomain("unity8");
111
112
112 QQuickView* view = new QQuickView();
113 QQuickView* view = new QQuickView();
113 view->setResizeMode(QQuickView::SizeRootObjectToView);
114 view->setResizeMode(QQuickView::SizeRootObjectToView);
tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py+4−2
@@ -97,7 +97,8 @@ class ApplicationLifecycleTests(tests.ApplicationLifeCycleTestCase):
97 self.assertThat(greeter.created, Eventually(Equals(True)))
97 self.assertThat(greeter.created, Eventually(Equals(True)))
98
98
99 application_name = self.launch_fake_app()
99 application_name = self.launch_fake_app()
100− self.assertThat(greeter.created, Eventually(Equals(False)))
100+ greeter.wait_swiped_away()
101+ process_helpers.unlock_unity()
101 self.assert_current_focused_application(application_name)
102 self.assert_current_focused_application(application_name)
102
103
103 def test_greeter_hides_on_app_focus(self):
104 def test_greeter_hides_on_app_focus(self):
@@ -113,7 +114,8 @@ class ApplicationLifecycleTests(tests.ApplicationLifeCycleTestCase):
113 self.assertThat(greeter.created, Eventually(Equals(True)))
114 self.assertThat(greeter.created, Eventually(Equals(True)))
114
115
115 self.launch_upstart_application(application_name)
116 self.launch_upstart_application(application_name)
116− self.assertThat(greeter.created, Eventually(Equals(False)))
117+ greeter.wait_swiped_away()
118+ process_helpers.unlock_unity()
117 self.assert_current_focused_application(application_name)
119 self.assert_current_focused_application(application_name)
118
120
119 def test_click_dash_icon_must_unfocus_application(self):
121 def test_click_dash_icon_must_unfocus_application(self):
tests/autopilot/unity8/process_helpers.py+12−17
@@ -20,6 +20,7 @@
20import logging
20import logging
21import subprocess
21import subprocess
22import sys
22import sys
23+import dbus
23
24
24# This has to work in both python 3 (ap 1.5) and py2 (ap legacy 1.4.1) so we
25# This has to work in both python 3 (ap 1.5) and py2 (ap legacy 1.4.1) so we
25# pick the correct location in each case. Remove the py2 branch once we no
26# 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):
82 if greeter.created is False:
83 if greeter.created is False:
83 raise RuntimeWarning("Greeter appears to be already unlocked.")
84 raise RuntimeWarning("Greeter appears to be already unlocked.")
84
85
85− # Because of potential input jerkiness under heavy load,
86+ bus = dbus.SessionBus()
86− # retry unlocking the greeter two times.
87+ dbus_proxy = bus.get_object("com.canonical.UnityGreeter", "/")
87− # https://bugs.launchpad.net/ubuntu/+bug/1260113
88−
89− retries = 3
90− while retries > 0:
91− try:
88+ try:
92− greeter.swipe()
89+ dbus_proxy.HideGreeter()
93− except AssertionError:
90+ except dbus.DBusException:
94− retries -= 1
95− if retries == 0:
96− raise
97− logger.info("Failed to unlock greeter, trying again...")
91+ logger.info("Failed to unlock greeter")
92+ raise
98− else:
93+ else:
94+ greeter.created.wait_for(False)
99− logger.info("Greeter unlocked, continuing.")
95+ logger.info("Greeter unlocked, continuing.")
100− break
101
96
102
97
103def lock_unity(unity_proxy_obj=None):
98def lock_unity(unity_proxy_obj=None):
@@ -198,7 +193,7 @@ def get_job_status(name):
198 ], universal_newlines=True)
193 ], universal_newlines=True)
199 except subprocess.CalledProcessError as error:
194 except subprocess.CalledProcessError as error:
200 raise JobError(
195 raise JobError(
201− "Unable to get {}'s status: {}".format(name, error)
196+ "Unable to get {}'s status: {}".format(name, error)
202 )
197 )
203
198
204
199
tests/autopilot/unity8/shell/emulators/greeter.py+4−1
@@ -25,6 +25,9 @@ from unity8.shell.emulators import UnityEmulatorBase
25class Greeter(UnityEmulatorBase):
25class Greeter(UnityEmulatorBase):
26 """An emulator that understands the greeter screen."""
26 """An emulator that understands the greeter screen."""
27
27
28+ def wait_swiped_away(self):
29+ self.showProgress.wait_for(0)
30+
28 def swipe(self):
31 def swipe(self):
29 """Swipe the greeter screen away."""
32 """Swipe the greeter screen away."""
30 self.created.wait_for(True)
33 self.created.wait_for(True)
@@ -37,7 +40,7 @@ class Greeter(UnityEmulatorBase):
37 stop_y = start_y
40 stop_y = start_y
38 self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
41 self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
39
42
40− self.showProgress.wait_for(0)
43+ self.wait_swiped_away()
41
44
42 def get_prompt(self):
45 def get_prompt(self):
43 return self.select_single(
46 return self.select_single(
tests/autopilot/unity8/shell/tests/test_lock_screen.py+8−9
@@ -20,7 +20,6 @@
20
20
21from __future__ import absolute_import
21from __future__ import absolute_import
22
22
23−from unity8.process_helpers import unlock_unity
24from unity8.shell import with_lightdm_mock
23from unity8.shell import with_lightdm_mock
25from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
24from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
26
25
@@ -45,11 +44,11 @@ class TestLockscreen(UnityTestCase):
45 @with_lightdm_mock("single-pin")
44 @with_lightdm_mock("single-pin")
46 def test_can_unlock_pin_screen(self):
45 def test_can_unlock_pin_screen(self):
47 """Must be able to unlock the PIN entry lock screen."""
46 """Must be able to unlock the PIN entry lock screen."""
48− unity_proxy = self.launch_unity()
47+ self.launch_unity()
49 greeter = self.main_window.get_greeter()
48 greeter = self.main_window.get_greeter()
50
49
51 if greeter.narrowMode:
50 if greeter.narrowMode:
52− unlock_unity(unity_proxy)
51+ greeter.swipe()
53 lockscreen = self._wait_for_lockscreen()
52 lockscreen = self._wait_for_lockscreen()
54 self.main_window.enter_pin_code("1234")
53 self.main_window.enter_pin_code("1234")
55 self.assertThat(lockscreen.shown, Eventually(Equals(False)))
54 self.assertThat(lockscreen.shown, Eventually(Equals(False)))
@@ -60,11 +59,11 @@ class TestLockscreen(UnityTestCase):
60 @with_lightdm_mock("single-passphrase")
59 @with_lightdm_mock("single-passphrase")
61 def test_can_unlock_passphrase_screen(self):
60 def test_can_unlock_passphrase_screen(self):
62 """Must be able to unlock the passphrase entry screen."""
61 """Must be able to unlock the passphrase entry screen."""
63− unity_proxy = self.launch_unity()
62+ self.launch_unity()
64 greeter = self.main_window.get_greeter()
63 greeter = self.main_window.get_greeter()
65
64
66 if greeter.narrowMode:
65 if greeter.narrowMode:
67− unlock_unity(unity_proxy)
66+ greeter.swipe()
68 lockscreen = self._wait_for_lockscreen()
67 lockscreen = self._wait_for_lockscreen()
69 self._enter_pin_passphrase("password")
68 self._enter_pin_passphrase("password")
70 self.assertThat(lockscreen.shown, Eventually(Equals(False)))
69 self.assertThat(lockscreen.shown, Eventually(Equals(False)))
@@ -75,11 +74,11 @@ class TestLockscreen(UnityTestCase):
75 @with_lightdm_mock("single-pin")
74 @with_lightdm_mock("single-pin")
76 def test_pin_screen_wrong_code(self):
75 def test_pin_screen_wrong_code(self):
77 """Entering the wrong pin code must not dismiss the lock screen."""
76 """Entering the wrong pin code must not dismiss the lock screen."""
78− unity_proxy = self.launch_unity()
77+ self.launch_unity()
79 greeter = self.main_window.get_greeter()
78 greeter = self.main_window.get_greeter()
80
79
81 if greeter.narrowMode:
80 if greeter.narrowMode:
82− unlock_unity(unity_proxy)
81+ greeter.swipe()
83 lockscreen = self._wait_for_lockscreen()
82 lockscreen = self._wait_for_lockscreen()
84 self.main_window.enter_pin_code("4321")
83 self.main_window.enter_pin_code("4321")
85 pinentryField = self.main_window.get_pinentryField()
84 pinentryField = self.main_window.get_pinentryField()
@@ -94,11 +93,11 @@ class TestLockscreen(UnityTestCase):
94 @with_lightdm_mock("single-passphrase")
93 @with_lightdm_mock("single-passphrase")
95 def test_passphrase_screen_wrong_password(self):
94 def test_passphrase_screen_wrong_password(self):
96 """Entering the wrong password must not dismiss the lock screen."""
95 """Entering the wrong password must not dismiss the lock screen."""
97− unity_proxy = self.launch_unity()
96+ self.launch_unity()
98 greeter = self.main_window.get_greeter()
97 greeter = self.main_window.get_greeter()
99
98
100 if greeter.narrowMode:
99 if greeter.narrowMode:
101− unlock_unity(unity_proxy)
100+ greeter.swipe()
102 lockscreen = self._wait_for_lockscreen()
101 lockscreen = self._wait_for_lockscreen()
103 self._enter_pin_passphrase("foobar")
102 self._enter_pin_passphrase("foobar")
104 pinentryField = self.main_window.get_pinentryField()
103 pinentryField = self.main_window.get_pinentryField()
tests/autopilot/unity8/shell/tests/test_notifications.py+61−97
@@ -135,10 +135,7 @@ class InteractiveNotificationBase(NotificationsBase):
135 actions = [("action_id", "dummy")]
135 actions = [("action_id", "dummy")]
136 hints = [
136 hints = [
137 ("x-canonical-switch-to-application", "true"),
137 ("x-canonical-switch-to-application", "true"),
138− (
139− "x-canonical-secondary-icon",
138+ ("x-canonical-secondary-icon","dialer")
140− self._get_icon_path('applicationIcons/dialer-app.png')
141− )
142 ]
139 ]
143
140
144 self._create_interactive_notification(
141 self._create_interactive_notification(
@@ -170,20 +167,19 @@ class InteractiveNotificationBase(NotificationsBase):
170 body = "Frank Zappa\n+44 (0)7736 027340"
167 body = "Frank Zappa\n+44 (0)7736 027340"
171 icon_path = self._get_icon_path('avatars/anna_olsson.png')
168 icon_path = self._get_icon_path('avatars/anna_olsson.png')
172 hints = [
169 hints = [
173− (
174− "x-canonical-secondary-icon",
170+ ("x-canonical-secondary-icon", "incoming-call"),
175− self._get_icon_path('applicationIcons/dialer-app.png')
176− ),
177 ("x-canonical-snap-decisions", "true"),
171 ("x-canonical-snap-decisions", "true"),
172+ ("x-canonical-private-affirmative-tint", "true"),
173+ ("x-canonical-private-rejection-tint", "true"),
178 ]
174 ]
179
175
180 actions = [
176 actions = [
181 ('action_accept', 'Hold + Answer'),
177 ('action_accept', 'Hold + Answer'),
182 ('action_decline_1', 'End + Answer'),
178 ('action_decline_1', 'End + Answer'),
183 ('action_decline_2', 'Decline'),
179 ('action_decline_2', 'Decline'),
184− ('action_decline_3', 'messages:I missed your call - can you call me now?'),
180+ ('action_decline_3', 'message:I missed your call - can you call me now?'),
185− ('action_decline_4', 'messages:I\'m running late. I\'m on my way.'),
181+ ('action_decline_4', 'message:I\'m running late. I\'m on my way.'),
186− ('action_decline_5', 'messages:I\'m busy at the moment. I\'ll call later.'),
182+ ('action_decline_5', 'message:I\'m busy at the moment. I\'ll call later.'),
187 ('action_decline_6', 'edit:Custom'),
183 ('action_decline_6', 'edit:Custom'),
188 ]
184 ]
189
185
@@ -204,13 +200,53 @@ class InteractiveNotificationBase(NotificationsBase):
204 notification.pointing_device.click_object(
200 notification.pointing_device.click_object(
205 notification.select_single(objectName="combobutton_dropdown"))
201 notification.select_single(objectName="combobutton_dropdown"))
206 self.assertThat(
202 self.assertThat(
207− notification.select_single(objectName="button2").expanded,
203+ notification.select_single(objectName="notify_button2").expanded,
208 Eventually(Equals(True)))
204 Eventually(Equals(True)))
209 time.sleep(2)
205 time.sleep(2)
210 notification.pointing_device.click_object(
206 notification.pointing_device.click_object(
211− notification.select_single(objectName="button4"))
207+ notification.select_single(objectName="notify_button4"))
212 self.assert_notification_action_id_was_called("action_decline_4")
208 self.assert_notification_action_id_was_called("action_decline_4")
213
209
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+
214 def test_modal_sd_without_greeter(self):
250 def test_modal_sd_without_greeter(self):
215 """Snap-decision should block input to shell without greeter."""
251 """Snap-decision should block input to shell without greeter."""
216 unity_proxy = self.launch_unity()
252 unity_proxy = self.launch_unity()
@@ -222,6 +258,8 @@ class InteractiveNotificationBase(NotificationsBase):
222 hints = [
258 hints = [
223 ("x-canonical-snap-decisions", "true"),
259 ("x-canonical-snap-decisions", "true"),
224 ("x-canonical-non-shaped-icon", "true"),
260 ("x-canonical-non-shaped-icon", "true"),
261+ ("x-canonical-private-affirmative-tint", "true"),
262+ ("x-canonical-private-rejection-tint", "true"),
225 ]
263 ]
226
264
227 actions = [
265 actions = [
@@ -253,7 +291,7 @@ class InteractiveNotificationBase(NotificationsBase):
253 self._assert_notification(
291 self._assert_notification(
254 notification, summary, body, True, False, 1.0)
292 notification, summary, body, True, False, 1.0)
255 notification.pointing_device.click_object(
293 notification.pointing_device.click_object(
256− notification.select_single(objectName="button0"))
294+ notification.select_single(objectName="notify_button0"))
257 self.assert_notification_action_id_was_called("action_accept")
295 self.assert_notification_action_id_was_called("action_accept")
258
296
259 def test_modal_sd_with_greeter(self):
297 def test_modal_sd_with_greeter(self):
@@ -266,6 +304,8 @@ class InteractiveNotificationBase(NotificationsBase):
266 hints = [
304 hints = [
267 ("x-canonical-snap-decisions", "true"),
305 ("x-canonical-snap-decisions", "true"),
268 ("x-canonical-non-shaped-icon", "true"),
306 ("x-canonical-non-shaped-icon", "true"),
307+ ("x-canonical-private-affirmative-tint", "true"),
308+ ("x-canonical-private-rejection-tint", "true"),
269 ]
309 ]
270
310
271 actions = [
311 actions = [
@@ -296,7 +336,7 @@ class InteractiveNotificationBase(NotificationsBase):
296 self._assert_notification(
336 self._assert_notification(
297 notification, summary, body, True, False, 1.0)
337 notification, summary, body, True, False, 1.0)
298 notification.pointing_device.click_object(
338 notification.pointing_device.click_object(
299− notification.select_single(objectName="button0"))
339+ notification.select_single(objectName="notify_button0"))
300 self.assert_notification_action_id_was_called("action_accept")
340 self.assert_notification_action_id_was_called("action_accept")
301
341
302 def _create_interactive_notification(
342 def _create_interactive_notification(
@@ -438,10 +478,7 @@ class EphemeralNotificationsTests(NotificationsBase):
438 "join me and Anna?"
478 "join me and Anna?"
439 icon_path = self._get_icon_path('avatars/anna_olsson.png')
479 icon_path = self._get_icon_path('avatars/anna_olsson.png')
440 hints = [
480 hints = [
441− (
442− "x-canonical-secondary-icon",
481+ ("x-canonical-secondary-icon", "message")
443− self._get_icon_path('applicationIcons/dialer-app.png')
444− )
445 ]
482 ]
446
483
447 notification = shell.create_ephemeral_notification(
484 notification = shell.create_ephemeral_notification(
@@ -474,17 +511,13 @@ class EphemeralNotificationsTests(NotificationsBase):
474 notify_list = self._get_notifications_list()
511 notify_list = self._get_notifications_list()
475
512
476 summary = "Upload of image completed"
513 summary = "Upload of image completed"
477− hints = [
478− (
479− "x-canonical-secondary-icon",
480− self._get_icon_path('applicationIcons/facebook.png')
514+ icon_path = self._get_icon_path('applicationIcons/facebook.png')
481− )
515+ hints=[]
482− ]
483
516
484 notification = shell.create_ephemeral_notification(
517 notification = shell.create_ephemeral_notification(
485 summary,
518 summary,
486 None,
519 None,
487− None,
520+ icon_path,
488 hints,
521 hints,
489 "NORMAL",
522 "NORMAL",
490 )
523 )
@@ -497,8 +530,8 @@ class EphemeralNotificationsTests(NotificationsBase):
497 notification(),
530 notification(),
498 summary,
531 summary,
499 None,
532 None,
500− False,
501 True,
533 True,
534+ False,
502 1.0
535 1.0
503 )
536 )
504
537
@@ -683,7 +716,7 @@ class EphemeralNotificationsTests(NotificationsBase):
683 body = 'This bubble uses the icon-title-body layout with a ' \
716 body = 'This bubble uses the icon-title-body layout with a ' \
684 'secondary icon.'
717 'secondary icon.'
685 icon_path = self._get_icon_path('avatars/anna_olsson.png')
718 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'
687
720
688 notification = shell.create_ephemeral_notification(
721 notification = shell.create_ephemeral_notification(
689 summary,
722 summary,
@@ -718,72 +751,3 @@ class EphemeralNotificationsTests(NotificationsBase):
718 self.assertThat(get_notification, Eventually(NotEquals(None)))
751 self.assertThat(get_notification, Eventually(NotEquals(None)))
719 self._assert_notification(
752 self._assert_notification(
720 get_notification(), summary, body, False, False, 1.0)
753 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/Powerd/Powerd.cpp+15−1
@@ -19,6 +19,20 @@
19#include "Powerd.h"
19#include "Powerd.h"
20
20
21Powerd::Powerd(QObject* parent)
21Powerd::Powerd(QObject* parent)
22− : QObject(parent)
22+ : QObject(parent),
23+ m_status(Powerd::Status::On)
23{
24{
24}
25}
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
26 Q_OBJECT
26 Q_OBJECT
27 Q_ENUMS(Status)
27 Q_ENUMS(Status)
28 Q_ENUMS(DisplayStateChangeReason)
28 Q_ENUMS(DisplayStateChangeReason)
29+ Q_PROPERTY(Status status READ status WRITE setStatus NOTIFY statusChanged) // write only exists for tests
29
30
30public:
31public:
31 enum DisplayStateChangeReason {
32 enum DisplayStateChangeReason {
@@ -42,8 +43,14 @@ public:
42
43
43 explicit Powerd(QObject *parent = 0);
44 explicit Powerd(QObject *parent = 0);
44
45
46+ Status status() const;
47+ void setStatus(Status status);
48+
45Q_SIGNALS:
49Q_SIGNALS:
46− void displayPowerStateChange(int status, int reason);
50+ void statusChanged(DisplayStateChangeReason reason);
51+
52+private:
53+ Status m_status;
47};
54};
48
55
49#endif
56#endif
tests/mocks/Powerd/Powerd.qmltypes+3−3
@@ -30,10 +30,10 @@ Module {
30 "On": 1
30 "On": 1
31 }
31 }
32 }
32 }
33+ Property { name: "status"; type: "Status" }
33 Signal {
34 Signal {
34− name: "displayPowerStateChange"
35+ name: "statusChanged"
35− Parameter { name: "status"; type: "int" }
36− Parameter { name: "reason"; type: "int" }
36+ Parameter { name: "reason"; type: "DisplayStateChangeReason" }
37 }
37 }
38 }
38 }
39}
39}
tests/mocks/Ubuntu/Payments/MockPayments.cpp+10−7
@@ -77,13 +77,16 @@ void MockPayments::setStoreItemId(const QString &store_item_id)
77
77
78void MockPayments::start()
78void MockPayments::start()
79{
79{
80− if (!m_store_item_id.isEmpty()) {
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 {
87 Q_EMIT purchaseError("No item ID supplied.");
81 Q_EMIT purchaseError("No item ID supplied.");
88 }
82 }
89}
83}
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:
41 void setPrice(const double price);
41 void setPrice(const double price);
42 void setStoreItemId(const QString& store_item_id);
42 void setStoreItemId(const QString& store_item_id);
43 Q_INVOKABLE void start();
43 Q_INVOKABLE void start();
44+ Q_INVOKABLE void process(); // only available for testing
44
45
45Q_SIGNALS:
46Q_SIGNALS:
46 void currencyChanged(const QString& currency);
47 void currencyChanged(const QString& currency);
tests/mocks/Unity/DashCommunicator/dashcommunicatorservice.cpp+2−2
@@ -27,7 +27,7 @@ DashCommunicatorService::~DashCommunicatorService()
27
27
28}
28}
29
29
30−void DashCommunicatorService::mockSetCurrentScope(const QString &scopeId, bool animate, bool reset)
30+void DashCommunicatorService::mockSetCurrentScope(const QString &scopeId, bool animate, bool isSwipe)
31{
31{
32− Q_EMIT setCurrentScopeRequested(scopeId, animate, reset);
32+ Q_EMIT setCurrentScopeRequested(scopeId, animate, isSwipe);
33}
33}
tests/mocks/Unity/DashCommunicator/dashcommunicatorservice.h+2−2
@@ -27,10 +27,10 @@ public:
27 ~DashCommunicatorService();
27 ~DashCommunicatorService();
28
28
29Q_SIGNALS:
29Q_SIGNALS:
30− void setCurrentScopeRequested(const QString &scopeId, bool animate, bool reset);
30+ void setCurrentScopeRequested(const QString &scopeId, bool animate, bool isSwipe);
31
31
32public Q_SLOTS:
32public Q_SLOTS:
33− void mockSetCurrentScope(const QString &scopeId, bool animate, bool reset);
33+ void mockSetCurrentScope(const QString &scopeId, bool animate, bool isSwipe);
34};
34};
35
35
36#endif // DBUSUNITYSESSIONSERVICE_H
36#endif // DBUSUNITYSESSIONSERVICE_H
tests/mocks/Unity/fake_scope.cpp+1−1
@@ -24,7 +24,7 @@
24#include "fake_scopes.h"
24#include "fake_scopes.h"
25#include "fake_settingsmodel.h"
25#include "fake_settingsmodel.h"
26
26
27−Scope::Scope(Scopes* parent) : Scope(QString(), QString(), false, parent)
27+Scope::Scope(Scopes* parent) : Scope("MockScope5", "Mock Scope", false, parent)
28{
28{
29}
29}
30
30
tests/plugins/Dash/cardcreator/2.res+2−2
@@ -94,7 +94,7 @@ Image {
94 wrapMode: Text.Wrap;
94 wrapMode: Text.Wrap;
95 maximumLineCount: 2;
95 maximumLineCount: 2;
96 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
96 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");
98 visible: showHeader ;
98 visible: showHeader ;
99 text: root.title;
99 text: root.title;
100 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
100 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -112,7 +112,7 @@ Image {
112 elide: Text.ElideRight;
112 elide: Text.ElideRight;
113 fontSize: "small";
113 fontSize: "small";
114 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
114 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");
116 visible: titleLabel.visible && titleLabel.text;
116 visible: titleLabel.visible && titleLabel.text;
117 text: cardData && cardData["subtitle"] || "";
117 text: cardData && cardData["subtitle"] || "";
118 font.weight: Font.Light;
118 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/5.res+2−2
@@ -114,7 +114,7 @@ Label {
114 wrapMode: Text.Wrap;
114 wrapMode: Text.Wrap;
115 maximumLineCount: 2;
115 maximumLineCount: 2;
116 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
116 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");
118 visible: showHeader && overlayLoader.active;
118 visible: showHeader && overlayLoader.active;
119 text: root.title;
119 text: root.title;
120 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
120 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -133,7 +133,7 @@ Label {
133 elide: Text.ElideRight;
133 elide: Text.ElideRight;
134 fontSize: "small";
134 fontSize: "small";
135 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
135 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");
137 visible: titleLabel.visible && titleLabel.text;
137 visible: titleLabel.visible && titleLabel.text;
138 text: cardData && cardData["subtitle"] || "";
138 text: cardData && cardData["subtitle"] || "";
139 font.weight: Font.Light;
139 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/6.res+3−3
@@ -70,7 +70,7 @@ Item {
70 wrapMode: Text.Wrap;
70 wrapMode: Text.Wrap;
71 maximumLineCount: 2;
71 maximumLineCount: 2;
72 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
72 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");
74 visible: showHeader ;
74 visible: showHeader ;
75 text: root.title;
75 text: root.title;
76 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
76 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -88,7 +88,7 @@ Item {
88 elide: Text.ElideRight;
88 elide: Text.ElideRight;
89 fontSize: "small";
89 fontSize: "small";
90 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
90 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");
92 visible: titleLabel.visible && titleLabel.text;
92 visible: titleLabel.visible && titleLabel.text;
93 text: cardData && cardData["subtitle"] || "";
93 text: cardData && cardData["subtitle"] || "";
94 font.weight: Font.Light;
94 font.weight: Font.Light;
@@ -103,7 +103,7 @@ Item {
103 rightMargin: units.gu(1);
103 rightMargin: units.gu(1);
104 }
104 }
105 source: cardData && cardData["emblem"] || "";
105 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");
107 width: height;
107 width: height;
108 height: source != "" ? titleLabel.font.pixelSize : 0;
108 height: source != "" ? titleLabel.font.pixelSize : 0;
109 }
109 }
tests/plugins/Dash/cardcreator/7.res+3−3
@@ -95,7 +95,7 @@ Image {
95 wrapMode: Text.Wrap;
95 wrapMode: Text.Wrap;
96 maximumLineCount: 2;
96 maximumLineCount: 2;
97 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
97 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");
99 visible: showHeader ;
99 visible: showHeader ;
100 text: root.title;
100 text: root.title;
101 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
101 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -113,7 +113,7 @@ Image {
113 elide: Text.ElideRight;
113 elide: Text.ElideRight;
114 fontSize: "small";
114 fontSize: "small";
115 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
115 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");
117 visible: titleLabel.visible && titleLabel.text;
117 visible: titleLabel.visible && titleLabel.text;
118 text: cardData && cardData["subtitle"] || "";
118 text: cardData && cardData["subtitle"] || "";
119 font.weight: Font.Light;
119 font.weight: Font.Light;
@@ -127,7 +127,7 @@ Image {
127 rightMargin: units.gu(1);
127 rightMargin: units.gu(1);
128 top: subtitleLabel.bottom;
128 top: subtitleLabel.bottom;
129 }
129 }
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");
131 fontScale: root.fontScale;
131 fontScale: root.fontScale;
132 model: cardData && cardData["attributes"];
132 model: cardData && cardData["attributes"];
133 }
133 }
tests/plugins/Unity/Launcher/CMakeLists.txt+1−1
@@ -50,7 +50,7 @@ add_executable(launchermodeltestExec
50 ${LAUNCHER_API_INCLUDEDIR}/unity/shell/application/ApplicationInfoInterface.h
50 ${LAUNCHER_API_INCLUDEDIR}/unity/shell/application/ApplicationInfoInterface.h
51 )
51 )
52target_link_libraries(launchermodeltestExec ${GSETTINGS_QT_LDFLAGS})
52target_link_libraries(launchermodeltestExec ${GSETTINGS_QT_LDFLAGS})
53−qt5_use_modules(launchermodeltestExec Test Core DBus)
53+qt5_use_modules(launchermodeltestExec Test Core DBus Gui)
54
54
55# copy .desktop files into build directory for shadow builds
55# copy .desktop files into build directory for shadow builds
56file(GLOB DESKTOP_FILES *.desktop)
56file(GLOB DESKTOP_FILES *.desktop)
tests/qmltests/Dash/Previews/tst_PreviewPayments.qml+49−9
@@ -48,19 +48,28 @@ Rectangle {
48 UT.UnityTestCase {
48 UT.UnityTestCase {
49 name: "PreviewPaymentsTest"
49 name: "PreviewPaymentsTest"
50 when: windowShown
50 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+ }
51
58
52 function cleanup()
59 function cleanup()
53 {
60 {
61+ paymentClient = null;
62+ previewPayments.widgetData = null;
54 spy.clear();
63 spy.clear();
55− var button = findChild(root, "paymentButton");
64+ var button = findChild(previewPayments, "paymentButton");
56 button.opacity = 1;
65 button.opacity = 1;
57 }
66 }
58
67
59 function test_purchase_text_display() {
68 function test_purchase_text_display() {
60 previewPayments.widgetData = jsonPurchase;
69 previewPayments.widgetData = jsonPurchase;
61
70
62− var button = findChild(root, "paymentButton");
71+ var button = findChild(previewPayments, "paymentButton");
63− verify(button != null, "Button not found.");
72+ verify(button, "Button not found.");
64 compare(button.text, "0.99USD");
73 compare(button.text, "0.99USD");
65 }
74 }
66
75
@@ -68,11 +77,12 @@ Rectangle {
68 // Exercise the purchaseCompleted signal here.
77 // Exercise the purchaseCompleted signal here.
69 previewPayments.widgetData = jsonPurchase;
78 previewPayments.widgetData = jsonPurchase;
70
79
71− var button = findChild(root, "paymentButton");
80+ var button = findChild(previewPayments, "paymentButton");
72− verify(button != null, "Button not found.");
81+ verify(button, "Button not found.");
73
82
74 mouseClick(button, button.width / 2, button.height / 2);
83 mouseClick(button, button.width / 2, button.height / 2);
75
84
85+ paymentClient.process();
76 spy.wait();
86 spy.wait();
77
87
78 var args = spy.signalArguments[0];
88 var args = spy.signalArguments[0];
@@ -85,8 +95,8 @@ Rectangle {
85 // Make sure the progress bar is shown.
95 // Make sure the progress bar is shown.
86 previewPayments.widgetData = jsonPurchase;
96 previewPayments.widgetData = jsonPurchase;
87
97
88− var button = findChild(root, "paymentButton");
98+ var button = findChild(previewPayments, "paymentButton");
89− var progress = findChild(root, "loadingBar");
99+ var progress = findChild(previewPayments, "loadingBar");
90
100
91 tryCompare(progress, "visible", false);
101 tryCompare(progress, "visible", false);
92 tryCompare(progress, "opacity", 0);
102 tryCompare(progress, "opacity", 0);
@@ -95,6 +105,7 @@ Rectangle {
95
105
96 mouseClick(button, button.width / 2, button.height / 2);
106 mouseClick(button, button.width / 2, button.height / 2);
97
107
108+ paymentClient.process();
98 spy.wait();
109 spy.wait();
99
110
100 tryCompare(progress, "visible", true);
111 tryCompare(progress, "visible", true);
@@ -103,16 +114,45 @@ Rectangle {
103 tryCompare(button, "opacity", 0);
114 tryCompare(button, "opacity", 0);
104 }
115 }
105
116
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+
106 function test_purchase_error() {
145 function test_purchase_error() {
107 // The mock Payments triggers an error when com.example.invalid is
146 // The mock Payments triggers an error when com.example.invalid is
108 // passed to it as store_item_id. Exercise it here
147 // passed to it as store_item_id. Exercise it here
109 previewPayments.widgetData = jsonPurchaseError;
148 previewPayments.widgetData = jsonPurchaseError;
110
149
111− var button = findChild(root, "paymentButton");
150+ var button = findChild(previewPayments, "paymentButton");
112− verify(button != null, "Button not found.");
151+ verify(button, "Button not found.");
113
152
114 mouseClick(button, button.width / 2, button.height / 2);
153 mouseClick(button, button.width / 2, button.height / 2);
115
154
155+ paymentClient.process();
116 spy.wait();
156 spy.wait();
117
157
118 var args = spy.signalArguments[0];
158 var args = spy.signalArguments[0];
tests/qmltests/Dash/tst_Dash.qml+9−2
@@ -189,6 +189,14 @@ Item {
189 var scopesOverviewAllView = findChild(dash, "scopesOverviewRepeaterChild1");
189 var scopesOverviewAllView = findChild(dash, "scopesOverviewRepeaterChild1");
190 tryCompare(scopesOverviewAllView, "enabled", true);
190 tryCompare(scopesOverviewAllView, "enabled", true);
191
191
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+
192 // Click on a temp scope
200 // Click on a temp scope
193 var tempScopeCard = findChild(scopesOverviewAllView, "delegate1");
201 var tempScopeCard = findChild(scopesOverviewAllView, "delegate1");
194 mouseClick(tempScopeCard, 0, 0);
202 mouseClick(tempScopeCard, 0, 0);
@@ -198,7 +206,6 @@ Item {
198 compare(overviewDragHandle.enabled, false);
206 compare(overviewDragHandle.enabled, false);
199
207
200 // Check temp scope is there
208 // Check temp scope is there
201− var scopesOverviewTempScopeItem = findChild(dash, "scopesOverviewTempScopeItem");
202 tryCompareFunction( function() { return scopesOverviewTempScopeItem.scope != null; }, true);
209 tryCompareFunction( function() { return scopesOverviewTempScopeItem.scope != null; }, true);
203 tryCompare(scopesOverviewTempScopeItem, "enabled", true);
210 tryCompare(scopesOverviewTempScopeItem, "enabled", true);
204
211
@@ -328,7 +335,7 @@ Item {
328 mouseFlick(dash, startX, startY, stopX, stopY);
335 mouseFlick(dash, startX, startY, stopX, stopY);
329 compare(dashContentList.currentIndex, 2, "Could not flick to scope id 2");
336 compare(dashContentList.currentIndex, 2, "Could not flick to scope id 2");
330 var dashCommunicatorService = findInvisibleChild(dash, "dashCommunicatorService");
337 var dashCommunicatorService = findInvisibleChild(dash, "dashCommunicatorService");
331− dashCommunicatorService.mockSetCurrentScope("clickscope", true, true);
338+ dashCommunicatorService.mockSetCurrentScope("clickscope", true, false);
332 tryCompare(dashContentList, "currentIndex", 1)
339 tryCompare(dashContentList, "currentIndex", 1)
333 }
340 }
334
341
tests/qmltests/Dash/tst_PreviewListView.qml+29−1
@@ -16,6 +16,7 @@
16
16
17import QtQuick 2.0
17import QtQuick 2.0
18import QtTest 1.0
18import QtTest 1.0
19+import Ubuntu.Components 1.1
19import "../../../qml/Dash"
20import "../../../qml/Dash"
20import Unity.Test 0.1 as UT
21import Unity.Test 0.1 as UT
21import Unity 0.2 as Unity
22import Unity 0.2 as Unity
@@ -43,7 +44,9 @@ Rectangle {
43 id: listView
44 id: listView
44 anchors.fill: parent
45 anchors.fill: parent
45 scope: mockScope
46 scope: mockScope
46− scopeStyle: ScopeStyle { }
47+ scopeStyle: ScopeStyle {
48+ style: mockScope.customizations
49+ }
47 }
50 }
48
51
49 UT.UnityTestCase {
52 UT.UnityTestCase {
@@ -88,5 +91,30 @@ Rectangle {
88 mouseClick(listView, listView.width / 2, listView.height / 2);
91 mouseClick(listView, listView.width / 2, listView.height / 2);
89 clickedSpy.wait();
92 clickedSpy.wait();
90 }
93 }
94+
95+ function test_title() {
96+ var header = findChild(listView, "innerPageHeader");
97+ verify(header, "Could not find the preview header");
98+
99+ compare(header.title, "Mock Scope");
100+ }
101+
102+ function test_header_style() {
103+ var header = findChild(listView, "pageHeader");
104+ verify(header, "Could not find the header");
105+
106+ var innerHeader = findChild(header, "innerPageHeader");
107+ verify(innerHeader, "Could not find the inner header");
108+ verify(Qt.colorEqual(innerHeader.textColor, UbuntuColors.darkGrey),
109+ "Foreground color not equal: %1 != %2".arg(innerHeader.textColor).arg(UbuntuColors.darkGrey));
110+
111+ var background = findChild(header, "headerBackground");
112+ verify(background, "Could not find the background");
113+ compare(background.style, "gradient:///lightgrey/grey");
114+
115+ var image = findChild(header, "titleImage");
116+ verify(image, "Could not find the title image.");
117+ compare(image.source, Qt.resolvedUrl("../Dash/tst_PageHeader/logo-ubuntu-orange.svg"), "Title image has the wrong source");
118+ }
91 }
119 }
92}
120}
tests/qmltests/Notifications/tst_Notifications.qml+59−17
@@ -64,7 +64,7 @@ Row {
64 function addSnapDecisionNotification() {
64 function addSnapDecisionNotification() {
65 var n = {
65 var n = {
66 type: Notification.SnapDecision,
66 type: Notification.SnapDecision,
67− hints: {"x-canonical-private-button-tint": "true"},
67+ hints: {"x-canonical-private-affirmative-tint": "true"},
68 summary: "Tom Ato",
68 summary: "Tom Ato",
69 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.",
69 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.",
70 icon: "../graphics/avatars/funky.png",
70 icon: "../graphics/avatars/funky.png",
@@ -79,6 +79,22 @@ Row {
79 mockModel.append(n)
79 mockModel.append(n)
80 }
80 }
81
81
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+
82 function addEphemeralNotification() {
98 function addEphemeralNotification() {
83 var n = {
99 var n = {
84 type: Notification.Ephemeral,
100 type: Notification.Ephemeral,
@@ -181,6 +197,12 @@ Row {
181 onClicked: addSnapDecisionNotification()
197 onClicked: addSnapDecisionNotification()
182 }
198 }
183
199
200+ Button {
201+ width: parent.width
202+ text: "add a 2over1 snap-decision"
203+ onClicked: add2over1SnapDecisionNotification()
204+ }
205+
184 Button {
206 Button {
185 width: parent.width
207 width: parent.width
186 text: "add an ephemeral"
208 text: "add an ephemeral"
@@ -229,7 +251,7 @@ Row {
229 {
251 {
230 tag: "Snap Decision with secondary icon and button-tint",
252 tag: "Snap Decision with secondary icon and button-tint",
231 type: Notification.SnapDecision,
253 type: Notification.SnapDecision,
232− hints: {"x-canonical-private-button-tint": "true"},
254+ hints: {"x-canonical-private-affirmative-tint": "true"},
233 summary: "Tom Ato",
255 summary: "Tom Ato",
234 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.",
256 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.",
235 icon: "../graphics/avatars/funky.png",
257 icon: "../graphics/avatars/funky.png",
@@ -249,10 +271,31 @@ Row {
249 buttonTinted: true,
271 buttonTinted: true,
250 hasSound: false
272 hasSound: false
251 },
273 },
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+ },
252 {
295 {
253 tag: "Ephemeral notification - icon-summary layout",
296 tag: "Ephemeral notification - icon-summary layout",
254 type: Notification.Ephemeral,
297 type: Notification.Ephemeral,
255− hints: {"x-canonical-private-button-tint": "false"},
298+ hints: {"x-canonical-private-affirmative-tint": "false"},
256 summary: "Photo upload completed",
299 summary: "Photo upload completed",
257 body: "",
300 body: "",
258 icon: "",
301 icon: "",
@@ -271,7 +314,7 @@ Row {
271 {
314 {
272 tag: "Ephemeral notification - check suppression of secondary icon for icon-summary layout",
315 tag: "Ephemeral notification - check suppression of secondary icon for icon-summary layout",
273 type: Notification.Ephemeral,
316 type: Notification.Ephemeral,
274− hints: {"x-canonical-private-button-tint": "false",
317+ hints: {"x-canonical-private-affirmative-tint": "false",
275 "sound-file": "dummy.ogg",
318 "sound-file": "dummy.ogg",
276 "suppress-sound": "true"},
319 "suppress-sound": "true"},
277 summary: "New comment successfully published",
320 summary: "New comment successfully published",
@@ -293,7 +336,7 @@ Row {
293 {
336 {
294 tag: "Interactive notification",
337 tag: "Interactive notification",
295 type: Notification.Interactive,
338 type: Notification.Interactive,
296− hints: {"x-canonical-private-button-tint": "false",
339+ hints: {"x-canonical-private-affirmative-tint": "false",
297 "sound-file": "dummy.ogg"},
340 "sound-file": "dummy.ogg"},
298 summary: "Interactive notification",
341 summary: "Interactive notification",
299 body: "This is a notification that can be clicked",
342 body: "This is a notification that can be clicked",
@@ -313,7 +356,7 @@ Row {
313 {
356 {
314 tag: "Snap Decision without secondary icon and no button-tint",
357 tag: "Snap Decision without secondary icon and no button-tint",
315 type: Notification.SnapDecision,
358 type: Notification.SnapDecision,
316− hints: {"x-canonical-private-button-tint": "false",
359+ hints: {"x-canonical-private-affirmative-tint": "false",
317 "sound-file": "dummy.ogg"},
360 "sound-file": "dummy.ogg"},
318 summary: "Bro Coly",
361 summary: "Bro Coly",
319 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.",
362 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 {
334 {
377 {
335 tag: "Ephemeral notification",
378 tag: "Ephemeral notification",
336 type: Notification.Ephemeral,
379 type: Notification.Ephemeral,
337− hints: {"x-canonical-private-button-tint": "false",
380+ hints: {"x-canonical-private-affirmative-tint": "false",
338 "sound-file": "dummy.ogg"},
381 "sound-file": "dummy.ogg"},
339 summary: "Cole Raby",
382 summary: "Cole Raby",
340 body: "I did not expect it to be that late.",
383 body: "I did not expect it to be that late.",
@@ -354,9 +397,8 @@ Row {
354 {
397 {
355 tag: "Ephemeral notification with non-shaped icon",
398 tag: "Ephemeral notification with non-shaped icon",
356 type: Notification.Ephemeral,
399 type: Notification.Ephemeral,
357− hints: {"x-canonical-private-button-tint": "false",
400+ hints: {"x-canonical-private-affirmative-tint": "false",
358− "x-canonical-non-shaped-icon": "true",
401+ "x-canonical-non-shaped-icon": "true"},
359− "sound-file": "dummy.ogg"},
360 summary: "Contacts",
402 summary: "Contacts",
361 body: "Synchronised contacts-database with cloud-storage.",
403 body: "Synchronised contacts-database with cloud-storage.",
362 icon: "../graphics/applicationIcons/contacts-app.png",
404 icon: "../graphics/applicationIcons/contacts-app.png",
@@ -370,7 +412,7 @@ Row {
370 secondaryIconVisible: false,
412 secondaryIconVisible: false,
371 buttonRowVisible: false,
413 buttonRowVisible: false,
372 buttonTinted: false,
414 buttonTinted: false,
373− hasSound: true
415+ hasSound: false
374 }
416 }
375 ]
417 ]
376 }
418 }
@@ -437,8 +479,8 @@ Row {
437 tryCompare(audioItem, "playbackState", data.hasSound ? Audio.PlayingState : Audio.StoppedState)
479 tryCompare(audioItem, "playbackState", data.hasSound ? Audio.PlayingState : Audio.StoppedState)
438
480
439 if(data.buttonRowVisible) {
481 if(data.buttonRowVisible) {
440− var buttonCancel = findChild(buttonRow, "button1")
482+ var buttonCancel = findChild(buttonRow, "notify_button1")
441− var buttonAccept = findChild(buttonRow, "button0")
483+ var buttonAccept = findChild(buttonRow, "notify_button0")
442
484
443 // only test the left/cancel-button if two actions have been passed in
485 // only test the left/cancel-button if two actions have been passed in
444 if (data.actions.length == 2) {
486 if (data.actions.length == 2) {
@@ -448,7 +490,7 @@ Row {
448 }
490 }
449
491
450 // check the tinting of the positive/right button
492 // 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")
452
494
453 // click the positive/right button
495 // click the positive/right button
454 tryCompareFunction(function() { mouseClick(buttonAccept, buttonAccept.width / 2, buttonAccept.height / 2); return actionSpy.signalArguments.length > 0; }, true);
496 tryCompareFunction(function() { mouseClick(buttonAccept, buttonAccept.width / 2, buttonAccept.height / 2); return actionSpy.signalArguments.length > 0; }, true);
@@ -458,19 +500,19 @@ Row {
458
500
459 // check if there's a ComboButton created due to more actions being passed
501 // check if there's a ComboButton created due to more actions being passed
460 if (data.actions.length > 2) {
502 if (data.actions.length > 2) {
461− var comboButton = findChild(notification, "button2")
503+ var comboButton = findChild(notification, "notify_button2")
462 tryCompareFunction(function() { return comboButton.expanded == false; }, true);
504 tryCompareFunction(function() { return comboButton.expanded == false; }, true);
463
505
464 // click to expand
506 // click to expand
465 tryCompareFunction(function() { mouseClick(comboButton, comboButton.width - comboButton.__styleInstance.dropDownWidth / 2, comboButton.height / 2); return comboButton.expanded == true; }, true);
507 tryCompareFunction(function() { mouseClick(comboButton, comboButton.width - comboButton.__styleInstance.dropDownWidth / 2, comboButton.height / 2); return comboButton.expanded == true; }, true);
466
508
467 // try clicking on choices in expanded comboList
509 // try clicking on choices in expanded comboList
468− var choiceButton1 = findChild(notification, "button3")
510+ var choiceButton1 = findChild(notification, "notify_button3")
469 tryCompareFunction(function() { mouseClick(choiceButton1, choiceButton1.width / 2, choiceButton1.height / 2); return actionSpy.signalArguments.length > 0; }, true);
511 tryCompareFunction(function() { mouseClick(choiceButton1, choiceButton1.width / 2, choiceButton1.height / 2); return actionSpy.signalArguments.length > 0; }, true);
470 compare(actionSpy.signalArguments[0][0], data.actions[3]["id"], "got wrong id choice action 1")
512 compare(actionSpy.signalArguments[0][0], data.actions[3]["id"], "got wrong id choice action 1")
471 actionSpy.clear()
513 actionSpy.clear()
472
514
473− var choiceButton2 = findChild(notification, "button4")
515+ var choiceButton2 = findChild(notification, "notify_button4")
474 tryCompareFunction(function() { mouseClick(choiceButton2, choiceButton2.width / 2, choiceButton2.height / 2); return actionSpy.signalArguments.length > 0; }, true);
516 tryCompareFunction(function() { mouseClick(choiceButton2, choiceButton2.width / 2, choiceButton2.height / 2); return actionSpy.signalArguments.length > 0; }, true);
475 compare(actionSpy.signalArguments[0][0], data.actions[4]["id"], "got wrong id choice action 2")
517 compare(actionSpy.signalArguments[0][0], data.actions[4]["id"], "got wrong id choice action 2")
476 actionSpy.clear()
518 actionSpy.clear()
tests/qmltests/tst_Shell.qml+14−7
@@ -21,6 +21,7 @@ import QtQuick 2.0
21import QtTest 1.0
21import QtTest 1.0
22import GSettings 1.0
22import GSettings 1.0
23import LightDM 0.1 as LightDM
23import LightDM 0.1 as LightDM
24+import Ubuntu.Telephony 0.1 as Telephony
24import Unity.Application 0.1
25import Unity.Application 0.1
25import Unity.Connectivity 0.1
26import Unity.Connectivity 0.1
26import Unity.Test 0.1 as UT
27import Unity.Test 0.1 as UT
@@ -74,6 +75,11 @@ Item {
74 signalName: "unlockingAllModems"
75 signalName: "unlockingAllModems"
75 }
76 }
76
77
78+ Telephony.CallEntry {
79+ id: phoneCall
80+ phoneNumber: "+447812221111"
81+ }
82+
77 UT.UnityTestCase {
83 UT.UnityTestCase {
78 name: "Shell"
84 name: "Shell"
79 when: windowShown
85 when: windowShown
@@ -146,21 +152,22 @@ Item {
146 verify(mainApp);
152 verify(mainApp);
147 tryCompare(mainApp, "state", ApplicationInfoInterface.Running);
153 tryCompare(mainApp, "state", ApplicationInfoInterface.Running);
148
154
149− // Try to suspend while proximity is engaged...
155+ // Suspend while call is active...
156+ callManager.foregroundCall = phoneCall;
150− Powerd.displayPowerStateChange(Powerd.Off, Powerd.Proximity);
157+ Powerd.status = Powerd.Off;
151 tryCompare(greeter, "showProgress", 0);
158 tryCompare(greeter, "showProgress", 0);
152
159
153− // Now really suspend
160+ // Now try again after ending call
154− print("suspending")
161+ callManager.foregroundCall = null;
162+ Powerd.status = Powerd.On;
155− Powerd.displayPowerStateChange(Powerd.Off, 0);
163+ Powerd.status = Powerd.Off;
156− print("done suspending")
157 tryCompare(greeter, "showProgress", 1);
164 tryCompare(greeter, "showProgress", 1);
158
165
159 tryCompare(ApplicationManager, "suspended", true);
166 tryCompare(ApplicationManager, "suspended", true);
160 compare(mainApp.state, ApplicationInfoInterface.Suspended);
167 compare(mainApp.state, ApplicationInfoInterface.Suspended);
161
168
162 // And wake up
169 // And wake up
163− Powerd.displayPowerStateChange(Powerd.On, 0);
170+ Powerd.status = Powerd.On;
164 tryCompare(greeter, "showProgress", 1);
171 tryCompare(greeter, "showProgress", 1);
165
172
166 // Swipe away greeter to focus app
173 // Swipe away greeter to focus app
tools/registry-tracker.cpp+6
@@ -119,6 +119,12 @@ void RegistryTracker::runRegistry()
119 QString registry_ini = QString(REGISTRY_CONFIG).arg(m_mw_config.fileName()).arg(scopeInstallDir).arg(scopeRunnerBin);
119 QString registry_ini = QString(REGISTRY_CONFIG).arg(m_mw_config.fileName()).arg(scopeInstallDir).arg(scopeRunnerBin);
120 QString mw_ini = QString(MW_CONFIG).arg(m_endpoints_dir.path());
120 QString mw_ini = QString(MW_CONFIG).arg(m_endpoints_dir.path());
121
121
122+ if (!m_systemScopes) {
123+ // Disable OEM and Click scopes when system scopes are disabled
124+ registry_ini += "OEM.InstallDir = /unused\n";
125+ registry_ini += "Click.InstallDir = /unused\n";
126+ }
127+
122 m_runtime_config.write(runtime_ini.toUtf8());
128 m_runtime_config.write(runtime_ini.toUtf8());
123 m_registry_config.write(registry_ini.toUtf8());
129 m_registry_config.write(registry_ini.toUtf8());
124 m_mw_config.write(mw_ini.toUtf8());
130 m_mw_config.write(mw_ini.toUtf8());
tools/scopetool.cpp+3
@@ -44,6 +44,9 @@ int main(int argc, char *argv[])
44 setenv("QML_FORCE_THREADED_RENDERER", "1", 1);
44 setenv("QML_FORCE_THREADED_RENDERER", "1", 1);
45 setenv("QML_FIXED_ANIMATION_STEP", "1", 1);
45 setenv("QML_FIXED_ANIMATION_STEP", "1", 1);
46
46
47+ // ignore favorites in unity-scopes-shell plugin
48+ setenv("UNITY_SCOPES_NO_FAVORITES", "1", 1);
49+
47 QGuiApplication::setApplicationName("Unity Scope Tool");
50 QGuiApplication::setApplicationName("Unity Scope Tool");
48 QGuiApplication *application;
51 QGuiApplication *application;
49 application = new QGuiApplication(argc, argv);
52 application = new QGuiApplication(argc, argv);
tools/unlock-device+4−5
@@ -19,13 +19,12 @@ done
19
19
20eval "$WAIT_COMMAND"
20eval "$WAIT_COMMAND"
21
21
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
23# to finish coming up (it's hard to tell when the greeter is actually rendered)
23# to finish coming up (it's hard to tell when the greeter is actually rendered)
24−sleep 20
24+sleep 30
25
25
26+# We need to go through sudo to get a proper environment for dbus set up
26−GDBUS_CMD="gdbus call --session --dest com.canonical.UnityGreeter --object-path / --method com.canonical.UnityGreeter.HideGreeter && echo Greeter unlocked"
27+UNLOCK_OUTPUT=$(adb shell "gdbus call --session --dest com.canonical.UnityGreeter --object-path / --method com.canonical.UnityGreeter.HideGreeter && echo Greeter unlocked" 2>&1)
27−
28−UNLOCK_OUTPUT=$(adb shell "if [ \"\$(id -u)\" = 0 ]; then sudo -u phablet -i $GDBUS_CMD; else $GDBUS_CMD; fi" 2>&1)
29if echo "$UNLOCK_OUTPUT" | grep 'Greeter unlocked' >/dev/null; then
28if echo "$UNLOCK_OUTPUT" | grep 'Greeter unlocked' >/dev/null; then
30 echo "I: Unlock passed"
29 echo "I: Unlock passed"
31 exit 0
30 exit 0