Merge lp:~lukas-kde/unity8/sessionIndicatorForDevices into lp:unity8

Proposed by Lukáš Tinkl
Status: Superseded
Proposed branch: lp:~lukas-kde/unity8/sessionIndicatorForDevices
Merge into: lp:unity8
Prerequisite: lp:~mzanetti/unity8/better-windowed-logic
Diff against target: 124 lines (+28/-9)
4 files modified
plugins/Unity/Indicators/indicatorsmanager.cpp (+3/-5)
plugins/Unity/Session/dbusunitysessionservice.cpp (+4/-1)
qml/Panel/Indicators/MenuItemFactory.qml (+16/-3)
qml/Shell.qml (+5/-0)
To merge this branch: bzr merge lp:~lukas-kde/unity8/sessionIndicatorForDevices
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Needs Fixing
Unity Team Pending
Review via email: mp+288466@code.launchpad.net

This proposal has been superseded by a proposal from 2016-03-11.

Commit message

Session indicator convergence

Description of the change

Session indicator convergence

Enables the session indicator also on devices, tweaking/hiding some of the items that don't make sense there.

Cf. https://docs.google.com/spreadsheets/d/1coL7U4BrOMrK3op7y9TPmmLcBAlgtzoUcKIYrbFhQvU

* Are there any related MPs required for this MP to build/function as expected? Please list.

https://code.launchpad.net/~mzanetti/unity8/better-windowed-logic/+merge/284731 and https://code.launchpad.net/~lukas-kde/indicator-session/desktopModeSwitch/+merge/288413

Also needs indicator-session to be installed by default on devices!

 * Did you perform an exploratory manual test run of your code change and any related functionality?

Yes

 * Did you make sure that your branch does not contain spurious tags?

Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

Yes

 * If you changed the UI, has there been a design review?

Yes, as per https://docs.google.com/spreadsheets/d/1coL7U4BrOMrK3op7y9TPmmLcBAlgtzoUcKIYrbFhQvU

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2219
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/661/
Executed test runs:
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/376
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial,testname=qmluitests.sh/376
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=autopilot.sh/376
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/867
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/883
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/883
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/881
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/881/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/881
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/881/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/881
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/881/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/881
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/881/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/881
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/881/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/881
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/881/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/661/rebuild

review: Needs Fixing (continuous-integration)
2220. By Lukáš Tinkl

create our own unity8-schemas package

2221. By Lukáš Tinkl

merge prereq

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/Unity/Indicators/indicatorsmanager.cpp'
2--- plugins/Unity/Indicators/indicatorsmanager.cpp 2015-12-02 12:02:50 +0000
3+++ plugins/Unity/Indicators/indicatorsmanager.cpp 2016-03-09 13:18:01 +0000
4@@ -1,5 +1,5 @@
5 /*
6- * Copyright (C) 2013 Canonical, Ltd.
7+ * Copyright (C) 2013-2016 Canonical, Ltd.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11@@ -12,8 +12,6 @@
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- * Author: Nick Dedekind <nick.dedekind@canonical.com>
17 */
18
19 #include "indicatorsmanager.h"
20@@ -286,12 +284,12 @@
21 new_indicator->init(data->m_fileInfo.fileName(), settings);
22
23 // convergence:
24- // 1) enable session indicator conditionally, typically when running in a multisession/multiuser environment
25+ // 1) enable session indicator
26 // 2) on a PC, switch the battery/power indicator to desktop mode,
27 // can't control brightness for now and phone-on-desktop broken (FIXME)
28 //
29 // The rest of the indicators respect their default profile (which is "phone", even on desktop PCs)
30- if ((new_indicator->identifier() == QStringLiteral("indicator-session") && m_platform.isMultiSession())
31+ if ((new_indicator->identifier() == QStringLiteral("indicator-session"))
32 || (new_indicator->identifier() == QStringLiteral("indicator-power") && m_platform.isPC())) {
33 new_indicator->setProfile("desktop");
34 } else {
35
36=== modified file 'plugins/Unity/Session/dbusunitysessionservice.cpp'
37--- plugins/Unity/Session/dbusunitysessionservice.cpp 2015-11-24 20:00:37 +0000
38+++ plugins/Unity/Session/dbusunitysessionservice.cpp 2016-03-09 13:18:01 +0000
39@@ -336,6 +336,9 @@
40
41 void DBusUnitySessionService::Lock()
42 {
43+ // signal u8 to show the lockscreen/greeter
44+ PromptLock();
45+
46 // lock the session using the org.freedesktop.DisplayManager system DBUS service
47 const QString sessionPath = QString::fromLocal8Bit(qgetenv("XDG_SESSION_PATH"));
48 QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.freedesktop.DisplayManager"),
49@@ -348,7 +351,7 @@
50 connect(watcher, &QDBusPendingCallWatcher::finished,
51 this, [this](QDBusPendingCallWatcher* watcher) {
52
53- QDBusPendingReply<QVariant> reply = *watcher;
54+ QDBusPendingReply<void> reply = *watcher;
55 watcher->deleteLater();
56 if (reply.isError()) {
57 qWarning() << "Lock call failed" << reply.error().message();
58
59=== modified file 'qml/Panel/Indicators/MenuItemFactory.qml'
60--- qml/Panel/Indicators/MenuItemFactory.qml 2016-01-11 17:36:56 +0000
61+++ qml/Panel/Indicators/MenuItemFactory.qml 2016-03-09 13:18:01 +0000
62@@ -15,6 +15,7 @@
63 */
64
65 import QtQuick 2.4
66+import QtQuick.Window 2.2
67 import Ubuntu.Settings.Menus 0.1 as Menus
68 import Ubuntu.Settings.Components 0.1
69 import QMenuModel 0.1
70@@ -22,6 +23,7 @@
71 import Ubuntu.Components.ListItems 1.3 as ListItems
72 import Ubuntu.Components 1.3
73 import Unity.Session 0.1
74+import Unity.Platform 1.0
75
76 Item {
77 id: menuFactory
78@@ -61,9 +63,11 @@
79
80 "com.canonical.indicator.calendar": calendarMenu,
81 "com.canonical.indicator.location": timezoneMenu,
82-
83- "indicator.user-menu-item": userMenuItem,
84- "indicator.guest-menu-item": userMenuItem
85+ },
86+ "indicator-session": {
87+ "indicator.user-menu-item": Platform.isPC ? userMenuItem : null,
88+ "indicator.guest-menu-item": Platform.isPC ? userMenuItem : null,
89+ "com.canonical.indicator.switch": Screen.width >= units.gu(90) ? switchMenu : null // Desktop mode switch
90 },
91 "indicator-messages" : {
92 "com.canonical.indicator.button" : messagesButtonMenu
93@@ -977,6 +981,15 @@
94 }
95
96 function load(modelData, context) {
97+ // tweak indicator-session items
98+ if (context === "indicator-session") {
99+ if ((modelData.action === "indicator.logout" || modelData.action === "indicator.suspend" || modelData.action === "indicator.hibernate" ||
100+ modelData.action === "indicator.reboot")
101+ && !Platform.isPC) {
102+ return null; // logout, suspend and hibernate hidden on devices
103+ }
104+ }
105+
106 if (modelData.type !== undefined && modelData.type !== "") {
107 var component = undefined;
108
109
110=== modified file 'qml/Shell.qml'
111--- qml/Shell.qml 2016-01-28 18:25:14 +0000
112+++ qml/Shell.qml 2016-03-09 13:18:01 +0000
113@@ -428,6 +428,11 @@
114 }
115 }
116
117+ Connections {
118+ target: DBusUnitySessionService
119+ onLockRequested: lightDM.greeter.showGreeter()
120+ }
121+
122 Timer {
123 // See powerConnection for why this is useful
124 id: showGreeterDelayed

Subscribers

People subscribed via source and target branches