on xenial help sign in
Enable the greeter to remember which session the user last logged into
effea56Josh Arenson
qml/Greeter/Greeter.qml+1−5
@@ -145,11 +145,7 @@ Showable {
145 }
145 }
146 }
146 }
147
147
148− if (loader.item.sessionToStart === LightDMService.greeter.defaultSession) {
149− return LightDMService.greeter.defaultSession;
148+ return LightDMService.greeter.defaultSession;
150− } else {
151− return "ubuntu"; // The default / fallback
152− }
153 }
149 }
154
150
155 QtObject {
151 QtObject {
qml/Greeter/LoginList.qml+1−1
@@ -165,7 +165,7 @@ StyledItem {
165 }
165 }
166
166
167 delegate: Item {
167 delegate: Item {
168− width: parent.width
168+ width: userList.width
169 height: root.cellHeight
169 height: root.cellHeight
170
170
171 readonly property bool belowHighlight: (userList.currentIndex < 0 && index > 0) || (userList.currentIndex >= 0 && index > userList.currentIndex)
171 readonly property bool belowHighlight: (userList.currentIndex < 0 && index > 0) || (userList.currentIndex >= 0 && index > userList.currentIndex)
qml/Greeter/WideView.qml+7−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,12 @@ FocusScope {
139 Behavior on boxVerticalOffset { UbuntuNumberAnimation {} }
141 Behavior on boxVerticalOffset { UbuntuNumberAnimation {} }
140
142
141 model: root.userModel
143 model: root.userModel
142− currentSession: LightDMService.greeter.defaultSession
144+ currentSession: LightDMService.users.data(selectedUserIndex, LightDMService.userRoles.SessionRole);
143 onResponded: root.responded(response)
145 onResponded: root.responded(response)
146+ onSelected: {
144− onSelected: root.selected(index)
147+ root.selected(index)
148+ loginList.selectedUserIndex = index;
149+ }
145 onSessionChooserButtonClicked: parent.state = "SessionsList"
150 onSessionChooserButtonClicked: parent.state = "SessionsList"
146
151
147 Keys.forwardTo: [sessionChooserLoader.item]
152 Keys.forwardTo: [sessionChooserLoader.item]