@@ -27,12 +27,12 @@ FocusScope {
27 property alias dragHandleLeftMargin: coverPage.dragHandleLeftMargin
27 property alias dragHandleLeftMargin: coverPage.dragHandleLeftMargin
28 property alias infographicModel: coverPage.infographicModel
28 property alias infographicModel: coverPage.infographicModel
29 property alias launcherOffset: coverPage.launcherOffset
29 property alias launcherOffset: coverPage.launcherOffset
30− property alias loginListShown: loginAreaLoader.loginListShown
30+ property alias loginListShown: loginList.loginListShown
31− property int currentIndex // Set from outside
31+ property alias currentIndex: loginList.currentIndex
32 property int delayMinutes // TODO
32 property int delayMinutes // TODO
33− property bool alphanumeric: true
33+ property alias alphanumeric: loginList.alphanumeric
34− property bool locked
34+ property alias locked: loginList.locked
35− property alias sessionToStart: loginAreaLoader.currentSession
35+ property alias sessionToStart: loginList.currentSession
36 property var userModel // Set from outside
36 property var userModel // Set from outside
38 readonly property bool animating: coverPage.showAnimation.running || coverPage.hideAnimation.running
38 readonly property bool animating: coverPage.showAnimation.running || coverPage.hideAnimation.running
@@ -57,29 +57,29 @@ FocusScope {
58 readonly property var notifyAuthenticationFailed: ifLoginlistShownThen(doNotifyAuthenticationFailed);
58 readonly property var notifyAuthenticationFailed: ifLoginlistShownThen(doNotifyAuthenticationFailed);
59 function doNotifyAuthenticationFailed() {
59 function doNotifyAuthenticationFailed() {
60− loginAreaLoader.item.showError();
60+ loginListm.showError();
63 readonly property var reset: ifLoginlistShownThen(doReset);
63 readonly property var reset: ifLoginlistShownThen(doReset);
64 function doReset() {
64 function doReset() {
65− loginAreaLoader.item.reset();
65+ loginList.reset();
68 readonly property var showMessage: ifLoginlistShownThen(doShowMessage);
68 readonly property var showMessage: ifLoginlistShownThen(doShowMessage);
69 function doShowMessage(html) {
69 function doShowMessage(html) {
70− loginAreaLoader.item.showMessage(html);
70+ loginList.showMessage(html);
73 readonly property var showPrompt: ifLoginlistShownThen(doShowPrompt);
73 readonly property var showPrompt: ifLoginlistShownThen(doShowPrompt);
74 function doShowPrompt(text, isSecret, isDefaultPrompt) {
74 function doShowPrompt(text, isSecret, isDefaultPrompt) {
75− loginAreaLoader.item.showPrompt(text, isSecret, isDefaultPrompt);
75+ loginList.showPrompt(text, isSecret, isDefaultPrompt);
78 readonly property var tryToUnlock: ifLoginlistShownThen(doTryToUnlock);
78 readonly property var tryToUnlock: ifLoginlistShownThen(doTryToUnlock);
79 function doTryToUnlock(toTheRight) {
79 function doTryToUnlock(toTheRight) {
80 if (root.locked) {
80 if (root.locked) {
81 coverPage.show();
81 coverPage.show();
82− loginAreaLoader.item.tryToUnlock();
82+ loginList.tryToUnlock();
83 return false;
83 return false;
85 var coverChanged = coverPage.shown;
85 var coverChanged = coverPage.shown;
@@ -117,10 +117,11 @@ FocusScope {
117 height: parent.height
117 height: parent.height
118 width: parent.width
118 width: parent.width
119 draggable: !root.locked && !root.waiting
119 draggable: !root.locked && !root.waiting
121 infographics {
122 infographics {
122 height: 0.75 * parent.height
123 height: 0.75 * parent.height
123− anchors.leftMargin: loginAreaLoader.x + loginAreaLoader.width
124+ anchors.leftMargin: loginList.x + loginList.width
126 onTease: root.tease()
127 onTease: root.tease()
@@ -131,9 +132,94 @@ FocusScope {
138+ property bool loginListShown: true
139+ property bool sessionUpdated: false
141+ height: inputMethod && inputMethod.visible ?
142+ parent.height - inputMethod.keyboardRectangle.height : parent.height
146+ leftMargin: Math.min(parent.width * 0.16, units.gu(20))
150+ model: root.userModel
152+ currentSession: LightDMService.greeter.defaultSession
153+ onResponded: root.responded(response)
154+ onSelected: root.selected(index)
155+ onSessionChooserButtonClicked: parent.state = "SessionsList"
135− id: loginAreaLoader
159+ id: sessionChooserLoader
161+ height: loginList.height
162+ width: loginList.width
165+ leftMargin: Math.min(parent.width * 0.16, units.gu(20))
172+ target: sessionChooserLoader.item
173+ property: "initiallySelectedSession"
174+ value: loginList.currentSession
178+ target: sessionChooserLoader.item
179+ onShowLoginList: coverPage.state = "LoginList"
180+ onSessionSelected: {
181+ loginList.sessionUpdated = true
182+ loginList.currentSession = sessionKey
184+ ignoreUnknownSignals: true
190+ name: "SessionsList"
191+ PropertyChanges { target: loginList; opacity: 0 }
192+ PropertyChanges { target: sessionChooserLoader;
195+ source: "SessionsList.qml"
201+ PropertyChanges { target: loginList; opacity: 1 }
202+ PropertyChanges { target: sessionChooserLoader;
214+ UbuntuNumberAnimation {
215+ property: "opacity";
136− objectName: "loginAreaLoader"
222+ objectName: "loginList"
138 // True when LoginList is shown, false when SessionList is shown
224 // True when LoginList is shown, false when SessionList is shown
139 property bool loginListShown: true
225 property bool loginListShown: true
@@ -155,7 +241,7 @@ FocusScope {
156 UbuntuNumberAnimation {
242 UbuntuNumberAnimation {
157 id: loadingAnimation
243 id: loadingAnimation
158− target: loginAreaLoader.item
244+ target: loginList.item
159 property: "opacity"
245 property: "opacity"
@@ -163,25 +249,25 @@ FocusScope {
165 Binding {
251 Binding {
166− target: loginAreaLoader.item
252+ target: loginList.item
167 property: "alphanumeric"
253 property: "alphanumeric"
168 value: loginListShown ? root.alphanumeric : null
254 value: loginListShown ? root.alphanumeric : null
171 Binding {
257 Binding {
172− target: loginAreaLoader.item
258+ target: loginList.item
173 property: "currentIndex"
259 property: "currentIndex"
174 value: loginListShown ? root.currentIndex : null
260 value: loginListShown ? root.currentIndex : null
177 Binding {
263 Binding {
178− target: loginAreaLoader.item
264+ target: loginList.item
179 property: "locked"
265 property: "locked"
180 value: root.locked
266 value: root.locked
183 Binding {
269 Binding {
184− target: loginAreaLoader.item
270+ target: loginList.item
185 property: "model"
271 property: "model"
186 value: loginListShown ? root.userModel : null
272 value: loginListShown ? root.userModel : null
@@ -189,27 +275,27 @@ FocusScope {
189 // Only inform LoginList if the session isn't the user's default session
275 // Only inform LoginList if the session isn't the user's default session
190 // because LoginList gets the default session on its own
276 // because LoginList gets the default session on its own
191 Binding {
277 Binding {
192− target: loginAreaLoader.item
278+ target: loginList.item
193 property: "selectedSession"
279 property: "selectedSession"
194− value: loginListShown && loginAreaLoader.sessionUpdated ?
280+ value: loginListShown && loginList.sessionUpdated ?
195− loginAreaLoader.currentSession : null
281+ loginList.currentSession : null
198 Binding {
284 Binding {
199− target: loginAreaLoader.item
285+ target: loginList.item
200 property: "initiallySelectedSession"
286 property: "initiallySelectedSession"
201− value: !loginListShown ? loginAreaLoader.currentSession : null
287+ value: !loginListShown ? loginList.currentSession : null
204 Connections {
290 Connections {
205− target: loginListShown ? loginAreaLoader.item : null
291+ target: loginListShown ? loginList.item : null
206 onSelected: root.selected(index)
292 onSelected: root.selected(index)
207 onResponded: root.responded(response)
293 onResponded: root.responded(response)
208 // The initially selected session lags behind the component completion
294 // The initially selected session lags behind the component completion
209 // so this provides the initial session name when available
295 // so this provides the initial session name when available
210 onLoginListSessionChanged: {
296 onLoginListSessionChanged: {
211− if (loginListShown && !loginAreaLoader.sessionUpdated) {
297+ if (loginListShown && !loginList.sessionUpdated) {
212− loginAreaLoader.currentSession = loginAreaLoader.item.currentSession
298+ loginList.currentSession = loginList.item.currentSession
@@ -218,15 +304,15 @@ FocusScope {
220 Connections {
306 Connections {
221− target: !loginListShown ? loginAreaLoader.item : null
307+ target: !loginListShown ? loginList.item : null
222 onSessionSelected: {
308 onSessionSelected: {
223− loginAreaLoader.sessionUpdated = true
309+ loginList.sessionUpdated = true
224− loginAreaLoader.currentSession = sessionKey
310+ loginList.currentSession = sessionKey
227− onShowLoginList: loginAreaLoader.loginListShown = true
313+ onShowLoginList: loginList.loginListShown = true
228 ignoreUnknownSignals: true
314 ignoreUnknownSignals: true