Merge lp:~mterry/unity8/split into lp:unity8

Proposed by Michael Terry on 2014-03-27
Status: Merged
Approved by: Albert Astals Cid on 2014-05-26
Approved revision: 271
Merged at revision: 933
Proposed branch: lp:~mterry/unity8/split
Merge into: lp:unity8
Prerequisite: lp:~mterry/unity8/greeter-ux-fixes
Diff against target: 4988 lines (+2256/-853)
104 files modified
CMakeLists.txt (+1/-0)
data/51-unity8-greeter.conf (+2/-0)
data/CMakeLists.txt (+13/-0)
data/unity8-greeter-init.conf (+12/-0)
data/unity8-greeter-wrapper (+98/-0)
data/unity8-greeter.desktop.in (+5/-0)
debian/changelog (+6/-0)
debian/control (+16/-0)
debian/copyright (+1/-1)
debian/rules (+0/-4)
debian/unity8-greeter.install (+6/-0)
debian/unity8-private.install (+1/-0)
debian/unity8.install (+0/-1)
plugins/AccountsService/AccountsService.cpp (+34/-11)
plugins/AccountsService/AccountsService.h (+9/-0)
plugins/CMakeLists.txt (+1/-0)
plugins/LightDM/CMakeLists.txt (+6/-9)
plugins/LightDM/Greeter.cpp (+3/-0)
plugins/LightDM/Greeter.h (+2/-0)
plugins/LightDM/URLDispatcher.cpp (+55/-0)
plugins/LightDM/URLDispatcher.h (+34/-0)
plugins/LightDM/plugin.cpp (+9/-0)
plugins/SessionBroadcast/SessionBroadcast.cpp (+35/-0)
plugins/SessionBroadcast/SessionBroadcast.h (+11/-0)
plugins/SessionManager/CMakeLists.txt (+22/-0)
plugins/SessionManager/SessionManager.cpp (+124/-0)
plugins/SessionManager/SessionManager.h (+61/-0)
plugins/SessionManager/plugin.cpp (+35/-0)
plugins/SessionManager/plugin.h (+35/-0)
plugins/SessionManager/qmldir (+2/-0)
plugins/Unity/Launcher/backend/launcherbackend.cpp (+16/-2)
plugins/Unity/Launcher/backend/launcherbackend.h (+7/-1)
plugins/Unity/Launcher/launcheritem.cpp (+14/-9)
plugins/Unity/Launcher/launcheritem.h (+2/-1)
plugins/Unity/Launcher/launchermodel.cpp (+41/-11)
plugins/Unity/Launcher/launchermodel.h (+2/-0)
po/ug.po (+2/-1)
qml/Components/BasicShell.qml (+84/-0)
qml/Components/EdgeDemo.qml (+1/-53)
qml/Components/Lockscreen.qml (+0/-20)
qml/Components/PageHeader.qml (+3/-2)
qml/Dash/ScopeListView.qml (+3/-2)
qml/Greeter/Clock.qml (+1/-1)
qml/Greeter/Greeter.qml (+36/-3)
qml/Greeter/GreeterContent.qml (+0/-38)
qml/Greeter/GreeterEdgeDemo.qml (+102/-0)
qml/Greeter/Infographics.qml (+0/-2)
qml/GreeterShell.qml (+283/-0)
qml/Hud/Hud.qml (+1/-4)
qml/Notifications/NotificationMenuItemFactory.qml (+29/-13)
qml/Panel/Panel.qml (+1/-1)
qml/Shell.qml (+31/-177)
run.sh (+6/-4)
src/CMakeLists.txt (+15/-3)
src/main.cpp (+18/-4)
tests/autopilot/unity8/application_lifecycle/tests/__init__.py (+0/-2)
tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py (+1/-29)
tests/autopilot/unity8/application_lifecycle/tests/test_greeter.py (+75/-0)
tests/autopilot/unity8/application_lifecycle/tests/test_url_dispatcher.py (+1/-0)
tests/autopilot/unity8/indicators/tests/test_indicators.py (+0/-2)
tests/autopilot/unity8/process_helpers.py (+0/-56)
tests/autopilot/unity8/shell/tests/__init__.py (+16/-4)
tests/autopilot/unity8/shell/tests/disabled_test_hud.py (+1/-7)
tests/autopilot/unity8/shell/tests/test_emulators.py (+0/-3)
tests/autopilot/unity8/shell/tests/test_lock_screen.py (+12/-13)
tests/autopilot/unity8/shell/tests/test_notifications.py (+2/-14)
tests/mocks/AccountsService/AccountsService.cpp (+9/-0)
tests/mocks/AccountsService/AccountsService.h (+7/-0)
tests/mocks/CMakeLists.txt (+2/-1)
tests/mocks/LightDM/demo/CMakeLists.txt (+0/-21)
tests/mocks/LightDM/demo/GreeterPrivate.cpp (+0/-70)
tests/mocks/LightDM/demo/UsersModelPrivate.cpp (+0/-41)
tests/mocks/LightDM/qmldir (+0/-3)
tests/mocks/SessionManager/CMakeLists.txt (+19/-0)
tests/mocks/SessionManager/SessionManager.cpp (+43/-0)
tests/mocks/SessionManager/SessionManager.h (+49/-0)
tests/mocks/SessionManager/plugin.cpp (+34/-0)
tests/mocks/SessionManager/plugin.h (+34/-0)
tests/mocks/SessionManager/qmldir (+2/-0)
tests/mocks/liblightdm/CMakeLists.txt (+0/-46)
tests/mocks/liblightdm/Greeter.cpp (+11/-0)
tests/mocks/liblightdm/Greeter.h (+4/-0)
tests/mocks/liblightdm/full/CMakeLists.txt (+3/-2)
tests/mocks/liblightdm/single-passphrase/CMakeLists.txt (+3/-2)
tests/mocks/liblightdm/single-pin/CMakeLists.txt (+3/-2)
tests/mocks/liblightdm/single/CMakeLists.txt (+3/-2)
tests/plugins/CMakeLists.txt (+2/-1)
tests/plugins/LightDM/CMakeLists.txt (+5/-4)
tests/plugins/SessionManager/CMakeLists.txt (+48/-0)
tests/plugins/SessionManager/LightDMSessionServer.cpp (+38/-0)
tests/plugins/SessionManager/LightDMSessionServer.h (+40/-0)
tests/plugins/SessionManager/LoginManagerServer.cpp (+34/-0)
tests/plugins/SessionManager/LoginManagerServer.h (+37/-0)
tests/plugins/SessionManager/LoginSessionServer.cpp (+25/-0)
tests/plugins/SessionManager/LoginSessionServer.h (+39/-0)
tests/plugins/SessionManager/client.cpp (+88/-0)
tests/plugins/SessionManager/interfaces.xml (+22/-0)
tests/plugins/SessionManager/server.cpp (+57/-0)
tests/qmltests/CMakeLists.txt (+40/-49)
tests/qmltests/Greeter/tst_Lockscreen.qml (+1/-2)
tests/qmltests/Greeter/tst_Phone.qml (+1/-17)
tests/qmltests/tst_GreeterShell.qml (+88/-0)
tests/qmltests/tst_Shell.qml (+10/-64)
tools/unlock-device (+10/-18)
To merge this branch: bzr merge lp:~mterry/unity8/split
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) 2014-03-27 Approve on 2014-05-26
PS Jenkins bot (community) continuous-integration 2014-03-27 Needs Fixing on 2014-05-23
Michał Sawicz Needs Fixing on 2014-05-23
Timo Jyrinki Needs Fixing on 2014-04-02
Review via email: mp+213149@code.launchpad.net

This proposal supersedes a proposal from 2014-03-12.

Commit message

Split the welcome screen into its own executable and allow it to be a proper LightDM greeter.

Description of the change

Split the welcome screen into its own executable and allow it to be a proper LightDM greeter.

Phew! Long time coming. First commit to this branch back in July 2013! It's just taken whipping the rest of the system into shape to avoid regressions to make this landable.

List of major changes and notes:
- Adds new executable (unity8-greeter) that gets its own package. This uses the same main.cpp as unity8, but with different Qml and a few #ifdef tweaks.
- Adds a new plugin SessionManager so that bits of code can still know if the session is active. Since rather integral code (PageHeader.qml) uses the plugin, I added the plugin directory to the default qmluitests list of includes. This cleaned up that CMakeLists.txt file considerably.
- Expands existing plugin SessionBroadcast to actually make requests of unity-greeter-session-broadcast (i.e. use the greeter-side of its API). This involves adding a Depends on that program.
- I had to split the current edge demo support in two (part of it is in greeter, part of it is in user session).
- Similarly, I split Shell.qml into three files: Shell.qml, GreeterShell.qml, and Components/BasicShell.qml (for shared code).
- We no longer use demo data for the greeter in production (still do in tests of course).
- I added a new -G option to ./run to get the greeter.
- And the expected new tests and test changes.

== Known Regressions ==
- The messaging menu will not show contact info in the greeter. You will see numbers, but not avatar/name. Design never really finished fleshing out the indicator experience in the greeter. Wanted to see it land first, I've heard. Ted knows more about state there.

== Checklist ==
 * Are there any related MPs required for this MP to build/function as expected? Please list.
- (Note none of these are needed to build or play around with split -- they all just enhance the experience / fix bugs)
- lp:~mterry/ubuntu-touch-session/split
- lp:~unity-team/unity-system-compositor/new-gl-screen
- lp:~mterry/unity-system-compositor/switch-after-buffers
- lp:~mterry/telephony-service/start-on

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

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
 - There are packaging changes, but I'm in that team.

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

To post a comment you must log in.
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:197
http://jenkins.qa.ubuntu.com/job/unity8-ci/2475/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3858
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3443/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1345
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/996
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1000
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1000/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/996
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3383
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3885
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3885/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3445
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3445/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5801/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4722

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2475/rebuild

review: Needs Fixing (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:199
http://jenkins.qa.ubuntu.com/job/unity8-ci/2486/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3883
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3468/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1356
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1007
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1011
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1011/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1007
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3399
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3910
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3910/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3470
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3470/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5817/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4748

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2486/rebuild

review: Needs Fixing (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:200
http://jenkins.qa.ubuntu.com/job/unity8-ci/2489/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3895
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3480/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1359
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1010
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1014
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1014/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1010
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3404
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3924
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3924/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3482
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3482/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5821/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4754

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2489/rebuild

review: Needs Fixing (continuous-integration)
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

Doesn't merge cleanly with trunk

review: Needs Fixing
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:202
http://jenkins.qa.ubuntu.com/job/unity8-ci/2524/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3996
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3581/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1394
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1045
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1049
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1049/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1045
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3488
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4032
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4032/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3583
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3583/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5913/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4876

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2524/rebuild

review: Needs Fixing (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:203
http://jenkins.qa.ubuntu.com/job/unity8-ci/2525/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3998
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3583/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1395
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1046
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1050
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1050/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1046
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3490
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4037
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4037/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3585
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3585/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5915/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4881

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2525/rebuild

review: Needs Fixing (continuous-integration)
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

Shouldn't you use m_user instead of qgetenv("USER") ?

Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

I suggest to use QProcess::startDetached in Upstart.cpp so that we don't need to keep the QProcess around in memory forever. Also i guess it would make sense to check that we can start it properly and fail gracefully if not?

PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:204
http://jenkins.qa.ubuntu.com/job/unity8-ci/2568/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4093
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3677/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1438
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1089
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1093
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1093/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1089
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3573
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4145
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4145/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3679
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3679/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5999/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5010

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2568/rebuild

review: Needs Fixing (continuous-integration)
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

Albert, I moved the /sbin/init call to unity8-greeter-wrapper. This way it will be easier once we add a wizard (which will likely be launched from the wrapper and want /sbin/init too). So that's another way of fixing the use of QProcess I guess. :)

Regarding qgetenv("USER") vs m_user. m_user is the currently selected user. qgetenv("USER") is obviously the user for the session. We use the latter in "ForCurrentUser" methods which are called for the lightdm user (rather than the selected user). Like noting that the greeter edge demo has been run (vs the edge demo for a user).

PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:206
http://jenkins.qa.ubuntu.com/job/unity8-ci/2584/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4122
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3706/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1454
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1105
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1109
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1109/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1105
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3595
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4183
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4183/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3708
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3708/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6022/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5050

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2584/rebuild

review: Needs Fixing (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:207
http://jenkins.qa.ubuntu.com/job/unity8-ci/2606/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4182
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3766/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1476
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1127
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1131
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1131/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1127
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3637
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4250
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4250/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3768
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3768/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6067/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5126

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2606/rebuild

review: Needs Fixing (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:208
http://jenkins.qa.ubuntu.com/job/unity8-ci/2615/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4208
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3792/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1485
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1136
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1140
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1140/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1136
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3656
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4281
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4281/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3794
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3794/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6092/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5160

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2615/rebuild

review: Needs Fixing (continuous-integration)
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

Should unity8-greeter package declare it's dependency in libglib2.0-bin since the greeter-wrapper script ends up in that package and is using the gdbus command?

review: Needs Information
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

In AccountsService constructor you have
  m_user(qgetenv("USER")),
and then
  setUser(qgetenv("USER"));

I guess you can remove the first one and save a getenv call?

review: Needs Fixing
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

In AccountsService constructor you have
    setUser(qgetenv("USER"));
    updateDemoEdgesForCurrentUser();
couldn't you use
    updateDemoEdges();
and save a getenv call?

review: Needs Fixing
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

You don't emit the changed signal from setDemoEdgesForCurrentUser neither from setDemoEdges

review: Needs Fixing
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

Can you explain why we need demoEdgesForCurrentUser() and demoEdges() to be separate?

review: Needs Information
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

Remove
+#include <QProcess>
+#include <unistd.h>
from URLDispatcher.cpp

review: Needs Fixing
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

Replace
+#include <QtQml>
by
+#include <QtQml/qqml.h>

No need to include 30 files without need :)

review: Needs Fixing
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

Do you really need m_parent in URLDispatcherInterface ? I mean you're forcing the URLDispatcherInterface constructor to get a URLDispatcher *parent parameter that you pass down to QObject so we could just save the m_parent pointer and in ::DispatchURL just do static_cast<URLDispatcher *>(parent()), no?

review: Needs Information
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

I'd remove the m_broadcaster(NULL) myself since you're initializing it like 3 lines below, but if you really want to initialize it at least use nullptr

review: Needs Fixing
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

With this we don't get the greeter anymore when doing ./run i guess that's ok?

review: Needs Information
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

./run -G on my desktop gives me a phone shaped UI but shows me users unlike trunk does, is this on purpose?

review: Needs Information
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

Remove tests/autopilot/unity8/shell/tests/test_greeter.py.THIS

review: Needs Fixing
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

Why all those changes in tests/qmltests/CMakeLists.txt ?

review: Needs Information
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

No test replacement for test_searchIndicatorHidesOnGreeterShown ?

review: Needs Fixing
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

After installing all the resulting packages of this branch and restarting the phone the greeter does not show up on reboot.

review: Needs Fixing
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

- Made unity8-greeter Depend on libglib2.0-bin
- Dropped extra qgetenv call in AccountsService constructor
- Removed extra headers from URLDispatcher.cpp
- Switched to <QtQml/qqml.h>
- Dropped m_parent from URLDispatcherInterface
- Dropped m_broadcaster(NULL)
- Removed tests/autopilot/unity8/shell/tests/test_greeter.py.THIS

- Yeah, it's expected that ./run no longer gives greeter. And if you want to use mocks with -G, you need to also pass -f, like ./run -fG

- So the deal with demoEdgesForCurrentUser and demoEdges. The AccountsService plugin as a whole points at a single user for its various values (statsWelcomeScreen, backgroundFile, etc). When in the session, we want that to be the current user ($USER). In the greeter, that will be whomever is selected in the greeter (think multi-user case). So that's why m_user defaults to $USER but is changeable. But consider the case of the edge demo. There is a greeter component to that and a user session component. The greeter decides to show its edge demo based on the lightdm user's field. But if the user skips the demo from the greeter, the greeter needs to set the user's edge demo field to false too, so the user doesn't see it once they log in. So I added a special member variable demoEdgesForCurrentUser that always tracks the current user that the greeter could use for its own demo decision and it could continue using demoEdges to set the user's demo field to false if it wanted to. That's why they are completely separate fields.

- tests/qmltests/CMakeLists.txt has all those changes because of the change in qml/Components/PageHeader.qml. It needed to start using the SessionManager plugin (to reset search when screen is locked). So any test using it needed to start using the mock plugin search path. And looking through the tests, almost every test either already had the binary plugin dir manually specified or would need it because of this change. So I added it to the default includes for tests. And that let me clean up nearly all the test calls to not need manually specified paths.

- test_searchIndicatorHidesOnGreeterShown has no replacement because it doesn't make sense anymore. In greeter, the search indicator is never shown. And in the session, when the session is locked, it doesn't care about hiding the search indicator since it doesn't share a panel with the greeter anymore.

- I'm not sure why nothing showed up for you on reboot. Except maybe you didn't rebuild the various packages depending on Mir 0.1.18 (platform-api, unity-mir)? It might be easiest to use the PPA we're using for testing: https://launchpad.net/~ci-train-ppa-service/+archive/landing-004

PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:211
http://jenkins.qa.ubuntu.com/job/unity8-ci/2625/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4237
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3821/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1495
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1146
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1150
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1150/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1146
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3675
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4311
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4311/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3823
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3823/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6112/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5190

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2625/rebuild

review: Needs Fixing (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:214
http://jenkins.qa.ubuntu.com/job/unity8-ci/2629/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4241
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3825/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1499
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1150
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1154
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1154/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1150
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3677
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4315
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4315/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3827
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3827/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6114/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5192

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2629/rebuild

review: Needs Fixing (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:215
http://jenkins.qa.ubuntu.com/job/unity8-ci/2630/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4249
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3833/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1500
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1151
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1155
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1155/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1151
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3684
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4323
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4323/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3835
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3835/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6121/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5199

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2630/rebuild

review: Needs Fixing (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:216
http://jenkins.qa.ubuntu.com/job/unity8-ci/2631/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4250
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3834/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1501
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1152
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1156
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1156/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1152
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3685
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4325
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4325/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3836
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3836/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6122/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5202

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2631/rebuild

review: Needs Fixing (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:217
http://jenkins.qa.ubuntu.com/job/unity8-ci/2633/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4252
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3836/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1503
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1154
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1158
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1158/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1154
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3687
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4328
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4328/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3838
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3838/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6124/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5204

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2633/rebuild

review: Needs Fixing (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:218
http://jenkins.qa.ubuntu.com/job/unity8-ci/2637/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4266
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3851/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1507
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1158
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1162
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1162/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1158
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3695
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4350
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4350/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3853
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3853/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6134/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5223

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2637/rebuild

review: Needs Fixing (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:220
http://jenkins.qa.ubuntu.com/job/unity8-ci/2644/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4286
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3871/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1514
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1165
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1169
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1169/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1165
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3712
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4371
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4371/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3873
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3873/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6152/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5250

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2644/rebuild

review: Needs Fixing (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:221
http://jenkins.qa.ubuntu.com/job/unity8-ci/2656/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4317
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3916/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1526
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1177
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1181
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1181/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1177
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3740
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4416
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4416/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3918
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3918/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6197/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5325

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2656/rebuild

review: Needs Fixing (continuous-integration)
lp:~mterry/unity8/split updated on 2014-03-27
223. By Michael Terry on 2014-03-27

Merge greeter-ux-fixes again

PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:222
http://jenkins.qa.ubuntu.com/job/unity8-ci/2658/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4321
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3920/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1528
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1179
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1183
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1183/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1179
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3744
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4420
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4420/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3922
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3922/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6201/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5332

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2658/rebuild

review: Needs Fixing (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:223
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~mterry/unity8/split/+merge/213149/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/unity8-ci/2659/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4322
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3921/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1529
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1180
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1184
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1184/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1180
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3745
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4421
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4421/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3923
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3923/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6203/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5334

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2659/rebuild

review: Needs Fixing (continuous-integration)
Albert Astals Cid (aacid) wrote :

Text conflict in tests/qmltests/CMakeLists.txt

review: Needs Fixing
lp:~mterry/unity8/split updated on 2014-03-31
224. By Michael Terry on 2014-03-31

Merge in greeter-ux-fixes

PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:224
http://jenkins.qa.ubuntu.com/job/unity8-ci/2682/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4379
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3974/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1552/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1203
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1207
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1207/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1203
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3793
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4480
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4480/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3995
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3995/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6246/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5434

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2682/rebuild

review: Needs Fixing (continuous-integration)
Timo Jyrinki (timo-jyrinki) wrote :

Right edge support was merged in, now this conflicts at:

Text conflict in debian/control
Text conflict in qml/Panel/Panel.qml
Text conflict in qml/Shell.qml
Text conflict in src/main.cpp
Text conflict in tests/qmltests/CMakeLists.txt
Text conflict in tests/qmltests/tst_Shell.qml

review: Needs Fixing
lp:~mterry/unity8/split updated on 2014-04-02
225. By Michael Terry on 2014-04-02

Merge from greeter-ux-fixes

PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:225
http://jenkins.qa.ubuntu.com/job/unity8-ci/2722/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4474/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/4074/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1592
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1243
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1247
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1247/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1243
    FAILURE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3865/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4580
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4580/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4109
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4109/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6324/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5577

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2722/rebuild

review: Needs Fixing (continuous-integration)
Albert Astals Cid (aacid) wrote :

Text conflict in tests/qmltests/CMakeLists.txt

review: Needs Fixing
lp:~mterry/unity8/split updated on 2014-04-08
226. By Michael Terry on 2014-04-08

Merge from greeter-ux-fixes

Michael Terry (mterry) wrote :

OK, merged from trunk.

PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:226
http://jenkins.qa.ubuntu.com/job/unity8-ci/2763/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-trusty-touch/115
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4648
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1633
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1284
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1288
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1288/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1284
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/112
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4236
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4236/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5790
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/4005
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4772
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4772/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2763/rebuild

review: Needs Fixing (continuous-integration)
lp:~mterry/unity8/split updated on 2014-04-09
227. By Michael Terry on 2014-04-09

Move the unity8-greeter-started upstart event into src/main.cpp where maliit will be ready to go instead of just crashing

228. By Michael Terry on 2014-04-09

Add unity8-greeter-starting emission so we can start the wizard that way if we want

PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:227
http://jenkins.qa.ubuntu.com/job/unity8-ci/2787/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-trusty-touch/156
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4713
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1651
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1308
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1312
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1312/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1308
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/152
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4296
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4296/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5862
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/4069
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4840
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4840/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2787/rebuild

review: Needs Fixing (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:228
http://jenkins.qa.ubuntu.com/job/unity8-ci/2788/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-trusty-touch/158
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4715
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1652
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1309
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1313
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1313/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1309
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/153
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4298
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4298/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5867
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/4070
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4844
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4844/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2788/rebuild

review: Needs Fixing (continuous-integration)
lp:~mterry/unity8/split updated on 2014-04-10
229. By Michael Terry on 2014-04-10

Merge from greeter-ux-fixes

PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:229
http://jenkins.qa.ubuntu.com/job/unity8-ci/2798/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-trusty-touch/188
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4756
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1662
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1319
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1323
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1323/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1319
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/181
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4339
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4339/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5911
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/4107
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4885
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4885/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2798/rebuild

review: Needs Fixing (continuous-integration)
Albert Astals Cid (aacid) wrote :

Text conflict in tests/autopilot/unity8/indicators/tests/test_indicators.py

review: Needs Fixing
lp:~mterry/unity8/split updated on 2014-04-14
230. By Michael Terry on 2014-04-14

Merge from trunk

Michael Terry (mterry) wrote :

Text conflict resolved via merge (which means the new unlock-device from trunk got added / updated to work with this branch, so eventually we can actually run our tests on jenkins...)

lp:~mterry/unity8/split updated on 2014-04-14
231. By Michael Terry on 2014-04-14

Set language after starting upstart job to let customization do it's thing

PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:230
http://jenkins.qa.ubuntu.com/job/unity8-ci/2811/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-trusty-touch/229
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4821
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1675/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1332
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1336
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1336/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1332
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/216
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4398
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4398/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/6001
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/4166
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4953
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4953/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2811/rebuild

review: Needs Fixing (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:231
http://jenkins.qa.ubuntu.com/job/unity8-ci/2813/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-trusty-touch/231
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4823
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1677
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1334
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1338
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1338/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1334
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/218
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4400
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4400/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/6003
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/4168
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4955
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4955/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2813/rebuild

review: Needs Fixing (continuous-integration)
Albert Astals Cid (aacid) wrote :

Text conflict in debian/control
Text conflict in qml/Shell.qml
Text conflict in tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py
Text conflict in tests/autopilot/unity8/application_lifecycle/tests/test_url_dispatcher.py
Text conflict in tests/autopilot/unity8/process_helpers.py

lp:~mterry/unity8/split updated on 2014-04-18
232. By Michael Terry on 2014-04-18

Merge from greeter-ux-fixes

lp:~mterry/unity8/split updated on 2014-04-18
233. By Michael Terry on 2014-04-18

Pretend that the greeter session is an ubuntu-touch session, so that indicator-network will start

lp:~mterry/unity8/split updated on 2014-04-23
234. By Michael Terry on 2014-04-23

Test

235. By Michael Terry on 2014-04-23

Fix indicators not coming up in split session

lp:~mterry/unity8/split updated on 2014-04-25
236. By Michael Terry on 2014-04-25

Remove testing code that slipped in

lp:~mterry/unity8/split updated on 2014-04-25
237. By Michael Terry on 2014-04-25

Use new resettable support in lightdm

Albert Astals Cid (aacid) wrote :

Text conflict in data/CMakeLists.txt
Text conflict in debian/control
Text conflict in debian/unity8.install
Text conflict in qml/Greeter/Clock.qml
Text conflict in tests/autopilot/unity8/shell/tests/test_notifications.py
5 conflicts encountered.

review: Needs Fixing
lp:~mterry/unity8/split updated on 2014-04-30
238. By Michael Terry on 2014-04-30

Merge from trunk

lp:~mterry/unity8/split updated on 2014-05-01
239. By Michael Terry on 2014-05-01

Merge from trunk

lp:~mterry/unity8/split updated on 2014-05-05
240. By Michael Terry on 2014-05-05

Remove fade in animations for now

241. By Michael Terry on 2014-05-05

Merge from trunk

lp:~mterry/unity8/split updated on 2014-05-05
242. By Michael Terry on 2014-05-05

Merge from trunk

243. By Michael Terry on 2014-05-05

Fix debian/changelog

lp:~mterry/unity8/split updated on 2014-05-06
244. By Michael Terry on 2014-05-06

Mark as resettable before connecting to LightDM

245. By Michael Terry on 2014-05-06

Specify minimum version of liblightdm needed

246. By Michael Terry on 2014-05-06

Completely remove fade-in animations for now; this removes the last visual change in the split greeter

lp:~mterry/unity8/split updated on 2014-05-07
247. By Michael Terry on 2014-05-07

Fix autopilot tests

248. By Michael Terry on 2014-05-07

Stop the swipe hint animation when greeter is swiped away

249. By Michael Terry on 2014-05-07

Fix syncing of stored launcher items

Francis Ginther (fginther) wrote :

I'm in the process of updating the test runner to use the appropriate unlock logic used in lp:ubuntu-test-cases/touch.

lp:~mterry/unity8/split updated on 2014-05-09
250. By Michael Terry on 2014-05-08

Disable ofono using pulseaudio

251. By Michael Terry on 2014-05-08

Merge from trunk

252. By Michael Terry on 2014-05-09

Just launch ofono-setup; it's what session does now and ofonod doesn't use its upstart job anymore apparently

253. By Michael Terry on 2014-05-09

Add back darkener-rectangle for infographic use

254. By Michael Terry on 2014-05-09

Consolidate unity8-greeter session upstart scripts

lp:~mterry/unity8/split updated on 2014-05-13
255. By Michael Terry on 2014-05-13

Merge from trunk

Albert Astals Cid (aacid) wrote :

Curious about the
|| true
constructs in unity8-greeter-init.conf, can you explain what they are for?

review: Needs Information
Albert Astals Cid (aacid) wrote :

modified file 'run_on_device.sh' (properties changed: +x to -x)

Why?

review: Needs Information
Albert Astals Cid (aacid) wrote :

Do we really need this?
  view->resize(view->screen()->size());
Seems like showFullScreen does that already to me.

review: Needs Information
Albert Astals Cid (aacid) wrote :

Code looks acceptable but it is still a bit unstable.

My experience:
 * Over my "yesterday" phone install
 * download http://jenkins.qa.ubuntu.com/job/unity8-utopic-armhf-ci/49/artifact/work/output/*zip*/output.zip and install it
 * Reboot
 * Everything is fine, greeter is there, can unlock, use unity8, etc
 * Run autopilot tests, all succeed
 * Reboot
 * Greeter is no longer there
 * Flash with --bootstrap
 * download http://jenkins.qa.ubuntu.com/job/unity8-utopic-armhf-ci/49/artifact/work/output/*zip*/output.zip and install it
 * Reboot
 * Greeter is not there
 * Press lock button
 * Window blacks and unblacks but greeter is a no show
 * Wait a bit with the window in black
 * Press lock button
 * Greeter is there

Seems like maybe greeter takes quite a bit of time to start and thus we're showing unity8 first? Isn't that a bit against the purpose of the greeter?

review: Needs Fixing
Albert Astals Cid (aacid) wrote :

Ok, after trying the silo2 the behaviour described above doesn't happen anymore.

Michael Terry (mterry) wrote :

> Curious about the
> || true
> constructs in unity8-greeter-init.conf, can you explain what they are for?

Normally upstart jobs run with "set -e" so any failing line stops the job. And "initctl start" will fail if a job is already started or the job doesn't exist or some such. So we don't want to avoid running later jobs if earlier lines fail.

> modified file 'run_on_device.sh' (properties changed: +x to -x)

Crazy. I have no idea why I would have done that. Good catch.

> Do we really need this?
> view->resize(view->screen()->size());

Ah, that was for better desktop support (back in November!). We don't need it for Touch, and apparently desktop support is better for unity8 these days. So I'll drop after double-testing on Touch.

lp:~mterry/unity8/split updated on 2014-05-14
256. By Michael Terry on 2014-05-14

Review fixes

Michael Terry (mterry) wrote :

OK, view->resize() is gone and the executable flag is fixed.

Albert Astals Cid (aacid) wrote :

Can you also remove the
  #include <QtGui/QScreen>
include that is now not needed any more?

review: Needs Fixing
lp:~mterry/unity8/split updated on 2014-05-15
257. By Michael Terry on 2014-05-15

Merge from trunk

258. By Michael Terry on 2014-05-15

Drop unneeded QScreen include

Michael Terry (mterry) wrote :

Done, Albert.

lp:~mterry/unity8/split updated on 2014-05-15
259. By Michael Terry on 2014-05-15

Specify USC_SOCKET in lightdm's init session, so anyone that wants to can find USC (like the welcome wizard

lp:~mterry/unity8/split updated on 2014-05-16
260. By Michael Terry on 2014-05-16

Whoops, requestHomeShown support must have gotten lost in a merge

lp:~mterry/unity8/split updated on 2014-05-18
261. By Michael Terry on 2014-05-18

Workaround bug in logind not telling us when a session becomes inactive, and also hide launcher when that happens

lp:~mterry/unity8/split updated on 2014-05-18
262. By Michael Terry on 2014-05-18

Merge from trunk

263. By Michael Terry on 2014-05-18

Remove unneeded Revealer, especially since the Revealer class is dead

Albert Astals Cid (aacid) wrote :

Do you think it makes sense to add a test that checks SessionBroadcast::requestHomeShown is called on onShowDashHome to make sure it doesn't get lost in future refactorings? Or would it feel like "we're testing a function call works"?

review: Needs Information
Michał Sawicz (saviq) wrote :

Got silo 002 on my device, and the few quirks I saw - just to make sure we note them down, importance is your decision:
* got an "incoming voice mail" item in the messaging indicator (not sure if related or where from...) - I sometimes get it in the session, sometimes in greeter, sometimes in both...
* app is black when unlocking greeter over an app
* greeter indicators should fade-out on unlock
* no GSM signal icon in greeter
* "stats on welcome screen" in settings app not respected (seems to be a bug in trunk already)
* at the end of unlock, session (?) launcher kicks in for a split second

review: Needs Information
Michał Sawicz (saviq) wrote :

* tapping "Tap to unlock" did not move the greeter away but just disappeared it
* unity8-greeter crash on manta when locking (weird, seems to be on closing mir - is greeter destroyed on unlock?)
* telephony-service crash on manta when locking
* indicator-network crash on manta when (re)locking
* brightness doesn't work on flo
* three batteries (sic!) in greeter on manta
* (related to previous comment) clearing voicemail doesn't clear in greeter (or the other way around)

review: Needs Information
Michał Sawicz (saviq) wrote :

* unity8-greeter spins on manta :'( → probably related to the crash
* locale isn't communicated between session and greeter → time format changes between session and greeter

FWIW, manta issues might've been caused by old image... need to charge it more to upgrade

review: Needs Information
Michał Sawicz (saviq) wrote :

Looks like flo brightness doesn't work in devel-proposed already, so not your fault.

Michał Sawicz (saviq) wrote :

* can't unlock my SIM any more, the indicator shows full bars when I know the SIM is PIN-locked...

review: Needs Fixing
Michael Terry (mterry) wrote :
Download full text (3.5 KiB)

@Albert,
> Do you think it makes sense to add a test that checks
> SessionBroadcast::requestHomeShown is called on onShowDashHome
> to make sure it doesn't get lost in future refactorings? Or
> would it feel like "we're testing a function call works"?

I'm leaning toward the latter.

@Saviq,
* got an "incoming voice mail" item in the messaging indicator (not sure if related or where from...) - I sometimes get it in the session, sometimes in greeter, sometimes in both...

Should be in both, and I've only ever happened to notice it in both. But I easily could have missed a time when it only showed in one because I never unlocked or whatever.

I'm not exactly sure why telephony-service decides to show that when. But it gets the status from ofono, which is a system daemon. I would file this under "telephony/indicator bug" and don't personally think it's a blocker.

* app is black when unlocking greeter over an app

Ugh, so it is. I hadn't tested that case recently (past month or so). I will investigate why.

* greeter indicators should fade-out on unlock

Oh yeah? I thought the idea was to have it look like the indicator panel didn't change at all (as far as possible).

* no GSM signal icon in greeter

I get an icon. That is something I usually look for too, so I'm surprised to hear that. Is this an all-the-time problem?

* "stats on welcome screen" in settings app not respected (seems to be a bug in trunk already)

I think someone was refactoring the infographic code recently, I wonder if that setting code got dropped. But if that's a bug in trunk, not a blocker for this.

* at the end of unlock, session (?) launcher kicks in for a split second

Not always. Only seems to if you are moving at a particular (relatively fast) speed. Right? That does seem odd. And it's the greeter launcher (you can tell if you have some running apps, they won't show up in greeter launcher). This is likely an issue in trunk, as I didn't change the teasing/swiping logic. But I'll have to confirm.

* tapping "Tap to unlock" did not move the greeter away but just disappeared it

Noted, will investigate.

* unity8-greeter crash on manta when locking (weird, seems to be on closing mir - is greeter destroyed on unlock?)

No it's not destroying on unlock. Curious. Will investigate.

* telephony-service crash on manta when locking

Hrm. Will investigate.

* indicator-network crash on manta when (re)locking

Hrm. Will investigate.

* brightness doesn't work on flo

I don't have a flo. But what do you mean? Idle-dimming? But you say later that this is just a problem with flo at the moment.

* three batteries (sic!) in greeter on manta

Hah! Really? OK. Will investigate. I should have tested manta recently.

* (related to previous comment) clearing voicemail doesn't clear in greeter (or the other way around)

Known bug, we are going to live with that for now. Super annoying though, I agree. That problem exists for any incoming call or text message.

* unity8-greeter spins on manta :'( → probably related to the crash

Noted, will investigate.

* locale isn't communicated between session and greeter → time format changes between session and greeter

Lan...

Read more...

Michał Sawicz (saviq) wrote :
Download full text (3.3 KiB)

On 19.05.2014 16:04, Michael Terry wrote:
> * got an "incoming voice mail" item in the messaging indicator (not sure if related or where from...) - I sometimes get it in the session, sometimes in greeter, sometimes in both...
>
> Should be in both, and I've only ever happened to notice it in both. But I easily could have missed a time when it only showed in one because I never unlocked or whatever.
>
> I'm not exactly sure why telephony-service decides to show that when. But it gets the status from ofono, which is a system daemon. I would file this under "telephony/indicator bug" and don't personally think it's a blocker.

I just wonder where it's coming from in the first place - I don't have
it at all in current devel-proposed... And not really sure what to do
with it, no action available.

> * greeter indicators should fade-out on unlock
>
> Oh yeah? I thought the idea was to have it look like the indicator panel didn't change at all (as far as possible).

Yeah, in which case if they fade-out, you wouldn't see the change at all
anyway. I'm getting a rather jarring change (SEARCH appears, but that's
going away anyway, GSM icon appears, alarm icon appears, time format
changes...). In any case, it's a design question.

> * no GSM signal icon in greeter
>
> I get an icon. That is something I usually look for too, so I'm surprised to hear that. Is this an all-the-time problem?

Might be related to SIM unlocking.

> * at the end of unlock, session (?) launcher kicks in for a split second
>
> Not always. Only seems to if you are moving at a particular (relatively fast) speed. Right? That does seem odd. And it's the greeter launcher (you can tell if you have some running apps, they won't show up in greeter launcher). This is likely an issue in trunk, as I didn't change the teasing/swiping logic. But I'll have to confirm.

Confirmed in trunk.

> * brightness doesn't work on flo
>
> I don't have a flo. But what do you mean? Idle-dimming? But you say later that this is just a problem with flo at the moment.

Yeah, and I mean the brightness slider.

> * (related to previous comment) clearing voicemail doesn't clear in greeter (or the other way around)
>
> Known bug, we are going to live with that for now. Super annoying though, I agree. That problem exists for any incoming call or text message.

Ouch...

> * locale isn't communicated between session and greeter → time format changes between session and greeter
>
> Language should be communicated, right? Looks like I forgot about time.

Can't say that it is... I get everything in en.UTF-8 in greeter,
regardless of what I choose as the session language. Indicators will be
a problem here btw... Feels like we need to override their env language,
to be able to switch live as we switch users... Infographics should be
ok as they will now be static SVG files, they just need to be
regenerated on language change (inside the user's session).

> * can't unlock my SIM any more, the indicator shows full bars when I know the SIM is PIN-locked...
>
> I thought SIM unlocking was busted in trunk anyway? Ugh. I wasn't worrying about testing that, since I had heard it was busted. I don't have ...

Read more...

lp:~mterry/unity8/split updated on 2014-05-19
264. By Michael Terry on 2014-05-19

Animate away the tablet greeter when clicking Tap to Unlock

265. By Michael Terry on 2014-05-19

Set locale as well as language when starting greeter

Michael Terry (mterry) wrote :

As for all the manta oddities, I can't reproduce on a recent image. You said you tested on an old image. If you test on new one, do you see the crashes and extra battery icons?

I fixed the Tap to Unlock animation not happening in this branch. And I fixed the "session is black if an app is up" with a unity-mir branch [1].

We both confirmed that launcher kicking in a second time is in trunk.

As for locale, I've fixed what you saw. I was exporting language, but not locale. Note that you still need to reboot for the change to take effect, but that's an existing bug with the shell. So there's no regression there.

You mention language in a multi-user situation (switching greeter languages when user switches). This is another open design question. The current design (on the desktop) is that the greeter just uses the system language and doesn't switch languages. Which unity8-greeter does too. But I've added a little hack in unity8-greeter-wrapper that notices if we have a phablet user with uid 32011 and sets language (and now locale) to that user's settings if so.

FYI, the "not syncing clears of indicator messages" is bug 1317649. Ted is on it.

So the only remaining regression by my count is SIM unlocking. Which I'll need your help with. Can we sync up tomorrow about it?

Also, I've just noticed that we flash the user session for a frame or two during boot on manta. I'll look at that, but it's likely an off-by-one frame bug in the USC branches, not this branch.

[1] https://code.launchpad.net/~mterry/unity-mir/dont-hide-focused-apps/+merge/220130

lp:~mterry/unity8/split updated on 2014-05-20
266. By Michael Terry on 2014-05-20

Move alpha-setting down so we don't show some extra frames with transparency

Michael Terry (mterry) wrote :

OK, just fixed the extra-frame-on-boot issue on manta and rekicked the silo. So the only known problem is SIM unlocking. We can look at that tomorrow.

Albert Astals Cid (aacid) wrote :

I'll bring my vote back to Approve, but Saviq still seems to have some things he wants fixed, so not top approving

review: Approve
lp:~mterry/unity8/split updated on 2014-05-21
267. By Michael Terry on 2014-05-20

Fix background for sim lockscreen

Michał Sawicz (saviq) wrote :

I get 3 users after the accountsservice upgrade: phablet, radio and system.

=====

No launcher in greeter on any of the 3 devices I have.

=====

Indicators in session don't get dismissed on suspend.

=====

"Tap to unlock" string only shows after some input in greeter after locking.

=====

Volume doesn't sync from greeter to session (should it?).

=====

Location/Bluetooth don't sync between greeter and session (should it?).

=====

Three batteries on manta in greeter "Battery" indicator.

=====

SIM unlock in greeter is not fullscreen (different to bug #1308011).
http://people.canonical.com/~msawicz/unity8/pin_good.png
vs.
http://people.canonical.com/~msawicz/unity8/pin_bad.png

=====

Alarm icon isn't shown in greeter (related to bug #1317861).

=====

Volume buttons don't work in greeter.

=====

Shouldn't we now drop the password from the phablet user if we want it to be unlocked, and support setting a password via passwd, and enforce it?

=====

Can't verify password-protected functionality.

=====

Trunk issues for reference:
- greeter strings are not translated
- "Swipe to unlock" conflicts with the user chooser - the user chooser should probably be made smaller
- timed-out SIM lock causes input to be blocked altogether
- SIM lock doesn't prevent you from interacting with indicators in greeter
- I can tap through the edge demo in the greeter, select different users and type a password in.
- Multi-user phone looks BAD - mini infographics. I thought we prevented multi-user on phone until we had designs?
- lockscreen isn't used any more after launching an app from greeter launcher (can't confirm with split as there's no launcher any more, or being able to password-protect the account)

review: Needs Fixing
lp:~mterry/unity8/split updated on 2014-05-21
268. By Michael Terry on 2014-05-21

Make launcher available in tablet mode again

Michael Terry (mterry) wrote :
Download full text (3.9 KiB)

* I get 3 users after the accountsservice upgrade: phablet, radio and system.

- That's because of an AS merge from Debian that dropped support for system-configured minimum UIDs. Laney didn't know we used that functionality. I'll upload a fix later today.

=====

* No launcher in greeter on any of the 3 devices I have.

- Just fixed that. It was because we were still carrying the old trunk bug where we didn't show the launcher in "tablet" mode, which all your devices are on because of the extra two users.

=====

* Indicators in session don't get dismissed on suspend.

- Hmm, and I guess they should be, since that's historic behavior... OK.

=====

* "Tap to unlock" string only shows after some input in greeter after locking.

- That's by design. It only shows when the user interacts.

=====

* Volume doesn't sync from greeter to session (should it?).

- It should, yes. And does for me. BUT! After testing the volume buttons below, I had some syncing oddities. If you use the indicator swipes without using volume buttons at all, it may sync correctly for you too... I'll look at what happens with volume buttons.

=====

* Location/Bluetooth don't sync between greeter and session (should it?).

- Maybe? Those are device-wide, so I'd think so. I haven't historically cared much about those since they didn't really "stick" even in trunk. Are they working in trunk these days?

=====

* Three batteries on manta in greeter "Battery" indicator.

- Ah, I see this now. When you described it earlier, I thought you were seeing three indicators. Will pass to Ted via bug 1321777.

=====

* SIM unlock in greeter is not fullscreen (different to bug #1308011).
* http://people.canonical.com/~msawicz/unity8/pin_good.png
* vs.
* http://people.canonical.com/~msawicz/unity8/pin_bad.png

- Yeah, I noticed that. But I couldn't immediately see why, so I've moved on to bigger fish at the moment. Will loop back.

=====

* Alarm icon isn't shown in greeter (related to bug #1317861).

- I will file bug 1321776 about that. But that's an indicator-side issue.

=====

* Volume buttons don't work in greeter.

- Guh. I see this too now. They used to work, will investigate what happened.

=====

* Shouldn't we now drop the password from the phablet user if we want it to be unlocked, and support setting a password via passwd, and enforce it?

- I'm not sure I follow. (A) this branch does not try to address *all* the changes needed for us to enable setting a password yet -- that needs some dialer, indicator, and system-settings work. (B) the existing password on the phablet user is unrelated to being able to autologin. That's done by group membership and lightdm config.

=====

* Can't verify password-protected functionality.

- This branch does not address that.

=====

* Trunk issues for reference:
* - greeter strings are not translated
* - "Swipe to unlock" conflicts with the user chooser - the user chooser should probably be made smaller

- Yeah, but multi-user on phone is literally entirely undesigned. The current UI you see there is just thrown together so we have *something*. We shouldn't spend any energy on making it look nice.

* - timed-out SIM l...

Read more...

lp:~mterry/unity8/split updated on 2014-05-22
269. By Michael Terry on 2014-05-21

Hide indicators as well as launcher when session becomes inactive

Albert Astals Cid (aacid) wrote :

debian/changelog needs correct merging

review: Needs Fixing
Michał Sawicz (saviq) wrote :

Confirmed volume and CPU issues are gone.

=====

> SIM unlock in greeter is not fullscreen (different to bug #1308011).

Still to fix.

=====

*Sometimes* when unlocking, I get a flash of a black frame, rings a bell?

=====

Oups, suspending on manta causes a white flash after the screen goes blank?

=====

Infographic bubbles lose color... but since we're replacing them altogether, let's ignore.

=====

Indicator issues (let's file bugs if there aren't already?)
* missed call / sms number not recognized in greeter messaging menu (is fine in notification)
* managed to get into a state where incoming sms didn't show up in greeter... can't reproduce
* still three batteries on manta

=====

systemd-logind on mako seems to be active all the time (2-3% CPU) after suspending, ideas?

=====

We're getting there!

review: Needs Fixing
lp:~mterry/unity8/split updated on 2014-05-23
270. By Michael Terry on 2014-05-23

Merge from trunk

271. By Michael Terry on 2014-05-23

Fix notification margins

Albert Astals Cid (aacid) wrote :

debian/Changelog got fixed, back to approved for me

review: Approve
Michał Sawicz (saviq) wrote :

Albert, did/could you review the changes after your previous Approve (r267+)?

Albert Astals Cid (aacid) wrote :

Yeah, 267+ looks good, i don't think it fixes all the issues you mention in your last comment, right Michael?

Michael Terry (mterry) wrote :

The current state of this branch fixes all the reproducable stuff. I couldn't reproduce the 3% CPU issue with systemd. I couldn't reproduce the white flashing when locking or the black flashing when unlocking. And I think Saviq also couldn't.

So I *believe* this branch is "ready enough" -- still some known regressions with indicators not handling split mode as well as they could. But we're thinking we'll handle those separately.

Albert Astals Cid (aacid) wrote :

Ok, I actually agree we should land it now and then fix the remaining bits separately, this way we get this hole chunk of code merged and the other fixes are smaller, more manageable. This one is starting to be really really painful for everyone to code/review.

Saviq?

Michał Sawicz (saviq) wrote :

On 26.05.2014 12:16, Albert Astals Cid wrote:
> Ok, I actually agree we should land it now and then fix the remaining bits separately, this way we get this hole chunk of code merged and the other fixes are smaller, more manageable. This one is starting to be really really painful for everyone to code/review.
>
> Saviq?

+1

Albert Astals Cid (aacid) wrote :

Ok, then, top approving again. You can find the checklist a few comments above, no need to repeat i guess.

lp:~mterry/unity8/split updated on 2014-05-29
272. By Michael Terry on 2014-05-28

Merge from trunk

273. By Michael Terry on 2014-05-29

Handle short appIds in launcher data

274. By Michael Terry on 2014-05-29

Add method to mock

275. By Michael Terry on 2014-05-29

undo accidental commits

276. By Michael Terry on 2014-05-29

More reliably mark greeter as re-enabled

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2014-04-24 14:13:21 +0000
3+++ CMakeLists.txt 2014-05-29 14:11:15 +0000
4@@ -96,6 +96,7 @@
5 declare_autopilot_test(shell unity8.shell ${CMAKE_SOURCE_DIR}/tests/autopilot/)
6
7 set(SHELL_APP unity8)
8+set(GREETER_APP unity8-greeter)
9 set(SCOPE_TOOL unity-scope-tool)
10
11 include_directories(
12
13=== added file 'data/51-unity8-greeter.conf'
14--- data/51-unity8-greeter.conf 1970-01-01 00:00:00 +0000
15+++ data/51-unity8-greeter.conf 2014-05-29 14:11:15 +0000
16@@ -0,0 +1,2 @@
17+[SeatDefaults]
18+greeter-session=unity8-greeter
19
20=== modified file 'data/CMakeLists.txt'
21--- data/CMakeLists.txt 2014-04-22 13:17:52 +0000
22+++ data/CMakeLists.txt 2014-05-29 14:11:15 +0000
23@@ -1,7 +1,20 @@
24 # generate desktop file
25 configure_file(${SHELL_APP}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${SHELL_APP}.desktop @ONLY)
26+configure_file(${GREETER_APP}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${GREETER_APP}.desktop @ONLY)
27
28 # install desktop files
29 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SHELL_APP}.desktop
30 DESTINATION ${CMAKE_INSTALL_DATADIR}/applications
31 )
32+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GREETER_APP}.desktop
33+ DESTINATION ${CMAKE_INSTALL_DATADIR}/lightdm/greeters
34+ )
35+install(FILES 51-${GREETER_APP}.conf
36+ DESTINATION ${CMAKE_INSTALL_DATADIR}/lightdm/lightdm.conf.d
37+ )
38+install(FILES ${GREETER_APP}-wrapper
39+ DESTINATION ${CMAKE_INSTALL_BINDIR}
40+ )
41+install(FILES ${GREETER_APP}-init.conf
42+ DESTINATION ${CMAKE_INSTALL_DATADIR}/upstart/sessions
43+ )
44
45=== added file 'data/unity8-greeter-init.conf'
46--- data/unity8-greeter-init.conf 1970-01-01 00:00:00 +0000
47+++ data/unity8-greeter-init.conf 2014-05-29 14:11:15 +0000
48@@ -0,0 +1,12 @@
49+description "Unity 8 Greeter initialization"
50+author "Michael Terry <mterry@ubuntu.com>"
51+
52+start on unity8-greeter-started
53+task
54+emits indicator-services-start
55+
56+script
57+ start --no-wait ofono-setup || true
58+ initctl emit --no-wait indicator-services-start || true
59+ start --no-wait maliit-server || true
60+end script
61
62=== added file 'data/unity8-greeter-wrapper'
63--- data/unity8-greeter-wrapper 1970-01-01 00:00:00 +0000
64+++ data/unity8-greeter-wrapper 2014-05-29 14:11:15 +0000
65@@ -0,0 +1,98 @@
66+#!/bin/sh
67+# -*- Mode: sh; indent-tabs-mode: nil; tab-width: 4 -*-
68+#
69+# Copyright (C) 2011,2013 Canonical Ltd
70+# Author: Michael Terry <michael.terry@canonical.com>
71+#
72+# This program is free software: you can redistribute it and/or modify it under
73+# the terms of the GNU General Public License as published by the Free Software
74+# Foundation, version 3 of the License.
75+#
76+# See http://www.gnu.org/copyleft/gpl.html the full text of the license.
77+
78+# This wrapper merely ensures that init and friends live only as long as this
79+# script does. Otherwise, it's very easy for some processes to not notice that
80+# the session died. We could try to do this in-process, but we want to do this
81+# cleanup even if the greeter aborts.
82+
83+trap cleanup TERM EXIT
84+
85+cleanup()
86+{
87+ trap - TERM EXIT
88+ # Kill upstart and indicators
89+ if [ -n "$INIT_PID" ]; then
90+ kill "$INIT_PID"
91+ fi
92+ if [ -n "$CMD_PID" ]; then
93+ kill "$CMD_PID"
94+ fi
95+ exit 0
96+}
97+
98+set_greeter_var()
99+{
100+ export "$1=$2"
101+ gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.UpdateActivationEnvironment "{'$1': '$2'}"
102+ if [ -n "$INIT_PID" ]; then
103+ initctl set-env --global "$1=$2"
104+ fi
105+}
106+
107+SUB_SOCKET=$XDG_RUNTIME_DIR/mir_socket
108+rm -f $SUB_SOCKET # clear socket in case we were hard shut down
109+
110+# If touch session script (which sets up grid units and mir variables) is available, use it
111+TOUCH_WRAPPER=
112+if [ -x /usr/bin/ubuntu-touch-session ]; then
113+ TOUCH_WRAPPER=/usr/bin/ubuntu-touch-session
114+fi
115+
116+# Pretend that we're in an ubuntu-touch session, so that indicator-network
117+# will start.
118+export DESKTOP_SESSION=ubuntu-touch
119+
120+# We disable ofono using pulse. It causes problems with racing with the user's
121+# pulse. We need to come up with a better long-term fix for this, because we
122+# eventually need the greeter to play ringtones for users that aren't logged in.
123+set_greeter_var PA_DISABLED 1
124+
125+# Normal unity8 sessions are entirely driven by Upstart. But greeters
126+# are special. They need access to the file descriptors that lightdm
127+# creates for them and don't want to start all the services that a normal
128+# session would. So it's inconvenient to live within an upstart session.
129+# But... we still want to use Upstart for some services. So launch here.
130+USC_SOCKET=$MIR_SOCKET MIR_SOCKET=$SUB_SOCKET $TOUCH_WRAPPER /sbin/init --user --no-startup-event &
131+INIT_PID=$!
132+while [ ! -e "$XDG_RUNTIME_DIR/upstart/sessions/$INIT_PID.session" ]; do sleep 0.1; done
133+export UPSTART_SESSION=$(/sbin/initctl list-sessions | grep "^$INIT_PID " | cut -d' ' -f2)
134+
135+# Start any pre-greeter tasks if needed (like wizard)
136+/sbin/initctl emit unity8-greeter-starting
137+
138+# Define language here for phone if available. When phone user switches their
139+# language, they expect that to affect the greeter too. But the user doesn't
140+# have permission to switch system language, only their own. So we notice if
141+# the phablet user exists and use their language if so. TODO: talk to design
142+# about whether we should switch language on fly as users are selected (this
143+# is very hard to do technically).
144+#
145+# Do this after unity8-greeter-starting, in case a customization upstart job
146+# changes language.
147+if [ "$(id -u phablet 2>/dev/null)" = "32011" ]; then
148+ USER_LANG=$(gdbus call --system --dest org.freedesktop.Accounts --object-path /org/freedesktop/Accounts/User32011 --method org.freedesktop.DBus.Properties.Get org.freedesktop.Accounts.User Language | cut -d\' -f2)
149+ if [ -n "$USER_LANG" ]; then
150+ set_greeter_var LANGUAGE "$USER_LANG"
151+ fi
152+ USER_LOCALE=$(gdbus call --system --dest org.freedesktop.Accounts --object-path /org/freedesktop/Accounts/User32011 --method org.freedesktop.DBus.Properties.Get org.freedesktop.Accounts.User FormatsLocale | cut -d\' -f2)
153+ if [ -n "$USER_LOCALE" ]; then
154+ set_greeter_var LANG "$USER_LOCALE"
155+ set_greeter_var LC_ALL "$USER_LOCALE"
156+ fi
157+fi
158+
159+# And finally actually start the greeter
160+exec env MIR_SERVER_FILE=$SUB_SOCKET $TOUCH_WRAPPER $@ &
161+CMD_PID=$!
162+wait $CMD_PID
163+CMD_PID=
164
165=== added file 'data/unity8-greeter.desktop.in'
166--- data/unity8-greeter.desktop.in 1970-01-01 00:00:00 +0000
167+++ data/unity8-greeter.desktop.in 2014-05-29 14:11:15 +0000
168@@ -0,0 +1,5 @@
169+[Desktop Entry]
170+Type=Application
171+Name=Unity 8 Greeter
172+Exec=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/unity8-greeter-wrapper @CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/unity8-greeter
173+X-LightDM-Session-Type=mir
174
175=== modified file 'debian/changelog'
176--- debian/changelog 2014-05-27 07:47:11 +0000
177+++ debian/changelog 2014-05-29 14:11:15 +0000
178@@ -1,3 +1,9 @@
179+unity8 (7.87+14.10.20140505-0ubuntu1) UNRELEASED; urgency=medium
180+
181+ * Bump version for Breaks due to unity8-greeter
182+
183+ -- Michael Terry <mterry@ubuntu.com> Wed, 02 Apr 2014 14:39:45 -0400
184+
185 unity8 (7.86+14.10.20140527-0ubuntu1) utopic; urgency=low
186
187 [ Andrea Cimitan ]
188
189=== modified file 'debian/control'
190--- debian/control 2014-05-05 12:09:22 +0000
191+++ debian/control 2014-05-29 14:11:15 +0000
192@@ -14,6 +14,7 @@
193 libglib2.0-dev,
194 libgsettings-qt-dev,
195 libhud-client2-dev,
196+ liblightdm-qt5-3-dev (>= 1.11.1),
197 libpulse-dev,
198 libqmenumodel-dev (>= 0.2.7),
199 libqt5xmlpatterns5-dev,
200@@ -79,6 +80,7 @@
201 qml-module-qtquick-xmllistmodel,
202 qtdeclarative5-gsettings1.0,
203 qtdeclarative5-ubuntu-settings-components,
204+ unity-greeter-session-broadcast,
205 unity-launcher-impl-3,
206 unity8-common (= ${source:Version}),
207 unity8-private (= ${binary:Version}),
208@@ -94,6 +96,19 @@
209 Description: Unity 8 shell
210 The Unity 8 shell is the primary user interface for Ubuntu devices.
211
212+Package: unity8-greeter
213+Architecture: any
214+Depends: dbus-x11,
215+ libglib2.0-bin,
216+ lightdm,
217+ unity8 (= ${source:Version}),
218+ ${misc:Depends},
219+ ${shlibs:Depends},
220+Breaks: unity8 (<< 7.87),
221+Replaces: unity8 (<< 7.87),
222+Description: Ubuntu QML greeter
223+ The Ubuntu QML greeter is the primary greeter for Ubuntu devices.
224+
225 Package: unity8-common
226 Architecture: all
227 Depends: qtdeclarative5-ubuntu-thumbnailer0.1 | ubuntu-thumbnailer-impl,
228@@ -132,6 +147,7 @@
229 ubuntu-ui-toolkit-autopilot,
230 unity8 (= ${source:Version}),
231 unity8-fake-env (= ${source:Version}),
232+ unity8-greeter (= ${source:Version}),
233 url-dispatcher-tools,
234 ${misc:Depends},
235 ${python3:Depends},
236
237=== modified file 'debian/copyright'
238--- debian/copyright 2013-06-26 08:16:38 +0000
239+++ debian/copyright 2014-05-29 14:11:15 +0000
240@@ -22,7 +22,7 @@
241 On Debian systems, the full text of the GNU General Public License
242 version 3 can be found in the file /usr/share/common-licenses/GPL-3.
243
244-Files: tests/mocks/LightDM/UsersModel.h tests/mocks/LightDM/Greeter.h
245+Files: tests/mocks/liblightdm/UsersModel.h tests/mocks/liblightdm/Greeter.h
246 Copyright: 2013 Canonical Ltd.
247 2010-2011 David Edmundson
248 2010-2011 Robert Ancell
249
250=== modified file 'debian/rules'
251--- debian/rules 2014-05-05 08:50:25 +0000
252+++ debian/rules 2014-05-29 14:11:15 +0000
253@@ -34,7 +34,3 @@
254 # use private lib directories
255 override_dh_makeshlibs:
256 dh_makeshlibs -Nunity8-private -Nunity8-fake-env
257-
258-# libMockLightDM-qml.so links against liblightdm-qt5-2.so which doesn't exist
259-override_dh_shlibdeps:
260- dh_shlibdeps -XlibMockLightDM-qml.so
261
262=== added file 'debian/unity8-greeter.install'
263--- debian/unity8-greeter.install 1970-01-01 00:00:00 +0000
264+++ debian/unity8-greeter.install 2014-05-29 14:11:15 +0000
265@@ -0,0 +1,6 @@
266+usr/bin/unity8-greeter
267+usr/bin/unity8-greeter-wrapper
268+usr/share/lightdm
269+usr/share/unity8/GreeterShell.qml
270+usr/share/unity8/Greeter
271+usr/share/upstart/sessions/unity8-greeter-*.conf
272
273=== modified file 'debian/unity8-private.install'
274--- debian/unity8-private.install 2014-05-06 08:44:10 +0000
275+++ debian/unity8-private.install 2014-05-29 14:11:15 +0000
276@@ -4,6 +4,7 @@
277 usr/lib/*/unity8/qml/LightDM
278 usr/lib/*/unity8/qml/Powerd
279 usr/lib/*/unity8/qml/SessionBroadcast
280+usr/lib/*/unity8/qml/SessionManager
281 usr/lib/*/unity8/qml/Ubuntu
282 usr/lib/*/unity8/qml/Unity
283 usr/lib/*/unity8/qml/Utils
284
285=== modified file 'debian/unity8.install'
286--- debian/unity8.install 2014-05-07 10:30:14 +0000
287+++ debian/unity8.install 2014-05-29 14:11:15 +0000
288@@ -1,7 +1,6 @@
289 data/unity8.conf usr/share/upstart/sessions/
290 usr/bin/unity8
291 usr/share/applications/unity8.desktop
292-usr/share/unity8/Greeter
293 usr/share/unity8/Hud
294 usr/share/unity8/Launcher
295 usr/share/unity8/Panel
296
297=== modified file 'plugins/AccountsService/AccountsService.cpp'
298--- plugins/AccountsService/AccountsService.cpp 2013-10-11 13:32:36 +0000
299+++ plugins/AccountsService/AccountsService.cpp 2014-05-29 14:11:15 +0000
300@@ -24,7 +24,6 @@
301 AccountsService::AccountsService(QObject* parent)
302 : QObject(parent),
303 m_service(new AccountsServiceDBusAdaptor(this)),
304- m_user(qgetenv("USER")),
305 m_demoEdges(false),
306 m_statsWelcomeScreen(false)
307 {
308@@ -32,6 +31,9 @@
309 this, SLOT(propertiesChanged(const QString &, const QString &, const QStringList &)));
310 connect(m_service, SIGNAL(maybeChanged(const QString &)),
311 this, SLOT(maybeChanged(const QString &)));
312+
313+ setUser(qgetenv("USER"));
314+ updateDemoEdgesForCurrentUser();
315 }
316
317 QString AccountsService::user() const
318@@ -57,9 +59,22 @@
319 void AccountsService::setDemoEdges(bool demoEdges)
320 {
321 m_demoEdges = demoEdges;
322+ Q_EMIT demoEdgesChanged();
323 m_service->setUserProperty(m_user, "com.canonical.unity.AccountsService", "demo-edges", demoEdges);
324 }
325
326+bool AccountsService::demoEdgesForCurrentUser() const
327+{
328+ return m_demoEdgesForCurrentUser;
329+}
330+
331+void AccountsService::setDemoEdgesForCurrentUser(bool demoEdgesForCurrentUser)
332+{
333+ m_demoEdgesForCurrentUser = demoEdgesForCurrentUser;
334+ Q_EMIT demoEdgesForCurrentUserChanged();
335+ m_service->setUserProperty(qgetenv("USER"), "com.canonical.unity.AccountsService", "demo-edges", demoEdgesForCurrentUser);
336+}
337+
338 QString AccountsService::backgroundFile() const
339 {
340 return m_backgroundFile;
341@@ -79,6 +94,15 @@
342 }
343 }
344
345+void AccountsService::updateDemoEdgesForCurrentUser()
346+{
347+ auto demoEdgesForCurrentUser = m_service->getUserProperty(qgetenv("USER"), "com.canonical.unity.AccountsService", "demo-edges").toBool();
348+ if (m_demoEdgesForCurrentUser != demoEdgesForCurrentUser) {
349+ m_demoEdgesForCurrentUser = demoEdgesForCurrentUser;
350+ Q_EMIT demoEdgesForCurrentUserChanged();
351+ }
352+}
353+
354 void AccountsService::updateBackgroundFile()
355 {
356 auto backgroundFile = m_service->getUserProperty(m_user, "org.freedesktop.Accounts.User", "BackgroundFile").toString();
357@@ -99,13 +123,14 @@
358
359 void AccountsService::propertiesChanged(const QString &user, const QString &interface, const QStringList &changed)
360 {
361- if (m_user != user) {
362- return;
363- }
364-
365 if (interface == "com.canonical.unity.AccountsService") {
366 if (changed.contains("demo-edges")) {
367- updateDemoEdges();
368+ if (qgetenv("USER") == user) {
369+ updateDemoEdgesForCurrentUser();
370+ }
371+ if (m_user == user) {
372+ updateDemoEdges();
373+ }
374 }
375 } else if (interface == "com.ubuntu.touch.AccountsService.SecurityPrivacy") {
376 if (changed.contains("StatsWelcomeScreen")) {
377@@ -116,10 +141,8 @@
378
379 void AccountsService::maybeChanged(const QString &user)
380 {
381- if (m_user != user) {
382- return;
383+ if (m_user == user) {
384+ // Standard properties might have changed
385+ updateBackgroundFile();
386 }
387-
388- // Standard properties might have changed
389- updateBackgroundFile();
390 }
391
392=== modified file 'plugins/AccountsService/AccountsService.h'
393--- plugins/AccountsService/AccountsService.h 2013-09-24 18:50:56 +0000
394+++ plugins/AccountsService/AccountsService.h 2014-05-29 14:11:15 +0000
395@@ -35,6 +35,10 @@
396 READ demoEdges
397 WRITE setDemoEdges
398 NOTIFY demoEdgesChanged)
399+ Q_PROPERTY (bool demoEdgesForCurrentUser
400+ READ demoEdgesForCurrentUser
401+ WRITE setDemoEdgesForCurrentUser
402+ NOTIFY demoEdgesForCurrentUserChanged)
403 Q_PROPERTY (QString backgroundFile
404 READ backgroundFile
405 NOTIFY backgroundFileChanged)
406@@ -49,12 +53,15 @@
407 void setUser(const QString &user);
408 bool demoEdges() const;
409 void setDemoEdges(bool demoEdges);
410+ bool demoEdgesForCurrentUser() const;
411+ void setDemoEdgesForCurrentUser(bool demoEdgesForCurrentUser);
412 QString backgroundFile() const;
413 bool statsWelcomeScreen() const;
414
415 Q_SIGNALS:
416 void userChanged();
417 void demoEdgesChanged();
418+ void demoEdgesForCurrentUserChanged();
419 void backgroundFileChanged();
420 void statsWelcomeScreenChanged();
421
422@@ -64,12 +71,14 @@
423
424 private:
425 void updateDemoEdges();
426+ void updateDemoEdgesForCurrentUser();
427 void updateBackgroundFile();
428 void updateStatsWelcomeScreen();
429
430 AccountsServiceDBusAdaptor *m_service;
431 QString m_user;
432 bool m_demoEdges;
433+ bool m_demoEdgesForCurrentUser;
434 QString m_backgroundFile;
435 bool m_statsWelcomeScreen;
436 };
437
438=== modified file 'plugins/CMakeLists.txt'
439--- plugins/CMakeLists.txt 2014-05-14 10:11:14 +0000
440+++ plugins/CMakeLists.txt 2014-05-29 14:11:15 +0000
441@@ -17,6 +17,7 @@
442 add_subdirectory(Dash)
443 add_subdirectory(Powerd)
444 add_subdirectory(SessionBroadcast)
445+add_subdirectory(SessionManager)
446 add_subdirectory(Ubuntu)
447 add_subdirectory(Unity)
448 add_subdirectory(Utils)
449
450=== modified file 'plugins/LightDM/CMakeLists.txt'
451--- plugins/LightDM/CMakeLists.txt 2014-05-02 22:57:00 +0000
452+++ plugins/LightDM/CMakeLists.txt 2014-05-29 14:11:15 +0000
453@@ -1,23 +1,22 @@
454 # Dependencies
455 include(FindPkgConfig)
456+pkg_check_modules(LIBLIGHTDM REQUIRED liblightdm-qt5-3)
457 pkg_check_modules(LIBUSERMETRICSOUTPUT REQUIRED libusermetricsoutput-1)
458-# TODO: Once we split out a separate greeter process, uncomment these lines
459-#pkg_check_modules(LIBLIGHTDM REQUIRED liblightdm-qt5-2)
460
461 include_directories(
462 ${CMAKE_CURRENT_SOURCE_DIR}
463 ${CMAKE_CURRENT_BINARY_DIR}
464 ${CMAKE_SOURCE_DIR}/plugins/Utils
465- ${CMAKE_SOURCE_DIR}/tests/mocks/LightDM
466- #${LIBLIGHTDM_INCLUDE_DIRS}
467+ ${LIBLIGHTDM_INCLUDE_DIRS}
468 ${LIBUSERMETRICSOUTPUT_INCLUDE_DIRS}
469 )
470
471 set(QMLPLUGIN_SRC
472- ../Utils/qsortfilterproxymodelqml.cpp # FIXME evaluate a more generic approach for using other plugins
473+ ${CMAKE_SOURCE_DIR}/plugins/Utils/qsortfilterproxymodelqml.cpp # FIXME evaluate a more generic approach for using other plugins
474 DBusGreeterList.cpp
475 Greeter.cpp
476 plugin.cpp
477+ URLDispatcher.cpp
478 UsersModel.cpp
479 )
480
481@@ -26,12 +25,10 @@
482 )
483
484 target_link_libraries(LightDM-qml
485- MockLightDM-demo
486-# TODO: Once we split out a separate greeter process, uncomment these lines
487-# ${LIBLIGHTDM_LDFLAGS}
488+ ${LIBLIGHTDM_LDFLAGS}
489 ${LIBUSERMETRICSOUTPUT_LDFLAGS}
490 )
491
492-qt5_use_modules(LightDM-qml DBus Gui Qml)
493+qt5_use_modules(LightDM-qml DBus Qml)
494
495 add_unity8_plugin(LightDM 0.1 LightDM TARGETS LightDM-qml)
496
497=== modified file 'plugins/LightDM/Greeter.cpp'
498--- plugins/LightDM/Greeter.cpp 2013-12-03 11:43:15 +0000
499+++ plugins/LightDM/Greeter.cpp 2014-05-29 14:11:15 +0000
500@@ -56,7 +56,10 @@
501 this, SLOT(showPromptFilter(QString, QLightDM::Greeter::PromptType)));
502 connect(d->m_greeter, SIGNAL(authenticationComplete()),
503 this, SLOT(authenticationCompleteFilter()));
504+ connect(d->m_greeter, SIGNAL(idle()), this, SIGNAL(idle()));
505+ connect(d->m_greeter, SIGNAL(reset()), this, SIGNAL(reset()));
506
507+ d->m_greeter->setResettable(true);
508 d->m_greeter->connectSync();
509 }
510
511
512=== modified file 'plugins/LightDM/Greeter.h'
513--- plugins/LightDM/Greeter.h 2013-12-03 11:43:15 +0000
514+++ plugins/LightDM/Greeter.h 2014-05-29 14:11:15 +0000
515@@ -56,6 +56,8 @@
516 void authenticationComplete();
517 void authenticationUserChanged(const QString &user);
518 void promptlessChanged();
519+ void idle();
520+ void reset();
521
522 // This signal is emitted by external agents like indicators, and the UI
523 // should switch to this user if possible.
524
525=== added file 'plugins/LightDM/URLDispatcher.cpp'
526--- plugins/LightDM/URLDispatcher.cpp 1970-01-01 00:00:00 +0000
527+++ plugins/LightDM/URLDispatcher.cpp 2014-05-29 14:11:15 +0000
528@@ -0,0 +1,55 @@
529+/*
530+ * Copyright (C) 2013 Canonical, Ltd.
531+ *
532+ * This program is free software; you can redistribute it and/or modify
533+ * it under the terms of the GNU General Public License as published by
534+ * the Free Software Foundation; version 3.
535+ *
536+ * This program is distributed in the hope that it will be useful,
537+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
538+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
539+ * GNU General Public License for more details.
540+ *
541+ * You should have received a copy of the GNU General Public License
542+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
543+ */
544+
545+#include "URLDispatcher.h"
546+
547+#include <QDBusConnection>
548+
549+class URLDispatcherInterface : public QObject
550+{
551+ Q_OBJECT
552+ Q_CLASSINFO("D-Bus Interface", "com.canonical.URLDispatcher")
553+
554+public:
555+ explicit URLDispatcherInterface(URLDispatcher *parent);
556+
557+ Q_SCRIPTABLE void DispatchURL(const QString &url);
558+};
559+
560+URLDispatcherInterface::URLDispatcherInterface(URLDispatcher *parent)
561+ : QObject(parent)
562+{
563+}
564+
565+void URLDispatcherInterface::DispatchURL(const QString &url)
566+{
567+ Q_EMIT static_cast<URLDispatcher *>(parent())->dispatchURL(url);
568+}
569+
570+URLDispatcher::URLDispatcher(QObject *parent)
571+ : QObject(parent)
572+{
573+ // This class also manages our url-dispatcher interception. We intercept
574+ // url-dispatcher because rather than spawning the handler for the URL in
575+ // our own session, we want to do notify the user session to do it for us
576+ // (and start an unlock in the process).
577+ QDBusConnection connection = QDBusConnection::sessionBus();
578+ URLDispatcherInterface *dispatcher = new URLDispatcherInterface(this);
579+ connection.registerObject("/com/canonical/URLDispatcher", dispatcher, QDBusConnection::ExportScriptableContents);
580+ connection.registerService("com.canonical.URLDispatcher");
581+}
582+
583+#include "URLDispatcher.moc"
584
585=== added file 'plugins/LightDM/URLDispatcher.h'
586--- plugins/LightDM/URLDispatcher.h 1970-01-01 00:00:00 +0000
587+++ plugins/LightDM/URLDispatcher.h 2014-05-29 14:11:15 +0000
588@@ -0,0 +1,34 @@
589+/*
590+ * Copyright (C) 2013 Canonical, Ltd.
591+ *
592+ * This program is free software; you can redistribute it and/or modify
593+ * it under the terms of the GNU General Public License as published by
594+ * the Free Software Foundation; version 3.
595+ *
596+ * This program is distributed in the hope that it will be useful,
597+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
598+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
599+ * GNU General Public License for more details.
600+ *
601+ * You should have received a copy of the GNU General Public License
602+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
603+ */
604+
605+#ifndef UNITY_URLDISPATCHER_H
606+#define UNITY_URLDISPATCHER_H
607+
608+#include <QObject>
609+#include <QString>
610+
611+class URLDispatcher : public QObject
612+{
613+ Q_OBJECT
614+
615+public:
616+ explicit URLDispatcher(QObject *parent=0);
617+
618+Q_SIGNALS:
619+ void dispatchURL(const QString &url);
620+};
621+
622+#endif
623
624=== modified file 'plugins/LightDM/plugin.cpp'
625--- plugins/LightDM/plugin.cpp 2013-12-03 16:55:03 +0000
626+++ plugins/LightDM/plugin.cpp 2014-05-29 14:11:15 +0000
627@@ -20,6 +20,7 @@
628 #include "plugin.h"
629 #include "DBusGreeterList.h"
630 #include "Greeter.h"
631+#include "URLDispatcher.h"
632 #include "UsersModel.h"
633 #include <libusermetricsoutput/ColorTheme.h>
634 #include <libusermetricsoutput/UserMetrics.h>
635@@ -46,6 +47,13 @@
636 return greeter;
637 }
638
639+static QObject *dispatcher_provider(QQmlEngine *engine, QJSEngine *scriptEngine)
640+{
641+ Q_UNUSED(engine)
642+ Q_UNUSED(scriptEngine)
643+ return new URLDispatcher();
644+}
645+
646 static QObject *users_provider(QQmlEngine *engine, QJSEngine *scriptEngine)
647 {
648 Q_UNUSED(engine)
649@@ -67,6 +75,7 @@
650
651 Q_ASSERT(uri == QLatin1String("LightDM"));
652 qmlRegisterSingletonType<Greeter>(uri, 0, 1, "Greeter", greeter_provider);
653+ qmlRegisterSingletonType<URLDispatcher>(uri, 0, 1, "URLDispatcher", dispatcher_provider);
654 qmlRegisterSingletonType<UsersModel>(uri, 0, 1, "Users", users_provider);
655 qmlRegisterUncreatableType<QLightDM::UsersModel>(uri, 0, 1, "UserRoles", "Type is not instantiable");
656 qmlRegisterSingletonType<UserMetricsOutput::UserMetrics>(uri, 0, 1, "Infographic", infographic_provider);
657
658=== modified file 'plugins/SessionBroadcast/SessionBroadcast.cpp'
659--- plugins/SessionBroadcast/SessionBroadcast.cpp 2013-09-12 17:58:21 +0000
660+++ plugins/SessionBroadcast/SessionBroadcast.cpp 2014-05-29 14:11:15 +0000
661@@ -18,11 +18,26 @@
662
663 #include "SessionBroadcast.h"
664 #include <QDBusConnection>
665+#include <QDBusConnectionInterface>
666+#include <QDBusInterface>
667
668 SessionBroadcast::SessionBroadcast(QObject* parent)
669 : QObject(parent)
670 {
671 auto connection = QDBusConnection::SM_BUSNAME();
672+ auto interface = connection.interface();
673+ interface->startService("com.canonical.Unity.Greeter.Broadcast");
674+ m_broadcaster = new QDBusInterface("com.canonical.Unity.Greeter.Broadcast",
675+ "/com/canonical/Unity/Greeter/Broadcast",
676+ "com.canonical.Unity.Greeter.Broadcast",
677+ connection, this);
678+
679+ connection.connect("com.canonical.Unity.Greeter.Broadcast",
680+ "/com/canonical/Unity/Greeter/Broadcast",
681+ "com.canonical.Unity.Greeter.Broadcast",
682+ "StartUrl",
683+ this,
684+ SLOT(onStartUrl(const QString &, const QString &)));
685
686 connection.connect("com.canonical.Unity.Greeter.Broadcast",
687 "/com/canonical/Unity/Greeter/Broadcast",
688@@ -32,6 +47,26 @@
689 SLOT(onShowHome(const QString &)));
690 }
691
692+void SessionBroadcast::requestUrlStart(const QString &username, const QString &url)
693+{
694+ m_broadcaster->asyncCall("RequestUrlStart", username, url);
695+}
696+
697+void SessionBroadcast::requestHomeShown(const QString &username)
698+{
699+ m_broadcaster->asyncCall("RequestHomeShown", username);
700+}
701+
702+void SessionBroadcast::onStartUrl(const QString &username, const QString &url)
703+{
704+ // Since this signal is just used for testing, we don't *really* care if
705+ // username matches, but just in case we do eventually use the signal, we
706+ // should only listen to our own requests.
707+ if (username == qgetenv("USER")) {
708+ Q_EMIT startUrl(url);
709+ }
710+}
711+
712 void SessionBroadcast::onShowHome(const QString &username)
713 {
714 // Only listen to requests meant for us
715
716=== modified file 'plugins/SessionBroadcast/SessionBroadcast.h'
717--- plugins/SessionBroadcast/SessionBroadcast.h 2013-09-12 17:58:21 +0000
718+++ plugins/SessionBroadcast/SessionBroadcast.h 2014-05-29 14:11:15 +0000
719@@ -31,11 +31,22 @@
720 public:
721 explicit SessionBroadcast(QObject *parent = 0);
722
723+ Q_INVOKABLE void requestUrlStart(const QString &username, const QString &url);
724+ Q_INVOKABLE void requestHomeShown(const QString &username);
725+
726 Q_SIGNALS:
727+ // This signal isn't actually used by the shell
728+ // (unity-greeter-session-broadcast handles launching an app for us), but
729+ // it's useful for testing the plugin.
730+ void startUrl(const QString &url);
731 void showHome();
732
733 private Q_SLOTS:
734+ void onStartUrl(const QString &username, const QString &url);
735 void onShowHome(const QString &username);
736+
737+private:
738+ QDBusInterface *m_broadcaster;
739 };
740
741 #endif
742
743=== added directory 'plugins/SessionManager'
744=== added file 'plugins/SessionManager/CMakeLists.txt'
745--- plugins/SessionManager/CMakeLists.txt 1970-01-01 00:00:00 +0000
746+++ plugins/SessionManager/CMakeLists.txt 2014-05-29 14:11:15 +0000
747@@ -0,0 +1,22 @@
748+set(QMLPLUGIN_SRC
749+ plugin.cpp
750+ SessionManager.cpp
751+ )
752+
753+include_directories(
754+ ${Qt5DBus_INCLUDE_DIRS}
755+ )
756+
757+add_definitions(-DSM_BUSNAME=systemBus)
758+
759+add_library(SessionManager-qml MODULE
760+ ${QMLPLUGIN_SRC}
761+ )
762+
763+target_link_libraries(SessionManager-qml
764+ ${Qt5DBus_LIBRARIES}
765+ )
766+
767+qt5_use_modules(SessionManager-qml Qml)
768+
769+add_unity8_plugin(SessionManager 0.1 SessionManager TARGETS SessionManager-qml)
770
771=== added file 'plugins/SessionManager/SessionManager.cpp'
772--- plugins/SessionManager/SessionManager.cpp 1970-01-01 00:00:00 +0000
773+++ plugins/SessionManager/SessionManager.cpp 2014-05-29 14:11:15 +0000
774@@ -0,0 +1,124 @@
775+/*
776+ * Copyright (C) 2013 Canonical, Ltd.
777+ *
778+ * This program is free software; you can redistribute it and/or modify
779+ * it under the terms of the GNU General Public License as published by
780+ * the Free Software Foundation; version 3.
781+ *
782+ * This program is distributed in the hope that it will be useful,
783+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
784+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
785+ * GNU General Public License for more details.
786+ *
787+ * You should have received a copy of the GNU General Public License
788+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
789+ *
790+ * Author: Michael Terry <michael.terry@canonical.com>
791+ */
792+
793+#include "SessionManager.h"
794+#include <QtCore/QEvent>
795+#include <QtDBus/QDBusPendingReply>
796+
797+SessionManager::SessionManager(QObject* parent)
798+ : QObject(parent),
799+ l1_manager(NULL),
800+ l1_session(NULL),
801+ ldm_session(NULL),
802+ is_active(true) // assume we're active w/o logind
803+{
804+ l1_manager = new QDBusInterface("org.freedesktop.login1",
805+ "/org/freedesktop/login1",
806+ "org.freedesktop.login1.Manager",
807+ QDBusConnection::SM_BUSNAME(), this);
808+ if (l1_manager->isValid() && QString(qgetenv("XDG_SESSION_ID")) != "") {
809+ QDBusPendingCall pcall = l1_manager->asyncCall("GetSession", QString(qgetenv("XDG_SESSION_ID")));
810+ QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pcall, this);
811+ QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
812+ this, SLOT(getSessionSlot(QDBusPendingCallWatcher*)));
813+ }
814+
815+ if (QString(qgetenv("XDG_SESSION_PATH")) != "") {
816+ ldm_session = new QDBusInterface("org.freedesktop.DisplayManager",
817+ QString(qgetenv("XDG_SESSION_PATH")),
818+ "org.freedesktop.DisplayManager.Session",
819+ QDBusConnection::SM_BUSNAME(), this);
820+ }
821+}
822+
823+bool SessionManager::active() const
824+{
825+ // We cache this value for performance reasons, as QDBusInterface does not
826+ // cache for us.
827+ return is_active;
828+}
829+
830+void SessionManager::lock()
831+{
832+ // We use ldm_session to handle locking rather than l1_session, because
833+ // l1_session doesn't have permissions to lock from the user session, but
834+ // ldm_session does. This is what the rest of Ubuntu uses to lock.
835+ if (ldm_session != NULL && ldm_session->isValid())
836+ ldm_session->asyncCall("Lock");
837+}
838+
839+void SessionManager::getSessionSlot(QDBusPendingCallWatcher *watcher)
840+{
841+ QDBusPendingReply<QDBusObjectPath> reply = *watcher;
842+ if (!reply.isError()) {
843+ QDBusObjectPath path = reply.argumentAt<0>();
844+ l1_session = new QDBusInterface("org.freedesktop.login1",
845+ path.path(),
846+ "org.freedesktop.login1.Session",
847+ l1_manager->connection(), this);
848+
849+ l1_manager->connection().connect("org.freedesktop.login1",
850+ path.path(),
851+ "org.freedesktop.DBus.Properties",
852+ "PropertiesChanged",
853+ this,
854+ SLOT(propertiesChanged(QString, QVariantMap, QStringList)));
855+
856+ // Login1 is very odd about emitting PropertiesChanged. It often does
857+ // not do so when active is becoming false. But it always does when
858+ // it becomes true. So we watch for the "Lock" signal too, which is a
859+ // reliably hint that active is false.
860+ l1_manager->connection().connect("org.freedesktop.login1",
861+ path.path(),
862+ "org.freedesktop.login1.Session",
863+ "Lock",
864+ this,
865+ SLOT(sessionLocked()));
866+
867+ propertiesChanged("", QVariantMap(), QStringList() << "Active");
868+ }
869+ watcher->deleteLater();
870+}
871+
872+void SessionManager::propertiesChanged(const QString &interface, const QVariantMap &changed, const QStringList &invalid)
873+{
874+ Q_UNUSED(interface)
875+
876+ QVariant value = changed.value("Active");
877+
878+ // If Active isn't in changed, check if we were at least notified about it
879+ // changing on the server. Also check if IdleHint was modified, because
880+ // sometimes logind does not emit a changed signal for Active becoming
881+ // false, but will emit for IdleHint when that does happen.
882+ if (!value.isValid() && (invalid.contains("Active") || invalid.contains("IdleHint") || changed.contains("IdleHint")) && l1_session->isValid()) {
883+ value = l1_session->property("Active");
884+ if (!value.isValid())
885+ value = QVariant(false);
886+ }
887+
888+ if (value.isValid() && value.toBool() != is_active) {
889+ is_active = value.toBool();
890+ Q_EMIT activeChanged();
891+ }
892+}
893+
894+void SessionManager::sessionLocked()
895+{
896+ is_active = false;
897+ Q_EMIT activeChanged();
898+}
899
900=== added file 'plugins/SessionManager/SessionManager.h'
901--- plugins/SessionManager/SessionManager.h 1970-01-01 00:00:00 +0000
902+++ plugins/SessionManager/SessionManager.h 2014-05-29 14:11:15 +0000
903@@ -0,0 +1,61 @@
904+/*
905+ * Copyright (C) 2012,2013 Canonical, Ltd.
906+ *
907+ * This program is free software; you can redistribute it and/or modify
908+ * it under the terms of the GNU General Public License as published by
909+ * the Free Software Foundation; version 3.
910+ *
911+ * This program is distributed in the hope that it will be useful,
912+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
913+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
914+ * GNU General Public License for more details.
915+ *
916+ * You should have received a copy of the GNU General Public License
917+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
918+ *
919+ * Authors: Gerry Boland <gerry.boland@canonical.com>
920+ * Michael Terry <michael.terry@canonical.com>
921+ */
922+
923+#ifndef UNITY_SESSIONMANAGER_H
924+#define UNITY_SESSIONMANAGER_H
925+
926+#include <QtCore/QObject>
927+#include <QtCore/QString>
928+#include <QtCore/QStringList>
929+#include <QtCore/QVariantMap>
930+#include <QtDBus/QDBusInterface>
931+#include <QtDBus/QDBusPendingCallWatcher>
932+
933+class SessionManager: public QObject
934+{
935+ Q_OBJECT
936+ Q_PROPERTY(bool active
937+ READ active
938+ NOTIFY activeChanged
939+ FINAL)
940+
941+public:
942+ explicit SessionManager(QObject *parent = 0);
943+
944+ bool active() const;
945+
946+public Q_SLOTS:
947+ void lock();
948+
949+Q_SIGNALS:
950+ void activeChanged();
951+
952+private Q_SLOTS:
953+ void getSessionSlot(QDBusPendingCallWatcher *watcher);
954+ void propertiesChanged(const QString &interface, const QVariantMap &changed, const QStringList &invalid);
955+ void sessionLocked();
956+
957+private:
958+ QDBusInterface *l1_manager;
959+ QDBusInterface *l1_session;
960+ QDBusInterface *ldm_session;
961+ bool is_active;
962+};
963+
964+#endif
965
966=== added file 'plugins/SessionManager/plugin.cpp'
967--- plugins/SessionManager/plugin.cpp 1970-01-01 00:00:00 +0000
968+++ plugins/SessionManager/plugin.cpp 2014-05-29 14:11:15 +0000
969@@ -0,0 +1,35 @@
970+/*
971+ * Copyright (C) 2012,2013 Canonical, Ltd.
972+ *
973+ * This program is free software; you can redistribute it and/or modify
974+ * it under the terms of the GNU General Public License as published by
975+ * the Free Software Foundation; version 3.
976+ *
977+ * This program is distributed in the hope that it will be useful,
978+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
979+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
980+ * GNU General Public License for more details.
981+ *
982+ * You should have received a copy of the GNU General Public License
983+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
984+ *
985+ * Authors: Gerry Boland <gerry.boland@canonical.com>
986+ * Michael Terry <michael.terry@canonical.com>
987+ */
988+
989+#include "plugin.h"
990+#include "SessionManager.h"
991+#include <QtQml/qqml.h>
992+
993+static QObject *sessionmanager_provider(QQmlEngine *engine, QJSEngine *scriptEngine)
994+{
995+ Q_UNUSED(engine)
996+ Q_UNUSED(scriptEngine)
997+ return new SessionManager();
998+}
999+
1000+void SessionManagerPlugin::registerTypes(const char *uri)
1001+{
1002+ Q_ASSERT(uri == QLatin1String("SessionManager"));
1003+ qmlRegisterSingletonType<SessionManager>(uri, 0, 1, "SessionManager", sessionmanager_provider);
1004+}
1005
1006=== added file 'plugins/SessionManager/plugin.h'
1007--- plugins/SessionManager/plugin.h 1970-01-01 00:00:00 +0000
1008+++ plugins/SessionManager/plugin.h 2014-05-29 14:11:15 +0000
1009@@ -0,0 +1,35 @@
1010+/*
1011+ * Copyright (C) 2012,2013 Canonical, Ltd.
1012+ *
1013+ * This program is free software; you can redistribute it and/or modify
1014+ * it under the terms of the GNU General Public License as published by
1015+ * the Free Software Foundation; version 3.
1016+ *
1017+ * This program is distributed in the hope that it will be useful,
1018+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1019+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1020+ * GNU General Public License for more details.
1021+ *
1022+ * You should have received a copy of the GNU General Public License
1023+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1024+ *
1025+ * Authors: Gerry Boland <gerry.boland@canonical.com>
1026+ * Michael Terry <michael.terry@canonical.com>
1027+ */
1028+
1029+#ifndef SESSIONMANAGER_PLUGIN_H
1030+#define SESSIONMANAGER_PLUGIN_H
1031+
1032+#include <QtQml/QQmlEngine>
1033+#include <QtQml/QQmlExtensionPlugin>
1034+
1035+class SessionManagerPlugin : public QQmlExtensionPlugin
1036+{
1037+ Q_OBJECT
1038+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
1039+
1040+public:
1041+ void registerTypes(const char *uri);
1042+};
1043+
1044+#endif
1045
1046=== added file 'plugins/SessionManager/qmldir'
1047--- plugins/SessionManager/qmldir 1970-01-01 00:00:00 +0000
1048+++ plugins/SessionManager/qmldir 2014-05-29 14:11:15 +0000
1049@@ -0,0 +1,2 @@
1050+module SessionManager
1051+plugin SessionManager-qml
1052
1053=== modified file 'plugins/Unity/Launcher/backend/launcherbackend.cpp'
1054--- plugins/Unity/Launcher/backend/launcherbackend.cpp 2014-05-13 11:21:45 +0000
1055+++ plugins/Unity/Launcher/backend/launcherbackend.cpp 2014-05-29 14:11:15 +0000
1056@@ -37,12 +37,15 @@
1057 bool countVisible;
1058 };
1059
1060-LauncherBackend::LauncherBackend(QObject *parent):
1061+LauncherBackend::LauncherBackend(bool greeterMode, QObject *parent):
1062 QDBusVirtualObject(parent),
1063+ m_greeterMode(greeterMode),
1064 m_accounts(nullptr)
1065 {
1066 #ifndef LAUNCHER_TESTING
1067 m_accounts = new AccountsServiceDBusAdaptor(this);
1068+ connect(m_accounts, SIGNAL(propertiesChanged(QString, QString, QStringList)),
1069+ this, SLOT(accountsListChanged(QString, QString, QStringList)));
1070 #endif
1071 m_user = qgetenv("USER");
1072 syncFromAccounts();
1073@@ -225,7 +228,7 @@
1074
1075 void LauncherBackend::setUser(const QString &username)
1076 {
1077- if (qgetenv("USER") == "lightdm" && m_user != username) {
1078+ if (m_greeterMode && m_user != username) {
1079 m_user = username;
1080 syncFromAccounts();
1081 }
1082@@ -238,6 +241,15 @@
1083 Q_UNUSED(quickListId)
1084 }
1085
1086+void LauncherBackend::accountsListChanged(const QString &user, const QString &interface, const QStringList &changed)
1087+{
1088+ if (m_greeterMode && user == m_user &&
1089+ interface == "com.canonical.unity.AccountsService" &&
1090+ changed.contains("launcher-items")) {
1091+ syncFromAccounts();
1092+ }
1093+}
1094+
1095 void LauncherBackend::syncFromAccounts()
1096 {
1097 QList<QVariantMap> apps;
1098@@ -299,6 +311,8 @@
1099 loadFromVariant(app.toMap());
1100 }
1101 }
1102+
1103+ Q_EMIT refreshApplications();
1104 }
1105
1106 void LauncherBackend::syncToAccounts()
1107
1108=== modified file 'plugins/Unity/Launcher/backend/launcherbackend.h'
1109--- plugins/Unity/Launcher/backend/launcherbackend.h 2014-04-29 19:22:13 +0000
1110+++ plugins/Unity/Launcher/backend/launcherbackend.h 2014-05-29 14:11:15 +0000
1111@@ -42,7 +42,7 @@
1112 friend LauncherBackendTest;
1113
1114 public:
1115- LauncherBackend(QObject *parent = 0);
1116+ LauncherBackend(bool greeterMode = false, QObject *parent = 0);
1117 virtual ~LauncherBackend();
1118
1119 /**
1120@@ -162,6 +162,7 @@
1121 virtual QString introspect (const QString &path) const;
1122
1123 Q_SIGNALS:
1124+ void refreshApplications() const;
1125 void quickListChanged(const QString &appId, const QList<QuickListEntry> &quickList) const;
1126 void progressChanged(const QString &appId, int progress) const;
1127 void countChanged(const QString &appId, int count) const;
1128@@ -178,6 +179,8 @@
1129 void syncFromAccounts();
1130 void syncToAccounts();
1131
1132+ bool m_greeterMode;
1133+
1134 QList<QString> m_storedApps;
1135 mutable QHash<QString, LauncherBackendItem*> m_itemCache;
1136
1137@@ -186,6 +189,9 @@
1138
1139 void emitPropChangedDbus(const QString& appId, const QString& property, QVariant &value) const;
1140
1141+private Q_SLOTS:
1142+ void accountsListChanged(const QString &user, const QString &interface, const QStringList &changed);
1143+
1144 protected: /* Protected to allow testing */
1145 LauncherBackendItem* getItem(const QString& appId) const;
1146
1147
1148=== modified file 'plugins/Unity/Launcher/launcheritem.cpp'
1149--- plugins/Unity/Launcher/launcheritem.cpp 2013-10-22 11:02:49 +0000
1150+++ plugins/Unity/Launcher/launcheritem.cpp 2014-05-29 14:11:15 +0000
1151@@ -22,12 +22,13 @@
1152
1153 #include <libintl.h>
1154
1155-LauncherItem::LauncherItem(const QString &appId, const QString &name, const QString &icon, QObject *parent) :
1156+LauncherItem::LauncherItem(const QString &appId, const QString &name, const QString &icon, bool pinnable, QObject *parent) :
1157 LauncherItemInterface(parent),
1158 m_appId(appId),
1159 m_name(name),
1160 m_icon(icon),
1161 m_pinned(false),
1162+ m_pinnable(pinnable),
1163 m_running(false),
1164 m_recent(false),
1165 m_progress(-1),
1166@@ -38,10 +39,12 @@
1167 QuickListEntry nameAction;
1168 nameAction.setText(m_name);
1169 m_quickList->appendAction(nameAction);
1170- QuickListEntry pinningAction;
1171- pinningAction.setActionId("pin_item");
1172- pinningAction.setText(gettext("Lock to Launcher"));
1173- m_quickList->appendAction(pinningAction);
1174+ if (m_pinnable) {
1175+ QuickListEntry pinningAction;
1176+ pinningAction.setActionId("pin_item");
1177+ pinningAction.setText(gettext("Lock to Launcher"));
1178+ m_quickList->appendAction(pinningAction);
1179+ }
1180 }
1181
1182 QString LauncherItem::appId() const
1183@@ -68,10 +71,12 @@
1184 {
1185 if (m_pinned != pinned) {
1186 m_pinned = pinned;
1187- QuickListEntry entry;
1188- entry.setActionId("pin_item");
1189- entry.setText(pinned ? gettext("Unlock from Launcher") : gettext("Lock to Launcher"));
1190- m_quickList->updateAction(entry);
1191+ if (m_pinnable) {
1192+ QuickListEntry entry;
1193+ entry.setActionId("pin_item");
1194+ entry.setText(pinned ? gettext("Unlock from Launcher") : gettext("Lock to Launcher"));
1195+ m_quickList->updateAction(entry);
1196+ }
1197 Q_EMIT pinnedChanged(pinned);
1198 }
1199 }
1200
1201=== modified file 'plugins/Unity/Launcher/launcheritem.h'
1202--- plugins/Unity/Launcher/launcheritem.h 2013-09-11 15:33:02 +0000
1203+++ plugins/Unity/Launcher/launcheritem.h 2014-05-29 14:11:15 +0000
1204@@ -32,7 +32,7 @@
1205 {
1206 Q_OBJECT
1207 public:
1208- LauncherItem(const QString &appId, const QString &name, const QString &icon, QObject *parent = 0);
1209+ LauncherItem(const QString &appId, const QString &name, const QString &icon, bool pinnable, QObject *parent = 0);
1210
1211 QString appId() const;
1212 QString name() const;
1213@@ -67,6 +67,7 @@
1214 QString m_name;
1215 QString m_icon;
1216 bool m_pinned;
1217+ bool m_pinnable;
1218 bool m_running;
1219 bool m_recent;
1220 int m_progress;
1221
1222=== modified file 'plugins/Unity/Launcher/launchermodel.cpp'
1223--- plugins/Unity/Launcher/launchermodel.cpp 2014-05-13 11:24:48 +0000
1224+++ plugins/Unity/Launcher/launchermodel.cpp 2014-05-29 14:11:15 +0000
1225@@ -27,20 +27,15 @@
1226
1227 LauncherModel::LauncherModel(QObject *parent):
1228 LauncherModelInterface(parent),
1229- m_backend(new LauncherBackend(this)),
1230+ m_greeterMode(qgetenv("XDG_SESSION_CLASS") == "greeter"),
1231+ m_backend(new LauncherBackend(m_greeterMode, this)),
1232 m_appManager(0)
1233 {
1234 connect(m_backend, SIGNAL(countChanged(QString,int)), SLOT(countChanged(QString,int)));
1235 connect(m_backend, SIGNAL(progressChanged(QString,int)), SLOT(progressChanged(QString,int)));
1236+ connect(m_backend, SIGNAL(refreshApplications()), SLOT(refreshStoredApplications()));
1237
1238- Q_FOREACH (const QString &entry, m_backend->storedApplications()) {
1239- LauncherItem *item = new LauncherItem(entry,
1240- m_backend->displayName(entry),
1241- m_backend->icon(entry),
1242- this);
1243- item->setPinned(true);
1244- m_list.append(item);
1245- }
1246+ refreshStoredApplications();
1247 }
1248
1249 LauncherModel::~LauncherModel()
1250@@ -139,7 +134,8 @@
1251 beginInsertRows(QModelIndex(), index, index);
1252 LauncherItem *item = new LauncherItem(appId,
1253 m_backend->displayName(appId),
1254- m_backend->icon(appId));
1255+ m_backend->icon(appId),
1256+ !m_greeterMode);
1257 item->setPinned(true);
1258 m_list.insert(index, item);
1259 endInsertRows();
1260@@ -199,6 +195,40 @@
1261 m_backend->setUser(username);
1262 }
1263
1264+void LauncherModel::refreshStoredApplications()
1265+{
1266+ // First remove any existing ones
1267+ QList<int> storedAppIndices;
1268+ for (int i = 0; i < m_list.count(); ++i) {
1269+ if (!m_list.at(i)->recent()) {
1270+ storedAppIndices << i;
1271+ }
1272+ }
1273+ int run = 0;
1274+ while (storedAppIndices.count() > 0) {
1275+ beginRemoveRows(QModelIndex(), storedAppIndices.first() - run, storedAppIndices.first() - run);
1276+ m_list.takeAt(storedAppIndices.first() - run)->deleteLater();
1277+ endRemoveRows();
1278+ storedAppIndices.takeFirst();
1279+ ++run;
1280+ }
1281+
1282+ // Now insert all stored apps at beginning of list
1283+ QStringList storedApplications = m_backend->storedApplications();
1284+ beginInsertRows(QModelIndex(), 0, storedApplications.size() - 1);
1285+ run = 0;
1286+ Q_FOREACH (const QString &entry, storedApplications) {
1287+ LauncherItem *item = new LauncherItem(entry,
1288+ m_backend->displayName(entry),
1289+ m_backend->icon(entry),
1290+ !m_greeterMode,
1291+ this);
1292+ item->setPinned(true);
1293+ m_list.insert(run++, item);
1294+ }
1295+ endInsertRows();
1296+}
1297+
1298 ApplicationManagerInterface *LauncherModel::applicationManager() const
1299 {
1300 return m_appManager;
1301@@ -302,7 +332,7 @@
1302 if (found) {
1303 // Shall we paint some running/recent app highlight? If yes, do it here.
1304 } else {
1305- LauncherItem *item = new LauncherItem(app->appId(), app->name(), app->icon().toString());
1306+ LauncherItem *item = new LauncherItem(app->appId(), app->name(), app->icon().toString(), !m_greeterMode);
1307 item->setRecent(true);
1308 item->setFocused(app->focused());
1309
1310
1311=== modified file 'plugins/Unity/Launcher/launchermodel.h'
1312--- plugins/Unity/Launcher/launchermodel.h 2013-09-11 15:33:02 +0000
1313+++ plugins/Unity/Launcher/launchermodel.h 2014-05-29 14:11:15 +0000
1314@@ -62,6 +62,7 @@
1315 private Q_SLOTS:
1316 void progressChanged(const QString &appId, int progress);
1317 void countChanged(const QString &appId, int count);
1318+ void refreshStoredApplications();
1319
1320 void applicationAdded(const QModelIndex &parent, int row);
1321 void applicationRemoved(const QModelIndex &parent, int row);
1322@@ -69,6 +70,7 @@
1323
1324 private:
1325 QList<LauncherItem*> m_list;
1326+ bool m_greeterMode;
1327 LauncherBackend *m_backend;
1328 ApplicationManagerInterface *m_appManager;
1329 };
1330
1331=== modified file 'po/ug.po'
1332--- po/ug.po 2014-05-01 06:44:18 +0000
1333+++ po/ug.po 2014-05-29 14:11:15 +0000
1334@@ -6,11 +6,12 @@
1335 msgid ""
1336 msgstr ""
1337 "Project-Id-Version: unity\n"
1338-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1339+"Report-Msgid-Bugs-To: \n"
1340 "POT-Creation-Date: 2014-04-10 11:13-0400\n"
1341 "PO-Revision-Date: 2014-04-22 05:46+0000\n"
1342 "Last-Translator: abdurahman <Unknown>\n"
1343 "Language-Team: Uyghur <ug@li.org>\n"
1344+"Language: \n"
1345 "MIME-Version: 1.0\n"
1346 "Content-Type: text/plain; charset=UTF-8\n"
1347 "Content-Transfer-Encoding: 8bit\n"
1348
1349=== added file 'qml/Components/BasicShell.qml'
1350--- qml/Components/BasicShell.qml 1970-01-01 00:00:00 +0000
1351+++ qml/Components/BasicShell.qml 2014-05-29 14:11:15 +0000
1352@@ -0,0 +1,84 @@
1353+/*
1354+ * Copyright (C) 2013 Canonical, Ltd.
1355+ *
1356+ * This program is free software; you can redistribute it and/or modify
1357+ * it under the terms of the GNU General Public License as published by
1358+ * the Free Software Foundation; version 3.
1359+ *
1360+ * This program is distributed in the hope that it will be useful,
1361+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1362+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1363+ * GNU General Public License for more details.
1364+ *
1365+ * You should have received a copy of the GNU General Public License
1366+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1367+ */
1368+
1369+import QtQuick 2.0
1370+import Ubuntu.Components 0.1
1371+import Unity.Application 0.1
1372+import "../Components"
1373+
1374+FocusScope {
1375+ id: shell
1376+
1377+ // this is only here to select the width / height of the window if not running fullscreen
1378+ property bool tablet: false
1379+ width: tablet ? units.gu(160) : applicationArguments.hasGeometry() ? applicationArguments.width() : units.gu(40)
1380+ height: tablet ? units.gu(100) : applicationArguments.hasGeometry() ? applicationArguments.height() : units.gu(71)
1381+
1382+ property real edgeSize: units.gu(2)
1383+
1384+ property url defaultBackground: Qt.resolvedUrl(shell.width >= units.gu(60) ? "../graphics/tablet_background.jpg" : "../graphics/phone_background.jpg")
1385+ property url background
1386+ property url backgroundSource
1387+ property url backgroundFallbackSource
1388+ property url backgroundFinal: (backgroundSource != undefined && backgroundSource != "") ? backgroundSource : (backgroundFallbackSource != undefined && backgroundFallbackSource != "") ? backgroundFallbackSource : shell.defaultBackground
1389+ onBackgroundFinalChanged: shell.background = backgroundFinal
1390+
1391+ // This is a dummy image that is needed to determine if the picture url
1392+ // in backgroundSettings points to a valid picture file.
1393+ // We can't do this with the real background image because setting a
1394+ // new source in onStatusChanged triggers a binding loop detection
1395+ // inside Image, which causes it not to render even though a valid source
1396+ // would be set. We don't mind about this image staying black and just
1397+ // use it for verification to populate the source for the real
1398+ // background image.
1399+ Image {
1400+ source: shell.background
1401+ height: 0
1402+ width: 0
1403+ sourceSize.height: 0
1404+ sourceSize.width: 0
1405+ onStatusChanged: {
1406+ if (status == Image.Error) {
1407+ if (source != shell.defaultBackground) {
1408+ shell.background = defaultBackground
1409+ } else {
1410+ // In case even our default background fails to load...
1411+ shell.background = "data:image/svg+xml,<svg><rect width='100%' height='100%' fill='#000'/></svg>"
1412+ }
1413+ }
1414+ }
1415+ }
1416+
1417+ VolumeControl {
1418+ id: volumeControl
1419+ }
1420+
1421+ Keys.onVolumeUpPressed: volumeControl.volumeUp()
1422+ Keys.onVolumeDownPressed: volumeControl.volumeDown()
1423+
1424+ function hideIndicatorMenu(delay) {
1425+ panel.hideIndicatorMenu(delay);
1426+ }
1427+
1428+ focus: true
1429+ onFocusChanged: if (!focus) forceActiveFocus();
1430+
1431+ Binding {
1432+ target: i18n
1433+ property: "domain"
1434+ value: "unity8"
1435+ }
1436+}
1437
1438=== modified file 'qml/Components/EdgeDemo.qml'
1439--- qml/Components/EdgeDemo.qml 2014-01-29 22:19:15 +0000
1440+++ qml/Components/EdgeDemo.qml 2014-05-29 14:11:15 +0000
1441@@ -15,13 +15,11 @@
1442 */
1443
1444 import AccountsService 0.1
1445-import LightDM 0.1 as LightDM
1446 import QtQuick 2.0
1447
1448 Item {
1449 id: demo
1450
1451- property Item greeter
1452 property Item dash
1453 property Item launcher
1454 property Item indicators
1455@@ -36,7 +34,6 @@
1456 property bool paused: false
1457
1458 onPausedChanged: {
1459- if (d.rightEdgeDemo) d.rightEdgeDemo.paused = paused
1460 if (d.topEdgeDemo) d.topEdgeDemo.paused = paused
1461 if (d.bottomEdgeDemo) d.bottomEdgeDemo.paused = paused
1462 if (d.leftEdgeDemo) d.leftEdgeDemo.paused = paused
1463@@ -45,16 +42,6 @@
1464
1465 function hideEdgeDemoInShell() {
1466 AccountsService.demoEdges = false;
1467- stopDemo();
1468- }
1469-
1470- function hideEdgeDemoInGreeter() {
1471- // TODO: AccountsService.demoEdges = false as lightdm user
1472- }
1473-
1474- function hideEdgeDemos() {
1475- hideEdgeDemoInGreeter();
1476- hideEdgeDemoInShell();
1477 }
1478
1479 function stopDemo() {
1480@@ -62,7 +49,6 @@
1481 dashEnabled = true
1482 panelEnabled = true
1483 panelContentEnabled = true
1484- if (d.rightEdgeDemo) d.rightEdgeDemo.destroy()
1485 if (d.topEdgeDemo) d.topEdgeDemo.destroy()
1486 if (d.bottomEdgeDemo) d.bottomEdgeDemo.destroy()
1487 if (d.leftEdgeDemo) d.leftEdgeDemo.destroy()
1488@@ -79,24 +65,17 @@
1489 panelEnabled = false;
1490 panelContentEnabled = false;
1491
1492- // Begin with either greeter or dash, depending on which is visible
1493- if (greeter && greeter.shown) {
1494- startRightEdgeDemo()
1495- } else {
1496- startTopEdgeDemo()
1497- }
1498+ startTopEdgeDemo()
1499 }
1500
1501 QtObject {
1502 id: d
1503 property Component overlay
1504- property QtObject rightEdgeDemo
1505 property QtObject topEdgeDemo
1506 property QtObject bottomEdgeDemo
1507 property QtObject leftEdgeDemo
1508 property QtObject finalEdgeDemo
1509 property bool showEdgeDemo: AccountsService.demoEdges
1510- property bool showEdgeDemoInGreeter: AccountsService.demoEdges // TODO: AccountsService.demoEdges as lightdm user
1511
1512 onShowEdgeDemoChanged: {
1513 stopDemo()
1514@@ -106,37 +85,6 @@
1515 }
1516 }
1517
1518- function startRightEdgeDemo() {
1519- if (demo.greeter) {
1520- d.rightEdgeDemo = d.overlay.createObject(demo.greeter, {
1521- "edge": "right",
1522- "title": i18n.tr("Right edge"),
1523- "text": i18n.tr("Try swiping from the right edge to unlock the phone"),
1524- "anchors.fill": demo.greeter,
1525- });
1526- }
1527- if (d.rightEdgeDemo) {
1528- d.rightEdgeDemo.onSkip.connect(demo.hideEdgeDemos)
1529- } else {
1530- stopDemo();
1531- }
1532- }
1533-
1534- Connections {
1535- target: demo.greeter
1536-
1537- function hide() {
1538- if (d.rightEdgeDemo && d.rightEdgeDemo.available) {
1539- d.rightEdgeDemo.hide()
1540- hideEdgeDemoInGreeter()
1541- startTopEdgeDemo()
1542- }
1543- }
1544-
1545- onUnlocked: hide()
1546- onShownChanged: if (!greeter.shown) hide()
1547- }
1548-
1549 function startTopEdgeDemo() {
1550 demo.panelEnabled = true;
1551 if (demo.dash && demo.underlay) {
1552
1553=== renamed file 'qml/Greeter/Lockscreen.qml' => 'qml/Components/Lockscreen.qml'
1554--- qml/Greeter/Lockscreen.qml 2014-05-20 13:09:51 +0000
1555+++ qml/Components/Lockscreen.qml 2014-05-29 14:11:15 +0000
1556@@ -17,7 +17,6 @@
1557 import QtQuick 2.0
1558 import Ubuntu.Components 1.0
1559 import Ubuntu.Components.Popups 1.0
1560-import "../Components"
1561
1562 Showable {
1563 id: root
1564@@ -49,8 +48,6 @@
1565 property int minPinLength: -1
1566 property int maxPinLength: -1
1567
1568- property url background: ""
1569-
1570 signal entered(string passphrase)
1571 signal cancel()
1572 signal emergencyCall()
1573@@ -76,23 +73,6 @@
1574 PopupUtils.open(infoPopupComponent, root, {title: title, text: text})
1575 }
1576
1577- Rectangle {
1578- // In case background fails to load or is undefined
1579- id: backgroundBackup
1580- anchors.fill: parent
1581- color: "black"
1582- }
1583-
1584- Image {
1585- id: backgroundImage
1586- objectName: "lockscreenBackground"
1587- anchors {
1588- fill: parent
1589- }
1590- source: root.required ? root.background : ""
1591- fillMode: Image.PreserveAspectCrop
1592- }
1593-
1594 MouseArea {
1595 anchors.fill: root
1596 }
1597
1598=== modified file 'qml/Components/PageHeader.qml'
1599--- qml/Components/PageHeader.qml 2014-05-19 11:10:58 +0000
1600+++ qml/Components/PageHeader.qml 2014-05-29 14:11:15 +0000
1601@@ -18,6 +18,7 @@
1602 import Ubuntu.Components 0.1
1603 import Ubuntu.Components.Popups 0.1
1604 import Ubuntu.Components.ListItems 0.1 as ListItem
1605+import SessionManager 0.1
1606 import Unity 0.2
1607
1608 Item {
1609@@ -51,8 +52,8 @@
1610 }
1611
1612 Connections {
1613- target: greeter
1614- onShownChanged: if (shown) resetSearch()
1615+ target: SessionManager
1616+ onActiveChanged: if (!SessionManager.active) resetSearch()
1617 }
1618
1619 Flickable {
1620
1621=== renamed file 'qml/Greeter/PassphraseLockscreen.qml' => 'qml/Components/PassphraseLockscreen.qml'
1622=== renamed file 'qml/Greeter/PinLockscreen.qml' => 'qml/Components/PinLockscreen.qml'
1623=== modified file 'qml/Dash/ScopeListView.qml'
1624--- qml/Dash/ScopeListView.qml 2014-04-30 10:06:33 +0000
1625+++ qml/Dash/ScopeListView.qml 2014-05-29 14:11:15 +0000
1626@@ -16,13 +16,14 @@
1627
1628 import QtQuick 2.0
1629 import Dash 0.1
1630+import SessionManager 0.1
1631
1632 ListViewWithPageHeader {
1633 maximumFlickVelocity: height * 10
1634 flickDeceleration: height * 2
1635
1636 Connections {
1637- target: greeter
1638- onShownChanged: if (greeter.shown) showHeader()
1639+ target: SessionManager
1640+ onActiveChanged: if (!SessionManager.active) showHeader()
1641 }
1642 }
1643
1644=== modified file 'qml/Greeter/Clock.qml'
1645--- qml/Greeter/Clock.qml 2014-04-18 18:22:56 +0000
1646+++ qml/Greeter/Clock.qml 2014-05-29 14:11:15 +0000
1647@@ -39,7 +39,7 @@
1648
1649 busName: "com.canonical.indicator.datetime"
1650 actionsObjectPath: "/com/canonical/indicator/datetime"
1651- menuObjectPath: clock.visible ? "/com/canonical/indicator/datetime/phone" : ""
1652+ menuObjectPath: clock.visible ? "/com/canonical/indicator/datetime/phone_greeter" : ""
1653
1654 Indicators.RootActionState {
1655 menu: timeModel.model
1656
1657=== modified file 'qml/Greeter/Greeter.qml'
1658--- qml/Greeter/Greeter.qml 2014-04-16 13:43:13 +0000
1659+++ qml/Greeter/Greeter.qml 2014-05-29 14:11:15 +0000
1660@@ -23,9 +23,9 @@
1661 Showable {
1662 id: greeter
1663 enabled: shown
1664- created: greeterContentLoader.status == Loader.Ready && greeterContentLoader.item.ready
1665+ created: greeterContentLoader.status == Loader.Ready
1666
1667- property url defaultBackground
1668+ property url background
1669
1670 // 1 when fully shown and 0 when fully hidden
1671 property real showProgress: MathUtils.clamp((width - Math.abs(x)) / width, 0, 1)
1672@@ -118,6 +118,36 @@
1673 }
1674 }
1675
1676+ Rectangle {
1677+ // To hide lockscreen until background finished fading in
1678+ id: backgroundBackup
1679+ anchors {
1680+ fill: parent
1681+ topMargin: -greeter.y
1682+ }
1683+ color: "black"
1684+ }
1685+
1686+ CrossFadeImage {
1687+ id: backgroundImage
1688+ objectName: "greeterBackground"
1689+ anchors {
1690+ fill: parent
1691+ topMargin: -greeter.y
1692+ }
1693+ source: greeter.background
1694+ fillMode: Image.PreserveAspectCrop
1695+
1696+ StandardAnimation {
1697+ running: true
1698+ target: backgroundImage
1699+ property: "opacity"
1700+ from: 0.0
1701+ to: 1.0
1702+ duration: 800
1703+ }
1704+ }
1705+
1706 Loader {
1707 id: greeterContentLoader
1708 objectName: "greeterContentLoader"
1709@@ -125,7 +155,6 @@
1710 property var model: LightDM.Users
1711 property int currentIndex: 0
1712 property var infographicModel: LightDM.Infographic
1713- readonly property int backgroundTopMargin: -greeter.y
1714
1715 source: required ? "GreeterContent.qml" : ""
1716
1717@@ -145,6 +174,10 @@
1718 }
1719
1720 onTease: showLabelAnimation.start()
1721+ onShownChanged: {
1722+ showLabelAnimation.stop()
1723+ swipeHint.opacity = 0
1724+ }
1725
1726 Label {
1727 id: swipeHint
1728
1729=== modified file 'qml/Greeter/GreeterContent.qml'
1730--- qml/Greeter/GreeterContent.qml 2014-04-17 15:43:16 +0000
1731+++ qml/Greeter/GreeterContent.qml 2014-05-29 14:11:15 +0000
1732@@ -24,47 +24,10 @@
1733 id: root
1734 anchors.fill: parent
1735
1736- property bool ready: background.source == "" || background.status == Image.Ready || background.status == Image.Error
1737-
1738 signal selected(int uid)
1739 signal unlocked(int uid)
1740
1741 Rectangle {
1742- // In case background fails to load
1743- id: backgroundBackup
1744- anchors.fill: parent
1745- color: "black"
1746- }
1747-
1748- property url backgroundValue: AccountsService.backgroundFile != undefined && AccountsService.backgroundFile.length > 0 ? AccountsService.backgroundFile : greeter.defaultBackground
1749- onBackgroundValueChanged: background.source = backgroundValue
1750-
1751- CrossFadeImage {
1752- id: background
1753- objectName: "greeterBackground"
1754- anchors {
1755- fill: parent
1756- topMargin: backgroundTopMargin
1757- }
1758- fillMode: Image.PreserveAspectCrop
1759- }
1760-
1761- // See Shell.qml's backgroundSettings treatment for why we need a separate
1762- // Image, but it boils down to avoiding binding loop detection.
1763- Image {
1764- source: background.source
1765- height: 0
1766- width: 0
1767- sourceSize.height: 0
1768- sourceSize.width: 0
1769- onStatusChanged: {
1770- if (status == Image.Error && source != greeter.defaultBackground) {
1771- background.source = greeter.defaultBackground
1772- }
1773- }
1774- }
1775-
1776- Rectangle {
1777 anchors.fill: parent
1778 color: "black"
1779 opacity: 0.4
1780@@ -145,7 +108,6 @@
1781
1782 Clock {
1783 id: clock
1784- visible: narrowMode
1785
1786 anchors {
1787 top: parent.top
1788
1789=== added file 'qml/Greeter/GreeterEdgeDemo.qml'
1790--- qml/Greeter/GreeterEdgeDemo.qml 1970-01-01 00:00:00 +0000
1791+++ qml/Greeter/GreeterEdgeDemo.qml 2014-05-29 14:11:15 +0000
1792@@ -0,0 +1,102 @@
1793+/*
1794+ * Copyright (C) 2013 Canonical, Ltd.
1795+ *
1796+ * This program is free software; you can redistribute it and/or modify
1797+ * it under the terms of the GNU General Public License as published by
1798+ * the Free Software Foundation; version 3.
1799+ *
1800+ * This program is distributed in the hope that it will be useful,
1801+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1802+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1803+ * GNU General Public License for more details.
1804+ *
1805+ * You should have received a copy of the GNU General Public License
1806+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1807+ */
1808+
1809+import AccountsService 0.1
1810+import LightDM 0.1 as LightDM
1811+import QtQuick 2.0
1812+
1813+Item {
1814+ id: demo
1815+
1816+ property Item greeter
1817+
1818+ property bool active: false
1819+ property bool paused: false
1820+
1821+ onPausedChanged: {
1822+ if (d.rightEdgeDemo) d.rightEdgeDemo.paused = paused
1823+ }
1824+
1825+ function hideEdgeDemoInShell() {
1826+ AccountsService.demoEdges = false;
1827+ }
1828+
1829+ function hideEdgeDemoInGreeter() {
1830+ AccountsService.demoEdgesForCurrentUser = false;
1831+ }
1832+
1833+ function hideEdgeDemos() {
1834+ hideEdgeDemoInGreeter();
1835+ hideEdgeDemoInShell();
1836+ }
1837+
1838+ function startDemo() {
1839+ if (!d.overlay) {
1840+ d.overlay = Qt.createComponent("../Components/EdgeDemoOverlay.qml")
1841+ }
1842+ startRightEdgeDemo()
1843+ }
1844+
1845+ function stopDemo() {
1846+ active = false
1847+ if (d.rightEdgeDemo) d.rightEdgeDemo.destroy()
1848+ }
1849+
1850+ QtObject {
1851+ id: d
1852+ property Component overlay
1853+ property QtObject rightEdgeDemo
1854+ property bool showEdgeDemoInGreeter: AccountsService.demoEdgesForCurrentUser && AccountsService.demoEdges
1855+
1856+ onShowEdgeDemoInGreeterChanged: {
1857+ stopDemo()
1858+ if (d.showEdgeDemoInGreeter) {
1859+ startDemo()
1860+ }
1861+ }
1862+ }
1863+
1864+ function startRightEdgeDemo() {
1865+ active = true;
1866+ if (demo.greeter) {
1867+ d.rightEdgeDemo = d.overlay.createObject(demo.greeter, {
1868+ "edge": "right",
1869+ "title": i18n.tr("Right edge"),
1870+ "text": i18n.tr("Try swiping from the right edge to unlock the phone"),
1871+ "anchors.fill": demo.greeter,
1872+ });
1873+ }
1874+ if (d.rightEdgeDemo) {
1875+ d.rightEdgeDemo.onSkip.connect(demo.hideEdgeDemos)
1876+ } else {
1877+ stopDemo();
1878+ }
1879+ }
1880+
1881+ Connections {
1882+ target: demo.greeter
1883+
1884+ function hide() {
1885+ if (d.rightEdgeDemo && d.rightEdgeDemo.available) {
1886+ d.rightEdgeDemo.hide()
1887+ hideEdgeDemoInGreeter()
1888+ }
1889+ }
1890+
1891+ onUnlocked: hide()
1892+ onShownChanged: if (!greeter.shown) hide()
1893+ }
1894+}
1895
1896=== modified file 'qml/Greeter/Infographics.qml'
1897--- qml/Greeter/Infographics.qml 2014-03-21 17:49:22 +0000
1898+++ qml/Greeter/Infographics.qml 2014-05-29 14:11:15 +0000
1899@@ -59,8 +59,6 @@
1900
1901 visible: model.label !== ""
1902
1903- Component.onCompleted: startShowAnimation()
1904-
1905 Item {
1906 id: dataCircle
1907 objectName: "dataCircle"
1908
1909=== added file 'qml/GreeterShell.qml'
1910--- qml/GreeterShell.qml 1970-01-01 00:00:00 +0000
1911+++ qml/GreeterShell.qml 2014-05-29 14:11:15 +0000
1912@@ -0,0 +1,283 @@
1913+/*
1914+ * Copyright (C) 2013 Canonical, Ltd.
1915+ *
1916+ * This program is free software; you can redistribute it and/or modify
1917+ * it under the terms of the GNU General Public License as published by
1918+ * the Free Software Foundation; version 3.
1919+ *
1920+ * This program is distributed in the hope that it will be useful,
1921+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1922+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1923+ * GNU General Public License for more details.
1924+ *
1925+ * You should have received a copy of the GNU General Public License
1926+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1927+ */
1928+
1929+import AccountsService 0.1
1930+import GSettings 1.0
1931+import LightDM 0.1 as LightDM
1932+import Powerd 0.1
1933+import QtQuick 2.0
1934+import SessionBroadcast 0.1
1935+import Ubuntu.Components 0.1
1936+import Unity.Application 0.1
1937+import Unity.Launcher 0.1
1938+import "Components"
1939+import "Greeter"
1940+import "Launcher"
1941+import "Panel"
1942+import "Notifications"
1943+import Unity.Notifications 1.0 as NotificationBackend
1944+
1945+BasicShell {
1946+ id: shell
1947+
1948+ function activateApplication(appId) {
1949+ SessionBroadcast.requestUrlStart(LightDM.Greeter.authenticationUser, appId)
1950+ greeter.hide()
1951+ }
1952+
1953+ GSettings {
1954+ id: backgroundSettings
1955+ schema.id: "org.gnome.desktop.background"
1956+ }
1957+ backgroundFallbackSource: backgroundSettings.pictureUri // for ease of customization by system builders
1958+ backgroundSource: AccountsService.backgroundFile
1959+
1960+ Lockscreen {
1961+ id: lockscreen
1962+ objectName: "lockscreen"
1963+
1964+ hides: [launcher, panel.indicators]
1965+ shown: false
1966+ enabled: true
1967+ showAnimation: StandardAnimation { property: "opacity"; to: 1 }
1968+ hideAnimation: StandardAnimation { property: "opacity"; to: 0 }
1969+ y: panel.panelHeight
1970+ x: required ? 0 : - width
1971+ width: parent.width
1972+ height: parent.height - panel.panelHeight
1973+ minPinLength: 4
1974+ maxPinLength: 4
1975+
1976+ onEntered: LightDM.Greeter.respond(passphrase);
1977+ onCancel: greeter.show()
1978+
1979+ Component.onCompleted: {
1980+ if (LightDM.Users.count == 1) {
1981+ LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole))
1982+ }
1983+ }
1984+ }
1985+
1986+ Connections {
1987+ target: LightDM.Greeter
1988+
1989+ onIdle: {
1990+ greeter.showNow()
1991+ }
1992+
1993+ onShowPrompt: {
1994+ if (LightDM.Users.count == 1) {
1995+ // TODO: There's no better way for now to determine if its a PIN or a passphrase.
1996+ if (text == "PIN") {
1997+ lockscreen.alphaNumeric = false
1998+ } else {
1999+ lockscreen.alphaNumeric = true
2000+ }
2001+ lockscreen.placeholderText = i18n.tr("Please enter %1").arg(text);
2002+ lockscreen.show();
2003+ }
2004+ }
2005+
2006+ onAuthenticationComplete: {
2007+ if (LightDM.Greeter.promptless) {
2008+ return;
2009+ }
2010+ if (LightDM.Greeter.authenticated) {
2011+ lockscreen.hide();
2012+ } else {
2013+ lockscreen.clear(true);
2014+ }
2015+ }
2016+ }
2017+
2018+ Rectangle {
2019+ anchors.fill: parent
2020+ color: "black"
2021+ opacity: greeterWrapper.showProgress * 0.8
2022+ }
2023+
2024+ Item {
2025+ // Just a tiny wrapper to adjust greeter's x without messing with its own dragging
2026+ id: greeterWrapper
2027+ x: launcher.progress
2028+ width: parent.width
2029+ height: parent.height
2030+
2031+ Behavior on x {
2032+ enabled: !launcher.dashSwipe
2033+ StandardAnimation {}
2034+ }
2035+
2036+ readonly property real showProgress: MathUtils.clamp((1 - x/width) + greeter.showProgress - 1, 0, 1)
2037+ onShowProgressChanged: if (LightDM.Greeter.promptless && showProgress === 0) greeter.login()
2038+
2039+ Greeter {
2040+ id: greeter
2041+ objectName: "greeter"
2042+
2043+ available: true
2044+ hides: [launcher, panel.indicators]
2045+ shown: true
2046+ background: shell.background
2047+
2048+ y: panel.panelHeight
2049+ width: parent.width
2050+ height: parent.height - panel.panelHeight
2051+
2052+ dragHandleWidth: shell.edgeSize
2053+
2054+ function login() {
2055+ enabled = false;
2056+ LightDM.Greeter.startSessionSync();
2057+ enabled = true;
2058+ }
2059+
2060+ onShownChanged: {
2061+ if (shown) {
2062+ lockscreen.reset();
2063+ // If there is only one user, we start authenticating with that one here.
2064+ // If there are more users, the Greeter will handle that
2065+ if (LightDM.Users.count == 1) {
2066+ LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole));
2067+ }
2068+ greeter.forceActiveFocus();
2069+ }
2070+ }
2071+
2072+ onUnlocked: hide()
2073+ onSelected: {
2074+ // Update launcher items for new user
2075+ var user = LightDM.Users.data(uid, LightDM.UserRoles.NameRole);
2076+ AccountsService.user = user;
2077+ LauncherModel.setUser(user);
2078+ }
2079+ onTease: launcher.tease()
2080+ }
2081+ }
2082+
2083+ InputFilterArea {
2084+ anchors.fill: parent
2085+ blockInput: true
2086+ }
2087+
2088+ Item {
2089+ id: overlay
2090+
2091+ anchors.fill: parent
2092+
2093+ Panel {
2094+ id: panel
2095+ anchors.fill: parent //because this draws indicator menus
2096+ indicatorsMenuWidth: parent.width > units.gu(60) ? units.gu(40) : parent.width
2097+ indicators {
2098+ hides: [launcher]
2099+ available: !edgeDemo.active
2100+ }
2101+ fullscreenMode: false
2102+ searchVisible: false
2103+ }
2104+
2105+ Launcher {
2106+ id: launcher
2107+
2108+ readonly property bool dashSwipe: progress > 0
2109+
2110+ anchors.top: parent.top
2111+ anchors.bottom: parent.bottom
2112+ width: parent.width
2113+ dragAreaWidth: shell.edgeSize
2114+ available: !edgeDemo.active
2115+ onLauncherApplicationSelected: {
2116+ shell.activateApplication("application:///" + appId + ".desktop")
2117+ }
2118+ onShownChanged: {
2119+ if (shown) {
2120+ panel.indicators.hide()
2121+ }
2122+ }
2123+ onDash: {
2124+ greeter.hideRight()
2125+ hide()
2126+ }
2127+ onShowDashHome: {
2128+ SessionBroadcast.requestHomeShown(LightDM.Greeter.authenticationUser)
2129+ greeter.hide()
2130+ }
2131+ }
2132+
2133+ Notifications {
2134+ id: notifications
2135+
2136+ model: NotificationBackend.Model
2137+ margin: units.gu(1)
2138+
2139+ anchors {
2140+ top: parent.top
2141+ right: parent.right
2142+ bottom: parent.bottom
2143+ topMargin: panel.panelHeight
2144+ }
2145+ states: [
2146+ State {
2147+ name: "narrow"
2148+ when: overlay.width <= units.gu(60)
2149+ AnchorChanges { target: notifications; anchors.left: parent.left }
2150+ },
2151+ State {
2152+ name: "wide"
2153+ when: overlay.width > units.gu(60)
2154+ AnchorChanges { target: notifications; anchors.left: undefined }
2155+ PropertyChanges { target: notifications; width: units.gu(38) }
2156+ }
2157+ ]
2158+
2159+ InputFilterArea {
2160+ anchors { left: parent.left; right: parent.right }
2161+ height: parent.contentHeight
2162+ blockInput: height > 0
2163+ }
2164+ }
2165+ }
2166+
2167+ OSKController {
2168+ anchors.topMargin: panel.panelHeight
2169+ anchors.fill: parent // as needs to know the geometry of the shell
2170+ }
2171+
2172+ Connections {
2173+ id: powerConnection
2174+ target: Powerd
2175+
2176+ onDisplayPowerStateChange: {
2177+ if (status == Powerd.Off) {
2178+ greeter.show();
2179+ edgeDemo.paused = true;
2180+ } else if (status == Powerd.On) {
2181+ edgeDemo.paused = false;
2182+ }
2183+ }
2184+ }
2185+
2186+ Connections {
2187+ target: LightDM.URLDispatcher
2188+ onDispatchURL: shell.activateApplication(url)
2189+ }
2190+
2191+ GreeterEdgeDemo {
2192+ id: edgeDemo
2193+ greeter: greeter
2194+ }
2195+}
2196
2197=== modified file 'qml/Hud/Hud.qml'
2198--- qml/Hud/Hud.qml 2014-03-19 17:38:03 +0000
2199+++ qml/Hud/Hud.qml 2014-05-29 14:11:15 +0000
2200@@ -227,10 +227,7 @@
2201 width: parent.width
2202
2203 onYChanged: {
2204- if (greeter.shown) {
2205- showAnimation.duration = 0
2206- hideAnimation.duration = 0
2207- } else if (!showAnimation.running && !hideAnimation.running) {
2208+ if (!showAnimation.running && !hideAnimation.running) {
2209 if (parent.height > 0) {
2210 showAnimation.duration = Math.min(showableAnimationDuration * (1 - (parent.height - y) / parent.height), showableAnimationDuration)
2211 hideAnimation.duration = showableAnimationDuration - showAnimation.duration
2212
2213=== modified file 'qml/Notifications/NotificationMenuItemFactory.qml'
2214--- qml/Notifications/NotificationMenuItemFactory.qml 2014-04-10 08:37:13 +0000
2215+++ qml/Notifications/NotificationMenuItemFactory.qml 2014-05-29 14:11:15 +0000
2216@@ -20,7 +20,6 @@
2217 import QtQuick 2.0
2218 import Ubuntu.Components 0.1
2219 import "../Components"
2220-import "../Greeter"
2221
2222 Loader {
2223 id: menuFactory
2224@@ -98,19 +97,36 @@
2225 Component {
2226 id: pinLock
2227
2228- Lockscreen {
2229- anchors.left: parent.left; anchors.right: parent.right
2230+ Item {
2231 height: menuFactory.maxHeight
2232- placeholderText: i18n.tr("Please enter SIM PIN")
2233- background: shell.background
2234-
2235- onEntered: {
2236- menuModel.changeState(menuIndex, passphrase);
2237- entryEnabled = false;
2238- }
2239-
2240- onCancel: {
2241- menuModel.activate(menuIndex, false);
2242+ anchors.left: parent.left
2243+ anchors.right: parent.right
2244+
2245+ Rectangle {
2246+ // In case background fails to load or is undefined
2247+ anchors.fill: parent
2248+ color: "black"
2249+ }
2250+
2251+ Image {
2252+ objectName: "lockscreenBackground"
2253+ anchors.fill: parent
2254+ source: shell.background
2255+ fillMode: Image.PreserveAspectCrop
2256+ }
2257+
2258+ Lockscreen {
2259+ anchors.fill: parent
2260+ placeholderText: i18n.tr("Please enter SIM PIN")
2261+
2262+ onEntered: {
2263+ menuModel.changeState(menuIndex, passphrase);
2264+ entryEnabled = false;
2265+ }
2266+
2267+ onCancel: {
2268+ menuModel.activate(menuIndex, false);
2269+ }
2270 }
2271 }
2272 }
2273
2274=== modified file 'qml/Panel/Panel.qml'
2275--- qml/Panel/Panel.qml 2014-02-04 23:04:52 +0000
2276+++ qml/Panel/Panel.qml 2014-05-29 14:11:15 +0000
2277@@ -62,7 +62,7 @@
2278 height: __panelMinusSeparatorLineHeight
2279 y: 0
2280
2281- Behavior on y { StandardAnimation { duration: UbuntuAnimation.FastDuration } }
2282+ Behavior on y { StandardAnimation { duration: 500 } }
2283 }
2284
2285 PanelSeparatorLine {
2286
2287=== modified file 'qml/Shell.qml'
2288--- qml/Shell.qml 2014-05-27 07:46:24 +0000
2289+++ qml/Shell.qml 2014-05-29 14:11:15 +0000
2290@@ -21,28 +21,19 @@
2291 import Ubuntu.Components 0.1
2292 import Ubuntu.Gestures 0.1
2293 import Unity.Launcher 0.1
2294-import LightDM 0.1 as LightDM
2295 import Powerd 0.1
2296 import SessionBroadcast 0.1
2297+import SessionManager 0.1
2298 import "Dash"
2299-import "Greeter"
2300 import "Launcher"
2301 import "Panel"
2302 import "Components"
2303 import "Notifications"
2304 import Unity.Notifications 1.0 as NotificationBackend
2305
2306-FocusScope {
2307+BasicShell {
2308 id: shell
2309
2310- // this is only here to select the width / height of the window if not running fullscreen
2311- property bool tablet: false
2312- width: tablet ? units.gu(160) : applicationArguments.hasGeometry() ? applicationArguments.width() : units.gu(40)
2313- height: tablet ? units.gu(100) : applicationArguments.hasGeometry() ? applicationArguments.height() : units.gu(71)
2314-
2315- property real edgeSize: units.gu(2)
2316- property url defaultBackground: Qt.resolvedUrl(shell.width >= units.gu(60) ? "graphics/tablet_background.jpg" : "graphics/phone_background.jpg")
2317- property url background
2318 readonly property real panelHeight: panel.panelHeight
2319
2320 property bool dashShown: dash.shown
2321@@ -78,17 +69,7 @@
2322 id: backgroundSettings
2323 schema.id: "org.gnome.desktop.background"
2324 }
2325- property url gSettingsPicture: backgroundSettings.pictureUri != undefined && backgroundSettings.pictureUri.length > 0 ? backgroundSettings.pictureUri : shell.defaultBackground
2326- onGSettingsPictureChanged: {
2327- shell.background = gSettingsPicture
2328- }
2329-
2330- VolumeControl {
2331- id: volumeControl
2332- }
2333-
2334- Keys.onVolumeUpPressed: volumeControl.volumeUp()
2335- Keys.onVolumeDownPressed: volumeControl.volumeDown()
2336+ backgroundSource: backgroundSettings.pictureUri
2337
2338 Item {
2339 id: underlayClipper
2340@@ -135,10 +116,9 @@
2341 id: dash
2342 objectName: "dash"
2343
2344- available: !greeter.shown && !lockscreen.shown
2345 hides: [stages, launcher, panel.indicators]
2346- shown: disappearingAnimationProgress !== 1.0 && greeterWrapper.showProgress !== 1.0
2347- enabled: disappearingAnimationProgress === 0.0 && greeterWrapper.showProgress === 0.0 && edgeDemo.dashEnabled
2348+ shown: disappearingAnimationProgress !== 1.0
2349+ enabled: disappearingAnimationProgress === 0.0 && edgeDemo.dashEnabled
2350
2351 anchors {
2352 fill: parent
2353@@ -226,7 +206,6 @@
2354 shown = true;
2355 panel.indicators.hide();
2356 edgeDemo.stopDemo();
2357- greeter.hide();
2358 if (!ApplicationManager.focusedApplicationId && ApplicationManager.count > 0 && focusApp) {
2359 ApplicationManager.focusApplication(ApplicationManager.get(0).appId);
2360 }
2361@@ -267,6 +246,12 @@
2362 }
2363 }
2364
2365+ Binding {
2366+ target: ApplicationManager
2367+ property: "suspended"
2368+ value: !SessionManager.active
2369+ }
2370+
2371 Loader {
2372 id: applicationsDisplayLoader
2373 anchors.fill: parent
2374@@ -291,132 +276,9 @@
2375 }
2376 }
2377
2378- Lockscreen {
2379- id: lockscreen
2380- objectName: "lockscreen"
2381-
2382- readonly property int backgroundTopMargin: -panel.panelHeight
2383-
2384- hides: [launcher, panel.indicators]
2385- shown: false
2386- enabled: true
2387- showAnimation: StandardAnimation { property: "opacity"; to: 1 }
2388- hideAnimation: StandardAnimation { property: "opacity"; to: 0 }
2389- y: panel.panelHeight
2390- x: required ? 0 : - width
2391- width: parent.width
2392- height: parent.height - panel.panelHeight
2393- background: shell.background
2394- minPinLength: 4
2395- maxPinLength: 4
2396-
2397- onEntered: LightDM.Greeter.respond(passphrase);
2398- onCancel: greeter.show()
2399-
2400- Component.onCompleted: {
2401- if (LightDM.Users.count == 1) {
2402- LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole))
2403- }
2404- }
2405- }
2406-
2407- Connections {
2408- target: LightDM.Greeter
2409-
2410- onShowPrompt: {
2411- if (LightDM.Users.count == 1) {
2412- // TODO: There's no better way for now to determine if its a PIN or a passphrase.
2413- if (text == "PIN") {
2414- lockscreen.alphaNumeric = false
2415- } else {
2416- lockscreen.alphaNumeric = true
2417- }
2418- lockscreen.placeholderText = i18n.tr("Please enter %1").arg(text);
2419- lockscreen.show();
2420- }
2421- }
2422-
2423- onAuthenticationComplete: {
2424- if (LightDM.Greeter.promptless) {
2425- return;
2426- }
2427- if (LightDM.Greeter.authenticated) {
2428- lockscreen.hide();
2429- } else {
2430- lockscreen.clear(true);
2431- }
2432- }
2433- }
2434-
2435- Rectangle {
2436- anchors.fill: parent
2437- color: "black"
2438- opacity: greeterWrapper.showProgress * 0.8
2439- }
2440-
2441- Item {
2442- // Just a tiny wrapper to adjust greeter's x without messing with its own dragging
2443- id: greeterWrapper
2444- x: launcher.progress
2445- y: panel.panelHeight
2446- width: parent.width
2447- height: parent.height - panel.panelHeight
2448-
2449- Behavior on x {
2450- enabled: !launcher.dashSwipe
2451- StandardAnimation {}
2452- }
2453-
2454- readonly property real showProgress: MathUtils.clamp((1 - x/width) + greeter.showProgress - 1, 0, 1)
2455-
2456- Greeter {
2457- id: greeter
2458- objectName: "greeter"
2459-
2460- available: true
2461- hides: [launcher, panel.indicators]
2462- shown: true
2463-
2464- defaultBackground: shell.background
2465-
2466- width: parent.width
2467- height: parent.height
2468-
2469- dragHandleWidth: shell.edgeSize
2470-
2471- onShownChanged: {
2472- if (shown) {
2473- lockscreen.reset();
2474- // If there is only one user, we start authenticating with that one here.
2475- // If there are more users, the Greeter will handle that
2476- if (LightDM.Users.count == 1) {
2477- LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole));
2478- }
2479- greeter.forceActiveFocus();
2480- }
2481- }
2482-
2483- onUnlocked: greeter.hide()
2484- onSelected: {
2485- // Update launcher items for new user
2486- var user = LightDM.Users.data(uid, LightDM.UserRoles.NameRole);
2487- AccountsService.user = user;
2488- LauncherModel.setUser(user);
2489- }
2490-
2491- onTease: launcher.tease()
2492-
2493- Binding {
2494- target: ApplicationManager
2495- property: "suspended"
2496- value: greeter.shown && greeterWrapper.showProgress == 1
2497- }
2498- }
2499- }
2500-
2501 InputFilterArea {
2502 anchors.fill: parent
2503- blockInput: ApplicationManager.focusedApplicationId.length === 0 || greeter.shown || lockscreen.shown || launcher.shown
2504+ blockInput: ApplicationManager.focusedApplicationId.length === 0 || launcher.shown
2505 || panel.indicators.shown
2506 }
2507
2508@@ -428,7 +290,7 @@
2509 // We ignore any display-off signals when the proximity sensor
2510 // is active. This usually indicates something like a phone call.
2511 if (status == Powerd.Off && (flags & Powerd.UseProximity) == 0) {
2512- greeter.showNow();
2513+ SessionManager.lock();
2514 }
2515
2516 // No reason to chew demo CPU when user isn't watching
2517@@ -440,17 +302,12 @@
2518 }
2519 }
2520
2521- function showHome() {
2522- var animate = !greeter.shown && !stages.shown
2523- greeter.hide()
2524+ function showHome(fromLauncher) {
2525+ var animate = fromLauncher && !stages.shown
2526 dash.setCurrentScope("clickscope", animate, false)
2527 stages.hide()
2528 }
2529
2530- function hideIndicatorMenu(delay) {
2531- panel.hideIndicatorMenu(delay);
2532- }
2533-
2534 Item {
2535 id: overlay
2536
2537@@ -467,8 +324,8 @@
2538 }
2539 property string focusedAppId: ApplicationManager.focusedApplicationId
2540 property var focusedApplication: ApplicationManager.findApplication(focusedAppId)
2541- fullscreenMode: focusedApplication && stages.fullscreen && !greeter.shown && !lockscreen.shown
2542- searchVisible: !greeter.shown && !lockscreen.shown && dash.shown && dash.searchable
2543+ fullscreenMode: focusedApplication && stages.fullscreen
2544+ searchVisible: dash.shown && dash.searchable
2545
2546 InputFilterArea {
2547 anchors {
2548@@ -506,8 +363,9 @@
2549 if (edgeDemo.running)
2550 return;
2551
2552- showHome()
2553+ showHome(true)
2554 }
2555+
2556 onDash: {
2557 if (stages.shown && !stages.overlayMode) {
2558 if (!stages.locked) {
2559@@ -515,10 +373,6 @@
2560 launcher.hide();
2561 }
2562 }
2563- if (greeter.shown) {
2564- greeter.hideRight();
2565- launcher.hide();
2566- }
2567 }
2568 onDashSwipeChanged: if (dashSwipe && stages.shown) dash.setCurrentScope("clickscope", false, true)
2569 onLauncherApplicationSelected: {
2570@@ -535,7 +389,7 @@
2571 Rectangle {
2572 id: modalNotificationBackground
2573
2574- visible: notifications.useModal && !greeter.shown && (notifications.state == "narrow")
2575+ visible: notifications.useModal && (notifications.state == "narrow")
2576 color: "#000000"
2577 anchors.fill: parent
2578 opacity: 0.5
2579@@ -582,11 +436,18 @@
2580 blockInput: height > 0
2581 }
2582 }
2583+
2584+ Connections {
2585+ target: SessionManager
2586+ onActiveChanged: {
2587+ if (!SessionManager.active) {
2588+ launcher.hide()
2589+ panel.indicators.hide()
2590+ }
2591+ }
2592+ }
2593 }
2594
2595- focus: true
2596- onFocusChanged: if (!focus) forceActiveFocus();
2597-
2598 InputFilterArea {
2599 anchors {
2600 top: parent.top
2601@@ -607,12 +468,6 @@
2602 blockInput: true
2603 }
2604
2605- Binding {
2606- target: i18n
2607- property: "domain"
2608- value: "unity8"
2609- }
2610-
2611 OSKController {
2612 anchors.topMargin: panel.panelHeight
2613 anchors.fill: parent // as needs to know the geometry of the shell
2614@@ -644,7 +499,6 @@
2615
2616 EdgeDemo {
2617 id: edgeDemo
2618- greeter: greeter
2619 launcher: launcher
2620 dash: dash
2621 indicators: panel.indicators
2622@@ -653,6 +507,6 @@
2623
2624 Connections {
2625 target: SessionBroadcast
2626- onShowHome: showHome()
2627+ onShowHome: showHome(false)
2628 }
2629 }
2630
2631=== modified file 'run.sh'
2632--- run.sh 2014-05-13 08:33:21 +0000
2633+++ run.sh 2014-05-29 14:11:15 +0000
2634@@ -18,13 +18,14 @@
2635 echo " -p, --pinlock Use a pin protected user." >&2
2636 echo " -k, --keylock Use a passphrase protected user." >&2
2637 echo " -g, --gdb Run through gdb." >&2
2638+ echo " -G, --greeter Run the greeter instead of the shell." >&2
2639 echo " -h, --help Show this help." >&2
2640 echo " -m, --nomousetouch Run without -mousetouch argument." >&2
2641 echo >&2
2642 exit 1
2643 }
2644
2645-ARGS=`getopt -n$0 -u -a --longoptions="fake,pinlock,keylock,gdb,help,nomousetouch" -o "fpkghm" -- "$@"`
2646+ARGS=`getopt -n$0 -u -a --longoptions="fake,pinlock,keylock,gdb,greeter,help,nomousetouch" -o "fpkgGhm" -- "$@"`
2647 [ $? -ne 0 ] && usage
2648 eval set -- "$ARGS"
2649
2650@@ -35,6 +36,7 @@
2651 -p|--pinlock) PINLOCK=true;;
2652 -k|--keylock) KEYLOCK=true;;
2653 -g|--gdb) GDB=true;;
2654+ -G|--greeter) QML_PHONE_SHELL_PATH=./builddir/src/unity8-greeter;;
2655 -h|--help) usage;;
2656 -m|--nomousetouch) MOUSE_TOUCH=false;;
2657 --) shift;break;;
2658@@ -44,17 +46,17 @@
2659
2660 if $FAKE; then
2661 export QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$PWD/builddir/tests/mocks:$PWD/builddir/plugins:$PWD/builddir/modules
2662- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/builddir/tests/mocks/libusermetrics:$PWD/builddir/tests/mocks/LightDM/single
2663+ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/builddir/tests/mocks/libusermetrics:$PWD/builddir/tests/mocks/liblightdm/single
2664 fi
2665
2666 if $PINLOCK; then
2667 export QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$PWD/builddir/tests/mocks:$PWD/builddir/plugins:$PWD/builddir/modules
2668- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/builddir/tests/mocks/libusermetrics:$PWD/builddir/tests/mocks/LightDM/single-pin
2669+ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/builddir/tests/mocks/libusermetrics:$PWD/builddir/tests/mocks/liblightdm/single-pin
2670 fi
2671
2672 if $KEYLOCK; then
2673 export QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$PWD/builddir/tests/mocks:$PWD/builddir/plugins:$PWD/builddir/modules
2674- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/builddir/tests/mocks/libusermetrics:$PWD/builddir/tests/mocks/LightDM/single-passphrase
2675+ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/builddir/tests/mocks/libusermetrics:$PWD/builddir/tests/mocks/liblightdm/single-passphrase
2676 fi
2677
2678 # Force icon theme if running on the desktop, otherwise gnome theme (if running
2679
2680=== modified file 'src/CMakeLists.txt'
2681--- src/CMakeLists.txt 2014-01-09 08:59:44 +0000
2682+++ src/CMakeLists.txt 2014-05-29 14:11:15 +0000
2683@@ -15,24 +15,36 @@
2684 ${CMAKE_SOURCE_DIR}/tests/*.svg
2685 )
2686
2687-add_executable(${SHELL_APP}
2688+set(COMMON_SRCS
2689 ApplicationArguments.h
2690 main.cpp
2691 MouseTouchAdaptor.cpp
2692 ${QML_FILES} # This is to make qml and image files appear in the IDE's project tree
2693-)
2694+ )
2695+add_executable(${SHELL_APP} ${COMMON_SRCS})
2696+add_executable(${GREETER_APP} ${COMMON_SRCS})
2697+
2698+set_target_properties(${SHELL_APP} PROPERTIES
2699+ COMPILE_DEFINITIONS "UNITY8_GREETER=0"
2700+ )
2701+set_target_properties(${GREETER_APP} PROPERTIES
2702+ COMPILE_DEFINITIONS "UNITY8_GREETER=1"
2703+ )
2704
2705 qt5_use_modules(${SHELL_APP} Gui Qml Quick Test)
2706+qt5_use_modules(${GREETER_APP} Gui Qml Quick Test)
2707 pkg_check_modules(XCB REQUIRED xcb)
2708
2709 if (NOT "${XCB_INCLUDE_DIRS}" STREQUAL "")
2710 set_target_properties(${SHELL_APP} PROPERTIES INCLUDE_DIRECTORIES ${XCB_INCLUDE_DIRS})
2711+ set_target_properties(${GREETER_APP} PROPERTIES INCLUDE_DIRECTORIES ${XCB_INCLUDE_DIRS})
2712
2713 target_link_libraries(${SHELL_APP} ${XCB_LDFLAGS})
2714+ target_link_libraries(${GREETER_APP} ${XCB_LDFLAGS})
2715 endif()
2716
2717 # install binaries
2718-install(TARGETS ${SHELL_APP}
2719+install(TARGETS ${SHELL_APP} ${GREETER_APP}
2720 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
2721 )
2722
2723
2724=== modified file 'src/main.cpp'
2725--- src/main.cpp 2014-05-13 08:33:50 +0000
2726+++ src/main.cpp 2014-05-29 14:11:15 +0000
2727@@ -26,6 +26,7 @@
2728 #include <qpa/qplatformnativeinterface.h>
2729 #include <QLibrary>
2730 #include <QDebug>
2731+#include <QProcess>
2732 #include <libintl.h>
2733 #include <dlfcn.h>
2734 #include <csignal>
2735@@ -42,7 +43,7 @@
2736 {
2737 const bool isUbuntuMirServer = qgetenv("QT_QPA_PLATFORM") == "ubuntumirserver";
2738
2739- QGuiApplication::setApplicationName("Unity 8");
2740+ QGuiApplication::setApplicationName(UNITY8_GREETER ? "Unity 8 Greeter" : "Unity 8");
2741 QGuiApplication *application;
2742
2743 QCommandLineParser parser;
2744@@ -93,7 +94,7 @@
2745
2746 QString indicatorProfile = qgetenv("UNITY_INDICATOR_PROFILE");
2747 if (indicatorProfile.isEmpty()) {
2748- indicatorProfile = "phone";
2749+ indicatorProfile = UNITY8_GREETER ? "phone_greeter" : "phone";
2750 }
2751
2752 resolveIconTheme();
2753@@ -152,7 +153,7 @@
2754 nativeInterface->setProperty("ubuntuSessionType", 1);
2755 view->setProperty("role", 2); // INDICATOR_ACTOR_ROLE
2756
2757- QUrl source(::qmlDirectory()+"Shell.qml");
2758+ QUrl source(::qmlDirectory() + (UNITY8_GREETER ? "GreeterShell.qml" : "Shell.qml"));
2759 prependImportPaths(view->engine(), ::overrideImportPaths());
2760 if (!isUbuntuMirServer) {
2761 prependImportPaths(view->engine(), ::nonMirImportPaths());
2762@@ -160,7 +161,7 @@
2763 appendImportPaths(view->engine(), ::fallbackImportPaths());
2764
2765 view->setSource(source);
2766- view->setColor("transparent");
2767+ view->setColor(Qt::transparent);
2768
2769 if (qgetenv("QT_QPA_PLATFORM") == "ubuntu" || isUbuntuMirServer || parser.isSet(fullscreenOption)) {
2770 view->showFullScreen();
2771@@ -168,6 +169,19 @@
2772 view->show();
2773 }
2774
2775+#if UNITY8_GREETER
2776+ if (isUbuntuMirServer) {
2777+ // Add alpha to surface, so that the greeter can bleed through
2778+ QSurfaceFormat format;
2779+ format.setAlphaBufferSize(8);
2780+ view->setFormat(format);
2781+ }
2782+
2783+ if (!QProcess::startDetached("/sbin/initctl emit --no-wait unity8-greeter-started")) {
2784+ qDebug() << "Unable to send unity8-greeter-started event to Upstart";
2785+ }
2786+#endif
2787+
2788 int result = application->exec();
2789
2790 delete view;
2791
2792=== modified file 'tests/autopilot/unity8/application_lifecycle/tests/__init__.py'
2793--- tests/autopilot/unity8/application_lifecycle/tests/__init__.py 2014-04-14 19:45:11 +0000
2794+++ tests/autopilot/unity8/application_lifecycle/tests/__init__.py 2014-05-29 14:11:15 +0000
2795@@ -31,8 +31,6 @@
2796 super(ApplicationLifeCycleTestCase, self).setUp()
2797 self._qml_mock_enabled = False
2798 self._data_dirs_mock_enabled = False
2799- unity_proxy = self.launch_unity()
2800- process_helpers.unlock_unity(unity_proxy)
2801
2802 def create_test_application(self):
2803 desktop_file_dict = fixture_setup.DEFAULT_DESKTOP_FILE_DICT
2804
2805=== modified file 'tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py'
2806--- tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py 2014-04-14 19:45:11 +0000
2807+++ tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py 2014-05-29 14:11:15 +0000
2808@@ -24,11 +24,8 @@
2809 import logging
2810 import os
2811
2812-from autopilot.matchers import Eventually
2813 from autopilot.platform import model
2814-from testtools.matchers import Equals
2815
2816-from unity8 import process_helpers
2817 from unity8.application_lifecycle import tests
2818
2819
2820@@ -41,6 +38,7 @@
2821 if model() == 'Desktop':
2822 self.skipTest('Test cannot be run on the desktop.')
2823 super(ApplicationLifecycleTests, self).setUp()
2824+ self.launch_unity()
2825
2826 def swipe_screen_from_right(self):
2827 width = self.main_window.width
2828@@ -89,29 +87,3 @@
2829 self.swipe_screen_from_right()
2830
2831 self.assert_current_focused_application(application1_name)
2832-
2833- def test_greeter_hides_on_app_open(self):
2834- """Greeter should hide when an app is opened"""
2835- process_helpers.lock_unity()
2836- greeter = self.main_window.get_greeter()
2837- self.assertThat(greeter.created, Eventually(Equals(True)))
2838-
2839- application_name = self.launch_fake_app()
2840- self.assertThat(greeter.created, Eventually(Equals(False)))
2841- self.assert_current_focused_application(application_name)
2842-
2843- def test_greeter_hides_on_app_focus(self):
2844- """Greeter should hide when an app is re-focused"""
2845- application_name = self.launch_fake_app()
2846- self.assert_current_focused_application(application_name)
2847-
2848- self.main_window.show_dash_swiping()
2849- self.assert_current_focused_application('')
2850-
2851- process_helpers.lock_unity()
2852- greeter = self.main_window.get_greeter()
2853- self.assertThat(greeter.created, Eventually(Equals(True)))
2854-
2855- self.launch_upstart_application(application_name)
2856- self.assertThat(greeter.created, Eventually(Equals(False)))
2857- self.assert_current_focused_application(application_name)
2858
2859=== added file 'tests/autopilot/unity8/application_lifecycle/tests/test_greeter.py'
2860--- tests/autopilot/unity8/application_lifecycle/tests/test_greeter.py 1970-01-01 00:00:00 +0000
2861+++ tests/autopilot/unity8/application_lifecycle/tests/test_greeter.py 2014-05-29 14:11:15 +0000
2862@@ -0,0 +1,75 @@
2863+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2864+#
2865+# Unity Autopilot Test Suite
2866+# Copyright (C) 2013, 2014 Canonical
2867+#
2868+# This program is free software: you can redistribute it and/or modify
2869+# it under the terms of the GNU General Public License as published by
2870+# the Free Software Foundation, either version 3 of the License, or
2871+# (at your option) any later version.
2872+#
2873+# This program is distributed in the hope that it will be useful,
2874+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2875+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2876+# GNU General Public License for more details.
2877+#
2878+# You should have received a copy of the GNU General Public License
2879+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2880+#
2881+
2882+"""Tests for the application lifecycle in the greeter."""
2883+
2884+from __future__ import absolute_import
2885+
2886+import logging
2887+import os
2888+import subprocess
2889+
2890+from autopilot.matchers import Eventually
2891+from autopilot.platform import model
2892+from testtools.matchers import Equals
2893+
2894+from unity8.application_lifecycle import tests
2895+from unity8.shell import with_lightdm_mock
2896+
2897+
2898+logger = logging.getLogger(__name__)
2899+
2900+
2901+class GreeterApplicationLifecycleTests(tests.ApplicationLifeCycleTestCase):
2902+
2903+ def setUp(self):
2904+ if model() == 'Desktop':
2905+ self.skipTest('Test cannot be run on the desktop.')
2906+ super(GreeterApplicationLifecycleTests, self).setUp()
2907+ # Kill user's url-dispatcher daemon, because we want to own its dbus
2908+ # name during these tests.
2909+ try:
2910+ subprocess.check_output(
2911+ ["/sbin/initctl", "stop", "url-dispatcher"],
2912+ stderr=subprocess.STDOUT
2913+ )
2914+ except subprocess.CalledProcessError:
2915+ logger.warning("Appears url-dispatcher was already stopped!")
2916+ self.addCleanup(self._start_dispatcher)
2917+ self.launch_greeter()
2918+
2919+ def _start_dispatcher(self):
2920+ subprocess.call(
2921+ ["/sbin/initctl", "start", "url-dispatcher"],
2922+ stderr=subprocess.STDOUT
2923+ )
2924+
2925+ @with_lightdm_mock("single")
2926+ def test_greeter_hides_on_url_dispatcher(self):
2927+ """Greeter should hide when an app is opened"""
2928+ greeter = self.main_window.get_greeter()
2929+ self.assertThat(greeter.created, Eventually(Equals(True)))
2930+
2931+ _, desktop_file_path = self.create_test_application()
2932+ desktop_file_name = os.path.basename(desktop_file_path)
2933+ application_name, _ = os.path.splitext(desktop_file_name)
2934+
2935+ subprocess.check_call(
2936+ ['url-dispatcher', 'application:///{}'.format(desktop_file_name)])
2937+ self.assertThat(greeter.created, Eventually(Equals(False)))
2938
2939=== modified file 'tests/autopilot/unity8/application_lifecycle/tests/test_url_dispatcher.py'
2940--- tests/autopilot/unity8/application_lifecycle/tests/test_url_dispatcher.py 2014-04-11 16:01:28 +0000
2941+++ tests/autopilot/unity8/application_lifecycle/tests/test_url_dispatcher.py 2014-05-29 14:11:15 +0000
2942@@ -33,6 +33,7 @@
2943 if platform.model() == 'Desktop':
2944 self.skipTest("URL dispatcher doesn't work on the desktop.")
2945 super(URLDispatcherTestCase, self).setUp()
2946+ self.launch_unity()
2947
2948 def test_swipe_out_application_started_by_url_dispatcher(self):
2949 _, desktop_file_path = self.create_test_application()
2950
2951=== modified file 'tests/autopilot/unity8/indicators/tests/test_indicators.py'
2952--- tests/autopilot/unity8/indicators/tests/test_indicators.py 2014-04-09 15:28:42 +0000
2953+++ tests/autopilot/unity8/indicators/tests/test_indicators.py 2014-05-29 14:11:15 +0000
2954@@ -22,7 +22,6 @@
2955
2956 from autopilot import platform
2957
2958-from unity8.process_helpers import unlock_unity
2959 from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
2960
2961
2962@@ -35,7 +34,6 @@
2963 self.skipTest('Test cannot be run on the desktop.')
2964 super(IndicatorTestCase, self).setUp()
2965 self.unity_proxy = self.launch_unity()
2966- unlock_unity(self.unity_proxy)
2967
2968
2969 class IndicatorExistsTestCase(IndicatorTestCase):
2970
2971=== modified file 'tests/autopilot/unity8/process_helpers.py'
2972--- tests/autopilot/unity8/process_helpers.py 2014-05-14 22:48:45 +0000
2973+++ tests/autopilot/unity8/process_helpers.py 2014-05-29 14:11:15 +0000
2974@@ -40,62 +40,6 @@
2975 pass
2976
2977
2978-def unlock_unity(unity_proxy_obj=None):
2979- """Helper function that attempts to unlock the unity greeter.
2980-
2981- If unity_proxy_object is None create a proxy object by querying for the
2982- running unity process.
2983- Otherwise re-use the passed proxy object.
2984-
2985- :raises RuntimeError: if the greeter attempts and fails to be unlocked.
2986-
2987- :raises RuntimeWarning: when the greeter cannot be found because it is
2988- already unlocked.
2989- :raises CannotAccessUnity: if unity is not introspectable or cannot be
2990- found on dbus.
2991- :raises CannotAccessUnity: if unity's upstart status is not "start" or the
2992- upstart job cannot be found at all.
2993-
2994- """
2995- if unity_proxy_obj is None:
2996- try:
2997- pid = _get_unity_pid()
2998- unity = _get_unity_proxy_object(pid)
2999- main_window = unity.select_single(main_window_emulator.QQuickView)
3000- except ProcessSearchError as e:
3001- raise CannotAccessUnity(
3002- "Cannot introspect unity, make sure that it has been started "
3003- "with testability. Perhaps use the function "
3004- "'restart_unity_with_testability' this module provides."
3005- "(%s)"
3006- % str(e)
3007- )
3008- else:
3009- main_window = unity_proxy_obj.select_single(
3010- main_window_emulator.QQuickView)
3011-
3012- greeter = main_window.get_greeter()
3013- if greeter.created == False:
3014- raise RuntimeWarning("Greeter appears to be already unlocked.")
3015-
3016- # Because of potential input jerkiness under heavy load,
3017- # retry unlocking the greeter two times.
3018- # https://bugs.launchpad.net/ubuntu/+bug/1260113
3019-
3020- retries = 3
3021- while retries > 0:
3022- try:
3023- greeter.swipe()
3024- except AssertionError:
3025- retries -= 1
3026- if retries == 0:
3027- raise
3028- logger.info("Failed to unlock greeter, trying again...")
3029- else:
3030- logger.info("Greeter unlocked, continuing.")
3031- break
3032-
3033-
3034 def lock_unity(unity_proxy_obj=None):
3035 """Helper function that attempts to lock the unity greeter."""
3036 import evdev, time
3037
3038=== modified file 'tests/autopilot/unity8/shell/tests/__init__.py'
3039--- tests/autopilot/unity8/shell/tests/__init__.py 2014-03-27 12:37:44 +0000
3040+++ tests/autopilot/unity8/shell/tests/__init__.py 2014-05-29 14:11:15 +0000
3041@@ -249,9 +249,9 @@
3042 "%s=%s" % (key, value)
3043 ], stderr=subprocess.STDOUT)
3044
3045- def launch_unity(self, **kwargs):
3046+ def _launch(self, executable, ready_func, **kwargs):
3047 """Launch the unity shell, return a proxy object for it."""
3048- binary_path = get_binary_path()
3049+ binary_path = get_binary_path(executable)
3050 lib_path = get_lib_path()
3051
3052 logger.info(
3053@@ -293,11 +293,19 @@
3054
3055 # Ensure that the dash is visible before we return:
3056 logger.debug("Unity started, waiting for it to be ready.")
3057- self.assertUnityReady()
3058+ ready_func()
3059 logger.debug("Unity loaded and ready.")
3060
3061 return app_proxy
3062
3063+ def launch_unity(self, **kwargs):
3064+ """Launch the unity shell, return a proxy object for it."""
3065+ return self._launch("unity8", self.assertUnityReady, **kwargs)
3066+
3067+ def launch_greeter(self, **kwargs):
3068+ """Launch the unity shell, return a proxy object for it."""
3069+ return self._launch("unity8-greeter", self.assertGreeterReady, **kwargs)
3070+
3071 def _launch_unity_with_upstart(self, binary_path, args):
3072 logger.info("Starting unity")
3073 self._patch_environment("QT_LOAD_TESTABILITY", 1)
3074@@ -344,7 +352,7 @@
3075 def _get_lightdm_mock_path(self, mock_type):
3076 lib_path = get_mocks_library_path()
3077 lightdm_mock_path = os.path.abspath(
3078- os.path.join(lib_path, "LightDM", mock_type)
3079+ os.path.join(lib_path, "liblightdm", mock_type)
3080 )
3081
3082 if not os.path.exists(lightdm_mock_path):
3083@@ -386,6 +394,10 @@
3084 )
3085 self.assertThat(home_scope.isCurrent, Eventually(Equals(True)))
3086
3087+ def assertGreeterReady(self):
3088+ greeter = self.main_window.get_greeter()
3089+ self.assertThat(greeter.created, Eventually(Equals(True)))
3090+
3091 def get_dash(self):
3092 dash = self._proxy.wait_select_single(Dash)
3093 return dash
3094
3095=== modified file 'tests/autopilot/unity8/shell/tests/disabled_test_hud.py'
3096--- tests/autopilot/unity8/shell/tests/disabled_test_hud.py 2014-03-17 11:44:05 +0000
3097+++ tests/autopilot/unity8/shell/tests/disabled_test_hud.py 2014-05-29 14:11:15 +0000
3098@@ -19,8 +19,7 @@
3099
3100 from __future__ import absolute_import
3101
3102-from unity8.process_helpers import unlock_unity
3103-from unity8.shell import with_lightdm_mock, DragMixin
3104+from unity8.shell import DragMixin
3105 from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
3106
3107 from testtools.matchers import Equals
3108@@ -40,7 +39,6 @@
3109
3110 """
3111 unity_proxy = self.launch_unity()
3112- unlock_unity(unity_proxy)
3113 hud_show_button = self.main_window.get_hud_show_button()
3114 edge_drag_area = self.main_window.get_hud_edge_drag_area()
3115 hud = self.main_window.get_hud()
3116@@ -81,7 +79,6 @@
3117
3118 """
3119 unity_proxy = self.launch_unity()
3120- unlock_unity(unity_proxy)
3121 hud_show_button = self.main_window.get_hud_show_button()
3122 hud = self.main_window.get_hud()
3123
3124@@ -117,7 +114,6 @@
3125 def test_hide_hud_click(self):
3126 """Tapping the close button of the Hud must dismiss it."""
3127 unity_proxy = self.launch_unity()
3128- unlock_unity(unity_proxy)
3129 hud = self.main_window.get_hud()
3130
3131 self._launch_test_app_from_app_screen()
3132@@ -134,7 +130,6 @@
3133
3134 """
3135 unity_proxy = self.launch_unity()
3136- unlock_unity(unity_proxy)
3137 hud = self.main_window.get_hud()
3138
3139 self._launch_test_app_from_app_screen()
3140@@ -151,7 +146,6 @@
3141 def test_launcher_hides_hud(self):
3142 """Opening the Launcher while the Hud is active must close the Hud."""
3143 unity_proxy = self.launch_unity()
3144- unlock_unity(unity_proxy)
3145 hud = self.main_window.get_hud()
3146 launcher = self.main_window.get_launcher()
3147
3148
3149=== modified file 'tests/autopilot/unity8/shell/tests/test_emulators.py'
3150--- tests/autopilot/unity8/shell/tests/test_emulators.py 2014-04-17 08:17:09 +0000
3151+++ tests/autopilot/unity8/shell/tests/test_emulators.py 2014-05-29 14:11:15 +0000
3152@@ -34,7 +34,6 @@
3153
3154 from testtools.matchers import Contains, HasLength
3155
3156-from unity8 import process_helpers
3157 from unity8.shell import emulators, fixture_setup, tests
3158 from unity8.shell.emulators import dash as dash_emulators
3159
3160@@ -46,7 +45,6 @@
3161 def setUp(self):
3162 super(MainWindowTestCase, self).setUp()
3163 unity_proxy = self.launch_unity()
3164- process_helpers.unlock_unity(unity_proxy)
3165
3166 def test_search(self):
3167 self.main_window.search('Test')
3168@@ -62,7 +60,6 @@
3169 def setUp(self):
3170 super(DashBaseTestCase, self).setUp()
3171 unity_proxy = self.launch_unity()
3172- process_helpers.unlock_unity(unity_proxy)
3173 self.dash = self.main_window.get_dash()
3174
3175
3176
3177=== modified file 'tests/autopilot/unity8/shell/tests/test_lock_screen.py'
3178--- tests/autopilot/unity8/shell/tests/test_lock_screen.py 2014-02-22 00:12:49 +0000
3179+++ tests/autopilot/unity8/shell/tests/test_lock_screen.py 2014-05-29 14:11:15 +0000
3180@@ -20,7 +20,6 @@
3181
3182 from __future__ import absolute_import
3183
3184-from unity8.process_helpers import unlock_unity
3185 from unity8.shell import with_lightdm_mock
3186 from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
3187
3188@@ -47,41 +46,41 @@
3189 @with_lightdm_mock("single-pin")
3190 def test_can_unlock_pin_screen(self):
3191 """Must be able to unlock the PIN entry lock screen."""
3192- unity_proxy = self.launch_unity()
3193+ self.launch_greeter()
3194 greeter = self.main_window.get_greeter()
3195
3196 if greeter.narrowMode:
3197- unlock_unity(unity_proxy)
3198+ greeter.swipe()
3199 lockscreen = self._wait_for_lockscreen()
3200 self._enter_pincode("1234")
3201 self.assertThat(lockscreen.shown, Eventually(Equals(False)))
3202 else:
3203 self._enter_prompt_passphrase("1234")
3204- self.assertThat(greeter.shown, Eventually(Equals(False)))
3205+ self.assertThat(greeter.enabled, Eventually(Equals(False)))
3206
3207 @with_lightdm_mock("single-passphrase")
3208 def test_can_unlock_passphrase_screen(self):
3209 """Must be able to unlock the passphrase entry screen."""
3210- unity_proxy = self.launch_unity()
3211+ self.launch_greeter()
3212 greeter = self.main_window.get_greeter()
3213
3214 if greeter.narrowMode:
3215- unlock_unity(unity_proxy)
3216+ greeter.swipe()
3217 lockscreen = self._wait_for_lockscreen()
3218 self._enter_pin_passphrase("password")
3219 self.assertThat(lockscreen.shown, Eventually(Equals(False)))
3220 else:
3221 self._enter_prompt_passphrase("password")
3222- self.assertThat(greeter.shown, Eventually(Equals(False)))
3223+ self.assertThat(greeter.enabled, Eventually(Equals(False)))
3224
3225 @with_lightdm_mock("single-pin")
3226 def test_pin_screen_wrong_code(self):
3227 """Entering the wrong pin code must not dismiss the lock screen."""
3228- unity_proxy = self.launch_unity()
3229+ self.launch_greeter()
3230 greeter = self.main_window.get_greeter()
3231
3232 if greeter.narrowMode:
3233- unlock_unity(unity_proxy)
3234+ greeter.swipe()
3235 lockscreen = self._wait_for_lockscreen()
3236 self._enter_pincode("4321")
3237 pinentryField = self.main_window.get_pinentryField()
3238@@ -91,16 +90,16 @@
3239 self._enter_prompt_passphrase("4231")
3240 prompt = self.main_window.get_greeter().get_prompt()
3241 self.assertThat(prompt.text, Eventually(Equals("")))
3242- self.assertThat(greeter.shown, Eventually(Equals(True)))
3243+ self.assertThat(greeter.enabled, Eventually(Equals(True)))
3244
3245 @with_lightdm_mock("single-passphrase")
3246 def test_passphrase_screen_wrong_password(self):
3247 """Entering the wrong password must not dismiss the lock screen."""
3248- unity_proxy = self.launch_unity()
3249+ self.launch_greeter()
3250 greeter = self.main_window.get_greeter()
3251
3252 if greeter.narrowMode:
3253- unlock_unity(unity_proxy)
3254+ greeter.swipe()
3255 lockscreen = self._wait_for_lockscreen()
3256 self._enter_pin_passphrase("foobar")
3257 pinentryField = self.main_window.get_pinentryField()
3258@@ -110,7 +109,7 @@
3259 self._enter_prompt_passphrase("foobar")
3260 prompt = self.main_window.get_greeter().get_prompt()
3261 self.assertThat(prompt.text, Eventually(Equals("")))
3262- self.assertThat(greeter.shown, Eventually(Equals(True)))
3263+ self.assertThat(greeter.enabled, Eventually(Equals(True)))
3264
3265 def _wait_for_lockscreen(self):
3266 """Wait for the lock screen to load, and return it."""
3267
3268=== modified file 'tests/autopilot/unity8/shell/tests/test_notifications.py'
3269--- tests/autopilot/unity8/shell/tests/test_notifications.py 2014-04-30 08:42:12 +0000
3270+++ tests/autopilot/unity8/shell/tests/test_notifications.py 2014-05-29 14:11:15 +0000
3271@@ -22,7 +22,6 @@
3272 from __future__ import absolute_import
3273
3274 from unity8 import shell
3275-from unity8.process_helpers import unlock_unity
3276 from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
3277
3278 from testtools.matchers import Equals, NotEquals
3279@@ -125,7 +124,6 @@
3280 def test_interactive(self):
3281 """Interactive notification must react upon click on itself."""
3282 unity_proxy = self.launch_unity()
3283- unlock_unity(unity_proxy)
3284
3285 notify_list = self._get_notifications_list()
3286
3287@@ -164,7 +162,6 @@
3288 """Rejecting a call should make notification expand and
3289 offer more options."""
3290 unity_proxy = self.launch_unity()
3291- unlock_unity(unity_proxy)
3292
3293 summary = "Incoming call"
3294 body = "Frank Zappa\n+44 (0)7736 027340"
3295@@ -214,7 +211,6 @@
3296 def test_modal_sd_without_greeter (self):
3297 """A snap-decision on a phone should block input to shell beneath it when there's no greeter."""
3298 unity_proxy = self.launch_unity()
3299- unlock_unity(unity_proxy)
3300
3301 summary = "Incoming file"
3302 body = "Frank would like to send you the file: essay.pdf"
3303@@ -255,7 +251,7 @@
3304
3305 def test_modal_sd_with_greeter (self):
3306 """A snap-decision on a phone should not block input to the greeter beneath it."""
3307- unity_proxy = self.launch_unity()
3308+ unity_proxy = self.launch_greeter()
3309
3310 summary = "Incoming file"
3311 body = "Frank would like to send you the file: essay.pdf"
3312@@ -281,8 +277,8 @@
3313
3314 # verify that we can swipe away the greeter (interact with the "shell")
3315 time.sleep(1)
3316- self.main_window.show_dash_swiping()
3317 greeter = self.main_window.get_greeter()
3318+ greeter.swipe()
3319 self.assertThat(greeter.shown, Eventually(Equals(False)))
3320
3321 # verify and interact with the triggered snap-decision notification
3322@@ -424,7 +420,6 @@
3323 def test_icon_summary_body(self):
3324 """Notification must display the expected summary and body text."""
3325 unity_proxy = self.launch_unity()
3326- unlock_unity(unity_proxy)
3327
3328 notify_list = self._get_notifications_list()
3329
3330@@ -464,7 +459,6 @@
3331 """Notification must display the expected summary and secondary
3332 icon."""
3333 unity_proxy = self.launch_unity()
3334- unlock_unity(unity_proxy)
3335
3336 notify_list = self._get_notifications_list()
3337
3338@@ -501,7 +495,6 @@
3339 """Notifications must be displayed in order according to their
3340 urgency."""
3341 unity_proxy = self.launch_unity()
3342- unlock_unity(unity_proxy)
3343
3344 notify_list = self._get_notifications_list()
3345
3346@@ -588,7 +581,6 @@
3347 def test_summary_and_body(self):
3348 """Notification must display the expected summary- and body-text."""
3349 unity_proxy = self.launch_unity()
3350- unlock_unity(unity_proxy)
3351
3352 notify_list = self._get_notifications_list()
3353
3354@@ -613,7 +605,6 @@
3355 def test_summary_only(self):
3356 """Notification must display only the expected summary-text."""
3357 unity_proxy = self.launch_unity()
3358- unlock_unity(unity_proxy)
3359
3360 notify_list = self._get_notifications_list()
3361
3362@@ -631,7 +622,6 @@
3363 """Notification must allow updating its contents while being
3364 displayed."""
3365 unity_proxy = self.launch_unity()
3366- unlock_unity(unity_proxy)
3367
3368 notify_list = self._get_notifications_list()
3369
3370@@ -669,7 +659,6 @@
3371 """Notification must allow updating its contents and layout while
3372 being displayed."""
3373 unity_proxy = self.launch_unity()
3374- unlock_unity(unity_proxy)
3375
3376 notify_list = self._get_notifications_list()
3377
3378@@ -715,7 +704,6 @@
3379 def test_append_hint(self):
3380 """Notification has to accumulate body-text using append-hint."""
3381 unity_proxy = self.launch_unity()
3382- unlock_unity(unity_proxy)
3383
3384 notify_list = self._get_notifications_list()
3385
3386
3387=== modified file 'tests/mocks/AccountsService/AccountsService.cpp'
3388--- tests/mocks/AccountsService/AccountsService.cpp 2014-02-20 20:14:40 +0000
3389+++ tests/mocks/AccountsService/AccountsService.cpp 2014-05-29 14:11:15 +0000
3390@@ -45,6 +45,15 @@
3391 Q_UNUSED(demoEdges)
3392 }
3393
3394+bool AccountsService::demoEdgesForCurrentUser() const
3395+{
3396+ return false;
3397+}
3398+
3399+void AccountsService::setDemoEdgesForCurrentUser(bool)
3400+{
3401+}
3402+
3403 QString AccountsService::backgroundFile() const
3404 {
3405 return m_backgroundFile;
3406
3407=== modified file 'tests/mocks/AccountsService/AccountsService.h'
3408--- tests/mocks/AccountsService/AccountsService.h 2013-09-24 18:50:56 +0000
3409+++ tests/mocks/AccountsService/AccountsService.h 2014-05-29 14:11:15 +0000
3410@@ -35,6 +35,10 @@
3411 READ demoEdges
3412 WRITE setDemoEdges
3413 NOTIFY demoEdgesChanged)
3414+ Q_PROPERTY (bool demoEdgesForCurrentUser
3415+ READ demoEdgesForCurrentUser
3416+ WRITE setDemoEdgesForCurrentUser
3417+ NOTIFY demoEdgesForCurrentUserChanged)
3418 Q_PROPERTY (QString backgroundFile
3419 READ backgroundFile
3420 WRITE setBackgroundFile // only available in mock
3421@@ -51,6 +55,8 @@
3422 void setUser(const QString &user);
3423 bool demoEdges() const;
3424 void setDemoEdges(bool demoEdges);
3425+ bool demoEdgesForCurrentUser() const;
3426+ void setDemoEdgesForCurrentUser(bool demoEdgesForCurrentUser);
3427 QString backgroundFile() const;
3428 void setBackgroundFile(const QString &backgroundFile);
3429 bool statsWelcomeScreen() const;
3430@@ -59,6 +65,7 @@
3431 Q_SIGNALS:
3432 void userChanged();
3433 void demoEdgesChanged();
3434+ void demoEdgesForCurrentUserChanged();
3435 void backgroundFileChanged();
3436 void statsWelcomeScreenChanged();
3437
3438
3439=== modified file 'tests/mocks/CMakeLists.txt'
3440--- tests/mocks/CMakeLists.txt 2014-05-02 22:57:21 +0000
3441+++ tests/mocks/CMakeLists.txt 2014-05-29 14:11:15 +0000
3442@@ -31,10 +31,11 @@
3443 add_subdirectory(AccountsService)
3444 add_subdirectory(GSettings.1.0)
3445 add_subdirectory(HudClient)
3446+add_subdirectory(liblightdm)
3447 add_subdirectory(libusermetrics)
3448-add_subdirectory(LightDM)
3449 add_subdirectory(Powerd)
3450 add_subdirectory(QMenuModel)
3451+add_subdirectory(SessionManager)
3452 add_subdirectory(Ubuntu)
3453 add_subdirectory(Unity)
3454 add_subdirectory(QtMultimedia)
3455
3456=== removed directory 'tests/mocks/LightDM/demo'
3457=== removed file 'tests/mocks/LightDM/demo/CMakeLists.txt'
3458--- tests/mocks/LightDM/demo/CMakeLists.txt 2013-12-13 01:02:53 +0000
3459+++ tests/mocks/LightDM/demo/CMakeLists.txt 1970-01-01 00:00:00 +0000
3460@@ -1,21 +0,0 @@
3461-pkg_check_modules(LIBUSERMETRICSOUTPUT REQUIRED libusermetricsoutput-1)
3462-
3463-set(LibLightDM_SOURCES
3464- ../Greeter.cpp
3465- ../UsersModel.cpp
3466- GreeterPrivate.cpp
3467- UsersModelPrivate.cpp
3468- ${CMAKE_SOURCE_DIR}/plugins/Utils/qvariantlistmodel.cpp
3469- )
3470-
3471-add_library(MockLightDM-demo STATIC ${LibLightDM_SOURCES})
3472-
3473-include_directories(
3474- ${LIBUSERMETRICSOUTPUT_INCLUDE_DIRS}
3475-)
3476-
3477-target_link_libraries(MockLightDM-demo
3478- ${LIBUSERMETRICSOUTPUT_LDFLAGS}
3479- )
3480-
3481-qt5_use_modules(MockLightDM-demo Gui)
3482
3483=== removed file 'tests/mocks/LightDM/demo/GreeterPrivate.cpp'
3484--- tests/mocks/LightDM/demo/GreeterPrivate.cpp 2014-01-29 19:04:20 +0000
3485+++ tests/mocks/LightDM/demo/GreeterPrivate.cpp 1970-01-01 00:00:00 +0000
3486@@ -1,70 +0,0 @@
3487-/*
3488- * Copyright (C) 2013 Canonical, Ltd.
3489- *
3490- * This program is free software; you can redistribute it and/or modify
3491- * it under the terms of the GNU General Public License as published by
3492- * the Free Software Foundation; version 3.
3493- *
3494- * This program is distributed in the hope that it will be useful,
3495- * but WITHOUT ANY WARRANTY; without even the implied warranty of
3496- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3497- * GNU General Public License for more details.
3498- *
3499- * You should have received a copy of the GNU General Public License
3500- * along with this program. If not, see <http://www.gnu.org/licenses/>.
3501- *
3502- * Author: Michael Terry <michael.terry@canonical.com>
3503- */
3504-
3505-#include "../Greeter.h"
3506-#include "../GreeterPrivate.h"
3507-#include <QtCore/QDir>
3508-#include <QtCore/QSettings>
3509-
3510-namespace QLightDM
3511-{
3512-
3513-GreeterPrivate::GreeterPrivate(Greeter* parent)
3514- : authenticated(false),
3515- authenticationUser(),
3516- q_ptr(parent)
3517-{
3518-}
3519-
3520-void GreeterPrivate::handleAuthenticate()
3521-{
3522- Q_Q(Greeter);
3523-
3524- QSettings settings(QDir::homePath() + "/.unity8-greeter-demo", QSettings::NativeFormat);
3525- settings.beginGroup(authenticationUser);
3526- QVariant password = settings.value("password", "none");
3527-
3528- if (password == "pin") {
3529- Q_EMIT q->showPrompt("PIN", Greeter::PromptTypeSecret);
3530- } else if (password == "keyboard") {
3531- Q_EMIT q->showPrompt("Password", Greeter::PromptTypeSecret);
3532- } else {
3533- authenticated = true;
3534- Q_EMIT q->authenticationComplete();
3535- }
3536-}
3537-
3538-void GreeterPrivate::handleRespond(const QString &response)
3539-{
3540- Q_Q(Greeter);
3541-
3542- QSettings settings(QDir::homePath() + "/.unity8-greeter-demo", QSettings::NativeFormat);
3543- settings.beginGroup(authenticationUser);
3544- QVariant password = settings.value("password", "none");
3545-
3546- QString passwordValue;
3547- if (password == "pin") {
3548- passwordValue = settings.value("passwordValue", "1234").toString();
3549- } else {
3550- passwordValue = settings.value("passwordValue", "password").toString();
3551- }
3552- authenticated = (response == passwordValue);
3553- Q_EMIT q->authenticationComplete();
3554-}
3555-
3556-}
3557
3558=== removed file 'tests/mocks/LightDM/demo/UsersModelPrivate.cpp'
3559--- tests/mocks/LightDM/demo/UsersModelPrivate.cpp 2014-02-04 14:38:00 +0000
3560+++ tests/mocks/LightDM/demo/UsersModelPrivate.cpp 1970-01-01 00:00:00 +0000
3561@@ -1,41 +0,0 @@
3562-/*
3563- * Copyright (C) 2013 Canonical, Ltd.
3564- *
3565- * This program is free software; you can redistribute it and/or modify
3566- * it under the terms of the GNU General Public License as published by
3567- * the Free Software Foundation; version 3.
3568- *
3569- * This program is distributed in the hope that it will be useful,
3570- * but WITHOUT ANY WARRANTY; without even the implied warranty of
3571- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3572- * GNU General Public License for more details.
3573- *
3574- * You should have received a copy of the GNU General Public License
3575- * along with this program. If not, see <http://www.gnu.org/licenses/>.
3576- *
3577- * Author: Michael Terry <michael.terry@canonical.com>
3578- */
3579-
3580-#include "../UsersModelPrivate.h"
3581-
3582-#include <QDir>
3583-#include <QSettings>
3584-#include <QStringList>
3585-
3586-namespace QLightDM
3587-{
3588-
3589-UsersModelPrivate::UsersModelPrivate(UsersModel* parent)
3590- : q_ptr(parent)
3591-{
3592- QSettings settings(QDir::homePath() + "/.unity8-greeter-demo", QSettings::NativeFormat);
3593- QStringList users = settings.value("users", QStringList() << "phablet").toStringList();
3594-
3595- Q_FOREACH(const QString &user, users)
3596- {
3597- QString name = settings.value(user + "/name", user[0].toUpper() + user.mid(1)).toString();
3598- entries.append({user, name, 0, 0, false, false, 0, 0});
3599- }
3600-}
3601-
3602-}
3603
3604=== removed file 'tests/mocks/LightDM/qmldir'
3605--- tests/mocks/LightDM/qmldir 2014-05-02 22:57:21 +0000
3606+++ tests/mocks/LightDM/qmldir 1970-01-01 00:00:00 +0000
3607@@ -1,3 +0,0 @@
3608-module LightDM
3609-plugin MockLightDM-qml
3610-typeinfo LightDM.qmltypes
3611
3612=== added directory 'tests/mocks/SessionManager'
3613=== added file 'tests/mocks/SessionManager/CMakeLists.txt'
3614--- tests/mocks/SessionManager/CMakeLists.txt 1970-01-01 00:00:00 +0000
3615+++ tests/mocks/SessionManager/CMakeLists.txt 2014-05-29 14:11:15 +0000
3616@@ -0,0 +1,19 @@
3617+add_library(MockSessionManager-qml MODULE
3618+ plugin.cpp
3619+ SessionManager.cpp
3620+ )
3621+
3622+qt5_use_modules(MockSessionManager-qml Qml)
3623+
3624+# copy qmldir file into build directory for shadow builds
3625+file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/qmldir"
3626+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
3627+ )
3628+
3629+install(TARGETS MockSessionManager-qml
3630+ DESTINATION ${SHELL_INSTALL_QML}/mocks/SessionManager
3631+ )
3632+
3633+install(FILES qmldir
3634+ DESTINATION ${SHELL_INSTALL_QML}/mocks/SessionManager
3635+ )
3636
3637=== added file 'tests/mocks/SessionManager/SessionManager.cpp'
3638--- tests/mocks/SessionManager/SessionManager.cpp 1970-01-01 00:00:00 +0000
3639+++ tests/mocks/SessionManager/SessionManager.cpp 2014-05-29 14:11:15 +0000
3640@@ -0,0 +1,43 @@
3641+/*
3642+ * Copyright (C) 2013 Canonical, Ltd.
3643+ *
3644+ * This program is free software; you can redistribute it and/or modify
3645+ * it under the terms of the GNU General Public License as published by
3646+ * the Free Software Foundation; version 3.
3647+ *
3648+ * This program is distributed in the hope that it will be useful,
3649+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3650+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3651+ * GNU General Public License for more details.
3652+ *
3653+ * You should have received a copy of the GNU General Public License
3654+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3655+ *
3656+ * Author: Michael Terry <michael.terry@canonical.com>
3657+ */
3658+
3659+#include "SessionManager.h"
3660+
3661+SessionManager::SessionManager(QObject* parent)
3662+ : QObject(parent),
3663+ m_active(true)
3664+{
3665+}
3666+
3667+bool SessionManager::active() const
3668+{
3669+ return m_active;
3670+}
3671+
3672+void SessionManager::setActive(bool active)
3673+{
3674+ if (m_active != active) {
3675+ m_active = active;
3676+ activeChanged();
3677+ }
3678+}
3679+
3680+void SessionManager::lock()
3681+{
3682+ setActive(false);
3683+}
3684
3685=== added file 'tests/mocks/SessionManager/SessionManager.h'
3686--- tests/mocks/SessionManager/SessionManager.h 1970-01-01 00:00:00 +0000
3687+++ tests/mocks/SessionManager/SessionManager.h 2014-05-29 14:11:15 +0000
3688@@ -0,0 +1,49 @@
3689+/*
3690+ * Copyright (C) 2013 Canonical, Ltd.
3691+ *
3692+ * This program is free software; you can redistribute it and/or modify
3693+ * it under the terms of the GNU General Public License as published by
3694+ * the Free Software Foundation; version 3.
3695+ *
3696+ * This program is distributed in the hope that it will be useful,
3697+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3698+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3699+ * GNU General Public License for more details.
3700+ *
3701+ * You should have received a copy of the GNU General Public License
3702+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3703+ *
3704+ * Authors: Michael Terry <michael.terry@canonical.com>
3705+ */
3706+
3707+#ifndef UNITY_MOCK_SESSIONMANAGER_H
3708+#define UNITY_MOCK_SESSIONMANAGER_H
3709+
3710+#include <QObject>
3711+
3712+class SessionManager: public QObject
3713+{
3714+ Q_OBJECT
3715+ Q_PROPERTY(bool active
3716+ READ active
3717+ WRITE setActive // Only in mock
3718+ NOTIFY activeChanged
3719+ FINAL)
3720+
3721+public:
3722+ explicit SessionManager(QObject *parent = 0);
3723+
3724+ bool active() const;
3725+ void setActive(bool active);
3726+
3727+public Q_SLOTS:
3728+ void lock();
3729+
3730+Q_SIGNALS:
3731+ void activeChanged();
3732+
3733+private:
3734+ bool m_active;
3735+};
3736+
3737+#endif
3738
3739=== added file 'tests/mocks/SessionManager/plugin.cpp'
3740--- tests/mocks/SessionManager/plugin.cpp 1970-01-01 00:00:00 +0000
3741+++ tests/mocks/SessionManager/plugin.cpp 2014-05-29 14:11:15 +0000
3742@@ -0,0 +1,34 @@
3743+/*
3744+ * Copyright (C) 2013 Canonical, Ltd.
3745+ *
3746+ * This program is free software; you can redistribute it and/or modify
3747+ * it under the terms of the GNU General Public License as published by
3748+ * the Free Software Foundation; version 3.
3749+ *
3750+ * This program is distributed in the hope that it will be useful,
3751+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3752+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3753+ * GNU General Public License for more details.
3754+ *
3755+ * You should have received a copy of the GNU General Public License
3756+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3757+ *
3758+ * Authors: Michael Terry <michael.terry@canonical.com>
3759+ */
3760+
3761+#include "plugin.h"
3762+#include "SessionManager.h"
3763+#include <QtQml/qqml.h>
3764+
3765+static QObject *sessionmanager_provider(QQmlEngine *engine, QJSEngine *scriptEngine)
3766+{
3767+ Q_UNUSED(engine)
3768+ Q_UNUSED(scriptEngine)
3769+ return new SessionManager();
3770+}
3771+
3772+void SessionManagerPlugin::registerTypes(const char *uri)
3773+{
3774+ Q_ASSERT(uri == QLatin1String("SessionManager"));
3775+ qmlRegisterSingletonType<SessionManager>(uri, 0, 1, "SessionManager", sessionmanager_provider);
3776+}
3777
3778=== added file 'tests/mocks/SessionManager/plugin.h'
3779--- tests/mocks/SessionManager/plugin.h 1970-01-01 00:00:00 +0000
3780+++ tests/mocks/SessionManager/plugin.h 2014-05-29 14:11:15 +0000
3781@@ -0,0 +1,34 @@
3782+/*
3783+ * Copyright (C) 2013 Canonical, Ltd.
3784+ *
3785+ * This program is free software; you can redistribute it and/or modify
3786+ * it under the terms of the GNU General Public License as published by
3787+ * the Free Software Foundation; version 3.
3788+ *
3789+ * This program is distributed in the hope that it will be useful,
3790+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3791+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3792+ * GNU General Public License for more details.
3793+ *
3794+ * You should have received a copy of the GNU General Public License
3795+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3796+ *
3797+ * Authors: Michael Terry <michael.terry@canonical.com>
3798+ */
3799+
3800+#ifndef MOCK_SESSIONMANAGER_PLUGIN_H
3801+#define MOCK_SESSIONMANAGER_PLUGIN_H
3802+
3803+#include <QQmlEngine>
3804+#include <QQmlExtensionPlugin>
3805+
3806+class SessionManagerPlugin : public QQmlExtensionPlugin
3807+{
3808+ Q_OBJECT
3809+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
3810+
3811+public:
3812+ void registerTypes(const char *uri);
3813+};
3814+
3815+#endif
3816
3817=== added file 'tests/mocks/SessionManager/qmldir'
3818--- tests/mocks/SessionManager/qmldir 1970-01-01 00:00:00 +0000
3819+++ tests/mocks/SessionManager/qmldir 2014-05-29 14:11:15 +0000
3820@@ -0,0 +1,2 @@
3821+module SessionManager
3822+plugin MockSessionManager-qml
3823
3824=== renamed directory 'tests/mocks/LightDM' => 'tests/mocks/liblightdm'
3825=== modified file 'tests/mocks/liblightdm/CMakeLists.txt'
3826--- tests/mocks/LightDM/CMakeLists.txt 2014-05-02 22:57:21 +0000
3827+++ tests/mocks/liblightdm/CMakeLists.txt 2014-05-29 14:11:15 +0000
3828@@ -1,50 +1,4 @@
3829-# This is a copy of the normal LightDM plugin, but instead of statically
3830-# linking in the lightdm bits, this one uses shared libraries so we can swap
3831-# out different sets of users for different tests. When we finally switch to
3832-# actually using the system liblightdm in the normal plugin, this version can
3833-# be deleted.
3834-
3835-add_subdirectory(demo)
3836 add_subdirectory(full)
3837 add_subdirectory(single)
3838 add_subdirectory(single-pin)
3839 add_subdirectory(single-passphrase)
3840-
3841-include_directories(
3842- ${CMAKE_CURRENT_SOURCE_DIR}
3843- ${CMAKE_CURRENT_BINARY_DIR}
3844- ${CMAKE_SOURCE_DIR}/plugins/Utils
3845- ${CMAKE_SOURCE_DIR}/tests/mocks/libusermetrics
3846-)
3847-
3848-set(QMLPLUGIN_SRC
3849- ${CMAKE_SOURCE_DIR}/plugins/LightDM/DBusGreeterList.cpp
3850- ${CMAKE_SOURCE_DIR}/plugins/LightDM/Greeter.cpp
3851- ${CMAKE_SOURCE_DIR}/plugins/LightDM/plugin.cpp
3852- ${CMAKE_SOURCE_DIR}/plugins/LightDM/UsersModel.cpp
3853- ${CMAKE_SOURCE_DIR}/plugins/Utils/qsortfilterproxymodelqml.cpp
3854- )
3855-
3856-add_library(MockLightDM-qml MODULE
3857- ${QMLPLUGIN_SRC}
3858- )
3859-
3860-# We want to link to liblightdm-qt5-2, but we don't want to depend on it being
3861-# installed on the system. So we make sure we link to our full fake version
3862-# At run time, we can point to whichever version we happen to be using via
3863-# LD_LIBRARY_PATH.
3864-add_dependencies(MockLightDM-qml MockLightDM-full MockUserMetrics)
3865-target_link_libraries(MockLightDM-qml
3866- -L${CMAKE_CURRENT_BINARY_DIR}/full
3867- -llightdm-qt5-2
3868- -L${CMAKE_BINARY_DIR}/tests/mocks/libusermetrics
3869- -lusermetricsoutput
3870- )
3871-
3872-qt5_use_modules(MockLightDM-qml DBus Gui Qml)
3873-
3874-add_unity8_mock(LightDM 0.1 LightDM
3875- PREFIX mocks
3876- TARGETS MockLightDM-qml
3877- ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_CURRENT_BINARY_DIR}/full"
3878-)
3879
3880=== modified file 'tests/mocks/liblightdm/Greeter.cpp'
3881--- tests/mocks/LightDM/Greeter.cpp 2013-06-05 22:03:08 +0000
3882+++ tests/mocks/liblightdm/Greeter.cpp 2014-05-29 14:11:15 +0000
3883@@ -151,12 +151,23 @@
3884 Q_UNUSED(language)
3885 }
3886
3887+void Greeter::setResettable (bool resettable)
3888+{
3889+ Q_UNUSED(resettable)
3890+}
3891+
3892 bool Greeter::startSessionSync(const QString &session)
3893 {
3894 Q_UNUSED(session)
3895 return true;
3896 }
3897
3898+QString Greeter::ensureSharedDataDirSync(const QString &username)
3899+{
3900+ Q_UNUSED(username)
3901+ return "";
3902+}
3903+
3904 void Greeter::respond(const QString &response)
3905 {
3906 Q_D(Greeter);
3907
3908=== modified file 'tests/mocks/liblightdm/Greeter.h'
3909--- tests/mocks/LightDM/Greeter.h 2013-06-05 22:03:08 +0000
3910+++ tests/mocks/liblightdm/Greeter.h 2014-05-29 14:11:15 +0000
3911@@ -88,13 +88,17 @@
3912 void respond(const QString &response);
3913 void cancelAuthentication();
3914 void setLanguage (const QString &language);
3915+ void setResettable (bool resettable);
3916 bool startSessionSync(const QString &session=QString());
3917+ QString ensureSharedDataDirSync(const QString &username);
3918
3919 Q_SIGNALS:
3920 void showMessage(QString text, QLightDM::Greeter::MessageType type);
3921 void showPrompt(QString text, QLightDM::Greeter::PromptType type);
3922 void authenticationComplete();
3923 void autologinTimerExpired();
3924+ void idle();
3925+ void reset();
3926
3927 private:
3928 GreeterPrivate *d_ptr;
3929
3930=== modified file 'tests/mocks/liblightdm/full/CMakeLists.txt'
3931--- tests/mocks/LightDM/full/CMakeLists.txt 2013-11-25 17:26:15 +0000
3932+++ tests/mocks/liblightdm/full/CMakeLists.txt 2014-05-29 14:11:15 +0000
3933@@ -11,8 +11,9 @@
3934 qt5_use_modules(MockLightDM-full Gui)
3935
3936 set_target_properties(MockLightDM-full PROPERTIES
3937- OUTPUT_NAME lightdm-qt5-2)
3938+ OUTPUT_NAME lightdm-qt5-3
3939+ SOVERSION 0)
3940
3941 install(TARGETS MockLightDM-full
3942- DESTINATION ${SHELL_INSTALL_QML}/mocks/LightDM/full
3943+ DESTINATION ${SHELL_INSTALL_QML}/mocks/liblightdm/full
3944 )
3945
3946=== modified file 'tests/mocks/liblightdm/single-passphrase/CMakeLists.txt'
3947--- tests/mocks/LightDM/single-passphrase/CMakeLists.txt 2013-11-25 17:26:15 +0000
3948+++ tests/mocks/liblightdm/single-passphrase/CMakeLists.txt 2014-05-29 14:11:15 +0000
3949@@ -12,8 +12,9 @@
3950 qt5_use_modules(MockLightDM-single-passphrase Gui)
3951
3952 set_target_properties(MockLightDM-single-passphrase PROPERTIES
3953- OUTPUT_NAME lightdm-qt5-2)
3954+ OUTPUT_NAME lightdm-qt5-3
3955+ SOVERSION 0)
3956
3957 install(TARGETS MockLightDM-single-passphrase
3958- DESTINATION ${SHELL_INSTALL_QML}/mocks/LightDM/single-passphrase
3959+ DESTINATION ${SHELL_INSTALL_QML}/mocks/liblightdm/single-passphrase
3960 )
3961
3962=== modified file 'tests/mocks/liblightdm/single-pin/CMakeLists.txt'
3963--- tests/mocks/LightDM/single-pin/CMakeLists.txt 2013-11-25 17:26:15 +0000
3964+++ tests/mocks/liblightdm/single-pin/CMakeLists.txt 2014-05-29 14:11:15 +0000
3965@@ -12,8 +12,9 @@
3966 qt5_use_modules(MockLightDM-single-pin Gui)
3967
3968 set_target_properties(MockLightDM-single-pin PROPERTIES
3969- OUTPUT_NAME lightdm-qt5-2)
3970+ OUTPUT_NAME lightdm-qt5-3
3971+ SOVERSION 0)
3972
3973 install(TARGETS MockLightDM-single-pin
3974- DESTINATION ${SHELL_INSTALL_QML}/mocks/LightDM/single-pin
3975+ DESTINATION ${SHELL_INSTALL_QML}/mocks/liblightdm/single-pin
3976 )
3977
3978=== modified file 'tests/mocks/liblightdm/single/CMakeLists.txt'
3979--- tests/mocks/LightDM/single/CMakeLists.txt 2013-11-25 17:26:15 +0000
3980+++ tests/mocks/liblightdm/single/CMakeLists.txt 2014-05-29 14:11:15 +0000
3981@@ -11,8 +11,9 @@
3982 qt5_use_modules(MockLightDM-single Gui)
3983
3984 set_target_properties(MockLightDM-single PROPERTIES
3985- OUTPUT_NAME lightdm-qt5-2)
3986+ OUTPUT_NAME lightdm-qt5-3
3987+ SOVERSION 0)
3988
3989 install(TARGETS MockLightDM-single
3990- DESTINATION ${SHELL_INSTALL_QML}/mocks/LightDM/single
3991+ DESTINATION ${SHELL_INSTALL_QML}/mocks/liblightdm/single
3992 )
3993
3994=== modified file 'tests/plugins/CMakeLists.txt'
3995--- tests/plugins/CMakeLists.txt 2014-04-30 10:06:33 +0000
3996+++ tests/plugins/CMakeLists.txt 2014-05-29 14:11:15 +0000
3997@@ -1,6 +1,7 @@
3998 add_subdirectory(AccountsService)
3999+add_subdirectory(Dash)
4000 add_subdirectory(LightDM)
4001-add_subdirectory(Dash)
4002+add_subdirectory(SessionManager)
4003 add_subdirectory(Ubuntu)
4004 add_subdirectory(Unity)
4005 add_subdirectory(Utils)
4006
4007=== modified file 'tests/plugins/LightDM/CMakeLists.txt'
4008--- tests/plugins/LightDM/CMakeLists.txt 2014-01-14 21:01:28 +0000
4009+++ tests/plugins/LightDM/CMakeLists.txt 2014-05-29 14:11:15 +0000
4010@@ -1,3 +1,6 @@
4011+include(FindPkgConfig)
4012+pkg_check_modules(LIBLIGHTDM REQUIRED liblightdm-qt5-3)
4013+
4014 add_executable(test-lightdm-dbus
4015 dbus.cpp
4016 ${CMAKE_SOURCE_DIR}/plugins/LightDM/Greeter.cpp
4017@@ -7,19 +10,17 @@
4018 include_directories(
4019 ${CMAKE_CURRENT_BINARY_DIR}
4020 ${CMAKE_SOURCE_DIR}/plugins/LightDM
4021- ${CMAKE_SOURCE_DIR}/tests/mocks/LightDM
4022 ${LIBLIGHTDM_INCLUDE_DIRS}
4023 )
4024
4025 add_dependencies(test-lightdm-dbus MockLightDM-full)
4026 target_link_libraries(test-lightdm-dbus
4027- -L${CMAKE_BINARY_DIR}/tests/mocks/LightDM/full
4028- -llightdm-qt5-2
4029+ ${LIBLIGHTDM_LDFLAGS}
4030 )
4031
4032 add_definitions(-DCURRENT_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
4033
4034-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)
4035+add_custom_target(testLightDMDBus dbus-launch env QML2_IMPORT_PATH=${CMAKE_BINARY_DIR}/plugins LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/liblightdm/full ${CMAKE_CURRENT_BINARY_DIR}/test-lightdm-dbus)
4036 add_dependencies(testLightDMDBus test-lightdm-dbus)
4037
4038 add_dependencies(qmluitests testLightDMDBus)
4039
4040=== added directory 'tests/plugins/SessionManager'
4041=== added file 'tests/plugins/SessionManager/CMakeLists.txt'
4042--- tests/plugins/SessionManager/CMakeLists.txt 1970-01-01 00:00:00 +0000
4043+++ tests/plugins/SessionManager/CMakeLists.txt 2014-05-29 14:11:15 +0000
4044@@ -0,0 +1,48 @@
4045+macro(make_dbus_class PREFIX SERVICE INTERFACE)
4046+ if (${CMAKE_CURRENT_SOURCE_DIR}/interfaces.xml IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/${PREFIX}${INTERFACE}Adaptor.h)
4047+ execute_process(COMMAND qdbusxml2cpp -c ${PREFIX}${INTERFACE}Adaptor -a ${CMAKE_CURRENT_BINARY_DIR}/${PREFIX}${INTERFACE}Adaptor ${CMAKE_CURRENT_SOURCE_DIR}/interfaces.xml ${SERVICE}.${INTERFACE})
4048+ endif ()
4049+endmacro(make_dbus_class)
4050+
4051+make_dbus_class(LightDM org.freedesktop.DisplayManager Session)
4052+make_dbus_class(Login org.freedesktop.login1 Manager)
4053+make_dbus_class(Login org.freedesktop.login1 Session)
4054+make_dbus_class(Login org.freedesktop.DBus Properties)
4055+
4056+include_directories(
4057+ ${CMAKE_CURRENT_BINARY_DIR}
4058+ ${CMAKE_SOURCE_DIR}/plugins/SessionManager
4059+ )
4060+
4061+add_definitions(-DSM_BUSNAME=sessionBus)
4062+
4063+add_executable(sessionmanagermock
4064+ ${CMAKE_CURRENT_BINARY_DIR}/LightDMSessionAdaptor.cpp
4065+ ${CMAKE_CURRENT_BINARY_DIR}/LoginManagerAdaptor.cpp
4066+ ${CMAKE_CURRENT_BINARY_DIR}/LoginPropertiesAdaptor.cpp
4067+ ${CMAKE_CURRENT_BINARY_DIR}/LoginSessionAdaptor.cpp
4068+ server.cpp
4069+ LightDMSessionServer.cpp
4070+ LoginManagerServer.cpp
4071+ LoginSessionServer.cpp
4072+ )
4073+qt5_use_modules(sessionmanagermock Core DBus)
4074+
4075+add_executable(sessionmanagertest
4076+ ${CMAKE_SOURCE_DIR}/plugins/SessionManager/SessionManager.cpp
4077+ client.cpp
4078+ )
4079+qt5_use_modules(sessionmanagertest Core DBus Test)
4080+
4081+add_test(NAME sessionmanagertest
4082+ COMMAND env
4083+ XDG_SESSION_ID=sessionid
4084+ XDG_SESSION_PATH=/mocksession/lightdm
4085+ dbus-test-runner
4086+ --task ${CMAKE_CURRENT_BINARY_DIR}/sessionmanagermock
4087+ --task-name server
4088+ --ignore-return
4089+ --task ${CMAKE_CURRENT_BINARY_DIR}/sessionmanagertest
4090+ --task-name client
4091+ --wait-for org.freedesktop.login1
4092+ )
4093
4094=== added file 'tests/plugins/SessionManager/LightDMSessionServer.cpp'
4095--- tests/plugins/SessionManager/LightDMSessionServer.cpp 1970-01-01 00:00:00 +0000
4096+++ tests/plugins/SessionManager/LightDMSessionServer.cpp 2014-05-29 14:11:15 +0000
4097@@ -0,0 +1,38 @@
4098+/*
4099+ * Copyright 2013 Canonical Ltd.
4100+ *
4101+ * This program is free software: you can redistribute it and/or modify it
4102+ * under the terms of the GNU General Public License version 3, as published
4103+ * by the Free Software Foundation.
4104+ *
4105+ * This program is distributed in the hope that it will be useful, but
4106+ * WITHOUT ANY WARRANTY; without even the implied warranties of
4107+ * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
4108+ * PURPOSE. See the GNU General Public License for more details.
4109+ *
4110+ * You should have received a copy of the GNU General Public License
4111+ * version 3 along with this program. If not, see
4112+ * <http://www.gnu.org/licenses/>
4113+ *
4114+ * Authored by: Michael Terry <michael.terry@canonical.com>
4115+ */
4116+
4117+#include "LightDMSessionServer.h"
4118+
4119+LightDMSessionServer::LightDMSessionServer(LoginSessionServer *logind, QObject *parent)
4120+ : QObject(parent),
4121+ logind(logind)
4122+{
4123+}
4124+
4125+void LightDMSessionServer::Lock()
4126+{
4127+ // As a side effect of locking, change Active state of logind.
4128+ // Note that this will say Active is true while the Active property will be
4129+ // false. This is intentional, as we don't want to keep any state in the
4130+ // mocks. Having this signal side effect lets us test that lock() was
4131+ // actually called by the plugin as well as test the changed signal itself.
4132+ QVariantMap changes;
4133+ changes.insert("Active", QVariant(true));
4134+ Q_EMIT logind->PropertiesChanged("org.freedesktop.login1.Session", changes, QStringList());
4135+}
4136
4137=== added file 'tests/plugins/SessionManager/LightDMSessionServer.h'
4138--- tests/plugins/SessionManager/LightDMSessionServer.h 1970-01-01 00:00:00 +0000
4139+++ tests/plugins/SessionManager/LightDMSessionServer.h 2014-05-29 14:11:15 +0000
4140@@ -0,0 +1,40 @@
4141+/*
4142+ * Copyright 2013 Canonical Ltd.
4143+ *
4144+ * This program is free software: you can redistribute it and/or modify it
4145+ * under the terms of the GNU General Public License version 3, as published
4146+ * by the Free Software Foundation.
4147+ *
4148+ * This program is distributed in the hope that it will be useful, but
4149+ * WITHOUT ANY WARRANTY; without even the implied warranties of
4150+ * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
4151+ * PURPOSE. See the GNU General Public License for more details.
4152+ *
4153+ * You should have received a copy of the GNU General Public License
4154+ * version 3 along with this program. If not, see
4155+ * <http://www.gnu.org/licenses/>
4156+ *
4157+ * Authored by: Michael Terry <michael.terry@canonical.com>
4158+ */
4159+
4160+#ifndef UNITY_LIGHTDMSESSIONSERVER_H
4161+#define UNITY_LIGHTDMSESSIONSERVER_H
4162+
4163+#include "LoginSessionServer.h"
4164+#include <QtCore/QObject>
4165+
4166+class LightDMSessionServer: public QObject
4167+{
4168+ Q_OBJECT
4169+
4170+public:
4171+ explicit LightDMSessionServer(LoginSessionServer *logind, QObject *parent = 0);
4172+
4173+public Q_SLOTS:
4174+ void Lock();
4175+
4176+private:
4177+ LoginSessionServer *logind;
4178+};
4179+
4180+#endif
4181
4182=== added file 'tests/plugins/SessionManager/LoginManagerServer.cpp'
4183--- tests/plugins/SessionManager/LoginManagerServer.cpp 1970-01-01 00:00:00 +0000
4184+++ tests/plugins/SessionManager/LoginManagerServer.cpp 2014-05-29 14:11:15 +0000
4185@@ -0,0 +1,34 @@
4186+/*
4187+ * Copyright 2013 Canonical Ltd.
4188+ *
4189+ * This program is free software: you can redistribute it and/or modify it
4190+ * under the terms of the GNU General Public License version 3, as published
4191+ * by the Free Software Foundation.
4192+ *
4193+ * This program is distributed in the hope that it will be useful, but
4194+ * WITHOUT ANY WARRANTY; without even the implied warranties of
4195+ * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
4196+ * PURPOSE. See the GNU General Public License for more details.
4197+ *
4198+ * You should have received a copy of the GNU General Public License
4199+ * version 3 along with this program. If not, see
4200+ * <http://www.gnu.org/licenses/>
4201+ *
4202+ * Authored by: Michael Terry <michael.terry@canonical.com>
4203+ */
4204+
4205+#include "LoginManagerServer.h"
4206+
4207+LoginManagerServer::LoginManagerServer(QObject *parent)
4208+ : QObject(parent)
4209+{
4210+}
4211+
4212+QDBusObjectPath LoginManagerServer::GetSession(const QString &id)
4213+{
4214+ if (id == "sessionid") {
4215+ return QDBusObjectPath("/mocksession/login1");
4216+ } else {
4217+ return QDBusObjectPath();
4218+ }
4219+}
4220
4221=== added file 'tests/plugins/SessionManager/LoginManagerServer.h'
4222--- tests/plugins/SessionManager/LoginManagerServer.h 1970-01-01 00:00:00 +0000
4223+++ tests/plugins/SessionManager/LoginManagerServer.h 2014-05-29 14:11:15 +0000
4224@@ -0,0 +1,37 @@
4225+/*
4226+ * Copyright 2013 Canonical Ltd.
4227+ *
4228+ * This program is free software: you can redistribute it and/or modify it
4229+ * under the terms of the GNU General Public License version 3, as published
4230+ * by the Free Software Foundation.
4231+ *
4232+ * This program is distributed in the hope that it will be useful, but
4233+ * WITHOUT ANY WARRANTY; without even the implied warranties of
4234+ * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
4235+ * PURPOSE. See the GNU General Public License for more details.
4236+ *
4237+ * You should have received a copy of the GNU General Public License
4238+ * version 3 along with this program. If not, see
4239+ * <http://www.gnu.org/licenses/>
4240+ *
4241+ * Authored by: Michael Terry <michael.terry@canonical.com>
4242+ */
4243+
4244+#ifndef UNITY_LOGINMANAGERSERVER_H
4245+#define UNITY_LOGINMANAGERSERVER_H
4246+
4247+#include <QtCore/QObject>
4248+#include <QtDBus/QDBusObjectPath>
4249+
4250+class LoginManagerServer: public QObject
4251+{
4252+ Q_OBJECT
4253+
4254+public:
4255+ explicit LoginManagerServer(QObject *parent = 0);
4256+
4257+public Q_SLOTS:
4258+ QDBusObjectPath GetSession(const QString &id);
4259+};
4260+
4261+#endif
4262
4263=== added file 'tests/plugins/SessionManager/LoginSessionServer.cpp'
4264--- tests/plugins/SessionManager/LoginSessionServer.cpp 1970-01-01 00:00:00 +0000
4265+++ tests/plugins/SessionManager/LoginSessionServer.cpp 2014-05-29 14:11:15 +0000
4266@@ -0,0 +1,25 @@
4267+/*
4268+ * Copyright 2013 Canonical Ltd.
4269+ *
4270+ * This program is free software: you can redistribute it and/or modify it
4271+ * under the terms of the GNU General Public License version 3, as published
4272+ * by the Free Software Foundation.
4273+ *
4274+ * This program is distributed in the hope that it will be useful, but
4275+ * WITHOUT ANY WARRANTY; without even the implied warranties of
4276+ * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
4277+ * PURPOSE. See the GNU General Public License for more details.
4278+ *
4279+ * You should have received a copy of the GNU General Public License
4280+ * version 3 along with this program. If not, see
4281+ * <http://www.gnu.org/licenses/>
4282+ *
4283+ * Authored by: Michael Terry <michael.terry@canonical.com>
4284+ */
4285+
4286+#include "LoginSessionServer.h"
4287+
4288+LoginSessionServer::LoginSessionServer(QObject *parent)
4289+ : QObject(parent)
4290+{
4291+}
4292
4293=== added file 'tests/plugins/SessionManager/LoginSessionServer.h'
4294--- tests/plugins/SessionManager/LoginSessionServer.h 1970-01-01 00:00:00 +0000
4295+++ tests/plugins/SessionManager/LoginSessionServer.h 2014-05-29 14:11:15 +0000
4296@@ -0,0 +1,39 @@
4297+/*
4298+ * Copyright 2013 Canonical Ltd.
4299+ *
4300+ * This program is free software: you can redistribute it and/or modify it
4301+ * under the terms of the GNU General Public License version 3, as published
4302+ * by the Free Software Foundation.
4303+ *
4304+ * This program is distributed in the hope that it will be useful, but
4305+ * WITHOUT ANY WARRANTY; without even the implied warranties of
4306+ * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
4307+ * PURPOSE. See the GNU General Public License for more details.
4308+ *
4309+ * You should have received a copy of the GNU General Public License
4310+ * version 3 along with this program. If not, see
4311+ * <http://www.gnu.org/licenses/>
4312+ *
4313+ * Authored by: Michael Terry <michael.terry@canonical.com>
4314+ */
4315+
4316+#ifndef UNITY_LOGINSESSIONSERVER_H
4317+#define UNITY_LOGINSESSIONSERVER_H
4318+
4319+#include <QtCore/QObject>
4320+#include <QtCore/QStringList>
4321+#include <QtCore/QVariant>
4322+#include <QtCore/QVariantMap>
4323+
4324+class LoginSessionServer: public QObject
4325+{
4326+ Q_OBJECT
4327+
4328+public:
4329+ explicit LoginSessionServer(QObject *parent = 0);
4330+
4331+Q_SIGNALS:
4332+ void PropertiesChanged(const QString &interface, const QVariantMap &changed, const QStringList &invalid);
4333+};
4334+
4335+#endif
4336
4337=== added file 'tests/plugins/SessionManager/client.cpp'
4338--- tests/plugins/SessionManager/client.cpp 1970-01-01 00:00:00 +0000
4339+++ tests/plugins/SessionManager/client.cpp 2014-05-29 14:11:15 +0000
4340@@ -0,0 +1,88 @@
4341+/*
4342+ * Copyright 2013 Canonical Ltd.
4343+ *
4344+ * This program is free software: you can redistribute it and/or modify it
4345+ * under the terms of the GNU General Public License version 3, as published
4346+ * by the Free Software Foundation.
4347+ *
4348+ * This program is distributed in the hope that it will be useful, but
4349+ * WITHOUT ANY WARRANTY; without even the implied warranties of
4350+ * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
4351+ * PURPOSE. See the GNU General Public License for more details.
4352+ *
4353+ * You should have received a copy of the GNU General Public License
4354+ * version 3 along with this program. If not, see
4355+ * <http://www.gnu.org/licenses/>
4356+ *
4357+ * Authored by: Michael Terry <michael.terry@canonical.com>
4358+ */
4359+
4360+#include "SessionManager.h"
4361+#include <QtTest/QSignalSpy>
4362+#include <QtTest/QTest>
4363+
4364+
4365+// These tests assume the following behavior from our mock logind server:
4366+// * IsActive will return false
4367+// * Lock() will emit an ActiveChanged(true) signal
4368+//
4369+// This should lead to the following behavior from our SessionManager plugin:
4370+// * Starts active
4371+// * Becomes inactive once it connects to logind and sees IsActive result
4372+// * Becomes active once Lock() is called (which isn't really sensible, but
4373+// it's just a mock)
4374+
4375+class SessionManagerTest : public QObject
4376+{
4377+ Q_OBJECT
4378+
4379+private Q_SLOTS:
4380+
4381+ void waitForChange(SessionManager *session)
4382+ {
4383+ // Wait 5 seconds for initial activeChanged signal
4384+ QSignalSpy spy(session, SIGNAL(activeChanged()));
4385+ int i = 0;
4386+ while (spy.count() == 0 && i++ < 50)
4387+ QTest::qWait(100);
4388+ QCOMPARE(spy.count(), 1);
4389+ }
4390+
4391+ void testAssumeActive()
4392+ {
4393+ // Test that active() starts as true before we connect to service
4394+ SessionManager session;
4395+ QCOMPARE(session.active(), true);
4396+ }
4397+
4398+ void testSafeLock()
4399+ {
4400+ // Test that lock() doesn't crash if used before we connect to service
4401+ // (i.e. just test that we're not being stupid about pointers)
4402+ SessionManager session;
4403+ session.lock();
4404+ }
4405+
4406+ void testInitialSignal()
4407+ {
4408+ // Test that we get notified of change once we connect to service
4409+ SessionManager session;
4410+ waitForChange(&session);
4411+ QCOMPARE(session.active(), false);
4412+ }
4413+
4414+ void testLock()
4415+ {
4416+ // Test that lock() gets called correctly and that we listen for
4417+ // the activeChanged signal too.
4418+ SessionManager session;
4419+ waitForChange(&session);
4420+ session.lock();
4421+ waitForChange(&session);
4422+ QCOMPARE(session.active(), true);
4423+ }
4424+};
4425+
4426+QTEST_MAIN(SessionManagerTest)
4427+