Add deprecated properties and notifications

This commit is contained in:
Roel Walraven 2017-02-24 14:04:48 +01:00
parent d6a7fabfd6
commit 0c01ee7933

View File

@ -31,34 +31,38 @@
function LightDMMock(autofill, timeout, autoGuest) {
window.checkForUpdate("v1.0.0");
this.hostname = null;
this.users = null;
this.default_language = null;
this.language = null;
this.languages = null;
this.default_layout = null;
this.layouts = null;
this.layout = null;
this.sessions = null;
this.num_users = 0;
this.default_session = null;
this.timed_login_user = null;
this.timed_login_delay = null;
// see <https://github.com/Antergos/web-greeter/blob/before-python/src/webkit2-extension.c#L1470-L1504>
this.authentication_user = null;
this.in_authentication = false;
this.is_authenticated = false;
this.can_suspend = false;
this.autologin_guest = false;
this.autologin_timeout = 0;
this.autologin_user = null;
this.can_hibernate = false;
this.can_restart = false;
this.can_shutdown = false;
this.lock_hint = false;
this.can_suspend = false;
this.default_session = null;
this.has_guest_account = false;
this.hide_users = false;
this.select_user = null;
this.select_guest = false;
this.autologin_user = null;
this.autologin_guest = false;
this.autologin_timeout = 0;
this.hostname = null;
this.in_authentication = false;
this.is_authenticated = false;
this.language = null;
this.languages = null;
this.layout = null;
this.layouts = null;
this.lock_hint = false;
this.num_users = 0;
this.select_guest_hint = null;
this.select_user_hint = null;
this.sessions = null;
this.users = null;
this.default_language = null; // Deprecated
this.default_layout = null; // Deprecated
this.select_guest = null; // Deprecated
this.select_user = null; // Deprecated
this.timed_login_delay = null; // Deprecated
this.timed_login_user = null; // Deprecated
if(typeof autofill === "boolean" && autofill) {
this.users = JSON.parse(atob("W3siZGlzcGxheV9uYW1lIjoiQWxleGFuZGVyIHRoZSBHcmVhdCIsImxhbmd1YWdlIjoiZ3JfR1IiLCJyZWFsX25hbWUiOiJCYXNpbGV1cyIsImxheW91dCI6bnVsbCwiaW1hZ2UiOiJtb2NrL2Jhc2lsZXVzYWxleC8uZmFjZSIsImhvbWVfZGlyZWN0b3J5IjoibW9jay9iYXNpbGV1c2FsZXgiLCJuYW1lIjoiYmFzaWxldXNhbGV4Ii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m5hbWUiOiJtZWlqaXRhaXRlaSIsImxvZ2dlZF9pbiI6ZmFsc2UsInNlc3Npb24iOm51bGx9XQ=="));
@ -563,6 +567,14 @@ LightDMMock.watch('default_layout', function() {
window.deprecationNotifier("property", "default_layout", "lightdm.layout");
});
LightDMMock.watch('select_guest', function() {
window.deprecationNotifier("property", "select_guest", "lightdm.select_guest_hint");
});
LightDMMock.watch('select_user', function() {
window.deprecationNotifier("property", "select_user", "lightdm.select_user_hint");
});
LightDMMock.watch('timed_login_user', function() {
window.deprecationNotifier("property", "timed_login_user", "lightdm.autologin_user");
});