on xenial help sign in
Merge trunk.
e961874Michał Sawicz
data/unity8.conf+3
@@ -44,6 +44,8 @@ pre-start script
44 rm "$MIR_SERVER_FILE"
44 rm "$MIR_SERVER_FILE"
45 fi
45 fi
46
46
47+ initctl set-env --global MIR_SERVER_PROMPT_FILE=1
48+
47 initctl emit scope-ui-starting
49 initctl emit scope-ui-starting
48 initctl emit --no-wait indicator-services-start
50 initctl emit --no-wait indicator-services-start
49end script
51end script
@@ -53,4 +55,5 @@ exec ${BINARY:-unity8} $ARGS
53post-stop script
55post-stop script
54 initctl set-env --global MIR_SOCKET=$UNITY_MIR_SOCKET
56 initctl set-env --global MIR_SOCKET=$UNITY_MIR_SOCKET
55 initctl unset-env --global UNITY_MIR_SOCKET
57 initctl unset-env --global UNITY_MIR_SOCKET
58+ initctl unset-env --global MIR_SERVER_PROMPT_FILE
56end script
59end script
debian/changelog+45
@@ -1,3 +1,48 @@
1+unity8 (7.90+14.10.20140717.3-0ubuntu1) utopic; urgency=low
2+
3+ [ Nick Dedekind ]
4+ * Added environment variable to upstart conf for mir trusted socket
5+ * Removed indicator menu dismissal on menu activation (LP: #1337771)
6+
7+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 17 Jul 2014 16:35:52 +0000
8+
9+unity8 (7.90+14.10.20140717.1-0ubuntu1) utopic; urgency=low
10+
11+ [ Michał Sawicz ]
12+ * Only generate .qmltypes files manually, no need to do it build-time.
13+ It didn't work when cross-compiling either, and required builders to
14+ have otherwise unnecessary environment.
15+ * Fix CardCreator test. It got broken with a merge that got landed
16+ along side of it.
17+
18+ [ Ying-Chun Liu ]
19+ * Add reboot/shutdown (LP: #1234062)
20+
21+ [ Albert Astals ]
22+ * Make the departments test more stable
23+
24+ [ Mirco Müller ]
25+ * Fixes gap at top of sim-unlock/fullscreen notification (point 1.),
26+ fixes blocking overlay if underlying UnityMenuModel vanishes from
27+ DBus (point 2.). The third bullet-point of the bug-report, lockup of
28+ shell-UI, could not be reproduced. (LP: #1308011)
29+
30+ [ Michael Terry ]
31+ * Expose a new greeter DBus property, IsActive, which tells apps and
32+ indicators when the integrated-greeter screen is active. Useful for
33+ switching UI modes when the screen is locked.
34+ * Allow the session to bring up the greeter/lockscreen over DBus. The
35+ emergency dialer will need this support in order to cancel bringing
36+ it up.
37+
38+ [ Michael Zanetti ]
39+ * Fixes gap at top of sim-unlock/fullscreen notification (point 1.),
40+ fixes blocking overlay if underlying UnityMenuModel vanishes from
41+ DBus (point 2.). The third bullet-point of the bug-report, lockup of
42+ shell-UI, could not be reproduced. (LP: #1308011)
43+
44+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 17 Jul 2014 09:38:20 +0000
45+
1unity8 (7.90+14.10.20140714-0ubuntu1) utopic; urgency=low
46unity8 (7.90+14.10.20140714-0ubuntu1) utopic; urgency=low
2
47
3 [ Michał Sawicz ]
48 [ Michał Sawicz ]
debian/control+3−3
@@ -17,7 +17,7 @@ Build-Depends: cmake,
17 libhud-client2-dev,
17 libhud-client2-dev,
18 libpay1-dev,
18 libpay1-dev,
19 libpulse-dev,
19 libpulse-dev,
20− libqmenumodel-dev (>= 0.2.7),
20+ libqmenumodel-dev (>= 0.2.8),
21 libqt5xmlpatterns5-dev,
21 libqt5xmlpatterns5-dev,
22 libunity-api-dev (>= 7.85),
22 libunity-api-dev (>= 7.85),
23 libunity-mir-dev,
23 libunity-mir-dev,
@@ -52,7 +52,7 @@ Vcs-Browser: https://bazaar.launchpad.net/~unity-team/unity8/trunk
52
52
53Package: indicators-client
53Package: indicators-client
54Architecture: amd64 armhf i386
54Architecture: amd64 armhf i386
55−Depends: qmenumodel-qml (>= 0.2.7),
55+Depends: qmenumodel-qml (>= 0.2.8),
56 qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.49) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 0.1.49),
56 qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.49) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 0.1.49),
57 unity8 (= ${binary:Version}),
57 unity8 (= ${binary:Version}),
58 ${misc:Depends},
58 ${misc:Depends},
@@ -77,7 +77,7 @@ Depends: gsettings-desktop-schemas,
77 libcap2-bin,
77 libcap2-bin,
78 libglib2.0-bin,
78 libglib2.0-bin,
79 libunity-mir1 (>= 0.4),
79 libunity-mir1 (>= 0.4),
80− qmenumodel-qml (>= 0.2.7),
80+ qmenumodel-qml (>= 0.2.8),
81 qml-module-qtquick-xmllistmodel,
81 qml-module-qtquick-xmllistmodel,
82 qtdeclarative5-gsettings1.0,
82 qtdeclarative5-gsettings1.0,
83 qtdeclarative5-ubuntu-settings-components (>= 0.3),
83 qtdeclarative5-ubuntu-settings-components (>= 0.3),
plugins/LightDM/CMakeLists.txt+1
@@ -15,6 +15,7 @@ include_directories(
15
15
16set(QMLPLUGIN_SRC
16set(QMLPLUGIN_SRC
17 ../Utils/qsortfilterproxymodelqml.cpp # FIXME evaluate a more generic approach for using other plugins
17 ../Utils/qsortfilterproxymodelqml.cpp # FIXME evaluate a more generic approach for using other plugins
18+ DBusGreeter.cpp
18 DBusGreeterList.cpp
19 DBusGreeterList.cpp
19 Greeter.cpp
20 Greeter.cpp
20 plugin.cpp
21 plugin.cpp
plugins/LightDM/DBusGreeter.cppnew file+65
@@ -0,0 +1,65 @@
1+/*
2+ * Copyright (C) 2014 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+#include "DBusGreeter.h"
18+#include "Greeter.h"
19+
20+#include <QDBusMessage>
21+#include <QStringList>
22+
23+DBusGreeter::DBusGreeter(Greeter *greeter, const QDBusConnection &connection, const QString &path)
24+ : QObject(greeter),
25+ m_greeter(greeter),
26+ m_connection(connection),
27+ m_path(path)
28+{
29+ connect(m_greeter, SIGNAL(isActiveChanged()), this, SLOT(isActiveChangedHandler()));
30+}
31+
32+bool DBusGreeter::isActive() const
33+{
34+ return m_greeter->isActive();
35+}
36+
37+void DBusGreeter::ShowGreeter()
38+{
39+ return Q_EMIT m_greeter->showGreeter();
40+}
41+
42+void DBusGreeter::isActiveChangedHandler()
43+{
44+ notifyPropertyChanged("IsActive", isActive());
45+ Q_EMIT isActiveChanged();
46+}
47+
48+// Manually emit a PropertiesChanged signal over DBus, because QtDBus
49+// doesn't do it for us on Q_PROPERTIES, oddly enough.
50+void DBusGreeter::notifyPropertyChanged(const QString& propertyName, const QVariant &value)
51+{
52+ QDBusMessage message;
53+ QVariantMap changedProps;
54+
55+ changedProps.insert(propertyName, value);
56+
57+ message = QDBusMessage::createSignal(m_path,
58+ "org.freedesktop.DBus.Properties",
59+ "PropertiesChanged");
60+ message << "com.canonical.UnityGreeter";
61+ message << changedProps;
62+ message << QStringList();
63+
64+ m_connection.send(message);
65+}
plugins/LightDM/DBusGreeter.hnew file+55
@@ -0,0 +1,55 @@
1+/*
2+ * Copyright (C) 2014 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+#ifndef UNITY_DBUSGREETER_H
18+#define UNITY_DBUSGREETER_H
19+
20+#include <QDBusConnection>
21+#include <QObject>
22+
23+class Greeter;
24+class QDBusInterface;
25+
26+/** This is an internal class used to talk with the indicators.
27+ */
28+
29+class DBusGreeter : public QObject
30+{
31+ Q_OBJECT
32+ Q_CLASSINFO("D-Bus Interface", "com.canonical.UnityGreeter")
33+
34+ Q_PROPERTY(bool IsActive READ isActive NOTIFY isActiveChanged) // since 14.10
35+
36+public:
37+ explicit DBusGreeter(Greeter *greeter, const QDBusConnection &connection, const QString &path);
38+
39+ bool isActive() const;
40+ Q_SCRIPTABLE void ShowGreeter(); // temporary, until we split the greeter again
41+
42+Q_SIGNALS:
43+ void isActiveChanged();
44+
45+private Q_SLOTS:
46+ void isActiveChangedHandler();
47+ void notifyPropertyChanged(const QString &propertyName, const QVariant &value);
48+
49+private:
50+ Greeter *m_greeter;
51+ QDBusConnection m_connection;
52+ QString m_path;
53+};
54+
55+#endif
plugins/LightDM/Greeter.cpp+17
@@ -25,6 +25,7 @@ public:
25 explicit GreeterPrivate(Greeter *parent);
25 explicit GreeterPrivate(Greeter *parent);
26
26
27 QLightDM::Greeter *m_greeter;
27 QLightDM::Greeter *m_greeter;
28+ bool m_active;
28 bool wasPrompted;
29 bool wasPrompted;
29 bool promptless;
30 bool promptless;
30
31
@@ -38,6 +39,7 @@ private:
38
39
39GreeterPrivate::GreeterPrivate(Greeter* parent)
40GreeterPrivate::GreeterPrivate(Greeter* parent)
40 : m_greeter(new QLightDM::Greeter(parent)),
41 : m_greeter(new QLightDM::Greeter(parent)),
42+ m_active(false),
41 wasPrompted(false),
43 wasPrompted(false),
42 promptless(false),
44 promptless(false),
43 q_ptr(parent)
45 q_ptr(parent)
@@ -60,6 +62,21 @@ Greeter::Greeter(QObject* parent)
60 d->m_greeter->connectSync();
62 d->m_greeter->connectSync();
61}
63}
62
64
65+bool Greeter::isActive() const
66+{
67+ Q_D(const Greeter);
68+ return d->m_active;
69+}
70+
71+void Greeter::setIsActive(bool active)
72+{
73+ Q_D(Greeter);
74+ if (d->m_active != active) {
75+ d->m_active = active;
76+ Q_EMIT isActiveChanged();
77+ }
78+}
79+
63bool Greeter::isAuthenticated() const
80bool Greeter::isAuthenticated() const
64{
81{
65 Q_D(const Greeter);
82 Q_D(const Greeter);
plugins/LightDM/Greeter.h+5
@@ -34,6 +34,7 @@ class Greeter : public QObject
34{
34{
35 Q_OBJECT
35 Q_OBJECT
36
36
37+ Q_PROPERTY(bool active READ isActive WRITE setIsActive NOTIFY isActiveChanged)
37 Q_PROPERTY(bool authenticated READ isAuthenticated)
38 Q_PROPERTY(bool authenticated READ isAuthenticated)
38 Q_PROPERTY(QString authenticationUser READ authenticationUser NOTIFY authenticationUserChanged)
39 Q_PROPERTY(QString authenticationUser READ authenticationUser NOTIFY authenticationUserChanged)
39 Q_PROPERTY(bool promptless READ promptless NOTIFY promptlessChanged)
40 Q_PROPERTY(bool promptless READ promptless NOTIFY promptlessChanged)
@@ -41,6 +42,7 @@ class Greeter : public QObject
41public:
42public:
42 explicit Greeter(QObject* parent=0);
43 explicit Greeter(QObject* parent=0);
43
44
45+ bool isActive() const;
44 bool isAuthenticated() const;
46 bool isAuthenticated() const;
45 QString authenticationUser() const;
47 QString authenticationUser() const;
46 bool promptless() const;
48 bool promptless() const;
@@ -49,13 +51,16 @@ public Q_SLOTS:
49 void authenticate(const QString &username=QString());
51 void authenticate(const QString &username=QString());
50 void respond(const QString &response);
52 void respond(const QString &response);
51 bool startSessionSync(const QString &session=QString());
53 bool startSessionSync(const QString &session=QString());
54+ void setIsActive(bool isActive);
52
55
53Q_SIGNALS:
56Q_SIGNALS:
54 void showMessage(const QString &text, bool isError);
57 void showMessage(const QString &text, bool isError);
55 void showPrompt(const QString &text, bool isSecret);
58 void showPrompt(const QString &text, bool isSecret);
56 void authenticationComplete();
59 void authenticationComplete();
57 void authenticationUserChanged(const QString &user);
60 void authenticationUserChanged(const QString &user);
61+ void isActiveChanged();
58 void promptlessChanged();
62 void promptlessChanged();
63+ void showGreeter();
59
64
60 // This signal is emitted by external agents like indicators, and the UI
65 // This signal is emitted by external agents like indicators, and the UI
61 // should switch to this user if possible.
66 // should switch to this user if possible.
plugins/LightDM/plugin.cpp+3
@@ -18,6 +18,7 @@
18 */
18 */
19
19
20#include "plugin.h"
20#include "plugin.h"
21+#include "DBusGreeter.h"
21#include "DBusGreeterList.h"
22#include "DBusGreeterList.h"
22#include "Greeter.h"
23#include "Greeter.h"
23#include "UsersModel.h"
24#include "UsersModel.h"
@@ -39,6 +40,8 @@ static QObject *greeter_provider(QQmlEngine *engine, QJSEngine *scriptEngine)
39
40
40 Greeter *greeter = new Greeter();
41 Greeter *greeter = new Greeter();
41 QDBusConnection connection = QDBusConnection::sessionBus();
42 QDBusConnection connection = QDBusConnection::sessionBus();
43+ DBusGreeter *root = new DBusGreeter(greeter, connection, "/");
44+ connection.registerObject("/", root, QDBusConnection::ExportScriptableContents);
42 DBusGreeterList *list = new DBusGreeterList(greeter, connection, GREETER_LIST_DBUS_PATH);
45 DBusGreeterList *list = new DBusGreeterList(greeter, connection, GREETER_LIST_DBUS_PATH);
43 connection.registerObject(GREETER_LIST_DBUS_PATH, list, QDBusConnection::ExportScriptableContents);
46 connection.registerObject(GREETER_LIST_DBUS_PATH, list, QDBusConnection::ExportScriptableContents);
44 connection.registerService(GREETER_DBUS_SERVICE);
47 connection.registerService(GREETER_DBUS_SERVICE);
plugins/Lights/Lights.qmltypesnew file+45
@@ -0,0 +1,45 @@
1+import QtQuick.tooling 1.1
2+
3+// This file describes the plugin-supplied types contained in the library.
4+// It is used for QML tooling purposes only.
5+//
6+// This file was auto-generated by:
7+// 'qmlplugindump -notrelocatable Lights 0.1 plugins'
8+
9+Module {
10+ Component {
11+ name: "Lights"
12+ prototype: "QObject"
13+ exports: ["Lights/Lights 0.1"]
14+ isCreatable: false
15+ isSingleton: true
16+ exportMetaObjectRevisions: [0]
17+ Enum {
18+ name: "State"
19+ values: {
20+ "Off": 0,
21+ "On": 1
22+ }
23+ }
24+ Property { name: "state"; type: "State" }
25+ Property { name: "color"; type: "QColor" }
26+ Property { name: "onMillisec"; type: "int" }
27+ Property { name: "offMillisec"; type: "int" }
28+ Signal {
29+ name: "stateChanged"
30+ Parameter { name: "newState"; type: "State" }
31+ }
32+ Signal {
33+ name: "colorChanged"
34+ Parameter { name: "color"; type: "QColor" }
35+ }
36+ Signal {
37+ name: "onMillisecChanged"
38+ Parameter { name: "onMs"; type: "int" }
39+ }
40+ Signal {
41+ name: "offMillisecChanged"
42+ Parameter { name: "offMs"; type: "int" }
43+ }
44+ }
45+}
plugins/Powerd/Powerd.qmltypes+6−13
@@ -15,19 +15,12 @@ Module {
15 isSingleton: true
15 isSingleton: true
16 exportMetaObjectRevisions: [0]
16 exportMetaObjectRevisions: [0]
17 Enum {
17 Enum {
18− name: "DisplayFlag"
18+ name: "DisplayStateChangeReason"
19 values: {
19 values: {
20− "UseProximity": 1,
20+ "Unknown": 0,
21− "DisableAutoBrightness": 2,
21+ "Inactivity": 1,
22− "Bright": 4
22+ "PowerKey": 2,
23− }
23+ "Proximity": 3
24− }
25− Enum {
26− name: "DisplayFlags"
27− values: {
28− "UseProximity": 1,
29− "DisableAutoBrightness": 2,
30− "Bright": 4
31 }
24 }
32 }
25 }
33 Enum {
26 Enum {
@@ -40,7 +33,7 @@ Module {
40 Signal {
33 Signal {
41 name: "displayPowerStateChange"
34 name: "displayPowerStateChange"
42 Parameter { name: "status"; type: "int" }
35 Parameter { name: "status"; type: "int" }
43− Parameter { name: "flags"; type: "uint" }
36+ Parameter { name: "reason"; type: "int" }
44 }
37 }
45 }
38 }
46}
39}
plugins/Ubuntu/Gestures/Gestures.qmltypes+1
@@ -141,6 +141,7 @@ Module {
141 name: "touchSceneYChanged"
141 name: "touchSceneYChanged"
142 Parameter { name: "value"; type: "double" }
142 Parameter { name: "value"; type: "double" }
143 }
143 }
144+ Signal { name: "tapped" }
144 }
145 }
145 Component {
146 Component {
146 name: "PressedOutsideNotifier"
147 name: "PressedOutsideNotifier"
plugins/Unity/Session/dbusunitysessionservice.cpp+33
@@ -19,6 +19,7 @@
19
19
20// Qt
20// Qt
21#include <QDBusConnection>
21#include <QDBusConnection>
22+#include <QDBusInterface>
22
23
23DBusUnitySessionService::DBusUnitySessionService() : QObject()
24DBusUnitySessionService::DBusUnitySessionService() : QObject()
24{
25{
@@ -44,3 +45,35 @@ void DBusUnitySessionService::RequestLogout()
44{
45{
45 Q_EMIT logoutRequested(false);
46 Q_EMIT logoutRequested(false);
46}
47}
48+
49+void DBusUnitySessionService::Reboot()
50+{
51+ QDBusConnection connection = QDBusConnection::systemBus();
52+ QDBusInterface iface1 ("org.freedesktop.login1",
53+ "/org/freedesktop/login1",
54+ "org.freedesktop.login1.Manager",
55+ connection);
56+
57+ iface1.call("Reboot", false);
58+}
59+
60+void DBusUnitySessionService::RequestReboot()
61+{
62+ Q_EMIT rebootRequested(false);
63+}
64+
65+void DBusUnitySessionService::Shutdown()
66+{
67+ QDBusConnection connection = QDBusConnection::systemBus();
68+ QDBusInterface iface1 ("org.freedesktop.login1",
69+ "/org/freedesktop/login1",
70+ "org.freedesktop.login1.Manager",
71+ connection);
72+
73+ iface1.call("PowerOff", false);
74+}
75+
76+void DBusUnitySessionService::RequestShutdown()
77+{
78+ Q_EMIT shutdownRequested(false);
79+}
plugins/Unity/Session/dbusunitysessionservice.h+61−4
@@ -46,6 +46,27 @@ Q_SIGNALS:
46 */
46 */
47 void logoutRequested(bool have_inhibitors);
47 void logoutRequested(bool have_inhibitors);
48
48
49+ /**
50+ * rebootRequested signal
51+ *
52+ * This signal is emitted when some applications request the system to
53+ * reboot.
54+ * @param have_inhibitors if there are any special running applications
55+ * which inhibit the reboot.
56+ */
57+ void rebootRequested(bool have_inhibitors);
58+
59+ /**
60+ * shutdownRequested signal
61+ *
62+ * This signal is emitted when some applications request the system to
63+ * shutdown.
64+ * @param have_inhibitors if there are any special running applications
65+ * which inhibit the shutdown.
66+ */
67+ void shutdownRequested(bool have_inhibitors);
68+
69+
49 /**
70 /**
50 * logoutReady signal
71 * logoutReady signal
51 *
72 *
@@ -61,22 +82,58 @@ public Q_SLOTS:
61 * This method directly logout the system without user's confirmation.
82 * This method directly logout the system without user's confirmation.
62 * Ordinary applications should avoid calling this method. Please call
83 * Ordinary applications should avoid calling this method. Please call
63 * RequestLogout() to ask the user to decide logout or not.
84 * RequestLogout() to ask the user to decide logout or not.
64− * This method will stop all the running applications and then signal
65− * logoutReady when all the apps stopped.
66 */
85 */
67 Q_SCRIPTABLE void Logout();
86 Q_SCRIPTABLE void Logout();
68
87
88+ /**
89+ * Reboot the system.
90+ *
91+ * This method directly reboot the system without user's confirmation.
92+ * Ordinary applications should avoid calling this method. Please call
93+ * RequestReboot() to ask the user to decide reboot or not.
94+ */
95+ Q_SCRIPTABLE void Reboot();
96+
97+ /**
98+ * Shutdown the system.
99+ *
100+ * This method directly shutdown the system without user's confirmation.
101+ * Ordinary applications should avoid calling this method. Please call
102+ * RequestShutdown() to ask the user to decide shutdown or not.
103+ */
104+ Q_SCRIPTABLE void Shutdown();
105+
69 /**
106 /**
70 * Issue a logout request.
107 * Issue a logout request.
71 *
108 *
72 * This method emit the logoutRequested signal to the shell with a boolean
109 * This method emit the logoutRequested signal to the shell with a boolean
73 * which indicates if there's any inhibitors. The shell should receive
110 * which indicates if there's any inhibitors. The shell should receive
74 * this signal and display a dialog to ask the user to confirm the logout
111 * this signal and display a dialog to ask the user to confirm the logout
75− * action. If confirmed, shell can call Logout() method to kill the apps
112+ * action. If confirmed, shell can call Logout() method to logout.
76− * and then logout
77 */
113 */
78 Q_SCRIPTABLE void RequestLogout();
114 Q_SCRIPTABLE void RequestLogout();
79
115
116+ /**
117+ * Issue a reboot request.
118+ *
119+ * This method emit the rebootRequested signal to the shell with a boolean
120+ * which indicates if there's any inhibitors. The shell should receive
121+ * this signal and display a dialog to ask the user to confirm the reboot
122+ * action. If confirmed, shell can call Reboot() method to reboot
123+ */
124+ Q_SCRIPTABLE void RequestReboot();
125+
126+ /**
127+ * Issue a shutdown request.
128+ *
129+ * This method emit the shutdownRequested signal to the shell with a
130+ * boolean which indicates if there's any inhibitors.
131+ * The shell should receive
132+ * this signal and display a dialog to ask the user to confirm the reboot
133+ * action. If confirmed, shell can call Shutdown() method to reboot
134+ */
135+ Q_SCRIPTABLE void RequestShutdown();
136+
80};
137};
81
138
82#endif // DBUSUNITYSESSIONSERVICE_H
139#endif // DBUSUNITYSESSIONSERVICE_H
po/gl.po+4−4
@@ -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-07-07 12:15+0100\n"
10"POT-Creation-Date: 2014-07-07 12:15+0100\n"
11−"PO-Revision-Date: 2014-07-09 12:17+0000\n"
11+"PO-Revision-Date: 2014-07-17 19:55+0000\n"
12"Last-Translator: Marcos Lans <Unknown>\n"
12"Last-Translator: Marcos Lans <Unknown>\n"
13"Language-Team: Galician <gl@li.org>\n"
13"Language-Team: Galician <gl@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-07-10 07:29+0000\n"
17+"X-Launchpad-Export-Date: 2014-07-18 05:28+0000\n"
18−"X-Generator: Launchpad (build 17100)\n"
18+"X-Generator: Launchpad (build 17114)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -52,7 +52,7 @@ msgstr "Pechar"
52
52
53#: qml/Components/EdgeDemo.qml:172
53#: qml/Components/EdgeDemo.qml:172
54msgid "Swipe up again to close the settings screen"
54msgid "Swipe up again to close the settings screen"
55−msgstr "Esvare o dedo cara a arriba para pechar os axustes"
55+msgstr "Esvare o dedo de novo cara a arriba para pechar os axustes"
56
56
57#: qml/Components/EdgeDemo.qml:199
57#: qml/Components/EdgeDemo.qml:199
58msgid "Left edge"
58msgid "Left edge"
po/ko.po+1−1
@@ -14,7 +14,7 @@ msgstr ""
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-07-17 06:38+0000\n"
17+"X-Launchpad-Export-Date: 2014-07-18 05:28+0000\n"
18"X-Generator: Launchpad (build 17114)\n"
18"X-Generator: Launchpad (build 17114)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
po/nl.po+11−9
@@ -8,23 +8,23 @@ 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-07-07 12:15+0100\n"
10"POT-Creation-Date: 2014-07-07 12:15+0100\n"
11−"PO-Revision-Date: 2014-07-15 14:11+0000\n"
11+"PO-Revision-Date: 2014-07-17 19:21+0000\n"
12−"Last-Translator: Hannie Dumoleyn <Unknown>\n"
12+"Last-Translator: Pjotr12345 <Unknown>\n"
13"Language-Team: Dutch <nl@li.org>\n"
13"Language-Team: Dutch <nl@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-07-16 07:27+0000\n"
17+"X-Launchpad-Export-Date: 2014-07-18 05:28+0000\n"
18−"X-Generator: Launchpad (build 17112)\n"
18+"X-Generator: Launchpad (build 17114)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
22msgid "Pin shortcut"
22msgid "Pin shortcut"
23−msgstr ""
23+msgstr "Snelkoppeling vastzetten"
24
24
25#: plugins/Unity/Launcher/launcheritem.cpp:73
25#: plugins/Unity/Launcher/launcheritem.cpp:73
26msgid "Unpin shortcut"
26msgid "Unpin shortcut"
27−msgstr ""
27+msgstr "Snelkoppeling losmaken"
28
28
29#: qml/Components/EdgeDemoOverlay.qml:151
29#: qml/Components/EdgeDemoOverlay.qml:151
30msgid "Skip intro"
30msgid "Skip intro"
@@ -36,7 +36,7 @@ msgstr "Rechterrand"
36
36
37#: qml/Components/EdgeDemo.qml:114
37#: qml/Components/EdgeDemo.qml:114
38msgid "Try swiping from the right edge to unlock the phone"
38msgid "Try swiping from the right edge to unlock the phone"
39−msgstr ""
39+msgstr "Veeg vanuit de rechterrand om het scherm te ontgrendelen"
40
40
41#: qml/Components/EdgeDemo.qml:145
41#: qml/Components/EdgeDemo.qml:145
42msgid "Top edge"
42msgid "Top edge"
@@ -44,7 +44,7 @@ msgstr "Bovenrand"
44
44
45#: qml/Components/EdgeDemo.qml:146
45#: qml/Components/EdgeDemo.qml:146
46msgid "Try swiping from the top edge to access the indicators"
46msgid "Try swiping from the top edge to access the indicators"
47−msgstr ""
47+msgstr "Veeg vanuit de bovenrand om de indicatoren te bekijken"
48
48
49#: qml/Components/EdgeDemo.qml:171
49#: qml/Components/EdgeDemo.qml:171
50msgid "Close"
50msgid "Close"
@@ -71,6 +71,8 @@ msgid ""
71"You have now mastered the edge gestures and can start using the "
71"You have now mastered the edge gestures and can start using the "
72"phone<br><br>Tap on the screen to start"
72"phone<br><br>Tap on the screen to start"
73msgstr ""
73msgstr ""
74+"Nu u de bewegingen vanuit de randen onder de knie heeft, kunt u beginnen met "
75+"het gebruiken van de telefoon<br><br>Tik op het scherm om te beginnen"
74
76
75#: qml/Components/Lockscreen.qml:214
77#: qml/Components/Lockscreen.qml:214
76msgid "Emergency Call"
78msgid "Emergency Call"
@@ -163,7 +165,7 @@ msgstr "Wachtwoord tonen"
163
165
164#: qml/Notifications/NotificationMenuItemFactory.qml:103
166#: qml/Notifications/NotificationMenuItemFactory.qml:103
165msgid "Please enter SIM PIN"
167msgid "Please enter SIM PIN"
166−msgstr "Voer SIM PIN in"
168+msgstr "Voer SIM-pincode in"
167
169
168#: qml/Panel/Indicators/MenuItemFactory.qml:583
170#: qml/Panel/Indicators/MenuItemFactory.qml:583
169msgid "In queue…"
171msgid "In queue…"
po/pt.po+23−23
@@ -8,23 +8,23 @@ 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-07-07 12:15+0100\n"
10"POT-Creation-Date: 2014-07-07 12:15+0100\n"
11−"PO-Revision-Date: 2014-01-14 19:18+0000\n"
11+"PO-Revision-Date: 2014-07-18 00:00+0000\n"
12−"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12+"Last-Translator: Nuno André <Unknown>\n"
13"Language-Team: Portuguese <pt@li.org>\n"
13"Language-Team: Portuguese <pt@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-07-09 06:37+0000\n"
17+"X-Launchpad-Export-Date: 2014-07-18 05:28+0000\n"
18−"X-Generator: Launchpad (build 17100)\n"
18+"X-Generator: Launchpad (build 17114)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
22msgid "Pin shortcut"
22msgid "Pin shortcut"
23−msgstr ""
23+msgstr "Afixar atalho"
24
24
25#: plugins/Unity/Launcher/launcheritem.cpp:73
25#: plugins/Unity/Launcher/launcheritem.cpp:73
26msgid "Unpin shortcut"
26msgid "Unpin shortcut"
27−msgstr ""
27+msgstr "Remover atalho"
28
28
29#: qml/Components/EdgeDemoOverlay.qml:151
29#: qml/Components/EdgeDemoOverlay.qml:151
30msgid "Skip intro"
30msgid "Skip intro"
@@ -64,7 +64,7 @@ msgstr ""
64
64
65#: qml/Components/EdgeDemo.qml:227
65#: qml/Components/EdgeDemo.qml:227
66msgid "Well done"
66msgid "Well done"
67−msgstr ""
67+msgstr "Muito bem"
68
68
69#: qml/Components/EdgeDemo.qml:228
69#: qml/Components/EdgeDemo.qml:228
70msgid ""
70msgid ""
@@ -74,7 +74,7 @@ msgstr ""
74
74
75#: qml/Components/Lockscreen.qml:214
75#: qml/Components/Lockscreen.qml:214
76msgid "Emergency Call"
76msgid "Emergency Call"
77−msgstr ""
77+msgstr "Chamada de emergência"
78
78
79#: qml/Components/Lockscreen.qml:231
79#: qml/Components/Lockscreen.qml:231
80msgid "OK"
80msgid "OK"
@@ -82,16 +82,16 @@ msgstr ""
82
82
83#: qml/Components/PageHeader.qml:366
83#: qml/Components/PageHeader.qml:366
84msgid "Recent searches"
84msgid "Recent searches"
85−msgstr ""
85+msgstr "Pesquisas recentes"
86
86
87#: qml/Components/PassphraseLockscreen.qml:60
87#: qml/Components/PassphraseLockscreen.qml:60
88#, qt-format
88#, qt-format
89msgid "Hello %1"
89msgid "Hello %1"
90−msgstr ""
90+msgstr "Olá %1"
91
91
92#: qml/Components/PassphraseLockscreen.qml:60
92#: qml/Components/PassphraseLockscreen.qml:60
93msgid "Hello"
93msgid "Hello"
94−msgstr ""
94+msgstr "Olá"
95
95
96#: qml/Components/PinLockscreen.qml:198
96#: qml/Components/PinLockscreen.qml:198
97msgid "CANCEL"
97msgid "CANCEL"
@@ -103,11 +103,11 @@ msgstr ""
103
103
104#: qml/Components/SeeMore.qml:35
104#: qml/Components/SeeMore.qml:35
105msgid "See more"
105msgid "See more"
106−msgstr ""
106+msgstr "Ver mais"
107
107
108#: qml/Components/SeeMore.qml:58
108#: qml/Components/SeeMore.qml:58
109msgid "See less"
109msgid "See less"
110−msgstr ""
110+msgstr "Ver menos"
111
111
112#: qml/Dash/DashApps.qml:37
112#: qml/Dash/DashApps.qml:37
113msgid "Recent"
113msgid "Recent"
@@ -115,11 +115,11 @@ msgstr ""
115
115
116#: qml/Dash/Previews/PreviewActionCombo.qml:34
116#: qml/Dash/Previews/PreviewActionCombo.qml:34
117msgid "More..."
117msgid "More..."
118−msgstr ""
118+msgstr "Mais..."
119
119
120#: qml/Dash/Previews/PreviewActionCombo.qml:34
120#: qml/Dash/Previews/PreviewActionCombo.qml:34
121msgid "Less..."
121msgid "Less..."
122−msgstr ""
122+msgstr "Menos..."
123
123
124#: qml/Dash/Previews/PreviewRatingInput.qml:82
124#: qml/Dash/Previews/PreviewRatingInput.qml:82
125msgid "Rate this"
125msgid "Rate this"
@@ -131,7 +131,7 @@ msgstr ""
131
131
132#: qml/Dash/Previews/PreviewRatingInput.qml:168
132#: qml/Dash/Previews/PreviewRatingInput.qml:168
133msgid "Send"
133msgid "Send"
134−msgstr ""
134+msgstr "Enviar"
135
135
136#: qml/Greeter/Greeter.qml:157
136#: qml/Greeter/Greeter.qml:157
137msgid "Swipe to unlock"
137msgid "Swipe to unlock"
@@ -139,11 +139,11 @@ msgstr ""
139
139
140#: qml/Hud/HudParametrizedActionsPage.qml:132
140#: qml/Hud/HudParametrizedActionsPage.qml:132
141msgid "Confirm"
141msgid "Confirm"
142−msgstr ""
142+msgstr "Confirmar"
143
143
144#: qml/Hud/Hud.qml:61 qml/Hud/Hud.qml:99 qml/Hud/Hud.qml:372
144#: qml/Hud/Hud.qml:61 qml/Hud/Hud.qml:99 qml/Hud/Hud.qml:372
145msgid "Type or say a command"
145msgid "Type or say a command"
146−msgstr ""
146+msgstr "Digite ou diga um comando"
147
147
148#: qml/Hud/Hud.qml:84
148#: qml/Hud/Hud.qml:84
149msgid "Loading. Please Wait..."
149msgid "Loading. Please Wait..."
@@ -151,11 +151,11 @@ msgstr ""
151
151
152#: qml/Hud/Hud.qml:89
152#: qml/Hud/Hud.qml:89
153msgid "Speak Now..."
153msgid "Speak Now..."
154−msgstr ""
154+msgstr "Fale agora..."
155
155
156#: qml/Hud/Hud.qml:94
156#: qml/Hud/Hud.qml:94
157msgid "Speaking..."
157msgid "Speaking..."
158−msgstr ""
158+msgstr "A falar..."
159
159
160#: qml/Notifications/NotificationMenuItemFactory.qml:91
160#: qml/Notifications/NotificationMenuItemFactory.qml:91
161msgid "Show password"
161msgid "Show password"
@@ -163,7 +163,7 @@ msgstr ""
163
163
164#: qml/Notifications/NotificationMenuItemFactory.qml:103
164#: qml/Notifications/NotificationMenuItemFactory.qml:103
165msgid "Please enter SIM PIN"
165msgid "Please enter SIM PIN"
166−msgstr ""
166+msgstr "Por favor insira o PIN"
167
167
168#: qml/Panel/Indicators/MenuItemFactory.qml:583
168#: qml/Panel/Indicators/MenuItemFactory.qml:583
169msgid "In queue…"
169msgid "In queue…"
@@ -175,11 +175,11 @@ msgstr ""
175
175
176#: qml/Panel/Indicators/MenuItemFactory.qml:589
176#: qml/Panel/Indicators/MenuItemFactory.qml:589
177msgid "Paused, tap to resume"
177msgid "Paused, tap to resume"
178−msgstr ""
178+msgstr "Parado, toque para continuar"
179
179
180#: qml/Panel/Indicators/MenuItemFactory.qml:591
180#: qml/Panel/Indicators/MenuItemFactory.qml:591
181msgid "Canceled"
181msgid "Canceled"
182−msgstr ""
182+msgstr "Cancelado"
183
183
184#: qml/Panel/Indicators/MenuItemFactory.qml:593
184#: qml/Panel/Indicators/MenuItemFactory.qml:593
185msgid "Finished"
185msgid "Finished"
po/pt_BR.po+1−1
@@ -14,7 +14,7 @@ msgstr ""
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-07-17 06:38+0000\n"
17+"X-Launchpad-Export-Date: 2014-07-18 05:28+0000\n"
18"X-Generator: Launchpad (build 17114)\n"
18"X-Generator: Launchpad (build 17114)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
qml/Notifications/Notification.qml+21−7
@@ -36,7 +36,7 @@ Item {
36 property var hints
36 property var hints
37 property var notification
37 property var notification
38 property color color
38 property color color
39− property bool fullscreen
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 property Gradient greenGradient : Gradient {
@@ -48,7 +48,6 @@ Item {
48 GradientStop { position: 1.0; color: "#4d4745" }
48 GradientStop { position: 1.0; color: "#4d4745" }
49 }
49 }
50
50
51− fullscreen: false
52 objectName: "background"
51 objectName: "background"
53 implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : contentColumn.height + contentColumn.spacing * 2) : 0
52 implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : contentColumn.height + contentColumn.spacing * 2) : 0
54
53
@@ -80,7 +79,7 @@ Item {
80 Audio {
79 Audio {
81 id: sound
80 id: sound
82 objectName: "sound"
81 objectName: "sound"
83− source: hints["suppress-sound"] != "" ? hints["sound-file"] : undefined
82+ source: hints["suppress-sound"] != "true" && hints["sound-file"] != undefined ? hints["sound-file"] : ""
84 }
83 }
85
84
86 onOpacityChanged: {
85 onOpacityChanged: {
@@ -159,9 +158,17 @@ Item {
159 UnityMenuModel {
158 UnityMenuModel {
160 id: unityMenuModel
159 id: unityMenuModel
161
160
161+ property string lastNameOwner: ""
162+
162 busName: paths.busName
163 busName: paths.busName
163 actions: paths.actions
164 actions: paths.actions
164 menuObjectPath: paths.menuObjectPath
165 menuObjectPath: paths.menuObjectPath
166+ onNameOwnerChanged: {
167+ if (lastNameOwner != "" && nameOwner == "" && notification.notification != undefined) {
168+ notification.notification.close()
169+ }
170+ lastNameOwner = nameOwner
171+ }
165 }
172 }
166
173
167 Behavior on implicitHeight {
174 Behavior on implicitHeight {
@@ -272,14 +279,18 @@ Item {
272 }
279 }
273
280
274 Column {
281 Column {
282+ id: dialogColumn
275 objectName: "dialogListView"
283 objectName: "dialogListView"
276 spacing: units.gu(2)
284 spacing: units.gu(2)
277
285
278 visible: count > 0
286 visible: count > 0
279
287
288+ anchors {
289+ left: parent.left
280− anchors.left: parent.left; anchors.right: parent.right
290+ right: parent.right
281− anchors.top: fullscreen ? parent.top : undefined
291+ top: fullscreen ? parent.top : undefined
282− anchors.bottom: fullscreen ? parent.bottom : undefined
292+ bottom: fullscreen ? parent.bottom : undefined
293+ }
283
294
284 Repeater {
295 Repeater {
285 model: unityMenuModel
296 model: unityMenuModel
@@ -287,7 +298,10 @@ Item {
287 NotificationMenuItemFactory {
298 NotificationMenuItemFactory {
288 id: menuItemFactory
299 id: menuItemFactory
289
300
290− anchors.left: parent.left; anchors.right: parent.right
301+ anchors {
302+ left: dialogColumn.left
303+ right: dialogColumn.right
304+ }
291
305
292 menuModel: unityMenuModel
306 menuModel: unityMenuModel
293 menuData: model
307 menuData: model
qml/Notifications/NotificationMenuItemFactory.qml+12−3
@@ -50,7 +50,10 @@ Loader {
50 Column {
50 Column {
51 spacing: units.gu(2)
51 spacing: units.gu(2)
52
52
53+ anchors {
54+ left: parent.left
53− anchors.left: parent.left; anchors.right: parent.right
55+ right: parent.right
56+ }
54
57
55 Component.onCompleted: {
58 Component.onCompleted: {
56 menuModel.loadExtendedAttributes(menuIndex, {"x-echo-mode-password": "bool"});
59 menuModel.loadExtendedAttributes(menuIndex, {"x-echo-mode-password": "bool"});
@@ -67,7 +70,10 @@ Loader {
67
70
68 // TODO using Qt.ImhNoPredictiveText here until lp #1291575 is fixed for ubuntu-ui-toolkit
71 // TODO using Qt.ImhNoPredictiveText here until lp #1291575 is fixed for ubuntu-ui-toolkit
69 inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText
72 inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText
73+ anchors {
74+ left: parent.left
70− anchors.left: parent.left; anchors.right: parent.right
75+ right: parent.right
76+ }
71 echoMode: checkBox.checked ? TextInput.Normal : TextInput.Password
77 echoMode: checkBox.checked ? TextInput.Normal : TextInput.Password
72 height: units.gu(5)
78 height: units.gu(5)
73 onTextChanged: {
79 onTextChanged: {
@@ -98,7 +104,10 @@ Loader {
98 id: pinLock
104 id: pinLock
99
105
100 Lockscreen {
106 Lockscreen {
107+ anchors {
108+ left: parent.left
101− anchors.left: parent.left; anchors.right: parent.right
109+ right: parent.right
110+ }
102 height: menuFactory.maxHeight
111 height: menuFactory.maxHeight
103 placeholderText: i18n.tr("Please enter SIM PIN")
112 placeholderText: i18n.tr("Please enter SIM PIN")
104 background: shell.background
113 background: shell.background
qml/Notifications/Notifications.qml+17−1
@@ -36,8 +36,11 @@ ListView {
36 filterRole: UnityNotifications.ModelInterface.RoleType
36 filterRole: UnityNotifications.ModelInterface.RoleType
37 filterRegExp: RegExp(UnityNotifications.Notification.SnapDecision)
37 filterRegExp: RegExp(UnityNotifications.Notification.SnapDecision)
38 }
38 }
39− spacing: delegate.fullscreen ? 0 : units.gu(.5)
40
39
40+ property bool topmostIsFullscreen: false
41+ spacing: topmostIsFullscreen ? 0 : units.gu(.5)
42+
43+ // FIXME: This doesn't make any sense and results in a binding loop
41 currentIndex: (currentIndex < 1 && count > 1) ? 1 : -1
44 currentIndex: (currentIndex < 1 && count > 1) ? 1 : -1
42
45
43 delegate: Notification {
46 delegate: Notification {
@@ -61,6 +64,19 @@ ListView {
61 // make sure there's no opacity-difference between the several
64 // make sure there's no opacity-difference between the several
62 // elements in a notification
65 // elements in a notification
63 layer.enabled: add.running || remove.running || populate.running
66 layer.enabled: add.running || remove.running || populate.running
67+
68+ Component.onCompleted: {
69+ if (index == 1) {
70+ notificationList.topmostIsFullscreen = fullscreen
71+ }
72+ }
73+
74+ onFullscreenChanged: {
75+ // index 1 because 0 is the PlaceHolder...
76+ if (index == 1) {
77+ notificationList.topmostIsFullscreen = fullscreen
78+ }
79+ }
64 }
80 }
65
81
66 populate: Transition {
82 populate: Transition {
qml/Panel/Indicators.qml+1
@@ -262,6 +262,7 @@ Showable {
262 indicators.calculateCurrentItem(touchX, false);
262 indicators.calculateCurrentItem(touchX, false);
263 } else {
263 } else {
264 indicators.state = "commit";
264 indicators.state = "commit";
265+ indicatorRow.currentItemOffset = 0;
265 }
266 }
266 }
267 }
267
268
qml/Panel/Indicators/MenuItemFactory.qml−6
@@ -140,7 +140,6 @@ Item {
140
140
141 onTriggered: {
141 onTriggered: {
142 menuModel.activate(menuIndex);
142 menuModel.activate(menuIndex);
143− shell.hideIndicatorMenu(UbuntuAnimation.FastDuration);
144 }
143 }
145 }
144 }
146 }
145 }
@@ -186,7 +185,6 @@ Item {
186
185
187 onTriggered: {
186 onTriggered: {
188 menuModel.activate(menuIndex);
187 menuModel.activate(menuIndex);
189− shell.hideIndicatorMenu(UbuntuAnimation.BriskDuration);
190 }
188 }
191 }
189 }
192 }
190 }
@@ -205,7 +203,6 @@ Item {
205
203
206 onTriggered: {
204 onTriggered: {
207 menuModel.activate(menuIndex);
205 menuModel.activate(menuIndex);
208− shell.hideIndicatorMenu(UbuntuAnimation.BriskDuration);
209 }
206 }
210 }
207 }
211 }
208 }
@@ -226,7 +223,6 @@ Item {
226
223
227 onTriggered: {
224 onTriggered: {
228 menuModel.activate(menuIndex);
225 menuModel.activate(menuIndex);
229− shell.hideIndicatorMenu(UbuntuAnimation.BriskDuration);
230 }
226 }
231 }
227 }
232 }
228 }
@@ -367,7 +363,6 @@ Item {
367 }
363 }
368 onTriggered: {
364 onTriggered: {
369 menuModel.activate(menuIndex);
365 menuModel.activate(menuIndex);
370− shell.hideIndicatorMenu(UbuntuAnimation.BriskDuration);
371 }
366 }
372
367
373 function loadAttributes() {
368 function loadAttributes() {
@@ -412,7 +407,6 @@ Item {
412 }
407 }
413 onClicked: {
408 onClicked: {
414 menuModel.activate(menuIndex, true);
409 menuModel.activate(menuIndex, true);
415− shell.hideIndicatorMenu(UbuntuAnimation.FastDuration);
416 }
410 }
417 onDismissed: {
411 onDismissed: {
418 menuModel.activate(menuIndex, false);
412 menuModel.activate(menuIndex, false);
qml/Panel/Indicators/MessageMenuItemFactory.qml−3
@@ -95,7 +95,6 @@ Item {
95
95
96 onAppActivated: {
96 onAppActivated: {
97 menuModel.activate(menuIndex, true);
97 menuModel.activate(menuIndex, true);
98− shell.hideIndicatorMenu(UbuntuAnimation.FastDuration);
99 }
98 }
100 onDismissed: {
99 onDismissed: {
101 menuModel.activate(menuIndex, false);
100 menuModel.activate(menuIndex, false);
@@ -144,7 +143,6 @@ Item {
144
143
145 onAppActivated: {
144 onAppActivated: {
146 menuModel.activate(menuIndex, true);
145 menuModel.activate(menuIndex, true);
147− shell.hideIndicatorMenu(UbuntuAnimation.FastDuration);
148 }
146 }
149 onDismissed: {
147 onDismissed: {
150 menuModel.activate(menuIndex, false);
148 menuModel.activate(menuIndex, false);
@@ -204,7 +202,6 @@ Item {
204
202
205 onAppActivated: {
203 onAppActivated: {
206 menuModel.activate(menuIndex, true);
204 menuModel.activate(menuIndex, true);
207− shell.hideIndicatorMenu(UbuntuAnimation.FastDuration);
208 }
205 }
209 onDismissed: {
206 onDismissed: {
210 menuModel.activate(menuIndex, false);
207 menuModel.activate(menuIndex, false);
qml/Panel/Panel.qml−22
@@ -27,28 +27,6 @@ Item {
27 property alias callHint: __callHint
27 property alias callHint: __callHint
28 property bool fullscreenMode: false
28 property bool fullscreenMode: false
29
29
30− function hideIndicatorMenu(delay) {
31− if (delay !== undefined) {
32− hideTimer.interval = delay;
33− hideTimer.start();
34− } else {
35− indicators.hide();
36− }
37− }
38−
39− Timer {
40− id: hideTimer
41− running: false
42− onTriggered: {
43− indicators.hide();
44− }
45− }
46−
47− Connections {
48− target: indicators
49− onShownChanged: hideTimer.stop()
50− }
51−
52 Rectangle {
30 Rectangle {
53 id: darkenedArea
31 id: darkenedArea
54 property real darkenedOpacity: 0.6
32 property real darkenedOpacity: 0.6
qml/Shell.qml+200−6
@@ -19,6 +19,7 @@ import AccountsService 0.1
19import GSettings 1.0
19import GSettings 1.0
20import Unity.Application 0.1
20import Unity.Application 0.1
21import Ubuntu.Components 0.1
21import Ubuntu.Components 0.1
22+import Ubuntu.Components.Popups 0.1
22import Ubuntu.Gestures 0.1
23import Ubuntu.Gestures 0.1
23import Unity.Launcher 0.1
24import Unity.Launcher 0.1
24import LightDM 0.1 as LightDM
25import LightDM 0.1 as LightDM
@@ -268,7 +269,128 @@ FocusScope {
268 }
269 }
269 }
270 }
270
271
272+ property bool dialogShown: false
273+
274+ Component {
275+ id: logoutDialog
276+ Dialog {
277+ id: dialogueLogout
278+ title: "Logout"
279+ text: "Are you sure that you want to logout?"
280+ Button {
281+ text: "Cancel"
282+ onClicked: {
283+ PopupUtils.close(dialogueLogout);
284+ stages.dialogShown = false;
285+ }
286+ }
287+ Button {
288+ text: "Yes"
289+ onClicked: {
290+ DBusUnitySessionService.Logout();
291+ PopupUtils.close(dialogueLogout);
292+ stages.dialogShown = false;
293+ }
294+ }
295+ }
296+ }
297+
298+ Component {
299+ id: shutdownDialog
300+ Dialog {
301+ id: dialogueShutdown
302+ title: "Shutdown"
303+ text: "Are you sure that you want to shutdown?"
304+ Button {
305+ text: "Cancel"
306+ onClicked: {
307+ PopupUtils.close(dialogueShutdown);
308+ stages.dialogShown = false;
309+ }
310+ }
311+ Button {
312+ text: "Yes"
313+ onClicked: {
314+ dBusUnitySessionServiceConnection.closeAllApps();
315+ DBusUnitySessionService.Shutdown();
316+ PopupUtils.close(dialogueShutdown);
317+ stages.dialogShown = false;
318+ }
319+ }
320+ }
321+ }
322+
323+ Component {
324+ id: rebootDialog
325+ Dialog {
326+ id: dialogueReboot
327+ title: "Reboot"
328+ text: "Are you sure that you want to reboot?"
329+ Button {
330+ text: "Cancel"
331+ onClicked: {
332+ PopupUtils.close(dialogueReboot)
333+ stages.dialogShown = false;
334+ }
335+ }
336+ Button {
337+ text: "Yes"
338+ onClicked: {
339+ dBusUnitySessionServiceConnection.closeAllApps();
340+ DBusUnitySessionService.Reboot();
341+ PopupUtils.close(dialogueReboot);
342+ stages.dialogShown = false;
343+ }
344+ }
345+ }
346+ }
347+
348+ Component {
349+ id: powerDialog
350+ Dialog {
351+ id: dialoguePower
352+ title: "Power"
353+ text: i18n.tr("Are you sure you would like to turn power off?")
354+ Button {
355+ text: i18n.tr("Power off")
356+ onClicked: {
357+ dBusUnitySessionServiceConnection.closeAllApps();
358+ PopupUtils.close(dialoguePower);
359+ stages.dialogShown = false;
360+ shutdownFadeOutRectangle.enabled = true;
361+ shutdownFadeOutRectangle.visible = true;
362+ shutdownFadeOut.start();
363+ }
364+ }
365+ Button {
366+ text: i18n.tr("Restart")
367+ onClicked: {
368+ dBusUnitySessionServiceConnection.closeAllApps();
369+ DBusUnitySessionService.Reboot();
370+ PopupUtils.close(dialoguePower);
371+ stages.dialogShown = false;
372+ }
373+ }
374+ Button {
375+ text: i18n.tr("Cancel")
376+ onClicked: {
377+ PopupUtils.close(dialoguePower);
378+ stages.dialogShown = false;
379+ }
380+ }
381+ }
382+ }
383+
384+ function showPowerDialog() {
385+ if (!stages.dialogShown) {
386+ stages.dialogShown = true;
387+ PopupUtils.open(powerDialog);
388+ }
389+ }
390+
271 Connections {
391 Connections {
392+ id: dBusUnitySessionServiceConnection
393+ objectName: "dBusUnitySessionServiceConnection"
272 target: DBusUnitySessionService
394 target: DBusUnitySessionService
273
395
274 function closeAllApps() {
396 function closeAllApps() {
@@ -282,8 +404,27 @@ FocusScope {
282 }
404 }
283
405
284 onLogoutRequested: {
406 onLogoutRequested: {
407+ // Display a dialog to ask the user to confirm.
408+ if (!stages.dialogShown) {
409+ stages.dialogShown = true;
410+ PopupUtils.open(logoutDialog);
411+ }
412+ }
413+
414+ onShutdownRequested: {
285− // TODO: Display a dialog to ask the user to confirm.
415+ // Display a dialog to ask the user to confirm.
286− DBusUnitySessionService.Logout();
416+ if (!stages.dialogShown) {
417+ stages.dialogShown = true;
418+ PopupUtils.open(shutdownDialog);
419+ }
420+ }
421+
422+ onRebootRequested: {
423+ // Display a dialog to ask the user to confirm.
424+ if (!stages.dialogShown) {
425+ stages.dialogShown = true;
426+ PopupUtils.open(rebootDialog);
427+ }
287 }
428 }
288
429
289 onLogoutReady: {
430 onLogoutReady: {
@@ -348,6 +489,8 @@ FocusScope {
348 Connections {
489 Connections {
349 target: LightDM.Greeter
490 target: LightDM.Greeter
350
491
492+ onShowGreeter: greeter.show()
493+
351 onShowPrompt: {
494 onShowPrompt: {
352 if (LightDM.Users.count == 1) {
495 if (LightDM.Users.count == 1) {
353 // TODO: There's no better way for now to determine if its a PIN or a passphrase.
496 // TODO: There's no better way for now to determine if its a PIN or a passphrase.
@@ -373,6 +516,12 @@ FocusScope {
373 }
516 }
374 }
517 }
375
518
519+ Binding {
520+ target: LightDM.Greeter
521+ property: "active"
522+ value: greeter.shown || lockscreen.shown
523+ }
524+
376 Rectangle {
525 Rectangle {
377 anchors.fill: parent
526 anchors.fill: parent
378 color: "black"
527 color: "black"
@@ -412,6 +561,9 @@ FocusScope {
412 onShownChanged: {
561 onShownChanged: {
413 if (shown) {
562 if (shown) {
414 lockscreen.reset();
563 lockscreen.reset();
564+ if (!LightDM.Greeter.promptless) {
565+ lockscreen.show();
566+ }
415 // If there is only one user, we start authenticating with that one here.
567 // If there is only one user, we start authenticating with that one here.
416 // If there are more users, the Greeter will handle that
568 // If there are more users, the Greeter will handle that
417 if (LightDM.Users.count == 1) {
569 if (LightDM.Users.count == 1) {
@@ -472,10 +624,6 @@ FocusScope {
472 stages.hide()
624 stages.hide()
473 }
625 }
474
626
475− function hideIndicatorMenu(delay) {
476− panel.hideIndicatorMenu(delay);
477− }
478−
479 Item {
627 Item {
480 id: overlay
628 id: overlay
481
629
@@ -679,4 +827,50 @@ FocusScope {
679 target: SessionBroadcast
827 target: SessionBroadcast
680 onShowHome: showHome()
828 onShowHome: showHome()
681 }
829 }
830+
831+ Keys.onPressed: {
832+ if (event.key == Qt.Key_PowerOff || event.key == Qt.Key_PowerDown) {
833+ if (!powerKeyTimer.running) {
834+ powerKeyTimer.start();
835+ }
836+ event.accepted = true;
837+ }
838+ }
839+
840+ Keys.onReleased: {
841+ if (event.key == Qt.Key_PowerOff || event.key == Qt.Key_PowerDown) {
842+ powerKeyTimer.stop();
843+ event.accepted = true;
844+ }
845+ }
846+
847+ Timer {
848+ id: powerKeyTimer
849+ interval: 2000
850+ repeat: false
851+ triggeredOnStart: false
852+
853+ onTriggered: {
854+ stages.showPowerDialog();
855+ }
856+ }
857+
858+ Rectangle {
859+ id: shutdownFadeOutRectangle
860+ enabled: false
861+ visible: false
862+ color: "black"
863+ anchors.fill: parent
864+ opacity: 0.0
865+ NumberAnimation on opacity {
866+ id: shutdownFadeOut
867+ from: 0.0
868+ to: 1.0
869+ onStopped: {
870+ if (shutdownFadeOutRectangle.enabled && shutdownFadeOutRectangle.visible) {
871+ DBusUnitySessionService.Shutdown();
872+ }
873+ }
874+ }
875+ }
682}
876}
tests/mocks/LightDM/CMakeLists.txt+1
@@ -18,6 +18,7 @@ include_directories(
18)
18)
19
19
20set(QMLPLUGIN_SRC
20set(QMLPLUGIN_SRC
21+ ${CMAKE_SOURCE_DIR}/plugins/LightDM/DBusGreeter.cpp
21 ${CMAKE_SOURCE_DIR}/plugins/LightDM/DBusGreeterList.cpp
22 ${CMAKE_SOURCE_DIR}/plugins/LightDM/DBusGreeterList.cpp
22 ${CMAKE_SOURCE_DIR}/plugins/LightDM/Greeter.cpp
23 ${CMAKE_SOURCE_DIR}/plugins/LightDM/Greeter.cpp
23 ${CMAKE_SOURCE_DIR}/plugins/LightDM/plugin.cpp
24 ${CMAKE_SOURCE_DIR}/plugins/LightDM/plugin.cpp
tests/mocks/Powerd/Powerd.qmltypes+6−13
@@ -15,19 +15,12 @@ Module {
15 isSingleton: true
15 isSingleton: true
16 exportMetaObjectRevisions: [0]
16 exportMetaObjectRevisions: [0]
17 Enum {
17 Enum {
18− name: "DisplayFlag"
18+ name: "DisplayStateChangeReason"
19 values: {
19 values: {
20− "UseProximity": 1,
20+ "Unknown": 0,
21− "DisableAutoBrightness": 2,
21+ "Inactivity": 1,
22− "Bright": 4
22+ "PowerKey": 2,
23− }
23+ "Proximity": 3
24− }
25− Enum {
26− name: "DisplayFlags"
27− values: {
28− "UseProximity": 1,
29− "DisableAutoBrightness": 2,
30− "Bright": 4
31 }
24 }
32 }
25 }
33 Enum {
26 Enum {
@@ -40,7 +33,7 @@ Module {
40 Signal {
33 Signal {
41 name: "displayPowerStateChange"
34 name: "displayPowerStateChange"
42 Parameter { name: "status"; type: "int" }
35 Parameter { name: "status"; type: "int" }
43− Parameter { name: "flags"; type: "uint" }
36+ Parameter { name: "reason"; type: "int" }
44 }
37 }
45 }
38 }
46}
39}
tests/mocks/Unity/Unity.qmltypes+10−2
@@ -89,6 +89,10 @@ Module {
89 name: "loadDepartment"
89 name: "loadDepartment"
90 Parameter { name: "id"; type: "string" }
90 Parameter { name: "id"; type: "string" }
91 }
91 }
92+ Method {
93+ name: "performQuery"
94+ Parameter { name: "query"; type: "string" }
95+ }
92 }
96 }
93 Component {
97 Component {
94 name: "Scopes"
98 name: "Scopes"
@@ -133,8 +137,8 @@ Module {
133 "RoleRawRendererTemplate": 3,
137 "RoleRawRendererTemplate": 3,
134 "RoleRenderer": 4,
138 "RoleRenderer": 4,
135 "RoleComponents": 5,
139 "RoleComponents": 5,
136− "RoleResults": 6,
140+ "RoleResults": 7,
137− "RoleCount": 7
141+ "RoleCount": 8
138 }
142 }
139 }
143 }
140 Method {
144 Method {
@@ -179,6 +183,9 @@ Module {
179 Component {
183 Component {
180 name: "unity::shell::scopes::PreviewModelInterface"
184 name: "unity::shell::scopes::PreviewModelInterface"
181 prototype: "QAbstractListModel"
185 prototype: "QAbstractListModel"
186+ exports: ["Unity/PreviewModel 0.2"]
187+ isCreatable: false
188+ exportMetaObjectRevisions: [0]
182 Enum {
189 Enum {
183 name: "Roles"
190 name: "Roles"
184 values: {
191 values: {
@@ -272,6 +279,7 @@ Module {
272 Property { name: "isActive"; type: "bool" }
279 Property { name: "isActive"; type: "bool" }
273 Property { name: "currentDepartmentId"; type: "string"; isReadonly: true }
280 Property { name: "currentDepartmentId"; type: "string"; isReadonly: true }
274 Property { name: "hasDepartments"; type: "bool"; isReadonly: true }
281 Property { name: "hasDepartments"; type: "bool"; isReadonly: true }
282+ Property { name: "customizations"; type: "QVariantMap"; isReadonly: true }
275 Signal { name: "showDash" }
283 Signal { name: "showDash" }
276 Signal { name: "hideDash" }
284 Signal { name: "hideDash" }
277 Signal {
285 Signal {
tests/plugins/LightDM/CMakeLists.txt+1−1
@@ -19,7 +19,7 @@ target_link_libraries(test-lightdm-dbus
19
19
20add_definitions(-DCURRENT_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
20add_definitions(-DCURRENT_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
21
21
22−add_custom_target(testLightDMDBus dbus-launch env QML2_IMPORT_PATH=${CMAKE_BINARY_DIR}/tests/mocks LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/LightDM/full ${CMAKE_CURRENT_BINARY_DIR}/test-lightdm-dbus)
22+add_custom_target(testLightDMDBus xvfb-run --server-args "-screen 0 1024x768x24" --auto-servernum dbus-launch env QML2_IMPORT_PATH=${CMAKE_BINARY_DIR}/tests/mocks LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/LightDM/full ${CMAKE_CURRENT_BINARY_DIR}/test-lightdm-dbus)
23add_dependencies(testLightDMDBus test-lightdm-dbus)
23add_dependencies(testLightDMDBus test-lightdm-dbus)
24
24
25add_dependencies(qmluitests testLightDMDBus)
25add_dependencies(qmluitests testLightDMDBus)
tests/plugins/LightDM/dbus.cpp+40
@@ -38,6 +38,13 @@ private Q_SLOTS:
38 // SIGNAL method, because QtDBus doesn't know about PropertiesChanged.
38 // SIGNAL method, because QtDBus doesn't know about PropertiesChanged.
39 // So we connect the hard way for the benefit of any tests that want
39 // So we connect the hard way for the benefit of any tests that want
40 // to watch.
40 // to watch.
41+ QDBusConnection::sessionBus().connect(
42+ "com.canonical.UnityGreeter",
43+ "/",
44+ "org.freedesktop.DBus.Properties",
45+ "PropertiesChanged",
46+ this,
47+ SIGNAL(PropertiesChangedRelay(const QString&, const QVariantMap&, const QStringList&)));
41 QDBusConnection::sessionBus().connect(
48 QDBusConnection::sessionBus().connect(
42 "com.canonical.UnityGreeter",
49 "com.canonical.UnityGreeter",
43 "/list",
50 "/list",
@@ -57,6 +64,12 @@ private Q_SLOTS:
57 view->show();
64 view->show();
58 QTest::qWaitForWindowExposed(view);
65 QTest::qWaitForWindowExposed(view);
59
66
67+ dbusMain = new QDBusInterface("com.canonical.UnityGreeter",
68+ "/",
69+ "com.canonical.UnityGreeter",
70+ QDBusConnection::sessionBus(), view);
71+ QVERIFY(dbusMain->isValid());
72+
60 dbusList = new QDBusInterface("com.canonical.UnityGreeter",
73 dbusList = new QDBusInterface("com.canonical.UnityGreeter",
61 "/list",
74 "/list",
62 "com.canonical.UnityGreeter.List",
75 "com.canonical.UnityGreeter.List",
@@ -155,9 +168,36 @@ private Q_SLOTS:
155 QVERIFY(arguments.at(1).toMap()["EntryIsLocked"] == false);
168 QVERIFY(arguments.at(1).toMap()["EntryIsLocked"] == false);
156 }
169 }
157
170
171+ void testIsActive()
172+ {
173+ QVERIFY(!greeter->isActive());
174+ QVERIFY(!dbusMain->property("IsActive").toBool());
175+
176+ QSignalSpy spy(this, SIGNAL(PropertiesChangedRelay(QString, QVariantMap, QStringList)));
177+ greeter->setIsActive(true);
178+ spy.wait();
179+
180+ QVERIFY(greeter->isActive());
181+ QVERIFY(dbusMain->property("IsActive").toBool());
182+
183+ QCOMPARE(spy.count(), 1);
184+ QList<QVariant> arguments = spy.takeFirst();
185+ QCOMPARE(arguments.at(0).toString(), QString("com.canonical.UnityGreeter"));
186+ QVERIFY(arguments.at(1).toMap().contains("IsActive"));
187+ QVERIFY(arguments.at(1).toMap()["IsActive"].toBool());
188+ }
189+
190+ void testShowGreeter()
191+ {
192+ // Just confirm the call exists and doesn't fail
193+ QDBusReply<void> reply = dbusMain->call("ShowGreeter");
194+ QVERIFY(reply.isValid());
195+ }
196+
158private:
197private:
159 QQuickView *view;
198 QQuickView *view;
160 Greeter *greeter;
199 Greeter *greeter;
200+ QDBusInterface *dbusMain;
161 QDBusInterface *dbusList;
201 QDBusInterface *dbusList;
162};
202};
163
203
tests/qmltests/Dash/tst_DashContent.qml+1
@@ -316,6 +316,7 @@ Item {
316 compare(allButton.visible, true);
316 compare(allButton.visible, true);
317 compare(backButton.visible, true);
317 compare(backButton.visible, true);
318
318
319+ tryCompare(departmentListView, "contentX", departmentList1.x);
319 waitForRendering(departmentListView);
320 waitForRendering(departmentListView);
320 mouseClick(allButton, 0, 0);
321 mouseClick(allButton, 0, 0);
321 compare(dashDepartments.showList, false);
322 compare(dashDepartments.showList, false);
tests/qmltests/Panel/tst_Panel.qml−14
@@ -333,19 +333,5 @@ Item {
333
333
334 compare(indicatorRow.currentItem, indicatorItemFirst, "First indicator should still be the current item");
334 compare(indicatorRow.currentItem, indicatorItemFirst, "First indicator should still be the current item");
335 }
335 }
336−
337− function test_hideIndicatorMenu_data() {
338− return [ {tag: "no-delay", delay: undefined },
339− {tag: "delayed", delay: 200 }
340− ];
341− }
342−
343− function test_hideIndicatorMenu(data) {
344− panel.indicators.show();
345− compare(panel.indicators.shown, true);
346−
347− panel.hideIndicatorMenu(data.delay);
348− tryCompare(panel.indicators, "shown", false);
349− }
350 }
336 }
351}
337}
tests/qmltests/tst_Shell.qml+8
@@ -20,6 +20,7 @@
20import QtQuick 2.0
20import QtQuick 2.0
21import QtTest 1.0
21import QtTest 1.0
22import GSettings 1.0
22import GSettings 1.0
23+import LightDM 0.1 as LightDM
23import Unity.Application 0.1
24import Unity.Application 0.1
24import Unity.Test 0.1 as UT
25import Unity.Test 0.1 as UT
25import Powerd 0.1
26import Powerd 0.1
@@ -520,5 +521,12 @@ Item {
520 tryCompare(greeter, "showProgress", 0)
521 tryCompare(greeter, "showProgress", 0)
521 waitUntilApplicationWindowIsFullyVisible()
522 waitUntilApplicationWindowIsFullyVisible()
522 }
523 }
524+
525+ function test_showGreeterDBusCall() {
526+ var greeter = findChild(shell, "greeter")
527+ tryCompare(greeter, "showProgress", 0)
528+ LightDM.Greeter.showGreeter()
529+ tryCompare(greeter, "showProgress", 1)
530+ }
523 }
531 }
524}
532}