~mterry/unity8/greeter-arrangement

« back to all changes in this revision

Viewing changes to qml/Greeter/LoginPage.qml

  • Committer: Michael Terry
  • Date: 2017-01-26 16:36:49 UTC
  • mfrom: (2552.7.202 unity8)
  • Revision ID: mike@mterry.name-20170126163649-ladpbjm2f4l143bx
Merge from trunk; this broke some tests, needs further investigation and testing

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
import QtQuick 2.4
18
18
import Ubuntu.Components 1.3
19
19
import "../Components"
 
20
import "." 0.1
20
21
 
21
22
Showable {
22
23
    id: root
119
120
        onSelected: if (enabled) root.selected(index)
120
121
        onResponded: root.responded(response)
121
122
        onSessionChooserButtonClicked: parent.state = "SessionsList"
 
123
        onCurrentIndexChanged: setCurrentSession()    
122
124
 
123
125
        Keys.forwardTo: [sessionChooserLoader.item]
 
126
 
 
127
        Component.onCompleted: setCurrentSession()
 
128
 
 
129
        function setCurrentSession() {
 
130
            currentSession = LightDMService.users.data(currentIndex, LightDMService.userRoles.SessionRole);
 
131
        }
124
132
    }
125
133
 
126
134
    Loader {
149
157
            onSessionSelected: loginList.currentSession = sessionKey
150
158
            onShowLoginList: {
151
159
                root.state = "LoginList"
152
 
                loginList.passwordInput.forceActiveFocus();
 
160
                loginList.tryToUnlock();
153
161
            }
154
162
            ignoreUnknownSignals: true
155
163
        }