[gnome-shell] Allow testing GDM login dialog from the session
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Allow testing GDM login dialog from the session
- Date: Tue, 23 Oct 2012 17:09:39 +0000 (UTC)
commit e249218a9db7f89240b4011e148f858a5c5c3072
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Tue Aug 7 17:52:24 2012 +0200
Allow testing GDM login dialog from the session
Check an environment variable, GDM_GREETER_TEST. If 1, LoginDialog will
skip anything that fails outside a GDM session.
It is therefore possible to test the GDM greeter without installing it
system-wide, by attempting login as the already logged in user (uses the
same code path as the unlock dialog).
https://bugzilla.gnome.org/show_bug.cgi?id=683725
js/gdm/loginDialog.js | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index 7ea93ba..15308dd 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -638,15 +638,17 @@ const LoginDialog = new Lang.Class({
this._userManager = AccountsService.UserManager.get_default()
this._greeterClient = new Gdm.Client();
- this._greeter = this._greeterClient.get_greeter_sync(null);
+ if (GLib.getenv('GDM_GREETER_TEST') != '1') {
+ this._greeter = this._greeterClient.get_greeter_sync(null);
- this._greeter.connect('default-session-name-changed',
- Lang.bind(this, this._onDefaultSessionChanged));
+ this._greeter.connect('default-session-name-changed',
+ Lang.bind(this, this._onDefaultSessionChanged));
- this._greeter.connect('session-opened',
- Lang.bind(this, this._onSessionOpened));
- this._greeter.connect('timed-login-requested',
- Lang.bind(this, this._onTimedLoginRequested));
+ this._greeter.connect('session-opened',
+ Lang.bind(this, this._onSessionOpened));
+ this._greeter.connect('timed-login-requested',
+ Lang.bind(this, this._onTimedLoginRequested));
+ }
this._userVerifier = new GdmUtil.ShellUserVerifier(this._greeterClient);
this._userVerifier.connect('ask-question', Lang.bind(this, this._askQuestion));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]