~mzanetti/unity8/fix-1648251

« back to all changes in this revision

Viewing changes to qml/Greeter/LightDMService.qml

  • Committer: Michael Zanetti
  • Date: 2016-10-13 11:02:11 UTC
  • mfrom: (2525.1.132 unity8)
  • Revision ID: michael.zanetti@canonical.com-20161013110211-tj2gly2dxaqj5t2e
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 * plugin
20
20
 */
21
21
 
 
22
pragma Singleton
22
23
import QtQuick 2.4
23
24
 
24
25
Loader {
26
27
 
27
28
    property var greeter: d.valid ? loader.item.greeter : null
28
29
    property var infographic: d.valid ? loader.item.infographic : null
 
30
    property var sessions: d.valid ? loader.item.sessions : null
 
31
    property var sessionRoles: d.valid ? loader.item.sessionRoles : null
29
32
    property var users: d.valid ? loader.item.users : null
30
33
    property var userRoles: d.valid ? loader.item.userRoles : null
31
34
 
32
 
    // TODO: Conditionally load RealLightDMImpl if shellMode dictates it
33
 
    source: "./IntegratedLightDMImpl.qml"
 
35
    // This trickery handles cases where applicationArguments aren't provided
 
36
    // such as during testing
 
37
    property var fullLightDM: {
 
38
        if (typeof applicationArguments !== "undefined") {
 
39
            if (applicationArguments.mode === "greeter") {
 
40
                return true;
 
41
            }
 
42
        }
 
43
        return false;
 
44
    }
 
45
 
 
46
    source:  fullLightDM ?
 
47
        "FullLightDMImpl.qml" : "IntegratedLightDMImpl.qml"
34
48
 
35
49
    QtObject {
36
50
        id: d
37
51
 
38
52
        property bool valid: loader.item !== null
39
53
    }
40
 
 
41
54
}