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

Proposed by Michael Terry
Status: Merged
Approved by: Albert Astals Cid
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) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
MichaƂ Sawicz Needs Fixing
Timo Jyrinki Needs Fixing
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.
Revision history for this message
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)
Revision history for this message
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)
Revision history for this message
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)
Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

Doesn't merge cleanly with trunk

review: Needs Fixing
Revision history for this message
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)
Revision history for this message
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)
Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

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

Revision history for this message
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?

Revision history for this message
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)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
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).

Revision history for this message
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)
Revision history for this message
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)
Revision history for this message
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)
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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
Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

No test replacement for test_searchIndicatorHidesOnGreeterShown ?

review: Needs Fixing
Revision history for this message
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
Revision history for this message
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

Revision history for this message
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)
Revision history for this message
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)
Revision history for this message
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)
Revision history for this message
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)
Revision history for this message
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)
Revision history for this message
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)
Revision history for this message
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)
Revision history for this message
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
223. By Michael Terry

Merge greeter-ux-fixes again

Revision history for this message
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)
Revision history for this message
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)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Text conflict in tests/qmltests/CMakeLists.txt

review: Needs Fixing
lp:~mterry/unity8/split updated
224. By Michael Terry

Merge in greeter-ux-fixes

Revision history for this message
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)
Revision history for this message
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
225. By Michael Terry

Merge from greeter-ux-fixes

Revision history for this message
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)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Text conflict in tests/qmltests/CMakeLists.txt

review: Needs Fixing
lp:~mterry/unity8/split updated
226. By Michael Terry

Merge from greeter-ux-fixes

Revision history for this message
Michael Terry (mterry) wrote :

OK, merged from trunk.

Revision history for this message
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
227. By Michael Terry

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

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

Revision history for this message
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)
Revision history for this message
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
229. By Michael Terry

Merge from greeter-ux-fixes

Revision history for this message
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)
Revision history for this message
Albert Astals Cid (aacid) wrote :

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

review: Needs Fixing
lp:~mterry/unity8/split updated
230. By Michael Terry

Merge from trunk

Revision history for this message
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
231. By Michael Terry

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

Revision history for this message
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)
Revision history for this message
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)
Revision history for this message
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
232. By Michael Terry

Merge from greeter-ux-fixes

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~mterry/unity8/split updated
233. By Michael Terry

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

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~mterry/unity8/split updated
234. By Michael Terry

Test

235. By Michael Terry

Fix indicators not coming up in split session

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~mterry/unity8/split updated
236. By Michael Terry

Remove testing code that slipped in

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~mterry/unity8/split updated
237. By Michael Terry

Use new resettable support in lightdm

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
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
238. By Michael Terry

Merge from trunk

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~mterry/unity8/split updated
239. By Michael Terry

Merge from trunk

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~mterry/unity8/split updated
240. By Michael Terry

Remove fade in animations for now

241. By Michael Terry

Merge from trunk

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~mterry/unity8/split updated
242. By Michael Terry

Merge from trunk

243. By Michael Terry

Fix debian/changelog

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~mterry/unity8/split updated
244. By Michael Terry

Mark as resettable before connecting to LightDM

245. By Michael Terry

Specify minimum version of liblightdm needed

246. By Michael Terry

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

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~mterry/unity8/split updated
247. By Michael Terry

Fix autopilot tests

248. By Michael Terry

Stop the swipe hint animation when greeter is swiped away

249. By Michael Terry

Fix syncing of stored launcher items

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
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.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~mterry/unity8/split updated
250. By Michael Terry

Disable ofono using pulseaudio

251. By Michael Terry

Merge from trunk

252. By Michael Terry

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

253. By Michael Terry

Add back darkener-rectangle for infographic use

254. By Michael Terry

Consolidate unity8-greeter session upstart scripts

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~mterry/unity8/split updated
255. By Michael Terry

Merge from trunk

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
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
Revision history for this message
Albert Astals Cid (aacid) wrote :

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

Why?

review: Needs Information
Revision history for this message
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
Revision history for this message
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
Revision history for this message
Albert Astals Cid (aacid) wrote :

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

Revision history for this message
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
256. By Michael Terry

Review fixes

Revision history for this message
Michael Terry (mterry) wrote :

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

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
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
257. By Michael Terry

Merge from trunk

258. By Michael Terry

Drop unneeded QScreen include

Revision history for this message
Michael Terry (mterry) wrote :

Done, Albert.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~mterry/unity8/split updated
259. By Michael Terry

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

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~mterry/unity8/split updated
260. By Michael Terry

Whoops, requestHomeShown support must have gotten lost in a merge

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
lp:~mterry/unity8/split updated
261. By Michael Terry

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

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~mterry/unity8/split updated
262. By Michael Terry

Merge from trunk

263. By Michael Terry

Remove unneeded Revealer, especially since the Revealer class is dead

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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
Revision history for this message
MichaƂ Sawicz (saviq) wrote :

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

Revision history for this message
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
Revision history for this message
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...

Revision history for this message
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
264. By Michael Terry

Animate away the tablet greeter when clicking Tap to Unlock

265. By Michael Terry

Set locale as well as language when starting greeter

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
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

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
lp:~mterry/unity8/split updated
266. By Michael Terry

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

Revision history for this message
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.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
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
267. By Michael Terry

Fix background for sim lockscreen

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
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
268. By Michael Terry

Make launcher available in tablet mode again

Revision history for this message
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...

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
lp:~mterry/unity8/split updated
269. By Michael Terry

Hide indicators as well as launcher when session becomes inactive

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

debian/changelog needs correct merging

review: Needs Fixing
Revision history for this message
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
270. By Michael Terry

Merge from trunk

271. By Michael Terry

Fix notification margins

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

debian/Changelog got fixed, back to approved for me

review: Approve
Revision history for this message
MichaƂ Sawicz (saviq) wrote :

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

Revision history for this message
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?

Revision history for this message
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.

Revision history for this message
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?

Revision history for this message
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

Revision history for this message
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
272. By Michael Terry

Merge from trunk

273. By Michael Terry

Handle short appIds in launcher data

274. By Michael Terry

Add method to mock

275. By Michael Terry

undo accidental commits

276. By Michael Terry

More reliably mark greeter as re-enabled

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2014-04-24 14:13:21 +0000
+++ CMakeLists.txt 2014-05-29 14:11:15 +0000
@@ -96,6 +96,7 @@
96declare_autopilot_test(shell unity8.shell ${CMAKE_SOURCE_DIR}/tests/autopilot/)96declare_autopilot_test(shell unity8.shell ${CMAKE_SOURCE_DIR}/tests/autopilot/)
9797
98set(SHELL_APP unity8)98set(SHELL_APP unity8)
99set(GREETER_APP unity8-greeter)
99set(SCOPE_TOOL unity-scope-tool)100set(SCOPE_TOOL unity-scope-tool)
100101
101include_directories(102include_directories(
102103
=== added file 'data/51-unity8-greeter.conf'
--- data/51-unity8-greeter.conf 1970-01-01 00:00:00 +0000
+++ data/51-unity8-greeter.conf 2014-05-29 14:11:15 +0000
@@ -0,0 +1,2 @@
1[SeatDefaults]
2greeter-session=unity8-greeter
03
=== modified file 'data/CMakeLists.txt'
--- data/CMakeLists.txt 2014-04-22 13:17:52 +0000
+++ data/CMakeLists.txt 2014-05-29 14:11:15 +0000
@@ -1,7 +1,20 @@
1# generate desktop file1# generate desktop file
2configure_file(${SHELL_APP}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${SHELL_APP}.desktop @ONLY)2configure_file(${SHELL_APP}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${SHELL_APP}.desktop @ONLY)
3configure_file(${GREETER_APP}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${GREETER_APP}.desktop @ONLY)
34
4# install desktop files5# install desktop files
5install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SHELL_APP}.desktop6install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SHELL_APP}.desktop
6 DESTINATION ${CMAKE_INSTALL_DATADIR}/applications7 DESTINATION ${CMAKE_INSTALL_DATADIR}/applications
7 )8 )
9install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GREETER_APP}.desktop
10 DESTINATION ${CMAKE_INSTALL_DATADIR}/lightdm/greeters
11 )
12install(FILES 51-${GREETER_APP}.conf
13 DESTINATION ${CMAKE_INSTALL_DATADIR}/lightdm/lightdm.conf.d
14 )
15install(FILES ${GREETER_APP}-wrapper
16 DESTINATION ${CMAKE_INSTALL_BINDIR}
17 )
18install(FILES ${GREETER_APP}-init.conf
19 DESTINATION ${CMAKE_INSTALL_DATADIR}/upstart/sessions
20 )
821
=== added file 'data/unity8-greeter-init.conf'
--- data/unity8-greeter-init.conf 1970-01-01 00:00:00 +0000
+++ data/unity8-greeter-init.conf 2014-05-29 14:11:15 +0000
@@ -0,0 +1,12 @@
1description "Unity 8 Greeter initialization"
2author "Michael Terry <mterry@ubuntu.com>"
3
4start on unity8-greeter-started
5task
6emits indicator-services-start
7
8script
9 start --no-wait ofono-setup || true
10 initctl emit --no-wait indicator-services-start || true
11 start --no-wait maliit-server || true
12end script
013
=== added file 'data/unity8-greeter-wrapper'
--- data/unity8-greeter-wrapper 1970-01-01 00:00:00 +0000
+++ data/unity8-greeter-wrapper 2014-05-29 14:11:15 +0000
@@ -0,0 +1,98 @@
1#!/bin/sh
2# -*- Mode: sh; indent-tabs-mode: nil; tab-width: 4 -*-
3#
4# Copyright (C) 2011,2013 Canonical Ltd
5# Author: Michael Terry <michael.terry@canonical.com>
6#
7# This program is free software: you can redistribute it and/or modify it under
8# the terms of the GNU General Public License as published by the Free Software
9# Foundation, version 3 of the License.
10#
11# See http://www.gnu.org/copyleft/gpl.html the full text of the license.
12
13# This wrapper merely ensures that init and friends live only as long as this
14# script does. Otherwise, it's very easy for some processes to not notice that
15# the session died. We could try to do this in-process, but we want to do this
16# cleanup even if the greeter aborts.
17
18trap cleanup TERM EXIT
19
20cleanup()
21{
22 trap - TERM EXIT
23 # Kill upstart and indicators
24 if [ -n "$INIT_PID" ]; then
25 kill "$INIT_PID"
26 fi
27 if [ -n "$CMD_PID" ]; then
28 kill "$CMD_PID"
29 fi
30 exit 0
31}
32
33set_greeter_var()
34{
35 export "$1=$2"
36 gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.UpdateActivationEnvironment "{'$1': '$2'}"
37 if [ -n "$INIT_PID" ]; then
38 initctl set-env --global "$1=$2"
39 fi
40}
41
42SUB_SOCKET=$XDG_RUNTIME_DIR/mir_socket
43rm -f $SUB_SOCKET # clear socket in case we were hard shut down
44
45# If touch session script (which sets up grid units and mir variables) is available, use it
46TOUCH_WRAPPER=
47if [ -x /usr/bin/ubuntu-touch-session ]; then
48 TOUCH_WRAPPER=/usr/bin/ubuntu-touch-session
49fi
50
51# Pretend that we're in an ubuntu-touch session, so that indicator-network
52# will start.
53export DESKTOP_SESSION=ubuntu-touch
54
55# We disable ofono using pulse. It causes problems with racing with the user's
56# pulse. We need to come up with a better long-term fix for this, because we
57# eventually need the greeter to play ringtones for users that aren't logged in.
58set_greeter_var PA_DISABLED 1
59
60# Normal unity8 sessions are entirely driven by Upstart. But greeters
61# are special. They need access to the file descriptors that lightdm
62# creates for them and don't want to start all the services that a normal
63# session would. So it's inconvenient to live within an upstart session.
64# But... we still want to use Upstart for some services. So launch here.
65USC_SOCKET=$MIR_SOCKET MIR_SOCKET=$SUB_SOCKET $TOUCH_WRAPPER /sbin/init --user --no-startup-event &
66INIT_PID=$!
67while [ ! -e "$XDG_RUNTIME_DIR/upstart/sessions/$INIT_PID.session" ]; do sleep 0.1; done
68export UPSTART_SESSION=$(/sbin/initctl list-sessions | grep "^$INIT_PID " | cut -d' ' -f2)
69
70# Start any pre-greeter tasks if needed (like wizard)
71/sbin/initctl emit unity8-greeter-starting
72
73# Define language here for phone if available. When phone user switches their
74# language, they expect that to affect the greeter too. But the user doesn't
75# have permission to switch system language, only their own. So we notice if
76# the phablet user exists and use their language if so. TODO: talk to design
77# about whether we should switch language on fly as users are selected (this
78# is very hard to do technically).
79#
80# Do this after unity8-greeter-starting, in case a customization upstart job
81# changes language.
82if [ "$(id -u phablet 2>/dev/null)" = "32011" ]; then
83 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)
84 if [ -n "$USER_LANG" ]; then
85 set_greeter_var LANGUAGE "$USER_LANG"
86 fi
87 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)
88 if [ -n "$USER_LOCALE" ]; then
89 set_greeter_var LANG "$USER_LOCALE"
90 set_greeter_var LC_ALL "$USER_LOCALE"
91 fi
92fi
93
94# And finally actually start the greeter
95exec env MIR_SERVER_FILE=$SUB_SOCKET $TOUCH_WRAPPER $@ &
96CMD_PID=$!
97wait $CMD_PID
98CMD_PID=
099
=== added file 'data/unity8-greeter.desktop.in'
--- data/unity8-greeter.desktop.in 1970-01-01 00:00:00 +0000
+++ data/unity8-greeter.desktop.in 2014-05-29 14:11:15 +0000
@@ -0,0 +1,5 @@
1[Desktop Entry]
2Type=Application
3Name=Unity 8 Greeter
4Exec=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/unity8-greeter-wrapper @CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/unity8-greeter
5X-LightDM-Session-Type=mir
06
=== modified file 'debian/changelog'
--- debian/changelog 2014-05-27 07:47:11 +0000
+++ debian/changelog 2014-05-29 14:11:15 +0000
@@ -1,3 +1,9 @@
1unity8 (7.87+14.10.20140505-0ubuntu1) UNRELEASED; urgency=medium
2
3 * Bump version for Breaks due to unity8-greeter
4
5 -- Michael Terry <mterry@ubuntu.com> Wed, 02 Apr 2014 14:39:45 -0400
6
1unity8 (7.86+14.10.20140527-0ubuntu1) utopic; urgency=low7unity8 (7.86+14.10.20140527-0ubuntu1) utopic; urgency=low
28
3 [ Andrea Cimitan ]9 [ Andrea Cimitan ]
410
=== modified file 'debian/control'
--- debian/control 2014-05-05 12:09:22 +0000
+++ debian/control 2014-05-29 14:11:15 +0000
@@ -14,6 +14,7 @@
14 libglib2.0-dev,14 libglib2.0-dev,
15 libgsettings-qt-dev,15 libgsettings-qt-dev,
16 libhud-client2-dev,16 libhud-client2-dev,
17 liblightdm-qt5-3-dev (>= 1.11.1),
17 libpulse-dev,18 libpulse-dev,
18 libqmenumodel-dev (>= 0.2.7),19 libqmenumodel-dev (>= 0.2.7),
19 libqt5xmlpatterns5-dev,20 libqt5xmlpatterns5-dev,
@@ -79,6 +80,7 @@
79 qml-module-qtquick-xmllistmodel,80 qml-module-qtquick-xmllistmodel,
80 qtdeclarative5-gsettings1.0,81 qtdeclarative5-gsettings1.0,
81 qtdeclarative5-ubuntu-settings-components,82 qtdeclarative5-ubuntu-settings-components,
83 unity-greeter-session-broadcast,
82 unity-launcher-impl-3,84 unity-launcher-impl-3,
83 unity8-common (= ${source:Version}),85 unity8-common (= ${source:Version}),
84 unity8-private (= ${binary:Version}),86 unity8-private (= ${binary:Version}),
@@ -94,6 +96,19 @@
94Description: Unity 8 shell96Description: Unity 8 shell
95 The Unity 8 shell is the primary user interface for Ubuntu devices.97 The Unity 8 shell is the primary user interface for Ubuntu devices.
9698
99Package: unity8-greeter
100Architecture: any
101Depends: dbus-x11,
102 libglib2.0-bin,
103 lightdm,
104 unity8 (= ${source:Version}),
105 ${misc:Depends},
106 ${shlibs:Depends},
107Breaks: unity8 (<< 7.87),
108Replaces: unity8 (<< 7.87),
109Description: Ubuntu QML greeter
110 The Ubuntu QML greeter is the primary greeter for Ubuntu devices.
111
97Package: unity8-common112Package: unity8-common
98Architecture: all113Architecture: all
99Depends: qtdeclarative5-ubuntu-thumbnailer0.1 | ubuntu-thumbnailer-impl,114Depends: qtdeclarative5-ubuntu-thumbnailer0.1 | ubuntu-thumbnailer-impl,
@@ -132,6 +147,7 @@
132 ubuntu-ui-toolkit-autopilot,147 ubuntu-ui-toolkit-autopilot,
133 unity8 (= ${source:Version}),148 unity8 (= ${source:Version}),
134 unity8-fake-env (= ${source:Version}),149 unity8-fake-env (= ${source:Version}),
150 unity8-greeter (= ${source:Version}),
135 url-dispatcher-tools,151 url-dispatcher-tools,
136 ${misc:Depends},152 ${misc:Depends},
137 ${python3:Depends},153 ${python3:Depends},
138154
=== modified file 'debian/copyright'
--- debian/copyright 2013-06-26 08:16:38 +0000
+++ debian/copyright 2014-05-29 14:11:15 +0000
@@ -22,7 +22,7 @@
22 On Debian systems, the full text of the GNU General Public License22 On Debian systems, the full text of the GNU General Public License
23 version 3 can be found in the file /usr/share/common-licenses/GPL-3.23 version 3 can be found in the file /usr/share/common-licenses/GPL-3.
2424
25Files: tests/mocks/LightDM/UsersModel.h tests/mocks/LightDM/Greeter.h25Files: tests/mocks/liblightdm/UsersModel.h tests/mocks/liblightdm/Greeter.h
26Copyright: 2013 Canonical Ltd.26Copyright: 2013 Canonical Ltd.
27 2010-2011 David Edmundson27 2010-2011 David Edmundson
28 2010-2011 Robert Ancell28 2010-2011 Robert Ancell
2929
=== modified file 'debian/rules'
--- debian/rules 2014-05-05 08:50:25 +0000
+++ debian/rules 2014-05-29 14:11:15 +0000
@@ -34,7 +34,3 @@
34# use private lib directories34# use private lib directories
35override_dh_makeshlibs:35override_dh_makeshlibs:
36 dh_makeshlibs -Nunity8-private -Nunity8-fake-env36 dh_makeshlibs -Nunity8-private -Nunity8-fake-env
37
38# libMockLightDM-qml.so links against liblightdm-qt5-2.so which doesn't exist
39override_dh_shlibdeps:
40 dh_shlibdeps -XlibMockLightDM-qml.so
4137
=== added file 'debian/unity8-greeter.install'
--- debian/unity8-greeter.install 1970-01-01 00:00:00 +0000
+++ debian/unity8-greeter.install 2014-05-29 14:11:15 +0000
@@ -0,0 +1,6 @@
1usr/bin/unity8-greeter
2usr/bin/unity8-greeter-wrapper
3usr/share/lightdm
4usr/share/unity8/GreeterShell.qml
5usr/share/unity8/Greeter
6usr/share/upstart/sessions/unity8-greeter-*.conf
07
=== modified file 'debian/unity8-private.install'
--- debian/unity8-private.install 2014-05-06 08:44:10 +0000
+++ debian/unity8-private.install 2014-05-29 14:11:15 +0000
@@ -4,6 +4,7 @@
4usr/lib/*/unity8/qml/LightDM4usr/lib/*/unity8/qml/LightDM
5usr/lib/*/unity8/qml/Powerd5usr/lib/*/unity8/qml/Powerd
6usr/lib/*/unity8/qml/SessionBroadcast6usr/lib/*/unity8/qml/SessionBroadcast
7usr/lib/*/unity8/qml/SessionManager
7usr/lib/*/unity8/qml/Ubuntu8usr/lib/*/unity8/qml/Ubuntu
8usr/lib/*/unity8/qml/Unity9usr/lib/*/unity8/qml/Unity
9usr/lib/*/unity8/qml/Utils10usr/lib/*/unity8/qml/Utils
1011
=== modified file 'debian/unity8.install'
--- debian/unity8.install 2014-05-07 10:30:14 +0000
+++ debian/unity8.install 2014-05-29 14:11:15 +0000
@@ -1,7 +1,6 @@
1data/unity8.conf usr/share/upstart/sessions/1data/unity8.conf usr/share/upstart/sessions/
2usr/bin/unity82usr/bin/unity8
3usr/share/applications/unity8.desktop3usr/share/applications/unity8.desktop
4usr/share/unity8/Greeter
5usr/share/unity8/Hud4usr/share/unity8/Hud
6usr/share/unity8/Launcher5usr/share/unity8/Launcher
7usr/share/unity8/Panel6usr/share/unity8/Panel
87
=== modified file 'plugins/AccountsService/AccountsService.cpp'
--- plugins/AccountsService/AccountsService.cpp 2013-10-11 13:32:36 +0000
+++ plugins/AccountsService/AccountsService.cpp 2014-05-29 14:11:15 +0000
@@ -24,7 +24,6 @@
24AccountsService::AccountsService(QObject* parent)24AccountsService::AccountsService(QObject* parent)
25 : QObject(parent),25 : QObject(parent),
26 m_service(new AccountsServiceDBusAdaptor(this)),26 m_service(new AccountsServiceDBusAdaptor(this)),
27 m_user(qgetenv("USER")),
28 m_demoEdges(false),27 m_demoEdges(false),
29 m_statsWelcomeScreen(false)28 m_statsWelcomeScreen(false)
30{29{
@@ -32,6 +31,9 @@
32 this, SLOT(propertiesChanged(const QString &, const QString &, const QStringList &)));31 this, SLOT(propertiesChanged(const QString &, const QString &, const QStringList &)));
33 connect(m_service, SIGNAL(maybeChanged(const QString &)),32 connect(m_service, SIGNAL(maybeChanged(const QString &)),
34 this, SLOT(maybeChanged(const QString &)));33 this, SLOT(maybeChanged(const QString &)));
34
35 setUser(qgetenv("USER"));
36 updateDemoEdgesForCurrentUser();
35}37}
3638
37QString AccountsService::user() const39QString AccountsService::user() const
@@ -57,9 +59,22 @@
57void AccountsService::setDemoEdges(bool demoEdges)59void AccountsService::setDemoEdges(bool demoEdges)
58{60{
59 m_demoEdges = demoEdges;61 m_demoEdges = demoEdges;
62 Q_EMIT demoEdgesChanged();
60 m_service->setUserProperty(m_user, "com.canonical.unity.AccountsService", "demo-edges", demoEdges);63 m_service->setUserProperty(m_user, "com.canonical.unity.AccountsService", "demo-edges", demoEdges);
61}64}
6265
66bool AccountsService::demoEdgesForCurrentUser() const
67{
68 return m_demoEdgesForCurrentUser;
69}
70
71void AccountsService::setDemoEdgesForCurrentUser(bool demoEdgesForCurrentUser)
72{
73 m_demoEdgesForCurrentUser = demoEdgesForCurrentUser;
74 Q_EMIT demoEdgesForCurrentUserChanged();
75 m_service->setUserProperty(qgetenv("USER"), "com.canonical.unity.AccountsService", "demo-edges", demoEdgesForCurrentUser);
76}
77
63QString AccountsService::backgroundFile() const78QString AccountsService::backgroundFile() const
64{79{
65 return m_backgroundFile;80 return m_backgroundFile;
@@ -79,6 +94,15 @@
79 }94 }
80}95}
8196
97void AccountsService::updateDemoEdgesForCurrentUser()
98{
99 auto demoEdgesForCurrentUser = m_service->getUserProperty(qgetenv("USER"), "com.canonical.unity.AccountsService", "demo-edges").toBool();
100 if (m_demoEdgesForCurrentUser != demoEdgesForCurrentUser) {
101 m_demoEdgesForCurrentUser = demoEdgesForCurrentUser;
102 Q_EMIT demoEdgesForCurrentUserChanged();
103 }
104}
105
82void AccountsService::updateBackgroundFile()106void AccountsService::updateBackgroundFile()
83{107{
84 auto backgroundFile = m_service->getUserProperty(m_user, "org.freedesktop.Accounts.User", "BackgroundFile").toString();108 auto backgroundFile = m_service->getUserProperty(m_user, "org.freedesktop.Accounts.User", "BackgroundFile").toString();
@@ -99,13 +123,14 @@
99123
100void AccountsService::propertiesChanged(const QString &user, const QString &interface, const QStringList &changed)124void AccountsService::propertiesChanged(const QString &user, const QString &interface, const QStringList &changed)
101{125{
102 if (m_user != user) {
103 return;
104 }
105
106 if (interface == "com.canonical.unity.AccountsService") {126 if (interface == "com.canonical.unity.AccountsService") {
107 if (changed.contains("demo-edges")) {127 if (changed.contains("demo-edges")) {
108 updateDemoEdges();128 if (qgetenv("USER") == user) {
129 updateDemoEdgesForCurrentUser();
130 }
131 if (m_user == user) {
132 updateDemoEdges();
133 }
109 }134 }
110 } else if (interface == "com.ubuntu.touch.AccountsService.SecurityPrivacy") {135 } else if (interface == "com.ubuntu.touch.AccountsService.SecurityPrivacy") {
111 if (changed.contains("StatsWelcomeScreen")) {136 if (changed.contains("StatsWelcomeScreen")) {
@@ -116,10 +141,8 @@
116141
117void AccountsService::maybeChanged(const QString &user)142void AccountsService::maybeChanged(const QString &user)
118{143{
119 if (m_user != user) {144 if (m_user == user) {
120 return;145 // Standard properties might have changed
146 updateBackgroundFile();
121 }147 }
122
123 // Standard properties might have changed
124 updateBackgroundFile();
125}148}
126149
=== modified file 'plugins/AccountsService/AccountsService.h'
--- plugins/AccountsService/AccountsService.h 2013-09-24 18:50:56 +0000
+++ plugins/AccountsService/AccountsService.h 2014-05-29 14:11:15 +0000
@@ -35,6 +35,10 @@
35 READ demoEdges35 READ demoEdges
36 WRITE setDemoEdges36 WRITE setDemoEdges
37 NOTIFY demoEdgesChanged)37 NOTIFY demoEdgesChanged)
38 Q_PROPERTY (bool demoEdgesForCurrentUser
39 READ demoEdgesForCurrentUser
40 WRITE setDemoEdgesForCurrentUser
41 NOTIFY demoEdgesForCurrentUserChanged)
38 Q_PROPERTY (QString backgroundFile42 Q_PROPERTY (QString backgroundFile
39 READ backgroundFile43 READ backgroundFile
40 NOTIFY backgroundFileChanged)44 NOTIFY backgroundFileChanged)
@@ -49,12 +53,15 @@
49 void setUser(const QString &user);53 void setUser(const QString &user);
50 bool demoEdges() const;54 bool demoEdges() const;
51 void setDemoEdges(bool demoEdges);55 void setDemoEdges(bool demoEdges);
56 bool demoEdgesForCurrentUser() const;
57 void setDemoEdgesForCurrentUser(bool demoEdgesForCurrentUser);
52 QString backgroundFile() const;58 QString backgroundFile() const;
53 bool statsWelcomeScreen() const;59 bool statsWelcomeScreen() const;
5460
55Q_SIGNALS:61Q_SIGNALS:
56 void userChanged();62 void userChanged();
57 void demoEdgesChanged();63 void demoEdgesChanged();
64 void demoEdgesForCurrentUserChanged();
58 void backgroundFileChanged();65 void backgroundFileChanged();
59 void statsWelcomeScreenChanged();66 void statsWelcomeScreenChanged();
6067
@@ -64,12 +71,14 @@
6471
65private:72private:
66 void updateDemoEdges();73 void updateDemoEdges();
74 void updateDemoEdgesForCurrentUser();
67 void updateBackgroundFile();75 void updateBackgroundFile();
68 void updateStatsWelcomeScreen();76 void updateStatsWelcomeScreen();
6977
70 AccountsServiceDBusAdaptor *m_service;78 AccountsServiceDBusAdaptor *m_service;
71 QString m_user;79 QString m_user;
72 bool m_demoEdges;80 bool m_demoEdges;
81 bool m_demoEdgesForCurrentUser;
73 QString m_backgroundFile;82 QString m_backgroundFile;
74 bool m_statsWelcomeScreen;83 bool m_statsWelcomeScreen;
75};84};
7685
=== modified file 'plugins/CMakeLists.txt'
--- plugins/CMakeLists.txt 2014-05-14 10:11:14 +0000
+++ plugins/CMakeLists.txt 2014-05-29 14:11:15 +0000
@@ -17,6 +17,7 @@
17add_subdirectory(Dash)17add_subdirectory(Dash)
18add_subdirectory(Powerd)18add_subdirectory(Powerd)
19add_subdirectory(SessionBroadcast)19add_subdirectory(SessionBroadcast)
20add_subdirectory(SessionManager)
20add_subdirectory(Ubuntu)21add_subdirectory(Ubuntu)
21add_subdirectory(Unity)22add_subdirectory(Unity)
22add_subdirectory(Utils)23add_subdirectory(Utils)
2324
=== modified file 'plugins/LightDM/CMakeLists.txt'
--- plugins/LightDM/CMakeLists.txt 2014-05-02 22:57:00 +0000
+++ plugins/LightDM/CMakeLists.txt 2014-05-29 14:11:15 +0000
@@ -1,23 +1,22 @@
1# Dependencies1# Dependencies
2include(FindPkgConfig)2include(FindPkgConfig)
3pkg_check_modules(LIBLIGHTDM REQUIRED liblightdm-qt5-3)
3pkg_check_modules(LIBUSERMETRICSOUTPUT REQUIRED libusermetricsoutput-1)4pkg_check_modules(LIBUSERMETRICSOUTPUT REQUIRED libusermetricsoutput-1)
4# TODO: Once we split out a separate greeter process, uncomment these lines
5#pkg_check_modules(LIBLIGHTDM REQUIRED liblightdm-qt5-2)
65
7include_directories(6include_directories(
8 ${CMAKE_CURRENT_SOURCE_DIR}7 ${CMAKE_CURRENT_SOURCE_DIR}
9 ${CMAKE_CURRENT_BINARY_DIR}8 ${CMAKE_CURRENT_BINARY_DIR}
10 ${CMAKE_SOURCE_DIR}/plugins/Utils9 ${CMAKE_SOURCE_DIR}/plugins/Utils
11 ${CMAKE_SOURCE_DIR}/tests/mocks/LightDM10 ${LIBLIGHTDM_INCLUDE_DIRS}
12 #${LIBLIGHTDM_INCLUDE_DIRS}
13 ${LIBUSERMETRICSOUTPUT_INCLUDE_DIRS}11 ${LIBUSERMETRICSOUTPUT_INCLUDE_DIRS}
14)12)
1513
16set(QMLPLUGIN_SRC14set(QMLPLUGIN_SRC
17 ../Utils/qsortfilterproxymodelqml.cpp # FIXME evaluate a more generic approach for using other plugins15 ${CMAKE_SOURCE_DIR}/plugins/Utils/qsortfilterproxymodelqml.cpp # FIXME evaluate a more generic approach for using other plugins
18 DBusGreeterList.cpp16 DBusGreeterList.cpp
19 Greeter.cpp17 Greeter.cpp
20 plugin.cpp18 plugin.cpp
19 URLDispatcher.cpp
21 UsersModel.cpp20 UsersModel.cpp
22 )21 )
2322
@@ -26,12 +25,10 @@
26 )25 )
2726
28target_link_libraries(LightDM-qml27target_link_libraries(LightDM-qml
29 MockLightDM-demo28 ${LIBLIGHTDM_LDFLAGS}
30# TODO: Once we split out a separate greeter process, uncomment these lines
31# ${LIBLIGHTDM_LDFLAGS}
32 ${LIBUSERMETRICSOUTPUT_LDFLAGS}29 ${LIBUSERMETRICSOUTPUT_LDFLAGS}
33 )30 )
3431
35qt5_use_modules(LightDM-qml DBus Gui Qml)32qt5_use_modules(LightDM-qml DBus Qml)
3633
37add_unity8_plugin(LightDM 0.1 LightDM TARGETS LightDM-qml)34add_unity8_plugin(LightDM 0.1 LightDM TARGETS LightDM-qml)
3835
=== modified file 'plugins/LightDM/Greeter.cpp'
--- plugins/LightDM/Greeter.cpp 2013-12-03 11:43:15 +0000
+++ plugins/LightDM/Greeter.cpp 2014-05-29 14:11:15 +0000
@@ -56,7 +56,10 @@
56 this, SLOT(showPromptFilter(QString, QLightDM::Greeter::PromptType)));56 this, SLOT(showPromptFilter(QString, QLightDM::Greeter::PromptType)));
57 connect(d->m_greeter, SIGNAL(authenticationComplete()),57 connect(d->m_greeter, SIGNAL(authenticationComplete()),
58 this, SLOT(authenticationCompleteFilter()));58 this, SLOT(authenticationCompleteFilter()));
59 connect(d->m_greeter, SIGNAL(idle()), this, SIGNAL(idle()));
60 connect(d->m_greeter, SIGNAL(reset()), this, SIGNAL(reset()));
5961
62 d->m_greeter->setResettable(true);
60 d->m_greeter->connectSync();63 d->m_greeter->connectSync();
61}64}
6265
6366
=== modified file 'plugins/LightDM/Greeter.h'
--- plugins/LightDM/Greeter.h 2013-12-03 11:43:15 +0000
+++ plugins/LightDM/Greeter.h 2014-05-29 14:11:15 +0000
@@ -56,6 +56,8 @@
56 void authenticationComplete();56 void authenticationComplete();
57 void authenticationUserChanged(const QString &user);57 void authenticationUserChanged(const QString &user);
58 void promptlessChanged();58 void promptlessChanged();
59 void idle();
60 void reset();
5961
60 // This signal is emitted by external agents like indicators, and the UI62 // This signal is emitted by external agents like indicators, and the UI
61 // should switch to this user if possible.63 // should switch to this user if possible.
6264
=== added file 'plugins/LightDM/URLDispatcher.cpp'
--- plugins/LightDM/URLDispatcher.cpp 1970-01-01 00:00:00 +0000
+++ plugins/LightDM/URLDispatcher.cpp 2014-05-29 14:11:15 +0000
@@ -0,0 +1,55 @@
1/*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "URLDispatcher.h"
18
19#include <QDBusConnection>
20
21class URLDispatcherInterface : public QObject
22{
23 Q_OBJECT
24 Q_CLASSINFO("D-Bus Interface", "com.canonical.URLDispatcher")
25
26public:
27 explicit URLDispatcherInterface(URLDispatcher *parent);
28
29 Q_SCRIPTABLE void DispatchURL(const QString &url);
30};
31
32URLDispatcherInterface::URLDispatcherInterface(URLDispatcher *parent)
33 : QObject(parent)
34{
35}
36
37void URLDispatcherInterface::DispatchURL(const QString &url)
38{
39 Q_EMIT static_cast<URLDispatcher *>(parent())->dispatchURL(url);
40}
41
42URLDispatcher::URLDispatcher(QObject *parent)
43 : QObject(parent)
44{
45 // This class also manages our url-dispatcher interception. We intercept
46 // url-dispatcher because rather than spawning the handler for the URL in
47 // our own session, we want to do notify the user session to do it for us
48 // (and start an unlock in the process).
49 QDBusConnection connection = QDBusConnection::sessionBus();
50 URLDispatcherInterface *dispatcher = new URLDispatcherInterface(this);
51 connection.registerObject("/com/canonical/URLDispatcher", dispatcher, QDBusConnection::ExportScriptableContents);
52 connection.registerService("com.canonical.URLDispatcher");
53}
54
55#include "URLDispatcher.moc"
056
=== added file 'plugins/LightDM/URLDispatcher.h'
--- plugins/LightDM/URLDispatcher.h 1970-01-01 00:00:00 +0000
+++ plugins/LightDM/URLDispatcher.h 2014-05-29 14:11:15 +0000
@@ -0,0 +1,34 @@
1/*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef UNITY_URLDISPATCHER_H
18#define UNITY_URLDISPATCHER_H
19
20#include <QObject>
21#include <QString>
22
23class URLDispatcher : public QObject
24{
25 Q_OBJECT
26
27public:
28 explicit URLDispatcher(QObject *parent=0);
29
30Q_SIGNALS:
31 void dispatchURL(const QString &url);
32};
33
34#endif
035
=== modified file 'plugins/LightDM/plugin.cpp'
--- plugins/LightDM/plugin.cpp 2013-12-03 16:55:03 +0000
+++ plugins/LightDM/plugin.cpp 2014-05-29 14:11:15 +0000
@@ -20,6 +20,7 @@
20#include "plugin.h"20#include "plugin.h"
21#include "DBusGreeterList.h"21#include "DBusGreeterList.h"
22#include "Greeter.h"22#include "Greeter.h"
23#include "URLDispatcher.h"
23#include "UsersModel.h"24#include "UsersModel.h"
24#include <libusermetricsoutput/ColorTheme.h>25#include <libusermetricsoutput/ColorTheme.h>
25#include <libusermetricsoutput/UserMetrics.h>26#include <libusermetricsoutput/UserMetrics.h>
@@ -46,6 +47,13 @@
46 return greeter;47 return greeter;
47}48}
4849
50static QObject *dispatcher_provider(QQmlEngine *engine, QJSEngine *scriptEngine)
51{
52 Q_UNUSED(engine)
53 Q_UNUSED(scriptEngine)
54 return new URLDispatcher();
55}
56
49static QObject *users_provider(QQmlEngine *engine, QJSEngine *scriptEngine)57static QObject *users_provider(QQmlEngine *engine, QJSEngine *scriptEngine)
50{58{
51 Q_UNUSED(engine)59 Q_UNUSED(engine)
@@ -67,6 +75,7 @@
6775
68 Q_ASSERT(uri == QLatin1String("LightDM"));76 Q_ASSERT(uri == QLatin1String("LightDM"));
69 qmlRegisterSingletonType<Greeter>(uri, 0, 1, "Greeter", greeter_provider);77 qmlRegisterSingletonType<Greeter>(uri, 0, 1, "Greeter", greeter_provider);
78 qmlRegisterSingletonType<URLDispatcher>(uri, 0, 1, "URLDispatcher", dispatcher_provider);
70 qmlRegisterSingletonType<UsersModel>(uri, 0, 1, "Users", users_provider);79 qmlRegisterSingletonType<UsersModel>(uri, 0, 1, "Users", users_provider);
71 qmlRegisterUncreatableType<QLightDM::UsersModel>(uri, 0, 1, "UserRoles", "Type is not instantiable");80 qmlRegisterUncreatableType<QLightDM::UsersModel>(uri, 0, 1, "UserRoles", "Type is not instantiable");
72 qmlRegisterSingletonType<UserMetricsOutput::UserMetrics>(uri, 0, 1, "Infographic", infographic_provider);81 qmlRegisterSingletonType<UserMetricsOutput::UserMetrics>(uri, 0, 1, "Infographic", infographic_provider);
7382
=== modified file 'plugins/SessionBroadcast/SessionBroadcast.cpp'
--- plugins/SessionBroadcast/SessionBroadcast.cpp 2013-09-12 17:58:21 +0000
+++ plugins/SessionBroadcast/SessionBroadcast.cpp 2014-05-29 14:11:15 +0000
@@ -18,11 +18,26 @@
1818
19#include "SessionBroadcast.h"19#include "SessionBroadcast.h"
20#include <QDBusConnection>20#include <QDBusConnection>
21#include <QDBusConnectionInterface>
22#include <QDBusInterface>
2123
22SessionBroadcast::SessionBroadcast(QObject* parent)24SessionBroadcast::SessionBroadcast(QObject* parent)
23 : QObject(parent)25 : QObject(parent)
24{26{
25 auto connection = QDBusConnection::SM_BUSNAME();27 auto connection = QDBusConnection::SM_BUSNAME();
28 auto interface = connection.interface();
29 interface->startService("com.canonical.Unity.Greeter.Broadcast");
30 m_broadcaster = new QDBusInterface("com.canonical.Unity.Greeter.Broadcast",
31 "/com/canonical/Unity/Greeter/Broadcast",
32 "com.canonical.Unity.Greeter.Broadcast",
33 connection, this);
34
35 connection.connect("com.canonical.Unity.Greeter.Broadcast",
36 "/com/canonical/Unity/Greeter/Broadcast",
37 "com.canonical.Unity.Greeter.Broadcast",
38 "StartUrl",
39 this,
40 SLOT(onStartUrl(const QString &, const QString &)));
2641
27 connection.connect("com.canonical.Unity.Greeter.Broadcast",42 connection.connect("com.canonical.Unity.Greeter.Broadcast",
28 "/com/canonical/Unity/Greeter/Broadcast",43 "/com/canonical/Unity/Greeter/Broadcast",
@@ -32,6 +47,26 @@
32 SLOT(onShowHome(const QString &)));47 SLOT(onShowHome(const QString &)));
33}48}
3449
50void SessionBroadcast::requestUrlStart(const QString &username, const QString &url)
51{
52 m_broadcaster->asyncCall("RequestUrlStart", username, url);
53}
54
55void SessionBroadcast::requestHomeShown(const QString &username)
56{
57 m_broadcaster->asyncCall("RequestHomeShown", username);
58}
59
60void SessionBroadcast::onStartUrl(const QString &username, const QString &url)
61{
62 // Since this signal is just used for testing, we don't *really* care if
63 // username matches, but just in case we do eventually use the signal, we
64 // should only listen to our own requests.
65 if (username == qgetenv("USER")) {
66 Q_EMIT startUrl(url);
67 }
68}
69
35void SessionBroadcast::onShowHome(const QString &username)70void SessionBroadcast::onShowHome(const QString &username)
36{71{
37 // Only listen to requests meant for us72 // Only listen to requests meant for us
3873
=== modified file 'plugins/SessionBroadcast/SessionBroadcast.h'
--- plugins/SessionBroadcast/SessionBroadcast.h 2013-09-12 17:58:21 +0000
+++ plugins/SessionBroadcast/SessionBroadcast.h 2014-05-29 14:11:15 +0000
@@ -31,11 +31,22 @@
31public:31public:
32 explicit SessionBroadcast(QObject *parent = 0);32 explicit SessionBroadcast(QObject *parent = 0);
3333
34 Q_INVOKABLE void requestUrlStart(const QString &username, const QString &url);
35 Q_INVOKABLE void requestHomeShown(const QString &username);
36
34Q_SIGNALS:37Q_SIGNALS:
38 // This signal isn't actually used by the shell
39 // (unity-greeter-session-broadcast handles launching an app for us), but
40 // it's useful for testing the plugin.
41 void startUrl(const QString &url);
35 void showHome();42 void showHome();
3643
37private Q_SLOTS:44private Q_SLOTS:
45 void onStartUrl(const QString &username, const QString &url);
38 void onShowHome(const QString &username);46 void onShowHome(const QString &username);
47
48private:
49 QDBusInterface *m_broadcaster;
39};50};
4051
41#endif52#endif
4253
=== added directory 'plugins/SessionManager'
=== added file 'plugins/SessionManager/CMakeLists.txt'
--- plugins/SessionManager/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ plugins/SessionManager/CMakeLists.txt 2014-05-29 14:11:15 +0000
@@ -0,0 +1,22 @@
1set(QMLPLUGIN_SRC
2 plugin.cpp
3 SessionManager.cpp
4 )
5
6include_directories(
7 ${Qt5DBus_INCLUDE_DIRS}
8 )
9
10add_definitions(-DSM_BUSNAME=systemBus)
11
12add_library(SessionManager-qml MODULE
13 ${QMLPLUGIN_SRC}
14 )
15
16target_link_libraries(SessionManager-qml
17 ${Qt5DBus_LIBRARIES}
18 )
19
20qt5_use_modules(SessionManager-qml Qml)
21
22add_unity8_plugin(SessionManager 0.1 SessionManager TARGETS SessionManager-qml)
023
=== added file 'plugins/SessionManager/SessionManager.cpp'
--- plugins/SessionManager/SessionManager.cpp 1970-01-01 00:00:00 +0000
+++ plugins/SessionManager/SessionManager.cpp 2014-05-29 14:11:15 +0000
@@ -0,0 +1,124 @@
1/*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Author: Michael Terry <michael.terry@canonical.com>
17 */
18
19#include "SessionManager.h"
20#include <QtCore/QEvent>
21#include <QtDBus/QDBusPendingReply>
22
23SessionManager::SessionManager(QObject* parent)
24 : QObject(parent),
25 l1_manager(NULL),
26 l1_session(NULL),
27 ldm_session(NULL),
28 is_active(true) // assume we're active w/o logind
29{
30 l1_manager = new QDBusInterface("org.freedesktop.login1",
31 "/org/freedesktop/login1",
32 "org.freedesktop.login1.Manager",
33 QDBusConnection::SM_BUSNAME(), this);
34 if (l1_manager->isValid() && QString(qgetenv("XDG_SESSION_ID")) != "") {
35 QDBusPendingCall pcall = l1_manager->asyncCall("GetSession", QString(qgetenv("XDG_SESSION_ID")));
36 QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pcall, this);
37 QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
38 this, SLOT(getSessionSlot(QDBusPendingCallWatcher*)));
39 }
40
41 if (QString(qgetenv("XDG_SESSION_PATH")) != "") {
42 ldm_session = new QDBusInterface("org.freedesktop.DisplayManager",
43 QString(qgetenv("XDG_SESSION_PATH")),
44 "org.freedesktop.DisplayManager.Session",
45 QDBusConnection::SM_BUSNAME(), this);
46 }
47}
48
49bool SessionManager::active() const
50{
51 // We cache this value for performance reasons, as QDBusInterface does not
52 // cache for us.
53 return is_active;
54}
55
56void SessionManager::lock()
57{
58 // We use ldm_session to handle locking rather than l1_session, because
59 // l1_session doesn't have permissions to lock from the user session, but
60 // ldm_session does. This is what the rest of Ubuntu uses to lock.
61 if (ldm_session != NULL && ldm_session->isValid())
62 ldm_session->asyncCall("Lock");
63}
64
65void SessionManager::getSessionSlot(QDBusPendingCallWatcher *watcher)
66{
67 QDBusPendingReply<QDBusObjectPath> reply = *watcher;
68 if (!reply.isError()) {
69 QDBusObjectPath path = reply.argumentAt<0>();
70 l1_session = new QDBusInterface("org.freedesktop.login1",
71 path.path(),
72 "org.freedesktop.login1.Session",
73 l1_manager->connection(), this);
74
75 l1_manager->connection().connect("org.freedesktop.login1",
76 path.path(),
77 "org.freedesktop.DBus.Properties",
78 "PropertiesChanged",
79 this,
80 SLOT(propertiesChanged(QString, QVariantMap, QStringList)));
81
82 // Login1 is very odd about emitting PropertiesChanged. It often does
83 // not do so when active is becoming false. But it always does when
84 // it becomes true. So we watch for the "Lock" signal too, which is a
85 // reliably hint that active is false.
86 l1_manager->connection().connect("org.freedesktop.login1",
87 path.path(),
88 "org.freedesktop.login1.Session",
89 "Lock",
90 this,
91 SLOT(sessionLocked()));
92
93 propertiesChanged("", QVariantMap(), QStringList() << "Active");
94 }
95 watcher->deleteLater();
96}
97
98void SessionManager::propertiesChanged(const QString &interface, const QVariantMap &changed, const QStringList &invalid)
99{
100 Q_UNUSED(interface)
101
102 QVariant value = changed.value("Active");
103
104 // If Active isn't in changed, check if we were at least notified about it
105 // changing on the server. Also check if IdleHint was modified, because
106 // sometimes logind does not emit a changed signal for Active becoming
107 // false, but will emit for IdleHint when that does happen.
108 if (!value.isValid() && (invalid.contains("Active") || invalid.contains("IdleHint") || changed.contains("IdleHint")) && l1_session->isValid()) {
109 value = l1_session->property("Active");
110 if (!value.isValid())
111 value = QVariant(false);
112 }
113
114 if (value.isValid() && value.toBool() != is_active) {
115 is_active = value.toBool();
116 Q_EMIT activeChanged();
117 }
118}
119
120void SessionManager::sessionLocked()
121{
122 is_active = false;
123 Q_EMIT activeChanged();
124}
0125
=== added file 'plugins/SessionManager/SessionManager.h'
--- plugins/SessionManager/SessionManager.h 1970-01-01 00:00:00 +0000
+++ plugins/SessionManager/SessionManager.h 2014-05-29 14:11:15 +0000
@@ -0,0 +1,61 @@
1/*
2 * Copyright (C) 2012,2013 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors: Gerry Boland <gerry.boland@canonical.com>
17 * Michael Terry <michael.terry@canonical.com>
18 */
19
20#ifndef UNITY_SESSIONMANAGER_H
21#define UNITY_SESSIONMANAGER_H
22
23#include <QtCore/QObject>
24#include <QtCore/QString>
25#include <QtCore/QStringList>
26#include <QtCore/QVariantMap>
27#include <QtDBus/QDBusInterface>
28#include <QtDBus/QDBusPendingCallWatcher>
29
30class SessionManager: public QObject
31{
32 Q_OBJECT
33 Q_PROPERTY(bool active
34 READ active
35 NOTIFY activeChanged
36 FINAL)
37
38public:
39 explicit SessionManager(QObject *parent = 0);
40
41 bool active() const;
42
43public Q_SLOTS:
44 void lock();
45
46Q_SIGNALS:
47 void activeChanged();
48
49private Q_SLOTS:
50 void getSessionSlot(QDBusPendingCallWatcher *watcher);
51 void propertiesChanged(const QString &interface, const QVariantMap &changed, const QStringList &invalid);
52 void sessionLocked();
53
54private:
55 QDBusInterface *l1_manager;
56 QDBusInterface *l1_session;
57 QDBusInterface *ldm_session;
58 bool is_active;
59};
60
61#endif
062
=== added file 'plugins/SessionManager/plugin.cpp'
--- plugins/SessionManager/plugin.cpp 1970-01-01 00:00:00 +0000
+++ plugins/SessionManager/plugin.cpp 2014-05-29 14:11:15 +0000
@@ -0,0 +1,35 @@
1/*
2 * Copyright (C) 2012,2013 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors: Gerry Boland <gerry.boland@canonical.com>
17 * Michael Terry <michael.terry@canonical.com>
18 */
19
20#include "plugin.h"
21#include "SessionManager.h"
22#include <QtQml/qqml.h>
23
24static QObject *sessionmanager_provider(QQmlEngine *engine, QJSEngine *scriptEngine)
25{
26 Q_UNUSED(engine)
27 Q_UNUSED(scriptEngine)
28 return new SessionManager();
29}
30
31void SessionManagerPlugin::registerTypes(const char *uri)
32{
33 Q_ASSERT(uri == QLatin1String("SessionManager"));
34 qmlRegisterSingletonType<SessionManager>(uri, 0, 1, "SessionManager", sessionmanager_provider);
35}
036
=== added file 'plugins/SessionManager/plugin.h'
--- plugins/SessionManager/plugin.h 1970-01-01 00:00:00 +0000
+++ plugins/SessionManager/plugin.h 2014-05-29 14:11:15 +0000
@@ -0,0 +1,35 @@
1/*
2 * Copyright (C) 2012,2013 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors: Gerry Boland <gerry.boland@canonical.com>
17 * Michael Terry <michael.terry@canonical.com>
18 */
19
20#ifndef SESSIONMANAGER_PLUGIN_H
21#define SESSIONMANAGER_PLUGIN_H
22
23#include <QtQml/QQmlEngine>
24#include <QtQml/QQmlExtensionPlugin>
25
26class SessionManagerPlugin : public QQmlExtensionPlugin
27{
28 Q_OBJECT
29 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
30
31public:
32 void registerTypes(const char *uri);
33};
34
35#endif
036
=== added file 'plugins/SessionManager/qmldir'
--- plugins/SessionManager/qmldir 1970-01-01 00:00:00 +0000
+++ plugins/SessionManager/qmldir 2014-05-29 14:11:15 +0000
@@ -0,0 +1,2 @@
1module SessionManager
2plugin SessionManager-qml
03
=== modified file 'plugins/Unity/Launcher/backend/launcherbackend.cpp'
--- plugins/Unity/Launcher/backend/launcherbackend.cpp 2014-05-13 11:21:45 +0000
+++ plugins/Unity/Launcher/backend/launcherbackend.cpp 2014-05-29 14:11:15 +0000
@@ -37,12 +37,15 @@
37 bool countVisible;37 bool countVisible;
38};38};
3939
40LauncherBackend::LauncherBackend(QObject *parent):40LauncherBackend::LauncherBackend(bool greeterMode, QObject *parent):
41 QDBusVirtualObject(parent),41 QDBusVirtualObject(parent),
42 m_greeterMode(greeterMode),
42 m_accounts(nullptr)43 m_accounts(nullptr)
43{44{
44#ifndef LAUNCHER_TESTING45#ifndef LAUNCHER_TESTING
45 m_accounts = new AccountsServiceDBusAdaptor(this);46 m_accounts = new AccountsServiceDBusAdaptor(this);
47 connect(m_accounts, SIGNAL(propertiesChanged(QString, QString, QStringList)),
48 this, SLOT(accountsListChanged(QString, QString, QStringList)));
46#endif49#endif
47 m_user = qgetenv("USER");50 m_user = qgetenv("USER");
48 syncFromAccounts();51 syncFromAccounts();
@@ -225,7 +228,7 @@
225228
226void LauncherBackend::setUser(const QString &username)229void LauncherBackend::setUser(const QString &username)
227{230{
228 if (qgetenv("USER") == "lightdm" && m_user != username) {231 if (m_greeterMode && m_user != username) {
229 m_user = username;232 m_user = username;
230 syncFromAccounts();233 syncFromAccounts();
231 }234 }
@@ -238,6 +241,15 @@
238 Q_UNUSED(quickListId)241 Q_UNUSED(quickListId)
239}242}
240243
244void LauncherBackend::accountsListChanged(const QString &user, const QString &interface, const QStringList &changed)
245{
246 if (m_greeterMode && user == m_user &&
247 interface == "com.canonical.unity.AccountsService" &&
248 changed.contains("launcher-items")) {
249 syncFromAccounts();
250 }
251}
252
241void LauncherBackend::syncFromAccounts()253void LauncherBackend::syncFromAccounts()
242{254{
243 QList<QVariantMap> apps;255 QList<QVariantMap> apps;
@@ -299,6 +311,8 @@
299 loadFromVariant(app.toMap());311 loadFromVariant(app.toMap());
300 }312 }
301 }313 }
314
315 Q_EMIT refreshApplications();
302}316}
303317
304void LauncherBackend::syncToAccounts()318void LauncherBackend::syncToAccounts()
305319
=== modified file 'plugins/Unity/Launcher/backend/launcherbackend.h'
--- plugins/Unity/Launcher/backend/launcherbackend.h 2014-04-29 19:22:13 +0000
+++ plugins/Unity/Launcher/backend/launcherbackend.h 2014-05-29 14:11:15 +0000
@@ -42,7 +42,7 @@
42 friend LauncherBackendTest;42 friend LauncherBackendTest;
4343
44public:44public:
45 LauncherBackend(QObject *parent = 0);45 LauncherBackend(bool greeterMode = false, QObject *parent = 0);
46 virtual ~LauncherBackend();46 virtual ~LauncherBackend();
4747
48 /**48 /**
@@ -162,6 +162,7 @@
162 virtual QString introspect (const QString &path) const;162 virtual QString introspect (const QString &path) const;
163163
164Q_SIGNALS:164Q_SIGNALS:
165 void refreshApplications() const;
165 void quickListChanged(const QString &appId, const QList<QuickListEntry> &quickList) const;166 void quickListChanged(const QString &appId, const QList<QuickListEntry> &quickList) const;
166 void progressChanged(const QString &appId, int progress) const;167 void progressChanged(const QString &appId, int progress) const;
167 void countChanged(const QString &appId, int count) const;168 void countChanged(const QString &appId, int count) const;
@@ -178,6 +179,8 @@
178 void syncFromAccounts();179 void syncFromAccounts();
179 void syncToAccounts();180 void syncToAccounts();
180181
182 bool m_greeterMode;
183
181 QList<QString> m_storedApps;184 QList<QString> m_storedApps;
182 mutable QHash<QString, LauncherBackendItem*> m_itemCache;185 mutable QHash<QString, LauncherBackendItem*> m_itemCache;
183186
@@ -186,6 +189,9 @@
186189
187 void emitPropChangedDbus(const QString& appId, const QString& property, QVariant &value) const;190 void emitPropChangedDbus(const QString& appId, const QString& property, QVariant &value) const;
188191
192private Q_SLOTS:
193 void accountsListChanged(const QString &user, const QString &interface, const QStringList &changed);
194
189protected: /* Protected to allow testing */195protected: /* Protected to allow testing */
190 LauncherBackendItem* getItem(const QString& appId) const;196 LauncherBackendItem* getItem(const QString& appId) const;
191197
192198
=== modified file 'plugins/Unity/Launcher/launcheritem.cpp'
--- plugins/Unity/Launcher/launcheritem.cpp 2013-10-22 11:02:49 +0000
+++ plugins/Unity/Launcher/launcheritem.cpp 2014-05-29 14:11:15 +0000
@@ -22,12 +22,13 @@
2222
23#include <libintl.h>23#include <libintl.h>
2424
25LauncherItem::LauncherItem(const QString &appId, const QString &name, const QString &icon, QObject *parent) :25LauncherItem::LauncherItem(const QString &appId, const QString &name, const QString &icon, bool pinnable, QObject *parent) :
26 LauncherItemInterface(parent),26 LauncherItemInterface(parent),
27 m_appId(appId),27 m_appId(appId),
28 m_name(name),28 m_name(name),
29 m_icon(icon),29 m_icon(icon),
30 m_pinned(false),30 m_pinned(false),
31 m_pinnable(pinnable),
31 m_running(false),32 m_running(false),
32 m_recent(false),33 m_recent(false),
33 m_progress(-1),34 m_progress(-1),
@@ -38,10 +39,12 @@
38 QuickListEntry nameAction;39 QuickListEntry nameAction;
39 nameAction.setText(m_name);40 nameAction.setText(m_name);
40 m_quickList->appendAction(nameAction);41 m_quickList->appendAction(nameAction);
41 QuickListEntry pinningAction;42 if (m_pinnable) {
42 pinningAction.setActionId("pin_item");43 QuickListEntry pinningAction;
43 pinningAction.setText(gettext("Lock to Launcher"));44 pinningAction.setActionId("pin_item");
44 m_quickList->appendAction(pinningAction);45 pinningAction.setText(gettext("Lock to Launcher"));
46 m_quickList->appendAction(pinningAction);
47 }
45}48}
4649
47QString LauncherItem::appId() const50QString LauncherItem::appId() const
@@ -68,10 +71,12 @@
68{71{
69 if (m_pinned != pinned) {72 if (m_pinned != pinned) {
70 m_pinned = pinned;73 m_pinned = pinned;
71 QuickListEntry entry;74 if (m_pinnable) {
72 entry.setActionId("pin_item");75 QuickListEntry entry;
73 entry.setText(pinned ? gettext("Unlock from Launcher") : gettext("Lock to Launcher"));76 entry.setActionId("pin_item");
74 m_quickList->updateAction(entry);77 entry.setText(pinned ? gettext("Unlock from Launcher") : gettext("Lock to Launcher"));
78 m_quickList->updateAction(entry);
79 }
75 Q_EMIT pinnedChanged(pinned);80 Q_EMIT pinnedChanged(pinned);
76 }81 }
77}82}
7883
=== modified file 'plugins/Unity/Launcher/launcheritem.h'
--- plugins/Unity/Launcher/launcheritem.h 2013-09-11 15:33:02 +0000
+++ plugins/Unity/Launcher/launcheritem.h 2014-05-29 14:11:15 +0000
@@ -32,7 +32,7 @@
32{32{
33 Q_OBJECT33 Q_OBJECT
34public:34public:
35 LauncherItem(const QString &appId, const QString &name, const QString &icon, QObject *parent = 0);35 LauncherItem(const QString &appId, const QString &name, const QString &icon, bool pinnable, QObject *parent = 0);
3636
37 QString appId() const;37 QString appId() const;
38 QString name() const;38 QString name() const;
@@ -67,6 +67,7 @@
67 QString m_name;67 QString m_name;
68 QString m_icon;68 QString m_icon;
69 bool m_pinned;69 bool m_pinned;
70 bool m_pinnable;
70 bool m_running;71 bool m_running;
71 bool m_recent;72 bool m_recent;
72 int m_progress;73 int m_progress;
7374
=== modified file 'plugins/Unity/Launcher/launchermodel.cpp'
--- plugins/Unity/Launcher/launchermodel.cpp 2014-05-13 11:24:48 +0000
+++ plugins/Unity/Launcher/launchermodel.cpp 2014-05-29 14:11:15 +0000
@@ -27,20 +27,15 @@
2727
28LauncherModel::LauncherModel(QObject *parent):28LauncherModel::LauncherModel(QObject *parent):
29 LauncherModelInterface(parent),29 LauncherModelInterface(parent),
30 m_backend(new LauncherBackend(this)),30 m_greeterMode(qgetenv("XDG_SESSION_CLASS") == "greeter"),
31 m_backend(new LauncherBackend(m_greeterMode, this)),
31 m_appManager(0)32 m_appManager(0)
32{33{
33 connect(m_backend, SIGNAL(countChanged(QString,int)), SLOT(countChanged(QString,int)));34 connect(m_backend, SIGNAL(countChanged(QString,int)), SLOT(countChanged(QString,int)));
34 connect(m_backend, SIGNAL(progressChanged(QString,int)), SLOT(progressChanged(QString,int)));35 connect(m_backend, SIGNAL(progressChanged(QString,int)), SLOT(progressChanged(QString,int)));
36 connect(m_backend, SIGNAL(refreshApplications()), SLOT(refreshStoredApplications()));
3537
36 Q_FOREACH (const QString &entry, m_backend->storedApplications()) {38 refreshStoredApplications();
37 LauncherItem *item = new LauncherItem(entry,
38 m_backend->displayName(entry),
39 m_backend->icon(entry),
40 this);
41 item->setPinned(true);
42 m_list.append(item);
43 }
44}39}
4540
46LauncherModel::~LauncherModel()41LauncherModel::~LauncherModel()
@@ -139,7 +134,8 @@
139 beginInsertRows(QModelIndex(), index, index);134 beginInsertRows(QModelIndex(), index, index);
140 LauncherItem *item = new LauncherItem(appId,135 LauncherItem *item = new LauncherItem(appId,
141 m_backend->displayName(appId),136 m_backend->displayName(appId),
142 m_backend->icon(appId));137 m_backend->icon(appId),
138 !m_greeterMode);
143 item->setPinned(true);139 item->setPinned(true);
144 m_list.insert(index, item);140 m_list.insert(index, item);
145 endInsertRows();141 endInsertRows();
@@ -199,6 +195,40 @@
199 m_backend->setUser(username);195 m_backend->setUser(username);
200}196}
201197
198void LauncherModel::refreshStoredApplications()
199{
200 // First remove any existing ones
201 QList<int> storedAppIndices;
202 for (int i = 0; i < m_list.count(); ++i) {
203 if (!m_list.at(i)->recent()) {
204 storedAppIndices << i;
205 }
206 }
207 int run = 0;
208 while (storedAppIndices.count() > 0) {
209 beginRemoveRows(QModelIndex(), storedAppIndices.first() - run, storedAppIndices.first() - run);
210 m_list.takeAt(storedAppIndices.first() - run)->deleteLater();
211 endRemoveRows();
212 storedAppIndices.takeFirst();
213 ++run;
214 }
215
216 // Now insert all stored apps at beginning of list
217 QStringList storedApplications = m_backend->storedApplications();
218 beginInsertRows(QModelIndex(), 0, storedApplications.size() - 1);
219 run = 0;
220 Q_FOREACH (const QString &entry, storedApplications) {
221 LauncherItem *item = new LauncherItem(entry,
222 m_backend->displayName(entry),
223 m_backend->icon(entry),
224 !m_greeterMode,
225 this);
226 item->setPinned(true);
227 m_list.insert(run++, item);
228 }
229 endInsertRows();
230}
231
202ApplicationManagerInterface *LauncherModel::applicationManager() const232ApplicationManagerInterface *LauncherModel::applicationManager() const
203{233{
204 return m_appManager;234 return m_appManager;
@@ -302,7 +332,7 @@
302 if (found) {332 if (found) {
303 // Shall we paint some running/recent app highlight? If yes, do it here.333 // Shall we paint some running/recent app highlight? If yes, do it here.
304 } else {334 } else {
305 LauncherItem *item = new LauncherItem(app->appId(), app->name(), app->icon().toString());335 LauncherItem *item = new LauncherItem(app->appId(), app->name(), app->icon().toString(), !m_greeterMode);
306 item->setRecent(true);336 item->setRecent(true);
307 item->setFocused(app->focused());337 item->setFocused(app->focused());
308338
309339
=== modified file 'plugins/Unity/Launcher/launchermodel.h'
--- plugins/Unity/Launcher/launchermodel.h 2013-09-11 15:33:02 +0000
+++ plugins/Unity/Launcher/launchermodel.h 2014-05-29 14:11:15 +0000
@@ -62,6 +62,7 @@
62private Q_SLOTS:62private Q_SLOTS:
63 void progressChanged(const QString &appId, int progress);63 void progressChanged(const QString &appId, int progress);
64 void countChanged(const QString &appId, int count);64 void countChanged(const QString &appId, int count);
65 void refreshStoredApplications();
6566
66 void applicationAdded(const QModelIndex &parent, int row);67 void applicationAdded(const QModelIndex &parent, int row);
67 void applicationRemoved(const QModelIndex &parent, int row);68 void applicationRemoved(const QModelIndex &parent, int row);
@@ -69,6 +70,7 @@
6970
70private:71private:
71 QList<LauncherItem*> m_list;72 QList<LauncherItem*> m_list;
73 bool m_greeterMode;
72 LauncherBackend *m_backend;74 LauncherBackend *m_backend;
73 ApplicationManagerInterface *m_appManager;75 ApplicationManagerInterface *m_appManager;
74};76};
7577
=== modified file 'po/ug.po'
--- po/ug.po 2014-05-01 06:44:18 +0000
+++ po/ug.po 2014-05-29 14:11:15 +0000
@@ -6,11 +6,12 @@
6msgid ""6msgid ""
7msgstr ""7msgstr ""
8"Project-Id-Version: unity\n"8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"9"Report-Msgid-Bugs-To: \n"
10"POT-Creation-Date: 2014-04-10 11:13-0400\n"10"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-04-22 05:46+0000\n"11"PO-Revision-Date: 2014-04-22 05:46+0000\n"
12"Last-Translator: abdurahman <Unknown>\n"12"Last-Translator: abdurahman <Unknown>\n"
13"Language-Team: Uyghur <ug@li.org>\n"13"Language-Team: Uyghur <ug@li.org>\n"
14"Language: \n"
14"MIME-Version: 1.0\n"15"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"16"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"17"Content-Transfer-Encoding: 8bit\n"
1718
=== added file 'qml/Components/BasicShell.qml'
--- qml/Components/BasicShell.qml 1970-01-01 00:00:00 +0000
+++ qml/Components/BasicShell.qml 2014-05-29 14:11:15 +0000
@@ -0,0 +1,84 @@
1/*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.0
18import Ubuntu.Components 0.1
19import Unity.Application 0.1
20import "../Components"
21
22FocusScope {
23 id: shell
24
25 // this is only here to select the width / height of the window if not running fullscreen
26 property bool tablet: false
27 width: tablet ? units.gu(160) : applicationArguments.hasGeometry() ? applicationArguments.width() : units.gu(40)
28 height: tablet ? units.gu(100) : applicationArguments.hasGeometry() ? applicationArguments.height() : units.gu(71)
29
30 property real edgeSize: units.gu(2)
31
32 property url defaultBackground: Qt.resolvedUrl(shell.width >= units.gu(60) ? "../graphics/tablet_background.jpg" : "../graphics/phone_background.jpg")
33 property url background
34 property url backgroundSource
35 property url backgroundFallbackSource
36 property url backgroundFinal: (backgroundSource != undefined && backgroundSource != "") ? backgroundSource : (backgroundFallbackSource != undefined && backgroundFallbackSource != "") ? backgroundFallbackSource : shell.defaultBackground
37 onBackgroundFinalChanged: shell.background = backgroundFinal
38
39 // This is a dummy image that is needed to determine if the picture url
40 // in backgroundSettings points to a valid picture file.
41 // We can't do this with the real background image because setting a
42 // new source in onStatusChanged triggers a binding loop detection
43 // inside Image, which causes it not to render even though a valid source
44 // would be set. We don't mind about this image staying black and just
45 // use it for verification to populate the source for the real
46 // background image.
47 Image {
48 source: shell.background
49 height: 0
50 width: 0
51 sourceSize.height: 0
52 sourceSize.width: 0
53 onStatusChanged: {
54 if (status == Image.Error) {
55 if (source != shell.defaultBackground) {
56 shell.background = defaultBackground
57 } else {
58 // In case even our default background fails to load...
59 shell.background = "data:image/svg+xml,<svg><rect width='100%' height='100%' fill='#000'/></svg>"
60 }
61 }
62 }
63 }
64
65 VolumeControl {
66 id: volumeControl
67 }
68
69 Keys.onVolumeUpPressed: volumeControl.volumeUp()
70 Keys.onVolumeDownPressed: volumeControl.volumeDown()
71
72 function hideIndicatorMenu(delay) {
73 panel.hideIndicatorMenu(delay);
74 }
75
76 focus: true
77 onFocusChanged: if (!focus) forceActiveFocus();
78
79 Binding {
80 target: i18n
81 property: "domain"
82 value: "unity8"
83 }
84}
085
=== modified file 'qml/Components/EdgeDemo.qml'
--- qml/Components/EdgeDemo.qml 2014-01-29 22:19:15 +0000
+++ qml/Components/EdgeDemo.qml 2014-05-29 14:11:15 +0000
@@ -15,13 +15,11 @@
15 */15 */
1616
17import AccountsService 0.117import AccountsService 0.1
18import LightDM 0.1 as LightDM
19import QtQuick 2.018import QtQuick 2.0
2019
21Item {20Item {
22 id: demo21 id: demo
2322
24 property Item greeter
25 property Item dash23 property Item dash
26 property Item launcher24 property Item launcher
27 property Item indicators25 property Item indicators
@@ -36,7 +34,6 @@
36 property bool paused: false34 property bool paused: false
3735
38 onPausedChanged: {36 onPausedChanged: {
39 if (d.rightEdgeDemo) d.rightEdgeDemo.paused = paused
40 if (d.topEdgeDemo) d.topEdgeDemo.paused = paused37 if (d.topEdgeDemo) d.topEdgeDemo.paused = paused
41 if (d.bottomEdgeDemo) d.bottomEdgeDemo.paused = paused38 if (d.bottomEdgeDemo) d.bottomEdgeDemo.paused = paused
42 if (d.leftEdgeDemo) d.leftEdgeDemo.paused = paused39 if (d.leftEdgeDemo) d.leftEdgeDemo.paused = paused
@@ -45,16 +42,6 @@
4542
46 function hideEdgeDemoInShell() {43 function hideEdgeDemoInShell() {
47 AccountsService.demoEdges = false;44 AccountsService.demoEdges = false;
48 stopDemo();
49 }
50
51 function hideEdgeDemoInGreeter() {
52 // TODO: AccountsService.demoEdges = false as lightdm user
53 }
54
55 function hideEdgeDemos() {
56 hideEdgeDemoInGreeter();
57 hideEdgeDemoInShell();
58 }45 }
5946
60 function stopDemo() {47 function stopDemo() {
@@ -62,7 +49,6 @@
62 dashEnabled = true49 dashEnabled = true
63 panelEnabled = true50 panelEnabled = true
64 panelContentEnabled = true51 panelContentEnabled = true
65 if (d.rightEdgeDemo) d.rightEdgeDemo.destroy()
66 if (d.topEdgeDemo) d.topEdgeDemo.destroy()52 if (d.topEdgeDemo) d.topEdgeDemo.destroy()
67 if (d.bottomEdgeDemo) d.bottomEdgeDemo.destroy()53 if (d.bottomEdgeDemo) d.bottomEdgeDemo.destroy()
68 if (d.leftEdgeDemo) d.leftEdgeDemo.destroy()54 if (d.leftEdgeDemo) d.leftEdgeDemo.destroy()
@@ -79,24 +65,17 @@
79 panelEnabled = false;65 panelEnabled = false;
80 panelContentEnabled = false;66 panelContentEnabled = false;
8167
82 // Begin with either greeter or dash, depending on which is visible68 startTopEdgeDemo()
83 if (greeter && greeter.shown) {
84 startRightEdgeDemo()
85 } else {
86 startTopEdgeDemo()
87 }
88 }69 }
8970
90 QtObject {71 QtObject {
91 id: d72 id: d
92 property Component overlay73 property Component overlay
93 property QtObject rightEdgeDemo
94 property QtObject topEdgeDemo74 property QtObject topEdgeDemo
95 property QtObject bottomEdgeDemo75 property QtObject bottomEdgeDemo
96 property QtObject leftEdgeDemo76 property QtObject leftEdgeDemo
97 property QtObject finalEdgeDemo77 property QtObject finalEdgeDemo
98 property bool showEdgeDemo: AccountsService.demoEdges78 property bool showEdgeDemo: AccountsService.demoEdges
99 property bool showEdgeDemoInGreeter: AccountsService.demoEdges // TODO: AccountsService.demoEdges as lightdm user
10079
101 onShowEdgeDemoChanged: {80 onShowEdgeDemoChanged: {
102 stopDemo()81 stopDemo()
@@ -106,37 +85,6 @@
106 }85 }
107 }86 }
10887
109 function startRightEdgeDemo() {
110 if (demo.greeter) {
111 d.rightEdgeDemo = d.overlay.createObject(demo.greeter, {
112 "edge": "right",
113 "title": i18n.tr("Right edge"),
114 "text": i18n.tr("Try swiping from the right edge to unlock the phone"),
115 "anchors.fill": demo.greeter,
116 });
117 }
118 if (d.rightEdgeDemo) {
119 d.rightEdgeDemo.onSkip.connect(demo.hideEdgeDemos)
120 } else {
121 stopDemo();
122 }
123 }
124
125 Connections {
126 target: demo.greeter
127
128 function hide() {
129 if (d.rightEdgeDemo && d.rightEdgeDemo.available) {
130 d.rightEdgeDemo.hide()
131 hideEdgeDemoInGreeter()
132 startTopEdgeDemo()
133 }
134 }
135
136 onUnlocked: hide()
137 onShownChanged: if (!greeter.shown) hide()
138 }
139
140 function startTopEdgeDemo() {88 function startTopEdgeDemo() {
141 demo.panelEnabled = true;89 demo.panelEnabled = true;
142 if (demo.dash && demo.underlay) {90 if (demo.dash && demo.underlay) {
14391
=== renamed file 'qml/Greeter/Lockscreen.qml' => 'qml/Components/Lockscreen.qml'
--- qml/Greeter/Lockscreen.qml 2014-05-20 13:09:51 +0000
+++ qml/Components/Lockscreen.qml 2014-05-29 14:11:15 +0000
@@ -17,7 +17,6 @@
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 1.018import Ubuntu.Components 1.0
19import Ubuntu.Components.Popups 1.019import Ubuntu.Components.Popups 1.0
20import "../Components"
2120
22Showable {21Showable {
23 id: root22 id: root
@@ -49,8 +48,6 @@
49 property int minPinLength: -148 property int minPinLength: -1
50 property int maxPinLength: -149 property int maxPinLength: -1
5150
52 property url background: ""
53
54 signal entered(string passphrase)51 signal entered(string passphrase)
55 signal cancel()52 signal cancel()
56 signal emergencyCall()53 signal emergencyCall()
@@ -76,23 +73,6 @@
76 PopupUtils.open(infoPopupComponent, root, {title: title, text: text})73 PopupUtils.open(infoPopupComponent, root, {title: title, text: text})
77 }74 }
7875
79 Rectangle {
80 // In case background fails to load or is undefined
81 id: backgroundBackup
82 anchors.fill: parent
83 color: "black"
84 }
85
86 Image {
87 id: backgroundImage
88 objectName: "lockscreenBackground"
89 anchors {
90 fill: parent
91 }
92 source: root.required ? root.background : ""
93 fillMode: Image.PreserveAspectCrop
94 }
95
96 MouseArea {76 MouseArea {
97 anchors.fill: root77 anchors.fill: root
98 }78 }
9979
=== modified file 'qml/Components/PageHeader.qml'
--- qml/Components/PageHeader.qml 2014-05-19 11:10:58 +0000
+++ qml/Components/PageHeader.qml 2014-05-29 14:11:15 +0000
@@ -18,6 +18,7 @@
18import Ubuntu.Components 0.118import Ubuntu.Components 0.1
19import Ubuntu.Components.Popups 0.119import Ubuntu.Components.Popups 0.1
20import Ubuntu.Components.ListItems 0.1 as ListItem20import Ubuntu.Components.ListItems 0.1 as ListItem
21import SessionManager 0.1
21import Unity 0.222import Unity 0.2
2223
23Item {24Item {
@@ -51,8 +52,8 @@
51 }52 }
5253
53 Connections {54 Connections {
54 target: greeter55 target: SessionManager
55 onShownChanged: if (shown) resetSearch()56 onActiveChanged: if (!SessionManager.active) resetSearch()
56 }57 }
5758
58 Flickable {59 Flickable {
5960
=== renamed file 'qml/Greeter/PassphraseLockscreen.qml' => 'qml/Components/PassphraseLockscreen.qml'
=== renamed file 'qml/Greeter/PinLockscreen.qml' => 'qml/Components/PinLockscreen.qml'
=== modified file 'qml/Dash/ScopeListView.qml'
--- qml/Dash/ScopeListView.qml 2014-04-30 10:06:33 +0000
+++ qml/Dash/ScopeListView.qml 2014-05-29 14:11:15 +0000
@@ -16,13 +16,14 @@
1616
17import QtQuick 2.017import QtQuick 2.0
18import Dash 0.118import Dash 0.1
19import SessionManager 0.1
1920
20ListViewWithPageHeader {21ListViewWithPageHeader {
21 maximumFlickVelocity: height * 1022 maximumFlickVelocity: height * 10
22 flickDeceleration: height * 223 flickDeceleration: height * 2
2324
24 Connections {25 Connections {
25 target: greeter26 target: SessionManager
26 onShownChanged: if (greeter.shown) showHeader()27 onActiveChanged: if (!SessionManager.active) showHeader()
27 }28 }
28}29}
2930
=== modified file 'qml/Greeter/Clock.qml'
--- qml/Greeter/Clock.qml 2014-04-18 18:22:56 +0000
+++ qml/Greeter/Clock.qml 2014-05-29 14:11:15 +0000
@@ -39,7 +39,7 @@
3939
40 busName: "com.canonical.indicator.datetime"40 busName: "com.canonical.indicator.datetime"
41 actionsObjectPath: "/com/canonical/indicator/datetime"41 actionsObjectPath: "/com/canonical/indicator/datetime"
42 menuObjectPath: clock.visible ? "/com/canonical/indicator/datetime/phone" : ""42 menuObjectPath: clock.visible ? "/com/canonical/indicator/datetime/phone_greeter" : ""
4343
44 Indicators.RootActionState {44 Indicators.RootActionState {
45 menu: timeModel.model45 menu: timeModel.model
4646
=== modified file 'qml/Greeter/Greeter.qml'
--- qml/Greeter/Greeter.qml 2014-04-16 13:43:13 +0000
+++ qml/Greeter/Greeter.qml 2014-05-29 14:11:15 +0000
@@ -23,9 +23,9 @@
23Showable {23Showable {
24 id: greeter24 id: greeter
25 enabled: shown25 enabled: shown
26 created: greeterContentLoader.status == Loader.Ready && greeterContentLoader.item.ready26 created: greeterContentLoader.status == Loader.Ready
2727
28 property url defaultBackground28 property url background
2929
30 // 1 when fully shown and 0 when fully hidden30 // 1 when fully shown and 0 when fully hidden
31 property real showProgress: MathUtils.clamp((width - Math.abs(x)) / width, 0, 1)31 property real showProgress: MathUtils.clamp((width - Math.abs(x)) / width, 0, 1)
@@ -118,6 +118,36 @@
118 }118 }
119 }119 }
120120
121 Rectangle {
122 // To hide lockscreen until background finished fading in
123 id: backgroundBackup
124 anchors {
125 fill: parent
126 topMargin: -greeter.y
127 }
128 color: "black"
129 }
130
131 CrossFadeImage {
132 id: backgroundImage
133 objectName: "greeterBackground"
134 anchors {
135 fill: parent
136 topMargin: -greeter.y
137 }
138 source: greeter.background
139 fillMode: Image.PreserveAspectCrop
140
141 StandardAnimation {
142 running: true
143 target: backgroundImage
144 property: "opacity"
145 from: 0.0
146 to: 1.0
147 duration: 800
148 }
149 }
150
121 Loader {151 Loader {
122 id: greeterContentLoader152 id: greeterContentLoader
123 objectName: "greeterContentLoader"153 objectName: "greeterContentLoader"
@@ -125,7 +155,6 @@
125 property var model: LightDM.Users155 property var model: LightDM.Users
126 property int currentIndex: 0156 property int currentIndex: 0
127 property var infographicModel: LightDM.Infographic157 property var infographicModel: LightDM.Infographic
128 readonly property int backgroundTopMargin: -greeter.y
129158
130 source: required ? "GreeterContent.qml" : ""159 source: required ? "GreeterContent.qml" : ""
131160
@@ -145,6 +174,10 @@
145 }174 }
146175
147 onTease: showLabelAnimation.start()176 onTease: showLabelAnimation.start()
177 onShownChanged: {
178 showLabelAnimation.stop()
179 swipeHint.opacity = 0
180 }
148181
149 Label {182 Label {
150 id: swipeHint183 id: swipeHint
151184
=== modified file 'qml/Greeter/GreeterContent.qml'
--- qml/Greeter/GreeterContent.qml 2014-04-17 15:43:16 +0000
+++ qml/Greeter/GreeterContent.qml 2014-05-29 14:11:15 +0000
@@ -24,47 +24,10 @@
24 id: root24 id: root
25 anchors.fill: parent25 anchors.fill: parent
2626
27 property bool ready: background.source == "" || background.status == Image.Ready || background.status == Image.Error
28
29 signal selected(int uid)27 signal selected(int uid)
30 signal unlocked(int uid)28 signal unlocked(int uid)
3129
32 Rectangle {30 Rectangle {
33 // In case background fails to load
34 id: backgroundBackup
35 anchors.fill: parent
36 color: "black"
37 }
38
39 property url backgroundValue: AccountsService.backgroundFile != undefined && AccountsService.backgroundFile.length > 0 ? AccountsService.backgroundFile : greeter.defaultBackground
40 onBackgroundValueChanged: background.source = backgroundValue
41
42 CrossFadeImage {
43 id: background
44 objectName: "greeterBackground"
45 anchors {
46 fill: parent
47 topMargin: backgroundTopMargin
48 }
49 fillMode: Image.PreserveAspectCrop
50 }
51
52 // See Shell.qml's backgroundSettings treatment for why we need a separate
53 // Image, but it boils down to avoiding binding loop detection.
54 Image {
55 source: background.source
56 height: 0
57 width: 0
58 sourceSize.height: 0
59 sourceSize.width: 0
60 onStatusChanged: {
61 if (status == Image.Error && source != greeter.defaultBackground) {
62 background.source = greeter.defaultBackground
63 }
64 }
65 }
66
67 Rectangle {
68 anchors.fill: parent31 anchors.fill: parent
69 color: "black"32 color: "black"
70 opacity: 0.433 opacity: 0.4
@@ -145,7 +108,6 @@
145108
146 Clock {109 Clock {
147 id: clock110 id: clock
148 visible: narrowMode
149111
150 anchors {112 anchors {
151 top: parent.top113 top: parent.top
152114
=== added file 'qml/Greeter/GreeterEdgeDemo.qml'
--- qml/Greeter/GreeterEdgeDemo.qml 1970-01-01 00:00:00 +0000
+++ qml/Greeter/GreeterEdgeDemo.qml 2014-05-29 14:11:15 +0000
@@ -0,0 +1,102 @@
1/*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import AccountsService 0.1
18import LightDM 0.1 as LightDM
19import QtQuick 2.0
20
21Item {
22 id: demo
23
24 property Item greeter
25
26 property bool active: false
27 property bool paused: false
28
29 onPausedChanged: {
30 if (d.rightEdgeDemo) d.rightEdgeDemo.paused = paused
31 }
32
33 function hideEdgeDemoInShell() {
34 AccountsService.demoEdges = false;
35 }
36
37 function hideEdgeDemoInGreeter() {
38 AccountsService.demoEdgesForCurrentUser = false;
39 }
40
41 function hideEdgeDemos() {
42 hideEdgeDemoInGreeter();
43 hideEdgeDemoInShell();
44 }
45
46 function startDemo() {
47 if (!d.overlay) {
48 d.overlay = Qt.createComponent("../Components/EdgeDemoOverlay.qml")
49 }
50 startRightEdgeDemo()
51 }
52
53 function stopDemo() {
54 active = false
55 if (d.rightEdgeDemo) d.rightEdgeDemo.destroy()
56 }
57
58 QtObject {
59 id: d
60 property Component overlay
61 property QtObject rightEdgeDemo
62 property bool showEdgeDemoInGreeter: AccountsService.demoEdgesForCurrentUser && AccountsService.demoEdges
63
64 onShowEdgeDemoInGreeterChanged: {
65 stopDemo()
66 if (d.showEdgeDemoInGreeter) {
67 startDemo()
68 }
69 }
70 }
71
72 function startRightEdgeDemo() {
73 active = true;
74 if (demo.greeter) {
75 d.rightEdgeDemo = d.overlay.createObject(demo.greeter, {
76 "edge": "right",
77 "title": i18n.tr("Right edge"),
78 "text": i18n.tr("Try swiping from the right edge to unlock the phone"),
79 "anchors.fill": demo.greeter,
80 });
81 }
82 if (d.rightEdgeDemo) {
83 d.rightEdgeDemo.onSkip.connect(demo.hideEdgeDemos)
84 } else {
85 stopDemo();
86 }
87 }
88
89 Connections {
90 target: demo.greeter
91
92 function hide() {
93 if (d.rightEdgeDemo && d.rightEdgeDemo.available) {
94 d.rightEdgeDemo.hide()
95 hideEdgeDemoInGreeter()
96 }
97 }
98
99 onUnlocked: hide()
100 onShownChanged: if (!greeter.shown) hide()
101 }
102}
0103
=== modified file 'qml/Greeter/Infographics.qml'
--- qml/Greeter/Infographics.qml 2014-03-21 17:49:22 +0000
+++ qml/Greeter/Infographics.qml 2014-05-29 14:11:15 +0000
@@ -59,8 +59,6 @@
5959
60 visible: model.label !== ""60 visible: model.label !== ""
6161
62 Component.onCompleted: startShowAnimation()
63
64 Item {62 Item {
65 id: dataCircle63 id: dataCircle
66 objectName: "dataCircle"64 objectName: "dataCircle"
6765
=== added file 'qml/GreeterShell.qml'
--- qml/GreeterShell.qml 1970-01-01 00:00:00 +0000
+++ qml/GreeterShell.qml 2014-05-29 14:11:15 +0000
@@ -0,0 +1,283 @@
1/*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import AccountsService 0.1
18import GSettings 1.0
19import LightDM 0.1 as LightDM
20import Powerd 0.1
21import QtQuick 2.0
22import SessionBroadcast 0.1
23import Ubuntu.Components 0.1
24import Unity.Application 0.1
25import Unity.Launcher 0.1
26import "Components"
27import "Greeter"
28import "Launcher"
29import "Panel"
30import "Notifications"
31import Unity.Notifications 1.0 as NotificationBackend
32
33BasicShell {
34 id: shell
35
36 function activateApplication(appId) {
37 SessionBroadcast.requestUrlStart(LightDM.Greeter.authenticationUser, appId)
38 greeter.hide()
39 }
40
41 GSettings {
42 id: backgroundSettings
43 schema.id: "org.gnome.desktop.background"
44 }
45 backgroundFallbackSource: backgroundSettings.pictureUri // for ease of customization by system builders
46 backgroundSource: AccountsService.backgroundFile
47
48 Lockscreen {
49 id: lockscreen
50 objectName: "lockscreen"
51
52 hides: [launcher, panel.indicators]
53 shown: false
54 enabled: true
55 showAnimation: StandardAnimation { property: "opacity"; to: 1 }
56 hideAnimation: StandardAnimation { property: "opacity"; to: 0 }
57 y: panel.panelHeight
58 x: required ? 0 : - width
59 width: parent.width
60 height: parent.height - panel.panelHeight
61 minPinLength: 4
62 maxPinLength: 4
63
64 onEntered: LightDM.Greeter.respond(passphrase);
65 onCancel: greeter.show()
66
67 Component.onCompleted: {
68 if (LightDM.Users.count == 1) {
69 LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole))
70 }
71 }
72 }
73
74 Connections {
75 target: LightDM.Greeter
76
77 onIdle: {
78 greeter.showNow()
79 }
80
81 onShowPrompt: {
82 if (LightDM.Users.count == 1) {
83 // TODO: There's no better way for now to determine if its a PIN or a passphrase.
84 if (text == "PIN") {
85 lockscreen.alphaNumeric = false
86 } else {
87 lockscreen.alphaNumeric = true
88 }
89 lockscreen.placeholderText = i18n.tr("Please enter %1").arg(text);
90 lockscreen.show();
91 }
92 }
93
94 onAuthenticationComplete: {
95 if (LightDM.Greeter.promptless) {
96 return;
97 }
98 if (LightDM.Greeter.authenticated) {
99 lockscreen.hide();
100 } else {
101 lockscreen.clear(true);
102 }
103 }
104 }
105
106 Rectangle {
107 anchors.fill: parent
108 color: "black"
109 opacity: greeterWrapper.showProgress * 0.8
110 }
111
112 Item {
113 // Just a tiny wrapper to adjust greeter's x without messing with its own dragging
114 id: greeterWrapper
115 x: launcher.progress
116 width: parent.width
117 height: parent.height
118
119 Behavior on x {
120 enabled: !launcher.dashSwipe
121 StandardAnimation {}
122 }
123
124 readonly property real showProgress: MathUtils.clamp((1 - x/width) + greeter.showProgress - 1, 0, 1)
125 onShowProgressChanged: if (LightDM.Greeter.promptless && showProgress === 0) greeter.login()
126
127 Greeter {
128 id: greeter
129 objectName: "greeter"
130
131 available: true
132 hides: [launcher, panel.indicators]
133 shown: true
134 background: shell.background
135
136 y: panel.panelHeight
137 width: parent.width
138 height: parent.height - panel.panelHeight
139
140 dragHandleWidth: shell.edgeSize
141
142 function login() {
143 enabled = false;
144 LightDM.Greeter.startSessionSync();
145 enabled = true;
146 }
147
148 onShownChanged: {
149 if (shown) {
150 lockscreen.reset();
151 // If there is only one user, we start authenticating with that one here.
152 // If there are more users, the Greeter will handle that
153 if (LightDM.Users.count == 1) {
154 LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole));
155 }
156 greeter.forceActiveFocus();
157 }
158 }
159
160 onUnlocked: hide()
161 onSelected: {
162 // Update launcher items for new user
163 var user = LightDM.Users.data(uid, LightDM.UserRoles.NameRole);
164 AccountsService.user = user;
165 LauncherModel.setUser(user);
166 }
167 onTease: launcher.tease()
168 }
169 }
170
171 InputFilterArea {
172 anchors.fill: parent
173 blockInput: true
174 }
175
176 Item {
177 id: overlay
178
179 anchors.fill: parent
180
181 Panel {
182 id: panel
183 anchors.fill: parent //because this draws indicator menus
184 indicatorsMenuWidth: parent.width > units.gu(60) ? units.gu(40) : parent.width
185 indicators {
186 hides: [launcher]
187 available: !edgeDemo.active
188 }
189 fullscreenMode: false
190 searchVisible: false
191 }
192
193 Launcher {
194 id: launcher
195
196 readonly property bool dashSwipe: progress > 0
197
198 anchors.top: parent.top
199 anchors.bottom: parent.bottom
200 width: parent.width
201 dragAreaWidth: shell.edgeSize
202 available: !edgeDemo.active
203 onLauncherApplicationSelected: {
204 shell.activateApplication("application:///" + appId + ".desktop")
205 }
206 onShownChanged: {
207 if (shown) {
208 panel.indicators.hide()
209 }
210 }
211 onDash: {
212 greeter.hideRight()
213 hide()
214 }
215 onShowDashHome: {
216 SessionBroadcast.requestHomeShown(LightDM.Greeter.authenticationUser)
217 greeter.hide()
218 }
219 }
220
221 Notifications {
222 id: notifications
223
224 model: NotificationBackend.Model
225 margin: units.gu(1)
226
227 anchors {
228 top: parent.top
229 right: parent.right
230 bottom: parent.bottom
231 topMargin: panel.panelHeight
232 }
233 states: [
234 State {
235 name: "narrow"
236 when: overlay.width <= units.gu(60)
237 AnchorChanges { target: notifications; anchors.left: parent.left }
238 },
239 State {
240 name: "wide"
241 when: overlay.width > units.gu(60)
242 AnchorChanges { target: notifications; anchors.left: undefined }
243 PropertyChanges { target: notifications; width: units.gu(38) }
244 }
245 ]
246
247 InputFilterArea {
248 anchors { left: parent.left; right: parent.right }
249 height: parent.contentHeight
250 blockInput: height > 0
251 }
252 }
253 }
254
255 OSKController {
256 anchors.topMargin: panel.panelHeight
257 anchors.fill: parent // as needs to know the geometry of the shell
258 }
259
260 Connections {
261 id: powerConnection
262 target: Powerd
263
264 onDisplayPowerStateChange: {
265 if (status == Powerd.Off) {
266 greeter.show();
267 edgeDemo.paused = true;
268 } else if (status == Powerd.On) {
269 edgeDemo.paused = false;
270 }
271 }
272 }
273
274 Connections {
275 target: LightDM.URLDispatcher
276 onDispatchURL: shell.activateApplication(url)
277 }
278
279 GreeterEdgeDemo {
280 id: edgeDemo
281 greeter: greeter
282 }
283}
0284
=== modified file 'qml/Hud/Hud.qml'
--- qml/Hud/Hud.qml 2014-03-19 17:38:03 +0000
+++ qml/Hud/Hud.qml 2014-05-29 14:11:15 +0000
@@ -227,10 +227,7 @@
227 width: parent.width227 width: parent.width
228228
229 onYChanged: {229 onYChanged: {
230 if (greeter.shown) {230 if (!showAnimation.running && !hideAnimation.running) {
231 showAnimation.duration = 0
232 hideAnimation.duration = 0
233 } else if (!showAnimation.running && !hideAnimation.running) {
234 if (parent.height > 0) {231 if (parent.height > 0) {
235 showAnimation.duration = Math.min(showableAnimationDuration * (1 - (parent.height - y) / parent.height), showableAnimationDuration)232 showAnimation.duration = Math.min(showableAnimationDuration * (1 - (parent.height - y) / parent.height), showableAnimationDuration)
236 hideAnimation.duration = showableAnimationDuration - showAnimation.duration233 hideAnimation.duration = showableAnimationDuration - showAnimation.duration
237234
=== modified file 'qml/Notifications/NotificationMenuItemFactory.qml'
--- qml/Notifications/NotificationMenuItemFactory.qml 2014-04-10 08:37:13 +0000
+++ qml/Notifications/NotificationMenuItemFactory.qml 2014-05-29 14:11:15 +0000
@@ -20,7 +20,6 @@
20import QtQuick 2.020import QtQuick 2.0
21import Ubuntu.Components 0.121import Ubuntu.Components 0.1
22import "../Components"22import "../Components"
23import "../Greeter"
2423
25Loader {24Loader {
26 id: menuFactory25 id: menuFactory
@@ -98,19 +97,36 @@
98 Component {97 Component {
99 id: pinLock98 id: pinLock
10099
101 Lockscreen {100 Item {
102 anchors.left: parent.left; anchors.right: parent.right
103 height: menuFactory.maxHeight101 height: menuFactory.maxHeight
104 placeholderText: i18n.tr("Please enter SIM PIN")102 anchors.left: parent.left
105 background: shell.background103 anchors.right: parent.right
106104
107 onEntered: {105 Rectangle {
108 menuModel.changeState(menuIndex, passphrase);106 // In case background fails to load or is undefined
109 entryEnabled = false;107 anchors.fill: parent
110 }108 color: "black"
111109 }
112 onCancel: {110
113 menuModel.activate(menuIndex, false);111 Image {
112 objectName: "lockscreenBackground"
113 anchors.fill: parent
114 source: shell.background
115 fillMode: Image.PreserveAspectCrop
116 }
117
118 Lockscreen {
119 anchors.fill: parent
120 placeholderText: i18n.tr("Please enter SIM PIN")
121
122 onEntered: {
123 menuModel.changeState(menuIndex, passphrase);
124 entryEnabled = false;
125 }
126
127 onCancel: {
128 menuModel.activate(menuIndex, false);
129 }
114 }130 }
115 }131 }
116 }132 }
117133
=== modified file 'qml/Panel/Panel.qml'
--- qml/Panel/Panel.qml 2014-02-04 23:04:52 +0000
+++ qml/Panel/Panel.qml 2014-05-29 14:11:15 +0000
@@ -62,7 +62,7 @@
62 height: __panelMinusSeparatorLineHeight62 height: __panelMinusSeparatorLineHeight
63 y: 063 y: 0
6464
65 Behavior on y { StandardAnimation { duration: UbuntuAnimation.FastDuration } }65 Behavior on y { StandardAnimation { duration: 500 } }
66 }66 }
6767
68 PanelSeparatorLine {68 PanelSeparatorLine {
6969
=== modified file 'qml/Shell.qml'
--- qml/Shell.qml 2014-05-27 07:46:24 +0000
+++ qml/Shell.qml 2014-05-29 14:11:15 +0000
@@ -21,28 +21,19 @@
21import Ubuntu.Components 0.121import Ubuntu.Components 0.1
22import Ubuntu.Gestures 0.122import Ubuntu.Gestures 0.1
23import Unity.Launcher 0.123import Unity.Launcher 0.1
24import LightDM 0.1 as LightDM
25import Powerd 0.124import Powerd 0.1
26import SessionBroadcast 0.125import SessionBroadcast 0.1
26import SessionManager 0.1
27import "Dash"27import "Dash"
28import "Greeter"
29import "Launcher"28import "Launcher"
30import "Panel"29import "Panel"
31import "Components"30import "Components"
32import "Notifications"31import "Notifications"
33import Unity.Notifications 1.0 as NotificationBackend32import Unity.Notifications 1.0 as NotificationBackend
3433
35FocusScope {34BasicShell {
36 id: shell35 id: shell
3736
38 // this is only here to select the width / height of the window if not running fullscreen
39 property bool tablet: false
40 width: tablet ? units.gu(160) : applicationArguments.hasGeometry() ? applicationArguments.width() : units.gu(40)
41 height: tablet ? units.gu(100) : applicationArguments.hasGeometry() ? applicationArguments.height() : units.gu(71)
42
43 property real edgeSize: units.gu(2)
44 property url defaultBackground: Qt.resolvedUrl(shell.width >= units.gu(60) ? "graphics/tablet_background.jpg" : "graphics/phone_background.jpg")
45 property url background
46 readonly property real panelHeight: panel.panelHeight37 readonly property real panelHeight: panel.panelHeight
4738
48 property bool dashShown: dash.shown39 property bool dashShown: dash.shown
@@ -78,17 +69,7 @@
78 id: backgroundSettings69 id: backgroundSettings
79 schema.id: "org.gnome.desktop.background"70 schema.id: "org.gnome.desktop.background"
80 }71 }
81 property url gSettingsPicture: backgroundSettings.pictureUri != undefined && backgroundSettings.pictureUri.length > 0 ? backgroundSettings.pictureUri : shell.defaultBackground72 backgroundSource: backgroundSettings.pictureUri
82 onGSettingsPictureChanged: {
83 shell.background = gSettingsPicture
84 }
85
86 VolumeControl {
87 id: volumeControl
88 }
89
90 Keys.onVolumeUpPressed: volumeControl.volumeUp()
91 Keys.onVolumeDownPressed: volumeControl.volumeDown()
9273
93 Item {74 Item {
94 id: underlayClipper75 id: underlayClipper
@@ -135,10 +116,9 @@
135 id: dash116 id: dash
136 objectName: "dash"117 objectName: "dash"
137118
138 available: !greeter.shown && !lockscreen.shown
139 hides: [stages, launcher, panel.indicators]119 hides: [stages, launcher, panel.indicators]
140 shown: disappearingAnimationProgress !== 1.0 && greeterWrapper.showProgress !== 1.0120 shown: disappearingAnimationProgress !== 1.0
141 enabled: disappearingAnimationProgress === 0.0 && greeterWrapper.showProgress === 0.0 && edgeDemo.dashEnabled121 enabled: disappearingAnimationProgress === 0.0 && edgeDemo.dashEnabled
142122
143 anchors {123 anchors {
144 fill: parent124 fill: parent
@@ -226,7 +206,6 @@
226 shown = true;206 shown = true;
227 panel.indicators.hide();207 panel.indicators.hide();
228 edgeDemo.stopDemo();208 edgeDemo.stopDemo();
229 greeter.hide();
230 if (!ApplicationManager.focusedApplicationId && ApplicationManager.count > 0 && focusApp) {209 if (!ApplicationManager.focusedApplicationId && ApplicationManager.count > 0 && focusApp) {
231 ApplicationManager.focusApplication(ApplicationManager.get(0).appId);210 ApplicationManager.focusApplication(ApplicationManager.get(0).appId);
232 }211 }
@@ -267,6 +246,12 @@
267 }246 }
268 }247 }
269248
249 Binding {
250 target: ApplicationManager
251 property: "suspended"
252 value: !SessionManager.active
253 }
254
270 Loader {255 Loader {
271 id: applicationsDisplayLoader256 id: applicationsDisplayLoader
272 anchors.fill: parent257 anchors.fill: parent
@@ -291,132 +276,9 @@
291 }276 }
292 }277 }
293278
294 Lockscreen {
295 id: lockscreen
296 objectName: "lockscreen"
297
298 readonly property int backgroundTopMargin: -panel.panelHeight
299
300 hides: [launcher, panel.indicators]
301 shown: false
302 enabled: true
303 showAnimation: StandardAnimation { property: "opacity"; to: 1 }
304 hideAnimation: StandardAnimation { property: "opacity"; to: 0 }
305 y: panel.panelHeight
306 x: required ? 0 : - width
307 width: parent.width
308 height: parent.height - panel.panelHeight
309 background: shell.background
310 minPinLength: 4
311 maxPinLength: 4
312
313 onEntered: LightDM.Greeter.respond(passphrase);
314 onCancel: greeter.show()
315
316 Component.onCompleted: {
317 if (LightDM.Users.count == 1) {
318 LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole))
319 }
320 }
321 }
322
323 Connections {
324 target: LightDM.Greeter
325
326 onShowPrompt: {
327 if (LightDM.Users.count == 1) {
328 // TODO: There's no better way for now to determine if its a PIN or a passphrase.
329 if (text == "PIN") {
330 lockscreen.alphaNumeric = false
331 } else {
332 lockscreen.alphaNumeric = true
333 }
334 lockscreen.placeholderText = i18n.tr("Please enter %1").arg(text);
335 lockscreen.show();
336 }
337 }
338
339 onAuthenticationComplete: {
340 if (LightDM.Greeter.promptless) {
341 return;
342 }
343 if (LightDM.Greeter.authenticated) {
344 lockscreen.hide();
345 } else {
346 lockscreen.clear(true);
347 }
348 }
349 }
350
351 Rectangle {
352 anchors.fill: parent
353 color: "black"
354 opacity: greeterWrapper.showProgress * 0.8
355 }
356
357 Item {
358 // Just a tiny wrapper to adjust greeter's x without messing with its own dragging
359 id: greeterWrapper
360 x: launcher.progress
361 y: panel.panelHeight
362 width: parent.width
363 height: parent.height - panel.panelHeight
364
365 Behavior on x {
366 enabled: !launcher.dashSwipe
367 StandardAnimation {}
368 }
369
370 readonly property real showProgress: MathUtils.clamp((1 - x/width) + greeter.showProgress - 1, 0, 1)
371
372 Greeter {
373 id: greeter
374 objectName: "greeter"
375
376 available: true
377 hides: [launcher, panel.indicators]
378 shown: true
379
380 defaultBackground: shell.background
381
382 width: parent.width
383 height: parent.height
384
385 dragHandleWidth: shell.edgeSize
386
387 onShownChanged: {
388 if (shown) {
389 lockscreen.reset();
390 // If there is only one user, we start authenticating with that one here.
391 // If there are more users, the Greeter will handle that
392 if (LightDM.Users.count == 1) {
393 LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole));
394 }
395 greeter.forceActiveFocus();
396 }
397 }
398
399 onUnlocked: greeter.hide()
400 onSelected: {
401 // Update launcher items for new user
402 var user = LightDM.Users.data(uid, LightDM.UserRoles.NameRole);
403 AccountsService.user = user;
404 LauncherModel.setUser(user);
405 }
406
407 onTease: launcher.tease()
408
409 Binding {
410 target: ApplicationManager
411 property: "suspended"
412 value: greeter.shown && greeterWrapper.showProgress == 1
413 }
414 }
415 }
416
417 InputFilterArea {279 InputFilterArea {
418 anchors.fill: parent280 anchors.fill: parent
419 blockInput: ApplicationManager.focusedApplicationId.length === 0 || greeter.shown || lockscreen.shown || launcher.shown281 blockInput: ApplicationManager.focusedApplicationId.length === 0 || launcher.shown
420 || panel.indicators.shown282 || panel.indicators.shown
421 }283 }
422284
@@ -428,7 +290,7 @@
428 // We ignore any display-off signals when the proximity sensor290 // We ignore any display-off signals when the proximity sensor
429 // is active. This usually indicates something like a phone call.291 // is active. This usually indicates something like a phone call.
430 if (status == Powerd.Off && (flags & Powerd.UseProximity) == 0) {292 if (status == Powerd.Off && (flags & Powerd.UseProximity) == 0) {
431 greeter.showNow();293 SessionManager.lock();
432 }294 }
433295
434 // No reason to chew demo CPU when user isn't watching296 // No reason to chew demo CPU when user isn't watching
@@ -440,17 +302,12 @@
440 }302 }
441 }303 }
442304
443 function showHome() {305 function showHome(fromLauncher) {
444 var animate = !greeter.shown && !stages.shown306 var animate = fromLauncher && !stages.shown
445 greeter.hide()
446 dash.setCurrentScope("clickscope", animate, false)307 dash.setCurrentScope("clickscope", animate, false)
447 stages.hide()308 stages.hide()
448 }309 }
449310
450 function hideIndicatorMenu(delay) {
451 panel.hideIndicatorMenu(delay);
452 }
453
454 Item {311 Item {
455 id: overlay312 id: overlay
456313
@@ -467,8 +324,8 @@
467 }324 }
468 property string focusedAppId: ApplicationManager.focusedApplicationId325 property string focusedAppId: ApplicationManager.focusedApplicationId
469 property var focusedApplication: ApplicationManager.findApplication(focusedAppId)326 property var focusedApplication: ApplicationManager.findApplication(focusedAppId)
470 fullscreenMode: focusedApplication && stages.fullscreen && !greeter.shown && !lockscreen.shown327 fullscreenMode: focusedApplication && stages.fullscreen
471 searchVisible: !greeter.shown && !lockscreen.shown && dash.shown && dash.searchable328 searchVisible: dash.shown && dash.searchable
472329
473 InputFilterArea {330 InputFilterArea {
474 anchors {331 anchors {
@@ -506,8 +363,9 @@
506 if (edgeDemo.running)363 if (edgeDemo.running)
507 return;364 return;
508365
509 showHome()366 showHome(true)
510 }367 }
368
511 onDash: {369 onDash: {
512 if (stages.shown && !stages.overlayMode) {370 if (stages.shown && !stages.overlayMode) {
513 if (!stages.locked) {371 if (!stages.locked) {
@@ -515,10 +373,6 @@
515 launcher.hide();373 launcher.hide();
516 }374 }
517 }375 }
518 if (greeter.shown) {
519 greeter.hideRight();
520 launcher.hide();
521 }
522 }376 }
523 onDashSwipeChanged: if (dashSwipe && stages.shown) dash.setCurrentScope("clickscope", false, true)377 onDashSwipeChanged: if (dashSwipe && stages.shown) dash.setCurrentScope("clickscope", false, true)
524 onLauncherApplicationSelected: {378 onLauncherApplicationSelected: {
@@ -535,7 +389,7 @@
535 Rectangle {389 Rectangle {
536 id: modalNotificationBackground390 id: modalNotificationBackground
537391
538 visible: notifications.useModal && !greeter.shown && (notifications.state == "narrow")392 visible: notifications.useModal && (notifications.state == "narrow")
539 color: "#000000"393 color: "#000000"
540 anchors.fill: parent394 anchors.fill: parent
541 opacity: 0.5395 opacity: 0.5
@@ -582,11 +436,18 @@
582 blockInput: height > 0436 blockInput: height > 0
583 }437 }
584 }438 }
439
440 Connections {
441 target: SessionManager
442 onActiveChanged: {
443 if (!SessionManager.active) {
444 launcher.hide()
445 panel.indicators.hide()
446 }
447 }
448 }
585 }449 }
586450
587 focus: true
588 onFocusChanged: if (!focus) forceActiveFocus();
589
590 InputFilterArea {451 InputFilterArea {
591 anchors {452 anchors {
592 top: parent.top453 top: parent.top
@@ -607,12 +468,6 @@
607 blockInput: true468 blockInput: true
608 }469 }
609470
610 Binding {
611 target: i18n
612 property: "domain"
613 value: "unity8"
614 }
615
616 OSKController {471 OSKController {
617 anchors.topMargin: panel.panelHeight472 anchors.topMargin: panel.panelHeight
618 anchors.fill: parent // as needs to know the geometry of the shell473 anchors.fill: parent // as needs to know the geometry of the shell
@@ -644,7 +499,6 @@
644499
645 EdgeDemo {500 EdgeDemo {
646 id: edgeDemo501 id: edgeDemo
647 greeter: greeter
648 launcher: launcher502 launcher: launcher
649 dash: dash503 dash: dash
650 indicators: panel.indicators504 indicators: panel.indicators
@@ -653,6 +507,6 @@
653507
654 Connections {508 Connections {
655 target: SessionBroadcast509 target: SessionBroadcast
656 onShowHome: showHome()510 onShowHome: showHome(false)
657 }511 }
658}512}
659513
=== modified file 'run.sh'
--- run.sh 2014-05-13 08:33:21 +0000
+++ run.sh 2014-05-29 14:11:15 +0000
@@ -18,13 +18,14 @@
18 echo " -p, --pinlock Use a pin protected user." >&218 echo " -p, --pinlock Use a pin protected user." >&2
19 echo " -k, --keylock Use a passphrase protected user." >&219 echo " -k, --keylock Use a passphrase protected user." >&2
20 echo " -g, --gdb Run through gdb." >&220 echo " -g, --gdb Run through gdb." >&2
21 echo " -G, --greeter Run the greeter instead of the shell." >&2
21 echo " -h, --help Show this help." >&222 echo " -h, --help Show this help." >&2
22 echo " -m, --nomousetouch Run without -mousetouch argument." >&223 echo " -m, --nomousetouch Run without -mousetouch argument." >&2
23 echo >&224 echo >&2
24 exit 125 exit 1
25}26}
2627
27ARGS=`getopt -n$0 -u -a --longoptions="fake,pinlock,keylock,gdb,help,nomousetouch" -o "fpkghm" -- "$@"`28ARGS=`getopt -n$0 -u -a --longoptions="fake,pinlock,keylock,gdb,greeter,help,nomousetouch" -o "fpkgGhm" -- "$@"`
28[ $? -ne 0 ] && usage29[ $? -ne 0 ] && usage
29eval set -- "$ARGS"30eval set -- "$ARGS"
3031
@@ -35,6 +36,7 @@
35 -p|--pinlock) PINLOCK=true;;36 -p|--pinlock) PINLOCK=true;;
36 -k|--keylock) KEYLOCK=true;;37 -k|--keylock) KEYLOCK=true;;
37 -g|--gdb) GDB=true;;38 -g|--gdb) GDB=true;;
39 -G|--greeter) QML_PHONE_SHELL_PATH=./builddir/src/unity8-greeter;;
38 -h|--help) usage;;40 -h|--help) usage;;
39 -m|--nomousetouch) MOUSE_TOUCH=false;;41 -m|--nomousetouch) MOUSE_TOUCH=false;;
40 --) shift;break;;42 --) shift;break;;
@@ -44,17 +46,17 @@
4446
45if $FAKE; then47if $FAKE; then
46 export QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$PWD/builddir/tests/mocks:$PWD/builddir/plugins:$PWD/builddir/modules48 export QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$PWD/builddir/tests/mocks:$PWD/builddir/plugins:$PWD/builddir/modules
47 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/builddir/tests/mocks/libusermetrics:$PWD/builddir/tests/mocks/LightDM/single49 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/builddir/tests/mocks/libusermetrics:$PWD/builddir/tests/mocks/liblightdm/single
48fi50fi
4951
50if $PINLOCK; then52if $PINLOCK; then
51 export QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$PWD/builddir/tests/mocks:$PWD/builddir/plugins:$PWD/builddir/modules53 export QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$PWD/builddir/tests/mocks:$PWD/builddir/plugins:$PWD/builddir/modules
52 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/builddir/tests/mocks/libusermetrics:$PWD/builddir/tests/mocks/LightDM/single-pin54 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/builddir/tests/mocks/libusermetrics:$PWD/builddir/tests/mocks/liblightdm/single-pin
53fi55fi
5456
55if $KEYLOCK; then57if $KEYLOCK; then
56 export QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$PWD/builddir/tests/mocks:$PWD/builddir/plugins:$PWD/builddir/modules58 export QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$PWD/builddir/tests/mocks:$PWD/builddir/plugins:$PWD/builddir/modules
57 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/builddir/tests/mocks/libusermetrics:$PWD/builddir/tests/mocks/LightDM/single-passphrase59 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/builddir/tests/mocks/libusermetrics:$PWD/builddir/tests/mocks/liblightdm/single-passphrase
58fi60fi
5961
60# Force icon theme if running on the desktop, otherwise gnome theme (if running62# Force icon theme if running on the desktop, otherwise gnome theme (if running
6163
=== modified file 'src/CMakeLists.txt'
--- src/CMakeLists.txt 2014-01-09 08:59:44 +0000
+++ src/CMakeLists.txt 2014-05-29 14:11:15 +0000
@@ -15,24 +15,36 @@
15 ${CMAKE_SOURCE_DIR}/tests/*.svg15 ${CMAKE_SOURCE_DIR}/tests/*.svg
16)16)
1717
18add_executable(${SHELL_APP}18set(COMMON_SRCS
19 ApplicationArguments.h19 ApplicationArguments.h
20 main.cpp20 main.cpp
21 MouseTouchAdaptor.cpp21 MouseTouchAdaptor.cpp
22 ${QML_FILES} # This is to make qml and image files appear in the IDE's project tree22 ${QML_FILES} # This is to make qml and image files appear in the IDE's project tree
23)23 )
24add_executable(${SHELL_APP} ${COMMON_SRCS})
25add_executable(${GREETER_APP} ${COMMON_SRCS})
26
27set_target_properties(${SHELL_APP} PROPERTIES
28 COMPILE_DEFINITIONS "UNITY8_GREETER=0"
29 )
30set_target_properties(${GREETER_APP} PROPERTIES
31 COMPILE_DEFINITIONS "UNITY8_GREETER=1"
32 )
2433
25qt5_use_modules(${SHELL_APP} Gui Qml Quick Test)34qt5_use_modules(${SHELL_APP} Gui Qml Quick Test)
35qt5_use_modules(${GREETER_APP} Gui Qml Quick Test)
26pkg_check_modules(XCB REQUIRED xcb)36pkg_check_modules(XCB REQUIRED xcb)
2737
28if (NOT "${XCB_INCLUDE_DIRS}" STREQUAL "")38if (NOT "${XCB_INCLUDE_DIRS}" STREQUAL "")
29 set_target_properties(${SHELL_APP} PROPERTIES INCLUDE_DIRECTORIES ${XCB_INCLUDE_DIRS})39 set_target_properties(${SHELL_APP} PROPERTIES INCLUDE_DIRECTORIES ${XCB_INCLUDE_DIRS})
40 set_target_properties(${GREETER_APP} PROPERTIES INCLUDE_DIRECTORIES ${XCB_INCLUDE_DIRS})
3041
31 target_link_libraries(${SHELL_APP} ${XCB_LDFLAGS})42 target_link_libraries(${SHELL_APP} ${XCB_LDFLAGS})
43 target_link_libraries(${GREETER_APP} ${XCB_LDFLAGS})
32endif()44endif()
3345
34# install binaries46# install binaries
35install(TARGETS ${SHELL_APP}47install(TARGETS ${SHELL_APP} ${GREETER_APP}
36 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}48 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
37 )49 )
3850
3951
=== modified file 'src/main.cpp'
--- src/main.cpp 2014-05-13 08:33:50 +0000
+++ src/main.cpp 2014-05-29 14:11:15 +0000
@@ -26,6 +26,7 @@
26#include <qpa/qplatformnativeinterface.h>26#include <qpa/qplatformnativeinterface.h>
27#include <QLibrary>27#include <QLibrary>
28#include <QDebug>28#include <QDebug>
29#include <QProcess>
29#include <libintl.h>30#include <libintl.h>
30#include <dlfcn.h>31#include <dlfcn.h>
31#include <csignal>32#include <csignal>
@@ -42,7 +43,7 @@
42{43{
43 const bool isUbuntuMirServer = qgetenv("QT_QPA_PLATFORM") == "ubuntumirserver";44 const bool isUbuntuMirServer = qgetenv("QT_QPA_PLATFORM") == "ubuntumirserver";
4445
45 QGuiApplication::setApplicationName("Unity 8");46 QGuiApplication::setApplicationName(UNITY8_GREETER ? "Unity 8 Greeter" : "Unity 8");
46 QGuiApplication *application;47 QGuiApplication *application;
4748
48 QCommandLineParser parser;49 QCommandLineParser parser;
@@ -93,7 +94,7 @@
9394
94 QString indicatorProfile = qgetenv("UNITY_INDICATOR_PROFILE");95 QString indicatorProfile = qgetenv("UNITY_INDICATOR_PROFILE");
95 if (indicatorProfile.isEmpty()) {96 if (indicatorProfile.isEmpty()) {
96 indicatorProfile = "phone";97 indicatorProfile = UNITY8_GREETER ? "phone_greeter" : "phone";
97 }98 }
9899
99 resolveIconTheme();100 resolveIconTheme();
@@ -152,7 +153,7 @@
152 nativeInterface->setProperty("ubuntuSessionType", 1);153 nativeInterface->setProperty("ubuntuSessionType", 1);
153 view->setProperty("role", 2); // INDICATOR_ACTOR_ROLE154 view->setProperty("role", 2); // INDICATOR_ACTOR_ROLE
154155
155 QUrl source(::qmlDirectory()+"Shell.qml");156 QUrl source(::qmlDirectory() + (UNITY8_GREETER ? "GreeterShell.qml" : "Shell.qml"));
156 prependImportPaths(view->engine(), ::overrideImportPaths());157 prependImportPaths(view->engine(), ::overrideImportPaths());
157 if (!isUbuntuMirServer) {158 if (!isUbuntuMirServer) {
158 prependImportPaths(view->engine(), ::nonMirImportPaths());159 prependImportPaths(view->engine(), ::nonMirImportPaths());
@@ -160,7 +161,7 @@
160 appendImportPaths(view->engine(), ::fallbackImportPaths());161 appendImportPaths(view->engine(), ::fallbackImportPaths());
161162
162 view->setSource(source);163 view->setSource(source);
163 view->setColor("transparent");164 view->setColor(Qt::transparent);
164165
165 if (qgetenv("QT_QPA_PLATFORM") == "ubuntu" || isUbuntuMirServer || parser.isSet(fullscreenOption)) {166 if (qgetenv("QT_QPA_PLATFORM") == "ubuntu" || isUbuntuMirServer || parser.isSet(fullscreenOption)) {
166 view->showFullScreen();167 view->showFullScreen();
@@ -168,6 +169,19 @@
168 view->show();169 view->show();
169 }170 }
170171
172#if UNITY8_GREETER
173 if (isUbuntuMirServer) {
174 // Add alpha to surface, so that the greeter can bleed through
175 QSurfaceFormat format;
176 format.setAlphaBufferSize(8);
177 view->setFormat(format);
178 }
179
180 if (!QProcess::startDetached("/sbin/initctl emit --no-wait unity8-greeter-started")) {
181 qDebug() << "Unable to send unity8-greeter-started event to Upstart";
182 }
183#endif
184
171 int result = application->exec();185 int result = application->exec();
172186
173 delete view;187 delete view;
174188
=== modified file 'tests/autopilot/unity8/application_lifecycle/tests/__init__.py'
--- tests/autopilot/unity8/application_lifecycle/tests/__init__.py 2014-04-14 19:45:11 +0000
+++ tests/autopilot/unity8/application_lifecycle/tests/__init__.py 2014-05-29 14:11:15 +0000
@@ -31,8 +31,6 @@
31 super(ApplicationLifeCycleTestCase, self).setUp()31 super(ApplicationLifeCycleTestCase, self).setUp()
32 self._qml_mock_enabled = False32 self._qml_mock_enabled = False
33 self._data_dirs_mock_enabled = False33 self._data_dirs_mock_enabled = False
34 unity_proxy = self.launch_unity()
35 process_helpers.unlock_unity(unity_proxy)
3634
37 def create_test_application(self):35 def create_test_application(self):
38 desktop_file_dict = fixture_setup.DEFAULT_DESKTOP_FILE_DICT36 desktop_file_dict = fixture_setup.DEFAULT_DESKTOP_FILE_DICT
3937
=== modified file 'tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py'
--- tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py 2014-04-14 19:45:11 +0000
+++ tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py 2014-05-29 14:11:15 +0000
@@ -24,11 +24,8 @@
24import logging24import logging
25import os25import os
2626
27from autopilot.matchers import Eventually
28from autopilot.platform import model27from autopilot.platform import model
29from testtools.matchers import Equals
3028
31from unity8 import process_helpers
32from unity8.application_lifecycle import tests29from unity8.application_lifecycle import tests
3330
3431
@@ -41,6 +38,7 @@
41 if model() == 'Desktop':38 if model() == 'Desktop':
42 self.skipTest('Test cannot be run on the desktop.')39 self.skipTest('Test cannot be run on the desktop.')
43 super(ApplicationLifecycleTests, self).setUp()40 super(ApplicationLifecycleTests, self).setUp()
41 self.launch_unity()
4442
45 def swipe_screen_from_right(self):43 def swipe_screen_from_right(self):
46 width = self.main_window.width44 width = self.main_window.width
@@ -89,29 +87,3 @@
89 self.swipe_screen_from_right()87 self.swipe_screen_from_right()
9088
91 self.assert_current_focused_application(application1_name)89 self.assert_current_focused_application(application1_name)
92
93 def test_greeter_hides_on_app_open(self):
94 """Greeter should hide when an app is opened"""
95 process_helpers.lock_unity()
96 greeter = self.main_window.get_greeter()
97 self.assertThat(greeter.created, Eventually(Equals(True)))
98
99 application_name = self.launch_fake_app()
100 self.assertThat(greeter.created, Eventually(Equals(False)))
101 self.assert_current_focused_application(application_name)
102
103 def test_greeter_hides_on_app_focus(self):
104 """Greeter should hide when an app is re-focused"""
105 application_name = self.launch_fake_app()
106 self.assert_current_focused_application(application_name)
107
108 self.main_window.show_dash_swiping()
109 self.assert_current_focused_application('')
110
111 process_helpers.lock_unity()
112 greeter = self.main_window.get_greeter()
113 self.assertThat(greeter.created, Eventually(Equals(True)))
114
115 self.launch_upstart_application(application_name)
116 self.assertThat(greeter.created, Eventually(Equals(False)))
117 self.assert_current_focused_application(application_name)
11890
=== added file 'tests/autopilot/unity8/application_lifecycle/tests/test_greeter.py'
--- tests/autopilot/unity8/application_lifecycle/tests/test_greeter.py 1970-01-01 00:00:00 +0000
+++ tests/autopilot/unity8/application_lifecycle/tests/test_greeter.py 2014-05-29 14:11:15 +0000
@@ -0,0 +1,75 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Unity Autopilot Test Suite
4# Copyright (C) 2013, 2014 Canonical
5#
6# This program is free software: you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation, either version 3 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18#
19
20"""Tests for the application lifecycle in the greeter."""
21
22from __future__ import absolute_import
23
24import logging
25import os
26import subprocess
27
28from autopilot.matchers import Eventually
29from autopilot.platform import model
30from testtools.matchers import Equals
31
32from unity8.application_lifecycle import tests
33from unity8.shell import with_lightdm_mock
34
35
36logger = logging.getLogger(__name__)
37
38
39class GreeterApplicationLifecycleTests(tests.ApplicationLifeCycleTestCase):
40
41 def setUp(self):
42 if model() == 'Desktop':
43 self.skipTest('Test cannot be run on the desktop.')
44 super(GreeterApplicationLifecycleTests, self).setUp()
45 # Kill user's url-dispatcher daemon, because we want to own its dbus
46 # name during these tests.
47 try:
48 subprocess.check_output(
49 ["/sbin/initctl", "stop", "url-dispatcher"],
50 stderr=subprocess.STDOUT
51 )
52 except subprocess.CalledProcessError:
53 logger.warning("Appears url-dispatcher was already stopped!")
54 self.addCleanup(self._start_dispatcher)
55 self.launch_greeter()
56
57 def _start_dispatcher(self):
58 subprocess.call(
59 ["/sbin/initctl", "start", "url-dispatcher"],
60 stderr=subprocess.STDOUT
61 )
62
63 @with_lightdm_mock("single")
64 def test_greeter_hides_on_url_dispatcher(self):
65 """Greeter should hide when an app is opened"""
66 greeter = self.main_window.get_greeter()
67 self.assertThat(greeter.created, Eventually(Equals(True)))
68
69 _, desktop_file_path = self.create_test_application()
70 desktop_file_name = os.path.basename(desktop_file_path)
71 application_name, _ = os.path.splitext(desktop_file_name)
72
73 subprocess.check_call(
74 ['url-dispatcher', 'application:///{}'.format(desktop_file_name)])
75 self.assertThat(greeter.created, Eventually(Equals(False)))
076
=== modified file 'tests/autopilot/unity8/application_lifecycle/tests/test_url_dispatcher.py'
--- tests/autopilot/unity8/application_lifecycle/tests/test_url_dispatcher.py 2014-04-11 16:01:28 +0000
+++ tests/autopilot/unity8/application_lifecycle/tests/test_url_dispatcher.py 2014-05-29 14:11:15 +0000
@@ -33,6 +33,7 @@
33 if platform.model() == 'Desktop':33 if platform.model() == 'Desktop':
34 self.skipTest("URL dispatcher doesn't work on the desktop.")34 self.skipTest("URL dispatcher doesn't work on the desktop.")
35 super(URLDispatcherTestCase, self).setUp()35 super(URLDispatcherTestCase, self).setUp()
36 self.launch_unity()
3637
37 def test_swipe_out_application_started_by_url_dispatcher(self):38 def test_swipe_out_application_started_by_url_dispatcher(self):
38 _, desktop_file_path = self.create_test_application()39 _, desktop_file_path = self.create_test_application()
3940
=== modified file 'tests/autopilot/unity8/indicators/tests/test_indicators.py'
--- tests/autopilot/unity8/indicators/tests/test_indicators.py 2014-04-09 15:28:42 +0000
+++ tests/autopilot/unity8/indicators/tests/test_indicators.py 2014-05-29 14:11:15 +0000
@@ -22,7 +22,6 @@
2222
23from autopilot import platform23from autopilot import platform
2424
25from unity8.process_helpers import unlock_unity
26from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios25from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
2726
2827
@@ -35,7 +34,6 @@
35 self.skipTest('Test cannot be run on the desktop.')34 self.skipTest('Test cannot be run on the desktop.')
36 super(IndicatorTestCase, self).setUp()35 super(IndicatorTestCase, self).setUp()
37 self.unity_proxy = self.launch_unity()36 self.unity_proxy = self.launch_unity()
38 unlock_unity(self.unity_proxy)
3937
4038
41class IndicatorExistsTestCase(IndicatorTestCase):39class IndicatorExistsTestCase(IndicatorTestCase):
4240
=== modified file 'tests/autopilot/unity8/process_helpers.py'
--- tests/autopilot/unity8/process_helpers.py 2014-05-14 22:48:45 +0000
+++ tests/autopilot/unity8/process_helpers.py 2014-05-29 14:11:15 +0000
@@ -40,62 +40,6 @@
40 pass40 pass
4141
4242
43def unlock_unity(unity_proxy_obj=None):
44 """Helper function that attempts to unlock the unity greeter.
45
46 If unity_proxy_object is None create a proxy object by querying for the
47 running unity process.
48 Otherwise re-use the passed proxy object.
49
50 :raises RuntimeError: if the greeter attempts and fails to be unlocked.
51
52 :raises RuntimeWarning: when the greeter cannot be found because it is
53 already unlocked.
54 :raises CannotAccessUnity: if unity is not introspectable or cannot be
55 found on dbus.
56 :raises CannotAccessUnity: if unity's upstart status is not "start" or the
57 upstart job cannot be found at all.
58
59 """
60 if unity_proxy_obj is None:
61 try:
62 pid = _get_unity_pid()
63 unity = _get_unity_proxy_object(pid)
64 main_window = unity.select_single(main_window_emulator.QQuickView)
65 except ProcessSearchError as e:
66 raise CannotAccessUnity(
67 "Cannot introspect unity, make sure that it has been started "
68 "with testability. Perhaps use the function "
69 "'restart_unity_with_testability' this module provides."
70 "(%s)"
71 % str(e)
72 )
73 else:
74 main_window = unity_proxy_obj.select_single(
75 main_window_emulator.QQuickView)
76
77 greeter = main_window.get_greeter()
78 if greeter.created == False:
79 raise RuntimeWarning("Greeter appears to be already unlocked.")
80
81 # Because of potential input jerkiness under heavy load,
82 # retry unlocking the greeter two times.
83 # https://bugs.launchpad.net/ubuntu/+bug/1260113
84
85 retries = 3
86 while retries > 0:
87 try:
88 greeter.swipe()
89 except AssertionError:
90 retries -= 1
91 if retries == 0:
92 raise
93 logger.info("Failed to unlock greeter, trying again...")
94 else:
95 logger.info("Greeter unlocked, continuing.")
96 break
97
98
99def lock_unity(unity_proxy_obj=None):43def lock_unity(unity_proxy_obj=None):
100 """Helper function that attempts to lock the unity greeter."""44 """Helper function that attempts to lock the unity greeter."""
101 import evdev, time45 import evdev, time
10246
=== modified file 'tests/autopilot/unity8/shell/tests/__init__.py'
--- tests/autopilot/unity8/shell/tests/__init__.py 2014-03-27 12:37:44 +0000
+++ tests/autopilot/unity8/shell/tests/__init__.py 2014-05-29 14:11:15 +0000
@@ -249,9 +249,9 @@
249 "%s=%s" % (key, value)249 "%s=%s" % (key, value)
250 ], stderr=subprocess.STDOUT)250 ], stderr=subprocess.STDOUT)
251251
252 def launch_unity(self, **kwargs):252 def _launch(self, executable, ready_func, **kwargs):
253 """Launch the unity shell, return a proxy object for it."""253 """Launch the unity shell, return a proxy object for it."""
254 binary_path = get_binary_path()254 binary_path = get_binary_path(executable)
255 lib_path = get_lib_path()255 lib_path = get_lib_path()
256256
257 logger.info(257 logger.info(
@@ -293,11 +293,19 @@
293293
294 # Ensure that the dash is visible before we return:294 # Ensure that the dash is visible before we return:
295 logger.debug("Unity started, waiting for it to be ready.")295 logger.debug("Unity started, waiting for it to be ready.")
296 self.assertUnityReady()296 ready_func()
297 logger.debug("Unity loaded and ready.")297 logger.debug("Unity loaded and ready.")
298298
299 return app_proxy299 return app_proxy
300300
301 def launch_unity(self, **kwargs):
302 """Launch the unity shell, return a proxy object for it."""
303 return self._launch("unity8", self.assertUnityReady, **kwargs)
304
305 def launch_greeter(self, **kwargs):
306 """Launch the unity shell, return a proxy object for it."""
307 return self._launch("unity8-greeter", self.assertGreeterReady, **kwargs)
308
301 def _launch_unity_with_upstart(self, binary_path, args):309 def _launch_unity_with_upstart(self, binary_path, args):
302 logger.info("Starting unity")310 logger.info("Starting unity")
303 self._patch_environment("QT_LOAD_TESTABILITY", 1)311 self._patch_environment("QT_LOAD_TESTABILITY", 1)
@@ -344,7 +352,7 @@
344 def _get_lightdm_mock_path(self, mock_type):352 def _get_lightdm_mock_path(self, mock_type):
345 lib_path = get_mocks_library_path()353 lib_path = get_mocks_library_path()
346 lightdm_mock_path = os.path.abspath(354 lightdm_mock_path = os.path.abspath(
347 os.path.join(lib_path, "LightDM", mock_type)355 os.path.join(lib_path, "liblightdm", mock_type)
348 )356 )
349357
350 if not os.path.exists(lightdm_mock_path):358 if not os.path.exists(lightdm_mock_path):
@@ -386,6 +394,10 @@
386 )394 )
387 self.assertThat(home_scope.isCurrent, Eventually(Equals(True)))395 self.assertThat(home_scope.isCurrent, Eventually(Equals(True)))
388396
397 def assertGreeterReady(self):
398 greeter = self.main_window.get_greeter()
399 self.assertThat(greeter.created, Eventually(Equals(True)))
400
389 def get_dash(self):401 def get_dash(self):
390 dash = self._proxy.wait_select_single(Dash)402 dash = self._proxy.wait_select_single(Dash)
391 return dash403 return dash
392404
=== modified file 'tests/autopilot/unity8/shell/tests/disabled_test_hud.py'
--- tests/autopilot/unity8/shell/tests/disabled_test_hud.py 2014-03-17 11:44:05 +0000
+++ tests/autopilot/unity8/shell/tests/disabled_test_hud.py 2014-05-29 14:11:15 +0000
@@ -19,8 +19,7 @@
1919
20from __future__ import absolute_import20from __future__ import absolute_import
2121
22from unity8.process_helpers import unlock_unity22from unity8.shell import DragMixin
23from unity8.shell import with_lightdm_mock, DragMixin
24from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios23from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
2524
26from testtools.matchers import Equals25from testtools.matchers import Equals
@@ -40,7 +39,6 @@
4039
41 """40 """
42 unity_proxy = self.launch_unity()41 unity_proxy = self.launch_unity()
43 unlock_unity(unity_proxy)
44 hud_show_button = self.main_window.get_hud_show_button()42 hud_show_button = self.main_window.get_hud_show_button()
45 edge_drag_area = self.main_window.get_hud_edge_drag_area()43 edge_drag_area = self.main_window.get_hud_edge_drag_area()
46 hud = self.main_window.get_hud()44 hud = self.main_window.get_hud()
@@ -81,7 +79,6 @@
8179
82 """80 """
83 unity_proxy = self.launch_unity()81 unity_proxy = self.launch_unity()
84 unlock_unity(unity_proxy)
85 hud_show_button = self.main_window.get_hud_show_button()82 hud_show_button = self.main_window.get_hud_show_button()
86 hud = self.main_window.get_hud()83 hud = self.main_window.get_hud()
8784
@@ -117,7 +114,6 @@
117 def test_hide_hud_click(self):114 def test_hide_hud_click(self):
118 """Tapping the close button of the Hud must dismiss it."""115 """Tapping the close button of the Hud must dismiss it."""
119 unity_proxy = self.launch_unity()116 unity_proxy = self.launch_unity()
120 unlock_unity(unity_proxy)
121 hud = self.main_window.get_hud()117 hud = self.main_window.get_hud()
122118
123 self._launch_test_app_from_app_screen()119 self._launch_test_app_from_app_screen()
@@ -134,7 +130,6 @@
134130
135 """131 """
136 unity_proxy = self.launch_unity()132 unity_proxy = self.launch_unity()
137 unlock_unity(unity_proxy)
138 hud = self.main_window.get_hud()133 hud = self.main_window.get_hud()
139134
140 self._launch_test_app_from_app_screen()135 self._launch_test_app_from_app_screen()
@@ -151,7 +146,6 @@
151 def test_launcher_hides_hud(self):146 def test_launcher_hides_hud(self):
152 """Opening the Launcher while the Hud is active must close the Hud."""147 """Opening the Launcher while the Hud is active must close the Hud."""
153 unity_proxy = self.launch_unity()148 unity_proxy = self.launch_unity()
154 unlock_unity(unity_proxy)
155 hud = self.main_window.get_hud()149 hud = self.main_window.get_hud()
156 launcher = self.main_window.get_launcher()150 launcher = self.main_window.get_launcher()
157151
158152
=== modified file 'tests/autopilot/unity8/shell/tests/test_emulators.py'
--- tests/autopilot/unity8/shell/tests/test_emulators.py 2014-04-17 08:17:09 +0000
+++ tests/autopilot/unity8/shell/tests/test_emulators.py 2014-05-29 14:11:15 +0000
@@ -34,7 +34,6 @@
3434
35from testtools.matchers import Contains, HasLength35from testtools.matchers import Contains, HasLength
3636
37from unity8 import process_helpers
38from unity8.shell import emulators, fixture_setup, tests37from unity8.shell import emulators, fixture_setup, tests
39from unity8.shell.emulators import dash as dash_emulators38from unity8.shell.emulators import dash as dash_emulators
4039
@@ -46,7 +45,6 @@
46 def setUp(self):45 def setUp(self):
47 super(MainWindowTestCase, self).setUp()46 super(MainWindowTestCase, self).setUp()
48 unity_proxy = self.launch_unity()47 unity_proxy = self.launch_unity()
49 process_helpers.unlock_unity(unity_proxy)
5048
51 def test_search(self):49 def test_search(self):
52 self.main_window.search('Test')50 self.main_window.search('Test')
@@ -62,7 +60,6 @@
62 def setUp(self):60 def setUp(self):
63 super(DashBaseTestCase, self).setUp()61 super(DashBaseTestCase, self).setUp()
64 unity_proxy = self.launch_unity()62 unity_proxy = self.launch_unity()
65 process_helpers.unlock_unity(unity_proxy)
66 self.dash = self.main_window.get_dash()63 self.dash = self.main_window.get_dash()
6764
6865
6966
=== modified file 'tests/autopilot/unity8/shell/tests/test_lock_screen.py'
--- tests/autopilot/unity8/shell/tests/test_lock_screen.py 2014-02-22 00:12:49 +0000
+++ tests/autopilot/unity8/shell/tests/test_lock_screen.py 2014-05-29 14:11:15 +0000
@@ -20,7 +20,6 @@
2020
21from __future__ import absolute_import21from __future__ import absolute_import
2222
23from unity8.process_helpers import unlock_unity
24from unity8.shell import with_lightdm_mock23from unity8.shell import with_lightdm_mock
25from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios24from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
2625
@@ -47,41 +46,41 @@
47 @with_lightdm_mock("single-pin")46 @with_lightdm_mock("single-pin")
48 def test_can_unlock_pin_screen(self):47 def test_can_unlock_pin_screen(self):
49 """Must be able to unlock the PIN entry lock screen."""48 """Must be able to unlock the PIN entry lock screen."""
50 unity_proxy = self.launch_unity()49 self.launch_greeter()
51 greeter = self.main_window.get_greeter()50 greeter = self.main_window.get_greeter()
5251
53 if greeter.narrowMode:52 if greeter.narrowMode:
54 unlock_unity(unity_proxy)53 greeter.swipe()
55 lockscreen = self._wait_for_lockscreen()54 lockscreen = self._wait_for_lockscreen()
56 self._enter_pincode("1234")55 self._enter_pincode("1234")
57 self.assertThat(lockscreen.shown, Eventually(Equals(False)))56 self.assertThat(lockscreen.shown, Eventually(Equals(False)))
58 else:57 else:
59 self._enter_prompt_passphrase("1234")58 self._enter_prompt_passphrase("1234")
60 self.assertThat(greeter.shown, Eventually(Equals(False)))59 self.assertThat(greeter.enabled, Eventually(Equals(False)))
6160
62 @with_lightdm_mock("single-passphrase")61 @with_lightdm_mock("single-passphrase")
63 def test_can_unlock_passphrase_screen(self):62 def test_can_unlock_passphrase_screen(self):
64 """Must be able to unlock the passphrase entry screen."""63 """Must be able to unlock the passphrase entry screen."""
65 unity_proxy = self.launch_unity()64 self.launch_greeter()
66 greeter = self.main_window.get_greeter()65 greeter = self.main_window.get_greeter()
6766
68 if greeter.narrowMode:67 if greeter.narrowMode:
69 unlock_unity(unity_proxy)68 greeter.swipe()
70 lockscreen = self._wait_for_lockscreen()69 lockscreen = self._wait_for_lockscreen()
71 self._enter_pin_passphrase("password")70 self._enter_pin_passphrase("password")
72 self.assertThat(lockscreen.shown, Eventually(Equals(False)))71 self.assertThat(lockscreen.shown, Eventually(Equals(False)))
73 else:72 else:
74 self._enter_prompt_passphrase("password")73 self._enter_prompt_passphrase("password")
75 self.assertThat(greeter.shown, Eventually(Equals(False)))74 self.assertThat(greeter.enabled, Eventually(Equals(False)))
7675
77 @with_lightdm_mock("single-pin")76 @with_lightdm_mock("single-pin")
78 def test_pin_screen_wrong_code(self):77 def test_pin_screen_wrong_code(self):
79 """Entering the wrong pin code must not dismiss the lock screen."""78 """Entering the wrong pin code must not dismiss the lock screen."""
80 unity_proxy = self.launch_unity()79 self.launch_greeter()
81 greeter = self.main_window.get_greeter()80 greeter = self.main_window.get_greeter()
8281
83 if greeter.narrowMode:82 if greeter.narrowMode:
84 unlock_unity(unity_proxy)83 greeter.swipe()
85 lockscreen = self._wait_for_lockscreen()84 lockscreen = self._wait_for_lockscreen()
86 self._enter_pincode("4321")85 self._enter_pincode("4321")
87 pinentryField = self.main_window.get_pinentryField()86 pinentryField = self.main_window.get_pinentryField()
@@ -91,16 +90,16 @@
91 self._enter_prompt_passphrase("4231")90 self._enter_prompt_passphrase("4231")
92 prompt = self.main_window.get_greeter().get_prompt()91 prompt = self.main_window.get_greeter().get_prompt()
93 self.assertThat(prompt.text, Eventually(Equals("")))92 self.assertThat(prompt.text, Eventually(Equals("")))
94 self.assertThat(greeter.shown, Eventually(Equals(True)))93 self.assertThat(greeter.enabled, Eventually(Equals(True)))
9594
96 @with_lightdm_mock("single-passphrase")95 @with_lightdm_mock("single-passphrase")
97 def test_passphrase_screen_wrong_password(self):96 def test_passphrase_screen_wrong_password(self):
98 """Entering the wrong password must not dismiss the lock screen."""97 """Entering the wrong password must not dismiss the lock screen."""
99 unity_proxy = self.launch_unity()98 self.launch_greeter()
100 greeter = self.main_window.get_greeter()99 greeter = self.main_window.get_greeter()
101100
102 if greeter.narrowMode:101 if greeter.narrowMode:
103 unlock_unity(unity_proxy)102 greeter.swipe()
104 lockscreen = self._wait_for_lockscreen()103 lockscreen = self._wait_for_lockscreen()
105 self._enter_pin_passphrase("foobar")104 self._enter_pin_passphrase("foobar")
106 pinentryField = self.main_window.get_pinentryField()105 pinentryField = self.main_window.get_pinentryField()
@@ -110,7 +109,7 @@
110 self._enter_prompt_passphrase("foobar")109 self._enter_prompt_passphrase("foobar")
111 prompt = self.main_window.get_greeter().get_prompt()110 prompt = self.main_window.get_greeter().get_prompt()
112 self.assertThat(prompt.text, Eventually(Equals("")))111 self.assertThat(prompt.text, Eventually(Equals("")))
113 self.assertThat(greeter.shown, Eventually(Equals(True)))112 self.assertThat(greeter.enabled, Eventually(Equals(True)))
114113
115 def _wait_for_lockscreen(self):114 def _wait_for_lockscreen(self):
116 """Wait for the lock screen to load, and return it."""115 """Wait for the lock screen to load, and return it."""
117116
=== modified file 'tests/autopilot/unity8/shell/tests/test_notifications.py'
--- tests/autopilot/unity8/shell/tests/test_notifications.py 2014-04-30 08:42:12 +0000
+++ tests/autopilot/unity8/shell/tests/test_notifications.py 2014-05-29 14:11:15 +0000
@@ -22,7 +22,6 @@
22from __future__ import absolute_import22from __future__ import absolute_import
2323
24from unity8 import shell24from unity8 import shell
25from unity8.process_helpers import unlock_unity
26from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios25from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
2726
28from testtools.matchers import Equals, NotEquals27from testtools.matchers import Equals, NotEquals
@@ -125,7 +124,6 @@
125 def test_interactive(self):124 def test_interactive(self):
126 """Interactive notification must react upon click on itself."""125 """Interactive notification must react upon click on itself."""
127 unity_proxy = self.launch_unity()126 unity_proxy = self.launch_unity()
128 unlock_unity(unity_proxy)
129127
130 notify_list = self._get_notifications_list()128 notify_list = self._get_notifications_list()
131129
@@ -164,7 +162,6 @@
164 """Rejecting a call should make notification expand and162 """Rejecting a call should make notification expand and
165 offer more options."""163 offer more options."""
166 unity_proxy = self.launch_unity()164 unity_proxy = self.launch_unity()
167 unlock_unity(unity_proxy)
168165
169 summary = "Incoming call"166 summary = "Incoming call"
170 body = "Frank Zappa\n+44 (0)7736 027340"167 body = "Frank Zappa\n+44 (0)7736 027340"
@@ -214,7 +211,6 @@
214 def test_modal_sd_without_greeter (self):211 def test_modal_sd_without_greeter (self):
215 """A snap-decision on a phone should block input to shell beneath it when there's no greeter."""212 """A snap-decision on a phone should block input to shell beneath it when there's no greeter."""
216 unity_proxy = self.launch_unity()213 unity_proxy = self.launch_unity()
217 unlock_unity(unity_proxy)
218214
219 summary = "Incoming file"215 summary = "Incoming file"
220 body = "Frank would like to send you the file: essay.pdf"216 body = "Frank would like to send you the file: essay.pdf"
@@ -255,7 +251,7 @@
255251
256 def test_modal_sd_with_greeter (self):252 def test_modal_sd_with_greeter (self):
257 """A snap-decision on a phone should not block input to the greeter beneath it."""253 """A snap-decision on a phone should not block input to the greeter beneath it."""
258 unity_proxy = self.launch_unity()254 unity_proxy = self.launch_greeter()
259255
260 summary = "Incoming file"256 summary = "Incoming file"
261 body = "Frank would like to send you the file: essay.pdf"257 body = "Frank would like to send you the file: essay.pdf"
@@ -281,8 +277,8 @@
281277
282 # verify that we can swipe away the greeter (interact with the "shell")278 # verify that we can swipe away the greeter (interact with the "shell")
283 time.sleep(1)279 time.sleep(1)
284 self.main_window.show_dash_swiping()
285 greeter = self.main_window.get_greeter()280 greeter = self.main_window.get_greeter()
281 greeter.swipe()
286 self.assertThat(greeter.shown, Eventually(Equals(False)))282 self.assertThat(greeter.shown, Eventually(Equals(False)))
287283
288 # verify and interact with the triggered snap-decision notification284 # verify and interact with the triggered snap-decision notification
@@ -424,7 +420,6 @@
424 def test_icon_summary_body(self):420 def test_icon_summary_body(self):
425 """Notification must display the expected summary and body text."""421 """Notification must display the expected summary and body text."""
426 unity_proxy = self.launch_unity()422 unity_proxy = self.launch_unity()
427 unlock_unity(unity_proxy)
428423
429 notify_list = self._get_notifications_list()424 notify_list = self._get_notifications_list()
430425
@@ -464,7 +459,6 @@
464 """Notification must display the expected summary and secondary459 """Notification must display the expected summary and secondary
465 icon."""460 icon."""
466 unity_proxy = self.launch_unity()461 unity_proxy = self.launch_unity()
467 unlock_unity(unity_proxy)
468462
469 notify_list = self._get_notifications_list()463 notify_list = self._get_notifications_list()
470464
@@ -501,7 +495,6 @@
501 """Notifications must be displayed in order according to their495 """Notifications must be displayed in order according to their
502 urgency."""496 urgency."""
503 unity_proxy = self.launch_unity()497 unity_proxy = self.launch_unity()
504 unlock_unity(unity_proxy)
505498
506 notify_list = self._get_notifications_list()499 notify_list = self._get_notifications_list()
507500
@@ -588,7 +581,6 @@
588 def test_summary_and_body(self):581 def test_summary_and_body(self):
589 """Notification must display the expected summary- and body-text."""582 """Notification must display the expected summary- and body-text."""
590 unity_proxy = self.launch_unity()583 unity_proxy = self.launch_unity()
591 unlock_unity(unity_proxy)
592584
593 notify_list = self._get_notifications_list()585 notify_list = self._get_notifications_list()
594586
@@ -613,7 +605,6 @@
613 def test_summary_only(self):605 def test_summary_only(self):
614 """Notification must display only the expected summary-text."""606 """Notification must display only the expected summary-text."""
615 unity_proxy = self.launch_unity()607 unity_proxy = self.launch_unity()
616 unlock_unity(unity_proxy)
617608
618 notify_list = self._get_notifications_list()609 notify_list = self._get_notifications_list()
619610
@@ -631,7 +622,6 @@
631 """Notification must allow updating its contents while being622 """Notification must allow updating its contents while being
632 displayed."""623 displayed."""
633 unity_proxy = self.launch_unity()624 unity_proxy = self.launch_unity()
634 unlock_unity(unity_proxy)
635625
636 notify_list = self._get_notifications_list()626 notify_list = self._get_notifications_list()
637627
@@ -669,7 +659,6 @@
669 """Notification must allow updating its contents and layout while659 """Notification must allow updating its contents and layout while
670 being displayed."""660 being displayed."""
671 unity_proxy = self.launch_unity()661 unity_proxy = self.launch_unity()
672 unlock_unity(unity_proxy)
673662
674 notify_list = self._get_notifications_list()663 notify_list = self._get_notifications_list()
675664
@@ -715,7 +704,6 @@
715 def test_append_hint(self):704 def test_append_hint(self):
716 """Notification has to accumulate body-text using append-hint."""705 """Notification has to accumulate body-text using append-hint."""
717 unity_proxy = self.launch_unity()706 unity_proxy = self.launch_unity()
718 unlock_unity(unity_proxy)
719707
720 notify_list = self._get_notifications_list()708 notify_list = self._get_notifications_list()
721709
722710
=== modified file 'tests/mocks/AccountsService/AccountsService.cpp'
--- tests/mocks/AccountsService/AccountsService.cpp 2014-02-20 20:14:40 +0000
+++ tests/mocks/AccountsService/AccountsService.cpp 2014-05-29 14:11:15 +0000
@@ -45,6 +45,15 @@
45 Q_UNUSED(demoEdges)45 Q_UNUSED(demoEdges)
46}46}
4747
48bool AccountsService::demoEdgesForCurrentUser() const
49{
50 return false;
51}
52
53void AccountsService::setDemoEdgesForCurrentUser(bool)
54{
55}
56
48QString AccountsService::backgroundFile() const57QString AccountsService::backgroundFile() const
49{58{
50 return m_backgroundFile;59 return m_backgroundFile;
5160
=== modified file 'tests/mocks/AccountsService/AccountsService.h'
--- tests/mocks/AccountsService/AccountsService.h 2013-09-24 18:50:56 +0000
+++ tests/mocks/AccountsService/AccountsService.h 2014-05-29 14:11:15 +0000
@@ -35,6 +35,10 @@
35 READ demoEdges35 READ demoEdges
36 WRITE setDemoEdges36 WRITE setDemoEdges
37 NOTIFY demoEdgesChanged)37 NOTIFY demoEdgesChanged)
38 Q_PROPERTY (bool demoEdgesForCurrentUser
39 READ demoEdgesForCurrentUser
40 WRITE setDemoEdgesForCurrentUser
41 NOTIFY demoEdgesForCurrentUserChanged)
38 Q_PROPERTY (QString backgroundFile42 Q_PROPERTY (QString backgroundFile
39 READ backgroundFile43 READ backgroundFile
40 WRITE setBackgroundFile // only available in mock44 WRITE setBackgroundFile // only available in mock
@@ -51,6 +55,8 @@
51 void setUser(const QString &user);55 void setUser(const QString &user);
52 bool demoEdges() const;56 bool demoEdges() const;
53 void setDemoEdges(bool demoEdges);57 void setDemoEdges(bool demoEdges);
58 bool demoEdgesForCurrentUser() const;
59 void setDemoEdgesForCurrentUser(bool demoEdgesForCurrentUser);
54 QString backgroundFile() const;60 QString backgroundFile() const;
55 void setBackgroundFile(const QString &backgroundFile);61 void setBackgroundFile(const QString &backgroundFile);
56 bool statsWelcomeScreen() const;62 bool statsWelcomeScreen() const;
@@ -59,6 +65,7 @@
59Q_SIGNALS:65Q_SIGNALS:
60 void userChanged();66 void userChanged();
61 void demoEdgesChanged();67 void demoEdgesChanged();
68 void demoEdgesForCurrentUserChanged();
62 void backgroundFileChanged();69 void backgroundFileChanged();
63 void statsWelcomeScreenChanged();70 void statsWelcomeScreenChanged();
6471
6572
=== modified file 'tests/mocks/CMakeLists.txt'
--- tests/mocks/CMakeLists.txt 2014-05-02 22:57:21 +0000
+++ tests/mocks/CMakeLists.txt 2014-05-29 14:11:15 +0000
@@ -31,10 +31,11 @@
31add_subdirectory(AccountsService)31add_subdirectory(AccountsService)
32add_subdirectory(GSettings.1.0)32add_subdirectory(GSettings.1.0)
33add_subdirectory(HudClient)33add_subdirectory(HudClient)
34add_subdirectory(liblightdm)
34add_subdirectory(libusermetrics)35add_subdirectory(libusermetrics)
35add_subdirectory(LightDM)
36add_subdirectory(Powerd)36add_subdirectory(Powerd)
37add_subdirectory(QMenuModel)37add_subdirectory(QMenuModel)
38add_subdirectory(SessionManager)
38add_subdirectory(Ubuntu)39add_subdirectory(Ubuntu)
39add_subdirectory(Unity)40add_subdirectory(Unity)
40add_subdirectory(QtMultimedia)41add_subdirectory(QtMultimedia)
4142
=== removed directory 'tests/mocks/LightDM/demo'
=== removed file 'tests/mocks/LightDM/demo/CMakeLists.txt'
--- tests/mocks/LightDM/demo/CMakeLists.txt 2013-12-13 01:02:53 +0000
+++ tests/mocks/LightDM/demo/CMakeLists.txt 1970-01-01 00:00:00 +0000
@@ -1,21 +0,0 @@
1pkg_check_modules(LIBUSERMETRICSOUTPUT REQUIRED libusermetricsoutput-1)
2
3set(LibLightDM_SOURCES
4 ../Greeter.cpp
5 ../UsersModel.cpp
6 GreeterPrivate.cpp
7 UsersModelPrivate.cpp
8 ${CMAKE_SOURCE_DIR}/plugins/Utils/qvariantlistmodel.cpp
9 )
10
11add_library(MockLightDM-demo STATIC ${LibLightDM_SOURCES})
12
13include_directories(
14 ${LIBUSERMETRICSOUTPUT_INCLUDE_DIRS}
15)
16
17target_link_libraries(MockLightDM-demo
18 ${LIBUSERMETRICSOUTPUT_LDFLAGS}
19 )
20
21qt5_use_modules(MockLightDM-demo Gui)
220
=== removed file 'tests/mocks/LightDM/demo/GreeterPrivate.cpp'
--- tests/mocks/LightDM/demo/GreeterPrivate.cpp 2014-01-29 19:04:20 +0000
+++ tests/mocks/LightDM/demo/GreeterPrivate.cpp 1970-01-01 00:00:00 +0000
@@ -1,70 +0,0 @@
1/*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Author: Michael Terry <michael.terry@canonical.com>
17 */
18
19#include "../Greeter.h"
20#include "../GreeterPrivate.h"
21#include <QtCore/QDir>
22#include <QtCore/QSettings>
23
24namespace QLightDM
25{
26
27GreeterPrivate::GreeterPrivate(Greeter* parent)
28 : authenticated(false),
29 authenticationUser(),
30 q_ptr(parent)
31{
32}
33
34void GreeterPrivate::handleAuthenticate()
35{
36 Q_Q(Greeter);
37
38 QSettings settings(QDir::homePath() + "/.unity8-greeter-demo", QSettings::NativeFormat);
39 settings.beginGroup(authenticationUser);
40 QVariant password = settings.value("password", "none");
41
42 if (password == "pin") {
43 Q_EMIT q->showPrompt("PIN", Greeter::PromptTypeSecret);
44 } else if (password == "keyboard") {
45 Q_EMIT q->showPrompt("Password", Greeter::PromptTypeSecret);
46 } else {
47 authenticated = true;
48 Q_EMIT q->authenticationComplete();
49 }
50}
51
52void GreeterPrivate::handleRespond(const QString &response)
53{
54 Q_Q(Greeter);
55
56 QSettings settings(QDir::homePath() + "/.unity8-greeter-demo", QSettings::NativeFormat);
57 settings.beginGroup(authenticationUser);
58 QVariant password = settings.value("password", "none");
59
60 QString passwordValue;
61 if (password == "pin") {
62 passwordValue = settings.value("passwordValue", "1234").toString();
63 } else {
64 passwordValue = settings.value("passwordValue", "password").toString();
65 }
66 authenticated = (response == passwordValue);
67 Q_EMIT q->authenticationComplete();
68}
69
70}
710
=== removed file 'tests/mocks/LightDM/demo/UsersModelPrivate.cpp'
--- tests/mocks/LightDM/demo/UsersModelPrivate.cpp 2014-02-04 14:38:00 +0000
+++ tests/mocks/LightDM/demo/UsersModelPrivate.cpp 1970-01-01 00:00:00 +0000
@@ -1,41 +0,0 @@
1/*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Author: Michael Terry <michael.terry@canonical.com>
17 */
18
19#include "../UsersModelPrivate.h"
20
21#include <QDir>
22#include <QSettings>
23#include <QStringList>
24
25namespace QLightDM
26{
27
28UsersModelPrivate::UsersModelPrivate(UsersModel* parent)
29 : q_ptr(parent)
30{
31 QSettings settings(QDir::homePath() + "/.unity8-greeter-demo", QSettings::NativeFormat);
32 QStringList users = settings.value("users", QStringList() << "phablet").toStringList();
33
34 Q_FOREACH(const QString &user, users)
35 {
36 QString name = settings.value(user + "/name", user[0].toUpper() + user.mid(1)).toString();
37 entries.append({user, name, 0, 0, false, false, 0, 0});
38 }
39}
40
41}
420
=== removed file 'tests/mocks/LightDM/qmldir'
--- tests/mocks/LightDM/qmldir 2014-05-02 22:57:21 +0000
+++ tests/mocks/LightDM/qmldir 1970-01-01 00:00:00 +0000
@@ -1,3 +0,0 @@
1module LightDM
2plugin MockLightDM-qml
3typeinfo LightDM.qmltypes
40
=== added directory 'tests/mocks/SessionManager'
=== added file 'tests/mocks/SessionManager/CMakeLists.txt'
--- tests/mocks/SessionManager/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ tests/mocks/SessionManager/CMakeLists.txt 2014-05-29 14:11:15 +0000
@@ -0,0 +1,19 @@
1add_library(MockSessionManager-qml MODULE
2 plugin.cpp
3 SessionManager.cpp
4 )
5
6qt5_use_modules(MockSessionManager-qml Qml)
7
8# copy qmldir file into build directory for shadow builds
9file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/qmldir"
10 DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
11 )
12
13install(TARGETS MockSessionManager-qml
14 DESTINATION ${SHELL_INSTALL_QML}/mocks/SessionManager
15 )
16
17install(FILES qmldir
18 DESTINATION ${SHELL_INSTALL_QML}/mocks/SessionManager
19 )
020
=== added file 'tests/mocks/SessionManager/SessionManager.cpp'
--- tests/mocks/SessionManager/SessionManager.cpp 1970-01-01 00:00:00 +0000
+++ tests/mocks/SessionManager/SessionManager.cpp 2014-05-29 14:11:15 +0000
@@ -0,0 +1,43 @@
1/*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Author: Michael Terry <michael.terry@canonical.com>
17 */
18
19#include "SessionManager.h"
20
21SessionManager::SessionManager(QObject* parent)
22 : QObject(parent),
23 m_active(true)
24{
25}
26
27bool SessionManager::active() const
28{
29 return m_active;
30}
31
32void SessionManager::setActive(bool active)
33{
34 if (m_active != active) {
35 m_active = active;
36 activeChanged();
37 }
38}
39
40void SessionManager::lock()
41{
42 setActive(false);
43}
044
=== added file 'tests/mocks/SessionManager/SessionManager.h'
--- tests/mocks/SessionManager/SessionManager.h 1970-01-01 00:00:00 +0000
+++ tests/mocks/SessionManager/SessionManager.h 2014-05-29 14:11:15 +0000
@@ -0,0 +1,49 @@
1/*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors: Michael Terry <michael.terry@canonical.com>
17 */
18
19#ifndef UNITY_MOCK_SESSIONMANAGER_H
20#define UNITY_MOCK_SESSIONMANAGER_H
21
22#include <QObject>
23
24class SessionManager: public QObject
25{
26 Q_OBJECT
27 Q_PROPERTY(bool active
28 READ active
29 WRITE setActive // Only in mock
30 NOTIFY activeChanged
31 FINAL)
32
33public:
34 explicit SessionManager(QObject *parent = 0);
35
36 bool active() const;
37 void setActive(bool active);
38
39public Q_SLOTS:
40 void lock();
41
42Q_SIGNALS:
43 void activeChanged();
44
45private:
46 bool m_active;
47};
48
49#endif
050
=== added file 'tests/mocks/SessionManager/plugin.cpp'
--- tests/mocks/SessionManager/plugin.cpp 1970-01-01 00:00:00 +0000
+++ tests/mocks/SessionManager/plugin.cpp 2014-05-29 14:11:15 +0000
@@ -0,0 +1,34 @@
1/*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors: Michael Terry <michael.terry@canonical.com>
17 */
18
19#include "plugin.h"
20#include "SessionManager.h"
21#include <QtQml/qqml.h>
22
23static QObject *sessionmanager_provider(QQmlEngine *engine, QJSEngine *scriptEngine)
24{
25 Q_UNUSED(engine)
26 Q_UNUSED(scriptEngine)
27 return new SessionManager();
28}
29
30void SessionManagerPlugin::registerTypes(const char *uri)
31{
32 Q_ASSERT(uri == QLatin1String("SessionManager"));
33 qmlRegisterSingletonType<SessionManager>(uri, 0, 1, "SessionManager", sessionmanager_provider);
34}
035
=== added file 'tests/mocks/SessionManager/plugin.h'
--- tests/mocks/SessionManager/plugin.h 1970-01-01 00:00:00 +0000
+++ tests/mocks/SessionManager/plugin.h 2014-05-29 14:11:15 +0000
@@ -0,0 +1,34 @@
1/*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors: Michael Terry <michael.terry@canonical.com>
17 */
18
19#ifndef MOCK_SESSIONMANAGER_PLUGIN_H
20#define MOCK_SESSIONMANAGER_PLUGIN_H
21
22#include <QQmlEngine>
23#include <QQmlExtensionPlugin>
24
25class SessionManagerPlugin : public QQmlExtensionPlugin
26{
27 Q_OBJECT
28 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
29
30public:
31 void registerTypes(const char *uri);
32};
33
34#endif
035
=== added file 'tests/mocks/SessionManager/qmldir'
--- tests/mocks/SessionManager/qmldir 1970-01-01 00:00:00 +0000
+++ tests/mocks/SessionManager/qmldir 2014-05-29 14:11:15 +0000
@@ -0,0 +1,2 @@
1module SessionManager
2plugin MockSessionManager-qml
03
=== renamed directory 'tests/mocks/LightDM' => 'tests/mocks/liblightdm'
=== modified file 'tests/mocks/liblightdm/CMakeLists.txt'
--- tests/mocks/LightDM/CMakeLists.txt 2014-05-02 22:57:21 +0000
+++ tests/mocks/liblightdm/CMakeLists.txt 2014-05-29 14:11:15 +0000
@@ -1,50 +1,4 @@
1# This is a copy of the normal LightDM plugin, but instead of statically
2# linking in the lightdm bits, this one uses shared libraries so we can swap
3# out different sets of users for different tests. When we finally switch to
4# actually using the system liblightdm in the normal plugin, this version can
5# be deleted.
6
7add_subdirectory(demo)
8add_subdirectory(full)1add_subdirectory(full)
9add_subdirectory(single)2add_subdirectory(single)
10add_subdirectory(single-pin)3add_subdirectory(single-pin)
11add_subdirectory(single-passphrase)4add_subdirectory(single-passphrase)
12
13include_directories(
14 ${CMAKE_CURRENT_SOURCE_DIR}
15 ${CMAKE_CURRENT_BINARY_DIR}
16 ${CMAKE_SOURCE_DIR}/plugins/Utils
17 ${CMAKE_SOURCE_DIR}/tests/mocks/libusermetrics
18)
19
20set(QMLPLUGIN_SRC
21 ${CMAKE_SOURCE_DIR}/plugins/LightDM/DBusGreeterList.cpp
22 ${CMAKE_SOURCE_DIR}/plugins/LightDM/Greeter.cpp
23 ${CMAKE_SOURCE_DIR}/plugins/LightDM/plugin.cpp
24 ${CMAKE_SOURCE_DIR}/plugins/LightDM/UsersModel.cpp
25 ${CMAKE_SOURCE_DIR}/plugins/Utils/qsortfilterproxymodelqml.cpp
26 )
27
28add_library(MockLightDM-qml MODULE
29 ${QMLPLUGIN_SRC}
30 )
31
32# We want to link to liblightdm-qt5-2, but we don't want to depend on it being
33# installed on the system. So we make sure we link to our full fake version
34# At run time, we can point to whichever version we happen to be using via
35# LD_LIBRARY_PATH.
36add_dependencies(MockLightDM-qml MockLightDM-full MockUserMetrics)
37target_link_libraries(MockLightDM-qml
38 -L${CMAKE_CURRENT_BINARY_DIR}/full
39 -llightdm-qt5-2
40 -L${CMAKE_BINARY_DIR}/tests/mocks/libusermetrics
41 -lusermetricsoutput
42 )
43
44qt5_use_modules(MockLightDM-qml DBus Gui Qml)
45
46add_unity8_mock(LightDM 0.1 LightDM
47 PREFIX mocks
48 TARGETS MockLightDM-qml
49 ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_CURRENT_BINARY_DIR}/full"
50)
515
=== modified file 'tests/mocks/liblightdm/Greeter.cpp'
--- tests/mocks/LightDM/Greeter.cpp 2013-06-05 22:03:08 +0000
+++ tests/mocks/liblightdm/Greeter.cpp 2014-05-29 14:11:15 +0000
@@ -151,12 +151,23 @@
151 Q_UNUSED(language)151 Q_UNUSED(language)
152}152}
153153
154void Greeter::setResettable (bool resettable)
155{
156 Q_UNUSED(resettable)
157}
158
154bool Greeter::startSessionSync(const QString &session)159bool Greeter::startSessionSync(const QString &session)
155{160{
156 Q_UNUSED(session)161 Q_UNUSED(session)
157 return true;162 return true;
158}163}
159164
165QString Greeter::ensureSharedDataDirSync(const QString &username)
166{
167 Q_UNUSED(username)
168 return "";
169}
170
160void Greeter::respond(const QString &response)171void Greeter::respond(const QString &response)
161{172{
162 Q_D(Greeter);173 Q_D(Greeter);
163174
=== modified file 'tests/mocks/liblightdm/Greeter.h'
--- tests/mocks/LightDM/Greeter.h 2013-06-05 22:03:08 +0000
+++ tests/mocks/liblightdm/Greeter.h 2014-05-29 14:11:15 +0000
@@ -88,13 +88,17 @@
88 void respond(const QString &response);88 void respond(const QString &response);
89 void cancelAuthentication();89 void cancelAuthentication();
90 void setLanguage (const QString &language);90 void setLanguage (const QString &language);
91 void setResettable (bool resettable);
91 bool startSessionSync(const QString &session=QString());92 bool startSessionSync(const QString &session=QString());
93 QString ensureSharedDataDirSync(const QString &username);
9294
93Q_SIGNALS:95Q_SIGNALS:
94 void showMessage(QString text, QLightDM::Greeter::MessageType type);96 void showMessage(QString text, QLightDM::Greeter::MessageType type);
95 void showPrompt(QString text, QLightDM::Greeter::PromptType type);97 void showPrompt(QString text, QLightDM::Greeter::PromptType type);
96 void authenticationComplete();98 void authenticationComplete();
97 void autologinTimerExpired();99 void autologinTimerExpired();
100 void idle();
101 void reset();
98102
99private:103private:
100 GreeterPrivate *d_ptr;104 GreeterPrivate *d_ptr;
101105
=== modified file 'tests/mocks/liblightdm/full/CMakeLists.txt'
--- tests/mocks/LightDM/full/CMakeLists.txt 2013-11-25 17:26:15 +0000
+++ tests/mocks/liblightdm/full/CMakeLists.txt 2014-05-29 14:11:15 +0000
@@ -11,8 +11,9 @@
11qt5_use_modules(MockLightDM-full Gui)11qt5_use_modules(MockLightDM-full Gui)
1212
13set_target_properties(MockLightDM-full PROPERTIES13set_target_properties(MockLightDM-full PROPERTIES
14 OUTPUT_NAME lightdm-qt5-2)14 OUTPUT_NAME lightdm-qt5-3
15 SOVERSION 0)
1516
16install(TARGETS MockLightDM-full17install(TARGETS MockLightDM-full
17 DESTINATION ${SHELL_INSTALL_QML}/mocks/LightDM/full18 DESTINATION ${SHELL_INSTALL_QML}/mocks/liblightdm/full
18 )19 )
1920
=== modified file 'tests/mocks/liblightdm/single-passphrase/CMakeLists.txt'
--- tests/mocks/LightDM/single-passphrase/CMakeLists.txt 2013-11-25 17:26:15 +0000
+++ tests/mocks/liblightdm/single-passphrase/CMakeLists.txt 2014-05-29 14:11:15 +0000
@@ -12,8 +12,9 @@
12qt5_use_modules(MockLightDM-single-passphrase Gui)12qt5_use_modules(MockLightDM-single-passphrase Gui)
1313
14set_target_properties(MockLightDM-single-passphrase PROPERTIES14set_target_properties(MockLightDM-single-passphrase PROPERTIES
15 OUTPUT_NAME lightdm-qt5-2)15 OUTPUT_NAME lightdm-qt5-3
16 SOVERSION 0)
1617
17install(TARGETS MockLightDM-single-passphrase18install(TARGETS MockLightDM-single-passphrase
18 DESTINATION ${SHELL_INSTALL_QML}/mocks/LightDM/single-passphrase19 DESTINATION ${SHELL_INSTALL_QML}/mocks/liblightdm/single-passphrase
19 )20 )
2021
=== modified file 'tests/mocks/liblightdm/single-pin/CMakeLists.txt'
--- tests/mocks/LightDM/single-pin/CMakeLists.txt 2013-11-25 17:26:15 +0000
+++ tests/mocks/liblightdm/single-pin/CMakeLists.txt 2014-05-29 14:11:15 +0000
@@ -12,8 +12,9 @@
12qt5_use_modules(MockLightDM-single-pin Gui)12qt5_use_modules(MockLightDM-single-pin Gui)
1313
14set_target_properties(MockLightDM-single-pin PROPERTIES14set_target_properties(MockLightDM-single-pin PROPERTIES
15 OUTPUT_NAME lightdm-qt5-2)15 OUTPUT_NAME lightdm-qt5-3
16 SOVERSION 0)
1617
17install(TARGETS MockLightDM-single-pin18install(TARGETS MockLightDM-single-pin
18 DESTINATION ${SHELL_INSTALL_QML}/mocks/LightDM/single-pin19 DESTINATION ${SHELL_INSTALL_QML}/mocks/liblightdm/single-pin
19 )20 )
2021
=== modified file 'tests/mocks/liblightdm/single/CMakeLists.txt'
--- tests/mocks/LightDM/single/CMakeLists.txt 2013-11-25 17:26:15 +0000
+++ tests/mocks/liblightdm/single/CMakeLists.txt 2014-05-29 14:11:15 +0000
@@ -11,8 +11,9 @@
11qt5_use_modules(MockLightDM-single Gui)11qt5_use_modules(MockLightDM-single Gui)
1212
13set_target_properties(MockLightDM-single PROPERTIES13set_target_properties(MockLightDM-single PROPERTIES
14 OUTPUT_NAME lightdm-qt5-2)14 OUTPUT_NAME lightdm-qt5-3
15 SOVERSION 0)
1516
16install(TARGETS MockLightDM-single17install(TARGETS MockLightDM-single
17 DESTINATION ${SHELL_INSTALL_QML}/mocks/LightDM/single18 DESTINATION ${SHELL_INSTALL_QML}/mocks/liblightdm/single
18 )19 )
1920
=== modified file 'tests/plugins/CMakeLists.txt'
--- tests/plugins/CMakeLists.txt 2014-04-30 10:06:33 +0000
+++ tests/plugins/CMakeLists.txt 2014-05-29 14:11:15 +0000
@@ -1,6 +1,7 @@
1add_subdirectory(AccountsService)1add_subdirectory(AccountsService)
2add_subdirectory(Dash)
2add_subdirectory(LightDM)3add_subdirectory(LightDM)
3add_subdirectory(Dash)4add_subdirectory(SessionManager)
4add_subdirectory(Ubuntu)5add_subdirectory(Ubuntu)
5add_subdirectory(Unity)6add_subdirectory(Unity)
6add_subdirectory(Utils)7add_subdirectory(Utils)
78
=== modified file 'tests/plugins/LightDM/CMakeLists.txt'
--- tests/plugins/LightDM/CMakeLists.txt 2014-01-14 21:01:28 +0000
+++ tests/plugins/LightDM/CMakeLists.txt 2014-05-29 14:11:15 +0000
@@ -1,3 +1,6 @@
1include(FindPkgConfig)
2pkg_check_modules(LIBLIGHTDM REQUIRED liblightdm-qt5-3)
3
1add_executable(test-lightdm-dbus4add_executable(test-lightdm-dbus
2 dbus.cpp5 dbus.cpp
3 ${CMAKE_SOURCE_DIR}/plugins/LightDM/Greeter.cpp6 ${CMAKE_SOURCE_DIR}/plugins/LightDM/Greeter.cpp
@@ -7,19 +10,17 @@
7include_directories(10include_directories(
8 ${CMAKE_CURRENT_BINARY_DIR}11 ${CMAKE_CURRENT_BINARY_DIR}
9 ${CMAKE_SOURCE_DIR}/plugins/LightDM12 ${CMAKE_SOURCE_DIR}/plugins/LightDM
10 ${CMAKE_SOURCE_DIR}/tests/mocks/LightDM
11 ${LIBLIGHTDM_INCLUDE_DIRS}13 ${LIBLIGHTDM_INCLUDE_DIRS}
12 )14 )
1315
14add_dependencies(test-lightdm-dbus MockLightDM-full)16add_dependencies(test-lightdm-dbus MockLightDM-full)
15target_link_libraries(test-lightdm-dbus17target_link_libraries(test-lightdm-dbus
16 -L${CMAKE_BINARY_DIR}/tests/mocks/LightDM/full18 ${LIBLIGHTDM_LDFLAGS}
17 -llightdm-qt5-2
18 )19 )
1920
20add_definitions(-DCURRENT_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")21add_definitions(-DCURRENT_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
2122
22add_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)23add_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)
23add_dependencies(testLightDMDBus test-lightdm-dbus)24add_dependencies(testLightDMDBus test-lightdm-dbus)
2425
25add_dependencies(qmluitests testLightDMDBus)26add_dependencies(qmluitests testLightDMDBus)
2627
=== added directory 'tests/plugins/SessionManager'
=== added file 'tests/plugins/SessionManager/CMakeLists.txt'
--- tests/plugins/SessionManager/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ tests/plugins/SessionManager/CMakeLists.txt 2014-05-29 14:11:15 +0000
@@ -0,0 +1,48 @@
1macro(make_dbus_class PREFIX SERVICE INTERFACE)
2 if (${CMAKE_CURRENT_SOURCE_DIR}/interfaces.xml IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/${PREFIX}${INTERFACE}Adaptor.h)
3 execute_process(COMMAND qdbusxml2cpp -c ${PREFIX}${INTERFACE}Adaptor -a ${CMAKE_CURRENT_BINARY_DIR}/${PREFIX}${INTERFACE}Adaptor ${CMAKE_CURRENT_SOURCE_DIR}/interfaces.xml ${SERVICE}.${INTERFACE})
4 endif ()
5endmacro(make_dbus_class)
6
7make_dbus_class(LightDM org.freedesktop.DisplayManager Session)
8make_dbus_class(Login org.freedesktop.login1 Manager)
9make_dbus_class(Login org.freedesktop.login1 Session)
10make_dbus_class(Login org.freedesktop.DBus Properties)
11
12include_directories(
13 ${CMAKE_CURRENT_BINARY_DIR}
14 ${CMAKE_SOURCE_DIR}/plugins/SessionManager
15 )
16
17add_definitions(-DSM_BUSNAME=sessionBus)
18
19add_executable(sessionmanagermock
20 ${CMAKE_CURRENT_BINARY_DIR}/LightDMSessionAdaptor.cpp
21 ${CMAKE_CURRENT_BINARY_DIR}/LoginManagerAdaptor.cpp
22 ${CMAKE_CURRENT_BINARY_DIR}/LoginPropertiesAdaptor.cpp
23 ${CMAKE_CURRENT_BINARY_DIR}/LoginSessionAdaptor.cpp
24 server.cpp
25 LightDMSessionServer.cpp
26 LoginManagerServer.cpp
27 LoginSessionServer.cpp
28 )
29qt5_use_modules(sessionmanagermock Core DBus)
30
31add_executable(sessionmanagertest
32 ${CMAKE_SOURCE_DIR}/plugins/SessionManager/SessionManager.cpp
33 client.cpp
34 )
35qt5_use_modules(sessionmanagertest Core DBus Test)
36
37add_test(NAME sessionmanagertest
38 COMMAND env
39 XDG_SESSION_ID=sessionid
40 XDG_SESSION_PATH=/mocksession/lightdm
41 dbus-test-runner
42 --task ${CMAKE_CURRENT_BINARY_DIR}/sessionmanagermock
43 --task-name server
44 --ignore-return
45 --task ${CMAKE_CURRENT_BINARY_DIR}/sessionmanagertest
46 --task-name client
47 --wait-for org.freedesktop.login1
48 )
049
=== added file 'tests/plugins/SessionManager/LightDMSessionServer.cpp'
--- tests/plugins/SessionManager/LightDMSessionServer.cpp 1970-01-01 00:00:00 +0000
+++ tests/plugins/SessionManager/LightDMSessionServer.cpp 2014-05-29 14:11:15 +0000
@@ -0,0 +1,38 @@
1/*
2 * Copyright 2013 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 3, as published
6 * by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranties of
10 * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
11 * PURPOSE. See the GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * version 3 along with this program. If not, see
15 * <http://www.gnu.org/licenses/>
16 *
17 * Authored by: Michael Terry <michael.terry@canonical.com>
18 */
19
20#include "LightDMSessionServer.h"
21
22LightDMSessionServer::LightDMSessionServer(LoginSessionServer *logind, QObject *parent)
23 : QObject(parent),
24 logind(logind)
25{
26}
27
28void LightDMSessionServer::Lock()
29{
30 // As a side effect of locking, change Active state of logind.
31 // Note that this will say Active is true while the Active property will be
32 // false. This is intentional, as we don't want to keep any state in the
33 // mocks. Having this signal side effect lets us test that lock() was
34 // actually called by the plugin as well as test the changed signal itself.
35 QVariantMap changes;
36 changes.insert("Active", QVariant(true));
37 Q_EMIT logind->PropertiesChanged("org.freedesktop.login1.Session", changes, QStringList());
38}
039
=== added file 'tests/plugins/SessionManager/LightDMSessionServer.h'
--- tests/plugins/SessionManager/LightDMSessionServer.h 1970-01-01 00:00:00 +0000
+++ tests/plugins/SessionManager/LightDMSessionServer.h 2014-05-29 14:11:15 +0000
@@ -0,0 +1,40 @@
1/*
2 * Copyright 2013 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 3, as published
6 * by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranties of
10 * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
11 * PURPOSE. See the GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * version 3 along with this program. If not, see
15 * <http://www.gnu.org/licenses/>
16 *
17 * Authored by: Michael Terry <michael.terry@canonical.com>
18 */
19
20#ifndef UNITY_LIGHTDMSESSIONSERVER_H
21#define UNITY_LIGHTDMSESSIONSERVER_H
22
23#include "LoginSessionServer.h"
24#include <QtCore/QObject>
25
26class LightDMSessionServer: public QObject
27{
28 Q_OBJECT
29
30public:
31 explicit LightDMSessionServer(LoginSessionServer *logind, QObject *parent = 0);
32
33public Q_SLOTS:
34 void Lock();
35
36private:
37 LoginSessionServer *logind;
38};
39
40#endif
041
=== added file 'tests/plugins/SessionManager/LoginManagerServer.cpp'
--- tests/plugins/SessionManager/LoginManagerServer.cpp 1970-01-01 00:00:00 +0000
+++ tests/plugins/SessionManager/LoginManagerServer.cpp 2014-05-29 14:11:15 +0000
@@ -0,0 +1,34 @@
1/*
2 * Copyright 2013 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 3, as published
6 * by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranties of
10 * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
11 * PURPOSE. See the GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * version 3 along with this program. If not, see
15 * <http://www.gnu.org/licenses/>
16 *
17 * Authored by: Michael Terry <michael.terry@canonical.com>
18 */
19
20#include "LoginManagerServer.h"
21
22LoginManagerServer::LoginManagerServer(QObject *parent)
23 : QObject(parent)
24{
25}
26
27QDBusObjectPath LoginManagerServer::GetSession(const QString &id)
28{
29 if (id == "sessionid") {
30 return QDBusObjectPath("/mocksession/login1");
31 } else {
32 return QDBusObjectPath();
33 }
34}
035
=== added file 'tests/plugins/SessionManager/LoginManagerServer.h'
--- tests/plugins/SessionManager/LoginManagerServer.h 1970-01-01 00:00:00 +0000
+++ tests/plugins/SessionManager/LoginManagerServer.h 2014-05-29 14:11:15 +0000
@@ -0,0 +1,37 @@
1/*
2 * Copyright 2013 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 3, as published
6 * by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranties of
10 * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
11 * PURPOSE. See the GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * version 3 along with this program. If not, see
15 * <http://www.gnu.org/licenses/>
16 *
17 * Authored by: Michael Terry <michael.terry@canonical.com>
18 */
19
20#ifndef UNITY_LOGINMANAGERSERVER_H
21#define UNITY_LOGINMANAGERSERVER_H
22
23#include <QtCore/QObject>
24#include <QtDBus/QDBusObjectPath>
25
26class LoginManagerServer: public QObject
27{
28 Q_OBJECT
29
30public:
31 explicit LoginManagerServer(QObject *parent = 0);
32
33public Q_SLOTS:
34 QDBusObjectPath GetSession(const QString &id);
35};
36
37#endif
038
=== added file 'tests/plugins/SessionManager/LoginSessionServer.cpp'
--- tests/plugins/SessionManager/LoginSessionServer.cpp 1970-01-01 00:00:00 +0000
+++ tests/plugins/SessionManager/LoginSessionServer.cpp 2014-05-29 14:11:15 +0000
@@ -0,0 +1,25 @@
1/*
2 * Copyright 2013 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 3, as published
6 * by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranties of
10 * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
11 * PURPOSE. See the GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * version 3 along with this program. If not, see
15 * <http://www.gnu.org/licenses/>
16 *
17 * Authored by: Michael Terry <michael.terry@canonical.com>
18 */
19
20#include "LoginSessionServer.h"
21
22LoginSessionServer::LoginSessionServer(QObject *parent)
23 : QObject(parent)
24{
25}
026
=== added file 'tests/plugins/SessionManager/LoginSessionServer.h'
--- tests/plugins/SessionManager/LoginSessionServer.h 1970-01-01 00:00:00 +0000
+++ tests/plugins/SessionManager/LoginSessionServer.h 2014-05-29 14:11:15 +0000
@@ -0,0 +1,39 @@
1/*
2 * Copyright 2013 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 3, as published
6 * by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranties of
10 * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
11 * PURPOSE. See the GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * version 3 along with this program. If not, see
15 * <http://www.gnu.org/licenses/>
16 *
17 * Authored by: Michael Terry <michael.terry@canonical.com>
18 */
19
20#ifndef UNITY_LOGINSESSIONSERVER_H
21#define UNITY_LOGINSESSIONSERVER_H
22
23#include <QtCore/QObject>
24#include <QtCore/QStringList>
25#include <QtCore/QVariant>
26#include <QtCore/QVariantMap>
27
28class LoginSessionServer: public QObject
29{
30 Q_OBJECT
31
32public:
33 explicit LoginSessionServer(QObject *parent = 0);
34
35Q_SIGNALS:
36 void PropertiesChanged(const QString &interface, const QVariantMap &changed, const QStringList &invalid);
37};
38
39#endif
040
=== added file 'tests/plugins/SessionManager/client.cpp'
--- tests/plugins/SessionManager/client.cpp 1970-01-01 00:00:00 +0000
+++ tests/plugins/SessionManager/client.cpp 2014-05-29 14:11:15 +0000
@@ -0,0 +1,88 @@
1/*
2 * Copyright 2013 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 3, as published
6 * by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranties of
10 * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
11 * PURPOSE. See the GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * version 3 along with this program. If not, see
15 * <http://www.gnu.org/licenses/>
16 *
17 * Authored by: Michael Terry <michael.terry@canonical.com>
18 */
19
20#include "SessionManager.h"
21#include <QtTest/QSignalSpy>
22#include <QtTest/QTest>
23
24
25// These tests assume the following behavior from our mock logind server:
26// * IsActive will return false
27// * Lock() will emit an ActiveChanged(true) signal
28//
29// This should lead to the following behavior from our SessionManager plugin:
30// * Starts active
31// * Becomes inactive once it connects to logind and sees IsActive result
32// * Becomes active once Lock() is called (which isn't really sensible, but
33// it's just a mock)
34
35class SessionManagerTest : public QObject
36{
37 Q_OBJECT
38
39private Q_SLOTS:
40
41 void waitForChange(SessionManager *session)
42 {
43 // Wait 5 seconds for initial activeChanged signal
44 QSignalSpy spy(session, SIGNAL(activeChanged()));
45 int i = 0;
46 while (spy.count() == 0 && i++ < 50)
47 QTest::qWait(100);
48 QCOMPARE(spy.count(), 1);
49 }
50
51 void testAssumeActive()
52 {
53 // Test that active() starts as true before we connect to service
54 SessionManager session;
55 QCOMPARE(session.active(), true);
56 }
57
58 void testSafeLock()
59 {
60 // Test that lock() doesn't crash if used before we connect to service
61 // (i.e. just test that we're not being stupid about pointers)
62 SessionManager session;
63 session.lock();
64 }
65
66 void testInitialSignal()
67 {
68 // Test that we get notified of change once we connect to service
69 SessionManager session;
70 waitForChange(&session);
71 QCOMPARE(session.active(), false);
72 }
73
74 void testLock()
75 {
76 // Test that lock() gets called correctly and that we listen for
77 // the activeChanged signal too.
78 SessionManager session;
79 waitForChange(&session);
80 session.lock();
81 waitForChange(&session);
82 QCOMPARE(session.active(), true);
83 }
84};
85
86QTEST_MAIN(SessionManagerTest)
87
88#include "client.moc"
089
=== added file 'tests/plugins/SessionManager/interfaces.xml'
--- tests/plugins/SessionManager/interfaces.xml 1970-01-01 00:00:00 +0000
+++ tests/plugins/SessionManager/interfaces.xml 2014-05-29 14:11:15 +0000
@@ -0,0 +1,22 @@
1<node>
2 <interface name="org.freedesktop.login1.Manager">
3 <method name="GetSession">
4 <arg name="id" type="s" direction="in" />
5 <arg name="path" type="o" direction="out" />
6 </method>
7 </interface>
8 <interface name="org.freedesktop.login1.Session">
9 <property name="Active" type="b" access="read"/>
10 </interface>
11 <interface name="org.freedesktop.DBus.Properties">
12 <signal name="PropertiesChanged">
13 <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
14 <arg name="interface" type="s" direction="out"/>
15 <arg name="changed" type="a{sv}" direction="out"/>
16 <arg name="invalid" type="as" direction="out"/>
17 </signal>
18 </interface>
19 <interface name="org.freedesktop.DisplayManager.Session">
20 <method name="Lock"/>
21 </interface>
22</node>
023
=== added file 'tests/plugins/SessionManager/server.cpp'
--- tests/plugins/SessionManager/server.cpp 1970-01-01 00:00:00 +0000
+++ tests/plugins/SessionManager/server.cpp 2014-05-29 14:11:15 +0000
@@ -0,0 +1,57 @@
1/*
2 * Copyright 2013 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 3, as published
6 * by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranties of
10 * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
11 * PURPOSE. See the GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * version 3 along with this program. If not, see
15 * <http://www.gnu.org/licenses/>
16 *
17 * Authored by: Michael Terry <michael.terry@canonical.com>
18 */
19
20#include "LightDMSessionAdaptor.h"
21#include "LightDMSessionServer.h"
22#include "LoginManagerAdaptor.h"
23#include "LoginManagerServer.h"
24#include "LoginPropertiesAdaptor.h"
25#include "LoginSessionAdaptor.h"
26#include "LoginSessionServer.h"
27#include <QtCore/QCoreApplication>
28
29int main(int argc, char *argv[])
30{
31 QCoreApplication a(argc, argv);
32
33 LoginManagerServer *manager = new LoginManagerServer();
34 new LoginManagerAdaptor(manager);
35
36 LoginSessionServer *l1_session = new LoginSessionServer();
37 new LoginSessionAdaptor(l1_session);
38 new LoginPropertiesAdaptor(l1_session);
39
40 LightDMSessionServer *ldm_session = new LightDMSessionServer(l1_session);
41 new LightDMSessionAdaptor(ldm_session);
42
43 // We use the session bus for testing. The real plugin uses the system bus
44 QDBusConnection connection = QDBusConnection::sessionBus();
45 if (!connection.registerObject("/org/freedesktop/login1", manager))
46 return 1;
47 if (!connection.registerObject("/mocksession/login1", l1_session))
48 return 1;
49 if (!connection.registerObject("/mocksession/lightdm", ldm_session))
50 return 1;
51 if (!connection.registerService("org.freedesktop.DisplayManager"))
52 return 1;
53 if (!connection.registerService("org.freedesktop.login1"))
54 return 1;
55
56 return a.exec();
57}
058
=== modified file 'tests/qmltests/CMakeLists.txt'
--- tests/qmltests/CMakeLists.txt 2014-05-22 14:16:00 +0000
+++ tests/qmltests/CMakeLists.txt 2014-05-29 14:11:15 +0000
@@ -4,6 +4,7 @@
4add_subdirectory(Components)4add_subdirectory(Components)
55
6set(qmltest_DEFAULT_IMPORT_PATHS6set(qmltest_DEFAULT_IMPORT_PATHS
7 ${CMAKE_BINARY_DIR}/plugins
7 ${CMAKE_BINARY_DIR}/tests/utils/modules8 ${CMAKE_BINARY_DIR}/tests/utils/modules
8 ${CMAKE_BINARY_DIR}/tests/mocks9 ${CMAKE_BINARY_DIR}/tests/mocks
9)10)
@@ -18,12 +19,12 @@
18set(qmltest_DEFAULT_NO_ADD_TEST TRUE)19set(qmltest_DEFAULT_NO_ADD_TEST TRUE)
19set(qmltest_DEFAULT_PROPERTIES ENVIRONMENT "LC_ALL=C")20set(qmltest_DEFAULT_PROPERTIES ENVIRONMENT "LC_ALL=C")
2021
21add_qml_test(. Shell IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks22add_qml_test(. Shell)
22 ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/LightDM/single")23add_qml_test(. GreeterShell ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/liblightdm/single")
23add_qml_test(Components Carousel)24add_qml_test(Components Carousel)
24add_qml_test(Components DraggingArea)25add_qml_test(Components DraggingArea)
25add_qml_test(Components EdgeDemoOverlay)26add_qml_test(Components EdgeDemoOverlay)
26add_qml_test(Components FilterGrid IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/plugins)27add_qml_test(Components FilterGrid)
27add_qml_test(Components LazyImage)28add_qml_test(Components LazyImage)
28add_qml_test(Components Rating)29add_qml_test(Components Rating)
29add_qml_test(Components ResponsiveFlowView)30add_qml_test(Components ResponsiveFlowView)
@@ -32,53 +33,43 @@
32add_qml_test(Components Showable)33add_qml_test(Components Showable)
33add_qml_test(Components PageHeaderLabel)34add_qml_test(Components PageHeaderLabel)
34add_qml_test(Components ZoomableImage)35add_qml_test(Components ZoomableImage)
35add_qml_test(Dash Dash IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})36add_qml_test(Dash Dash)
36add_qml_test(Dash DashContent IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})37add_qml_test(Dash DashContent)
37add_qml_test(Dash Card IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})38add_qml_test(Dash Card)
38add_qml_benchmark(Dash CardBenchmark 1000 IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})39add_qml_benchmark(Dash CardBenchmark 1000)
39add_qml_test(Dash CardTool IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})40add_qml_test(Dash CardTool)
40add_qml_test(Dash GenericScopeView IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})41add_qml_test(Dash GenericScopeView)
41add_qml_test(Dash/Apps RunningApplicationsGrid IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS}42add_qml_test(Dash/Apps RunningApplicationsGrid)
42 ${CMAKE_BINARY_DIR}/tests/mocks43add_qml_test(Dash/Previews Preview)
43 ${CMAKE_BINARY_DIR}/plugins)44add_qml_test(Dash/Previews PreviewActions)
44add_qml_test(Dash/Previews Preview IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)45add_qml_test(Dash/Previews PreviewAudioPlayback)
45add_qml_test(Dash/Previews PreviewActions IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)46add_qml_test(Dash/Previews PreviewHeader)
46add_qml_test(Dash/Previews PreviewAudioPlayback IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)47add_qml_test(Dash/Previews PreviewImageGallery)
47add_qml_test(Dash/Previews PreviewHeader IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)48add_qml_test(Dash/Previews PreviewProgress)
48add_qml_test(Dash/Previews PreviewImageGallery IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)49add_qml_test(Dash/Previews PreviewRatingDisplay)
49add_qml_test(Dash/Previews PreviewProgress IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)50add_qml_test(Dash/Previews PreviewRatingInput)
50add_qml_test(Dash/Previews PreviewRatingDisplay IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)51add_qml_test(Dash/Previews PreviewTextSummary)
51add_qml_test(Dash/Previews PreviewRatingInput IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)52add_qml_test(Dash/Previews PreviewVideoPlayback)
52add_qml_test(Dash/Previews PreviewTextSummary IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)53add_qml_test(Dash/Previews PreviewWidgetFactory)
53add_qml_test(Dash/Previews PreviewVideoPlayback IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)54add_qml_test(Dash/Previews PreviewZoomableImage)
54add_qml_test(Dash/Previews PreviewWidgetFactory IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)55add_qml_test(Greeter Lockscreen ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/libusermetrics:${CMAKE_BINARY_DIR}/tests/mocks/liblightdm/full")
55add_qml_test(Dash/Previews PreviewZoomableImage IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)56add_qml_test(Greeter Tablet ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/libusermetrics:${CMAKE_BINARY_DIR}/tests/mocks/liblightdm/full")
56add_qml_test(Greeter Lockscreen IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS}57add_qml_test(Greeter Phone ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/libusermetrics:${CMAKE_BINARY_DIR}/tests/mocks/liblightdm/single")
57 PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/libusermetrics:${CMAKE_BINARY_DIR}/tests/mocks/LightDM/full")58add_qml_test(Greeter Infographics ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/libusermetrics:${CMAKE_BINARY_DIR}/tests/mocks/liblightdm/full")
58add_qml_test(Greeter Tablet IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS}59add_qml_test(Greeter Clock ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/QMenuModel")
59 ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/libusermetrics:${CMAKE_BINARY_DIR}/tests/mocks/LightDM/full")
60add_qml_test(Greeter Phone IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS}
61 ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/libusermetrics:${CMAKE_BINARY_DIR}/tests/mocks/LightDM/single")
62add_qml_test(Greeter Infographics IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS}
63 ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/libusermetrics:${CMAKE_BINARY_DIR}/tests/mocks/LightDM/full")
64add_qml_test(Greeter Clock IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS}
65 ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/QMenuModel")
66add_qml_test(Hud Hud)60add_qml_test(Hud Hud)
67add_qml_test(Hud Result)61add_qml_test(Hud Result)
68add_qml_test(Launcher Launcher IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})62add_qml_test(Launcher Launcher)
69add_qml_test(Notifications Notifications IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/plugins)63add_qml_test(Notifications Notifications)
70add_qml_test(Notifications VisualSnapDecisionsQueue IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/plugins)64add_qml_test(Notifications VisualSnapDecisionsQueue)
71add_qml_test(Panel IndicatorRow)65add_qml_test(Panel IndicatorRow)
72add_qml_test(Panel Indicators IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})66add_qml_test(Panel Indicators)
73add_qml_test(Panel MenuContent IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})67add_qml_test(Panel MenuContent)
74add_qml_test(Panel Panel IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})68add_qml_test(Panel Panel)
75add_qml_test(Panel SearchIndicator)69add_qml_test(Panel SearchIndicator)
76add_qml_test(Panel/Indicators DefaultIndicatorWidget IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS}70add_qml_test(Panel/Indicators DefaultIndicatorWidget ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/QMenuModel")
77 ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/QMenuModel")71add_qml_test(Panel/Indicators DefaultIndicatorPage ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/QMenuModel")
78add_qml_test(Panel/Indicators DefaultIndicatorPage IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS}72# These MenuItemFactory tests need the test/mocks/ to come before plugins/
79 ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/QMenuModel")73add_qml_test(Panel/Indicators MenuItemFactory IMPORT_PATHS ${CMAKE_BINARY_DIR}/tests/mocks ${qmltest_DEFAULT_IMPORT_PATHS})
80add_qml_test(Panel/Indicators MenuItemFactory IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/plugins)74add_qml_test(Panel/Indicators MessageMenuItemFactory IMPORT_PATHS ${CMAKE_BINARY_DIR}/tests/mocks ${qmltest_DEFAULT_IMPORT_PATHS})
81add_qml_test(Panel/Indicators MessageMenuItemFactory IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/plugins)75add_qml_test(Stages PhoneStage)
82add_qml_test(Stages PhoneStage IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS}
83 ${CMAKE_BINARY_DIR}/tests/mocks
84 ${CMAKE_BINARY_DIR}/plugins)
8576
=== modified file 'tests/qmltests/Greeter/tst_Lockscreen.qml'
--- tests/qmltests/Greeter/tst_Lockscreen.qml 2014-05-20 12:10:23 +0000
+++ tests/qmltests/Greeter/tst_Lockscreen.qml 2014-05-29 14:11:15 +0000
@@ -17,7 +17,7 @@
17import QtQuick 2.017import QtQuick 2.0
18import QtTest 1.018import QtTest 1.0
19import ".."19import ".."
20import "../../../qml/Greeter"20import "../../../qml/Components"
21import Ubuntu.Components 0.121import Ubuntu.Components 0.1
22import LightDM 0.1 as LightDM22import LightDM 0.1 as LightDM
23import Unity.Test 0.1 as UT23import Unity.Test 0.1 as UT
@@ -39,7 +39,6 @@
39 minPinLength: minPinLengthTextField.text39 minPinLength: minPinLengthTextField.text
40 maxPinLength: maxPinLengthTextField.text40 maxPinLength: maxPinLengthTextField.text
41 username: "Lola"41 username: "Lola"
42 background: "../../../qml/graphics/phone_background.jpg"
43 infoText: infoTextTextField.text42 infoText: infoTextTextField.text
44 }43 }
4544
4645
=== modified file 'tests/qmltests/Greeter/tst_Phone.qml'
--- tests/qmltests/Greeter/tst_Phone.qml 2014-03-21 17:49:22 +0000
+++ tests/qmltests/Greeter/tst_Phone.qml 2014-05-29 14:11:15 +0000
@@ -33,7 +33,7 @@
33 height: parent.height33 height: parent.height
34 x: 0; y: 034 x: 0; y: 0
3535
36 defaultBackground: Qt.resolvedUrl("../../../qml/graphics/phone_background.jpg")36 background: Qt.resolvedUrl("../../../qml/graphics/phone_background.jpg")
3737
38 property int minX: 038 property int minX: 0
3939
@@ -104,22 +104,6 @@
104 tryCompare(LightDM.Infographic, "username", "single")104 tryCompare(LightDM.Infographic, "username", "single")
105 }105 }
106106
107 function test_background_data() {
108 return [
109 {tag: "set", accounts: Qt.resolvedUrl("../../data/unity/backgrounds/blue.png"), expected: "blue.png"},
110 {tag: "unset", accounts: "", expected: "background.jpg"},
111 {tag: "invalid", accounts: "invalid", expected: "background.jpg"},
112 ]
113 }
114
115 function test_background(data) {
116 var loader = findChild(greeter, "greeterContentLoader")
117 var background = findChild(loader.item, "greeterBackground")
118 AccountsService.backgroundFile = data.accounts
119 tryCompareFunction(function() { return background.source.toString().indexOf(data.expected) !== -1; }, true)
120 tryCompare(background, "status", Image.Ready)
121 }
122
123 function test_initial_selected_signal() {107 function test_initial_selected_signal() {
124 var greeterObj = greeterComponent.createObject(this)108 var greeterObj = greeterComponent.createObject(this)
125 var spy = findChild(greeterObj, "selectedSpy")109 var spy = findChild(greeterObj, "selectedSpy")
126110
=== added file 'tests/qmltests/tst_GreeterShell.qml'
--- tests/qmltests/tst_GreeterShell.qml 1970-01-01 00:00:00 +0000
+++ tests/qmltests/tst_GreeterShell.qml 2014-05-29 14:11:15 +0000
@@ -0,0 +1,88 @@
1/*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * Authors:
5 * Michael Terry <michael.terry@canonical.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 3.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20import QtQuick 2.0
21import QtTest 1.0
22import AccountsService 0.1
23import GSettings 1.0
24import Unity.Application 0.1
25import Unity.Test 0.1 as UT
26import Powerd 0.1
27import LightDM 0.1 as LightDM
28
29import "../../qml"
30
31Item {
32 width: shell.width
33 height: shell.height
34
35 QtObject {
36 id: applicationArguments
37
38 function hasGeometry() {
39 return false;
40 }
41
42 function width() {
43 return 0;
44 }
45
46 function height() {
47 return 0;
48 }
49 }
50
51 GreeterShell {
52 id: shell
53 defaultBackground: Qt.resolvedUrl("../../qml/graphics/phone_background.jpg")
54 }
55
56 UT.UnityTestCase {
57 name: "GreeterShell"
58 when: windowShown
59
60 function test_wallpaper_data() {
61 return [
62 {tag: "both", accounts: "../tests/data/unity/backgrounds/blue.png", gsettings: "../tests/data/unity/backgrounds/red.png", expected: "blue.png"},
63 {tag: "accounts", accounts: "../tests/data/unity/backgrounds/blue.png", gsettings: "", expected: "blue.png"},
64 {tag: "gsettings", accounts: "", gsettings: "../tests/data/unity/backgrounds/red.png", expected: "red.png"},
65 {tag: "none", accounts: "", gsettings: "", expected: shell.defaultBackground},
66 {tag: "invalid-both", accounts: "invalid", gsettings: "invalid", expected: shell.defaultBackground},
67 {tag: "invalid-accounts", accounts: "invalid", gsettings: "../tests/data/unity/backgrounds/red.png", expected: shell.defaultBackground},
68 {tag: "invalid-gsettings", accounts: "../tests/data/unity/backgrounds/blue.png", gsettings: "invalid", expected: "blue.png"},
69 ]
70 }
71
72 function test_wallpaper(data) {
73 var greeterBackground = findChild(shell, "greeterBackground")
74 GSettingsController.setPictureUri(data.gsettings)
75 AccountsService.backgroundFile = data.accounts
76 verify(greeterBackground.source.toString().indexOf(data.expected) !== -1)
77 tryCompare(greeterBackground, "status", Image.Ready)
78 }
79
80 function test_dispatchURLHidesGreeter() {
81 var greeter = findChild(shell, "greeter")
82 greeter.showNow()
83 tryCompare(greeter, "showProgress", 1)
84 LightDM.URLDispatcher.dispatchURL("application:///notes-app")
85 tryCompare(greeter, "showProgress", 0)
86 }
87 }
88}
089
=== modified file 'tests/qmltests/tst_Shell.qml'
--- tests/qmltests/tst_Shell.qml 2014-05-21 15:09:07 +0000
+++ tests/qmltests/tst_Shell.qml 2014-05-29 14:11:15 +0000
@@ -23,6 +23,7 @@
23import Unity.Application 0.123import Unity.Application 0.1
24import Unity.Test 0.1 as UT24import Unity.Test 0.1 as UT
25import Powerd 0.125import Powerd 0.1
26import SessionManager 0.1
2627
27import "../../qml"28import "../../qml"
2829
@@ -48,6 +49,7 @@
4849
49 Shell {50 Shell {
50 id: shell51 id: shell
52 defaultBackground: Qt.resolvedUrl("../../qml/graphics/phone_background.jpg")
51 }53 }
5254
53 UT.UnityTestCase {55 UT.UnityTestCase {
@@ -72,9 +74,6 @@
72 ok = homeLoader !== null74 ok = homeLoader !== null
73 && homeLoader.item !== undefined;75 && homeLoader.item !== undefined;
7476
75 var greeter = findChild(shell, "greeter");
76 ok &= greeter !== null;
77
78 var launcherPanel = findChild(shell, "launcherPanel");77 var launcherPanel = findChild(shell, "launcherPanel");
79 ok &= launcherPanel !== null;78 ok &= launcherPanel !== null;
8079
@@ -89,17 +88,9 @@
89 } while (!ok && attempts <= maxAttempts);88 } while (!ok && attempts <= maxAttempts);
9089
91 verify(ok);90 verify(ok);
92
93 swipeAwayGreeter();
94 }91 }
9592
96 function cleanup() {93 function cleanup() {
97 // If a test invoked the greeter, make sure we swipe it away again
98 var greeter = findChild(shell, "greeter");
99 if (greeter.shown) {
100 swipeAwayGreeter();
101 }
102
103 // kill all (fake) running apps94 // kill all (fake) running apps
104 killApps(ApplicationManager);95 killApps(ApplicationManager);
10596
@@ -181,8 +172,6 @@
181 }172 }
182173
183 function test_suspend() {174 function test_suspend() {
184 var greeter = findChild(shell, "greeter");
185
186 // Launch an app from the launcher175 // Launch an app from the launcher
187 dragLauncherIntoView();176 dragLauncherIntoView();
188 tapOnAppIconInLauncher();177 tapOnAppIconInLauncher();
@@ -196,40 +185,27 @@
196185
197 // Try to suspend while proximity is engaged...186 // Try to suspend while proximity is engaged...
198 Powerd.displayPowerStateChange(Powerd.Off, Powerd.UseProximity);187 Powerd.displayPowerStateChange(Powerd.Off, Powerd.UseProximity);
199 tryCompare(greeter, "showProgress", 0);188 tryCompare(SessionManager, "active", true);
200189
201 // Now really suspend190 // Now really suspend
202 print("suspending")191 print("suspending")
203 Powerd.displayPowerStateChange(Powerd.Off, 0);192 Powerd.displayPowerStateChange(Powerd.Off, 0);
204 print("done suspending")193 print("done suspending")
205 tryCompare(greeter, "showProgress", 1);194 tryCompare(SessionManager, "active", false);
206195
207 tryCompare(ApplicationManager, "suspended", true);196 tryCompare(ApplicationManager, "suspended", true);
208 compare(mainApp.state, ApplicationInfo.Suspended);197 compare(mainApp.state, ApplicationInfo.Suspended);
209198
210 // And wake up199 // And wake up
211 Powerd.displayPowerStateChange(Powerd.On, 0);200 Powerd.displayPowerStateChange(Powerd.On, 0);
212 tryCompare(greeter, "showProgress", 1);
213201
214 // Swipe away greeter to focus app202 // Activate session to focus app
215 swipeAwayGreeter();203 SessionManager.active = true;
216 tryCompare(ApplicationManager, "suspended", false);204 tryCompare(ApplicationManager, "suspended", false);
217 compare(mainApp.state, ApplicationInfo.Running);205 compare(mainApp.state, ApplicationInfo.Running);
218 tryCompare(ApplicationManager, "focusedApplicationId", mainAppId);206 tryCompare(ApplicationManager, "focusedApplicationId", mainAppId);
219 }207 }
220208
221 function swipeAwayGreeter() {
222 var greeter = findChild(shell, "greeter");
223 tryCompare(greeter, "showProgress", 1);
224
225 var touchX = shell.width - (shell.edgeSize / 2);
226 var touchY = shell.height / 2;
227 touchFlick(shell, touchX, touchY, shell.width * 0.1, touchY);
228
229 // wait until the animation has finished
230 tryCompare(greeter, "showProgress", 0);
231 }
232
233 /*209 /*
234 Perform a right-edge drag when the Dash is being show and there are210 Perform a right-edge drag when the Dash is being show and there are
235 no running/minimized apps to be restored.211 no running/minimized apps to be restored.
@@ -477,22 +453,14 @@
477453
478 function test_DashShown_data() {454 function test_DashShown_data() {
479 return [455 return [
480 {tag: "in focus", greeter: false, app: false, launcher: false, indicators: false, expectedShown: true},456 {tag: "in focus", app: false, launcher: false, indicators: false, expectedShown: true},
481 {tag: "under greeter", greeter: true, app: false, launcher: false, indicators: false, expectedShown: false},457 {tag: "under app", app: true, launcher: false, indicators: false, expectedShown: false},
482 {tag: "under app", greeter: false, app: true, launcher: false, indicators: false, expectedShown: false},458 {tag: "under launcher", app: false, launcher: true, indicators: false, expectedShown: true},
483 {tag: "under launcher", greeter: false, app: false, launcher: true, indicators: false, expectedShown: true},459 {tag: "under indicators", app: false, launcher: false, indicators: true, expectedShown: true},
484 {tag: "under indicators", greeter: false, app: false, launcher: false, indicators: true, expectedShown: true},
485 ]460 ]
486 }461 }
487462
488 function test_DashShown(data) {463 function test_DashShown(data) {
489 if (data.greeter) {
490 // Swipe the greeter in
491 var greeter = findChild(shell, "greeter");
492 Powerd.displayPowerStateChange(Powerd.Off, 0);
493 tryCompare(greeter, "showProgress", 1);
494 }
495
496 if (data.app) {464 if (data.app) {
497 dragLauncherIntoView();465 dragLauncherIntoView();
498 tapOnAppIconInLauncher();466 tapOnAppIconInLauncher();
@@ -522,17 +490,6 @@
522 tryCompare(searchIndicator, "opacity", 0);490 tryCompare(searchIndicator, "opacity", 0);
523 }491 }
524492
525 function test_searchIndicatorHidesOnGreeterShown() {
526 var searchIndicator = findChild(shell, "container")
527 var greeter = findChild(shell, "greeter");
528
529 tryCompare(searchIndicator, "opacity", 1)
530
531 greeter.show()
532 tryCompare(greeter, "shown", true)
533 tryCompare(searchIndicator, "opacity", 0)
534 }
535
536 function test_searchIndicatorHideOnPreviewShown() {493 function test_searchIndicatorHideOnPreviewShown() {
537 var searchIndicator = findChild(shell, "container");494 var searchIndicator = findChild(shell, "container");
538 var dashContent = findChild(shell, "dashContent");495 var dashContent = findChild(shell, "dashContent");
@@ -545,16 +502,5 @@
545502
546 tryCompare(searchIndicator, "opacity", 0);503 tryCompare(searchIndicator, "opacity", 0);
547 }504 }
548
549 function test_focusRequestedHidesGreeter() {
550 var greeter = findChild(shell, "greeter")
551
552 greeter.show()
553 tryCompare(greeter, "showProgress", 1)
554
555 ApplicationManager.focusRequested("notes-app")
556 tryCompare(greeter, "showProgress", 0)
557 waitUntilApplicationWindowIsFullyVisible()
558 }
559 }505 }
560}506}
561507
=== modified file 'tools/unlock-device'
--- tools/unlock-device 2014-05-14 17:09:07 +0000
+++ tools/unlock-device 2014-05-29 14:11:15 +0000
@@ -17,24 +17,16 @@
17 esac17 esac
18done18done
1919
20UNLOCK_SCRIPT='20LIGHTDM_CONFIG="
21import dbus, logging;21[SeatDefaults]
22from unity8 import process_helpers as helpers;22autologin-in-background=false
23logging.basicConfig(level=logging.INFO);23"
24bus = dbus.SystemBus().get_object("com.canonical.powerd", "/com/canonical/powerd");24LIGHTDM_CONFIG_FILE="/etc/lightdm/lightdm.conf.d/99-unity8-greeter-unlock.conf"
25cookie = bus.requestSysState("unlock-device-hold", 1, dbus_interface="com.canonical.powerd");25
26helpers.restart_unity_with_testability();26adb shell "echo '$LIGHTDM_CONFIG' > $LIGHTDM_CONFIG_FILE"
27bus.clearSysState(cookie, dbus_interface="com.canonical.powerd");
28helpers.unlock_unity()
29'
3027
31eval "$WAIT_COMMAND"28eval "$WAIT_COMMAND"
3229
33UNLOCK_OUTPUT=$(adb shell "sudo -u phablet -i python3 -c '$UNLOCK_SCRIPT'" 2>&1)30adb shell "rm -f $LIGHTDM_CONFIG_FILE"
34if echo "$UNLOCK_OUTPUT" | grep 'Greeter unlocked' >/dev/null; then31
35 echo "I: Unlock passed"32exit 0
36 exit 0
37else
38 echo "I: Unlock failed, script output: '$UNLOCK_OUTPUT'"
39 exit 1
40fi

Subscribers

People subscribed via source and target branches