@@ -25,7 +25,6 @@ Showable {
26 created: loader.status == Loader.Ready
26 created: loader.status == Loader.Ready
28− LightDMGreeterAPI{id:lightDMGreeterAPI}
29 property real dragHandleLeftMargin: 0
28 property real dragHandleLeftMargin: 0
31 property url background
30 property url background
@@ -43,7 +42,7 @@ Showable {
43 readonly property bool hasLockedApp: lockedApp !== ""
42 readonly property bool hasLockedApp: lockedApp !== ""
45 property bool forcedUnlock
44 property bool forcedUnlock
46− readonly property bool locked: lightDMGreeterAPI.active && !lightDMGreeterAPI.authenticated && !forcedUnlock
45+ readonly property bool locked: lightDM.greeter.active && !lightDM.greeter.authenticated && !forcedUnlock
48 property bool tabletMode
47 property bool tabletMode
49 property url viewSource // only used for testing
48 property url viewSource // only used for testing
@@ -104,10 +103,11 @@ Showable {
104 return d.startUnlock(true /* toTheRight */);
103 return d.startUnlock(true /* toTheRight */);
106+ LightDM{id:lightDM} // Provide backend access
107 QtObject {
107 QtObject {
110− readonly property bool multiUser: lightDMGreeterAPI.userCount > 1
110+ readonly property bool multiUser: lightDM.users.count > 1
111 property int currentIndex
111 property int currentIndex
112 property bool waiting
112 property bool waiting
@@ -131,15 +131,15 @@ Showable {
131 loader.item.reset();
131 loader.item.reset();
133 currentIndex = uid;
133 currentIndex = uid;
134− var user = lightDMGreeterAPI.getUsername(uid);
134+ var user = lightDM.users.data(uid);
135 AccountsService.user = user;
135 AccountsService.user = user;
136 LauncherModel.setUser(user);
136 LauncherModel.setUser(user);
137− lightDMGreeterAPI.authenticate(user); // always resets auth state
137+ lightDM.greeter.authenticate(user); // always resets auth state
140 function login() {
140 function login() {
141 enabled = false;
141 enabled = false;
142− if (lightDMGreeterAPI.startSessionSync()) {
142+ if (lightDM.greeter.startSessionSync()) {
143 sessionStarted();
143 sessionStarted();
144 if (loader.item) {
144 if (loader.item) {
145 loader.item.notifyAuthenticationSucceeded();
145 loader.item.notifyAuthenticationSucceeded();
@@ -226,7 +226,7 @@ Showable {
226 root.lockedApp = "";
226 root.lockedApp = "";
227 root.forceActiveFocus();
227 root.forceActiveFocus();
228 d.selectUser(d.currentIndex, true);
228 d.selectUser(d.currentIndex, true);
229− lightDMGreeterAPI.infographicReadyForDataChange();
229+ lightDM.infographic.readyForDataChange();
232 Connections {
232 Connections {
@@ -236,9 +236,9 @@ Showable {
237 onResponded: {
237 onResponded: {
238 if (root.locked) {
238 if (root.locked) {
239− lightDMGreeterAPI.respond(response);
239+ lightDM.greeter.respond(response);
241− if (lightDMGreeterAPI.active && !lightDMGreeterAPI.authenticated) { // could happen if forcedUnlock
241+ if (lightDM.greeter.active && !lightDM.greeter.authenticated) { // could happen if forcedUnlock
242 d.login();
242 d.login();
244 loader.item.hide();
244 loader.item.hide();
@@ -304,18 +304,18 @@ Showable {
304 Binding {
304 Binding {
305 target: loader.item
305 target: loader.item
306 property: "userModel"
306 property: "userModel"
307− value: lightDMGreeterAPI.userModel
307+ value: lightDM.users.model
310 Binding {
310 Binding {
311 target: loader.item
311 target: loader.item
312 property: "infographicModel"
312 property: "infographicModel"
313− value: lightDMGreeterAPI.infographicModel
313+ value: lightDM.infographic.model
317 Connections {
317 Connections {
318− target: lightDMGreeterAPI.theGreeter
318+ target: lightDM.greeter.singelton
320 onShowGreeter: root.forceShow()
320 onShowGreeter: root.forceShow()
@@ -325,7 +325,7 @@ Showable {
327 onShowMessage: {
327 onShowMessage: {
328− if (!lightDMGreeterAPI.active) {
328+ if (!lightDM.greeter.active) {
329 return; // could happen if hideGreeter() comes in before we prompt
329 return; // could happen if hideGreeter() comes in before we prompt
@@ -344,7 +344,7 @@ Showable {
344 onShowPrompt: {
344 onShowPrompt: {
345 d.waiting = false;
345 d.waiting = false;
347− if (!lightDMGreeterAPI.active) {
347+ if (!lightDM.greeter.active) {
348 return; // could happen if hideGreeter() comes in before we prompt
348 return; // could happen if hideGreeter() comes in before we prompt
@@ -354,14 +354,14 @@ Showable {
354 onAuthenticationComplete: {
354 onAuthenticationComplete: {
355 d.waiting = false;
355 d.waiting = false;
357− if (lightDMGreeterAPI.authenticated) {
357+ if (lightDM.greeter.authenticated) {
358 AccountsService.failedLogins = 0;
358 AccountsService.failedLogins = 0;
359 d.login();
359 d.login();
360− if (!lightDMGreeterAPI.promptless) {
360+ if (!lightDM.greeter.promptless) {
361 loader.item.hide();
361 loader.item.hide();
364− if (!lightDMGreeterAPI.promptless) {
364+ if (!lightDM.greeter.promptless) {
365 AccountsService.failedLogins++;
365 AccountsService.failedLogins++;
@@ -382,7 +382,7 @@ Showable {
384 loader.item.notifyAuthenticationFailed();
384 loader.item.notifyAuthenticationFailed();
385− if (!lightDMGreeterAPI.promptless) {
385+ if (!lightDM.greeter.promptless) {
386 d.selectUser(d.currentIndex, false);
386 d.selectUser(d.currentIndex, false);
@@ -390,8 +390,8 @@ Showable {
391 onRequestAuthenticationUser: {
391 onRequestAuthenticationUser: {
392 // Find index for requested user, if it exists
392 // Find index for requested user, if it exists
393− for (var i = 0; i < lightDMGreeterAPI.userCount; i++) {
393+ for (var i = 0; i < lightDM.users.count; i++) {
394− if (user === lightDMGreeterAPI.getUsername(i)) {
394+ if (user === lightDM.users.data(i)) {
395 d.selectUser(i, true);
395 d.selectUser(i, true);
@@ -400,19 +400,19 @@ Showable {
402 Binding {
402 Binding {
403− target: lightDMGreeterAPI.theGreeter
403+ target: lightDM.greeter
404 property: "active"
404 property: "active"
405 value: root.active
405 value: root.active
408 Binding {
408 Binding {
409− target: lightDMGreeterAPI.infographicModel
409+ target: lightDM.infographic
410 property: "username"
410 property: "username"
411− value: AccountsService.statsWelcomeScreen ? lightDMGreeterAPI.getUsername(d.currentIndex) : ""
411+ value: AccountsService.statsWelcomeScreen ? lightDM.users.data(d.currentIndex) : ""
414 Connections {
414 Connections {
415 target: i18n
415 target: i18n
416− onLanguageChanged: lightDMGreeterAPI.infographicReadyForDataChange()
416+ onLanguageChanged: lightDM.infographic.readyForDataChange()