on xenial help sign in
Return the correct role for the user session name
10f5f17Josh Arenson
qml/Greeter/WideView.qml+8−2
@@ -125,6 +125,8 @@ FocusScope {
125 id: loginList
125 id: loginList
126 objectName: "loginList"
126 objectName: "loginList"
127
127
128+ property int selectedUserIndex: 0
129+
128 width: units.gu(40)
130 width: units.gu(40)
129 anchors {
131 anchors {
130 left: parent.left
132 left: parent.left
@@ -139,9 +141,13 @@ FocusScope {
139 Behavior on boxVerticalOffset { UbuntuNumberAnimation {} }
141 Behavior on boxVerticalOffset { UbuntuNumberAnimation {} }
140
142
141 model: root.userModel
143 model: root.userModel
142− currentSession: LightDM.Greeter.defaultSession
144+ currentSession: LightDM.Users.data(selectedUserIndex,
145+ LightDM.UserRoles.SessionRole);
143 onResponded: root.responded(response)
146 onResponded: root.responded(response)
147+ onSelected: {
144− onSelected: root.selected(index)
148+ root.selected(index)
149+ selectedUserIndex = index;
150+ }
145 onSessionChooserButtonClicked: parent.state = "SessionsList"
151 onSessionChooserButtonClicked: parent.state = "SessionsList"
146
152
147 Keys.forwardTo: [sessionChooserLoader.item]
153 Keys.forwardTo: [sessionChooserLoader.item]