[gnome-shell/wip/reorg: 6/15] gdm: move all login/unlock code to auth/ directory
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/reorg: 6/15] gdm: move all login/unlock code to auth/ directory
- Date: Tue, 25 Jun 2013 19:26:36 +0000 (UTC)
commit 73d8f6c9934f9a25c16ffb9fec5322cc73112199
Author: Ray Strode <rstrode redhat com>
Date: Fri Jun 14 07:50:18 2013 -0400
gdm: move all login/unlock code to auth/ directory
Right now the GDM and unlock code use a mish-mash of files
from ui/ and from gdm/.
This commit consolidates all the files into ui/auth as a
first step toward cleaning up the duplication of code between
the two features.
js/Makefile.am | 12 ++++++------
js/{gdm => ui/auth}/fingerprint.js | 0
js/{gdm => ui/auth}/loginDialog.js | 30 +++++++++++++++---------------
js/{gdm => ui/auth}/powerMenu.js | 4 ++--
js/{gdm => ui/auth}/realmd.js | 0
js/ui/{ => auth}/unlockDialog.js | 12 ++++++------
js/{gdm => ui/auth}/util.js | 2 +-
js/ui/panel.js | 2 +-
js/ui/sessionMode.js | 4 ++--
9 files changed, 33 insertions(+), 33 deletions(-)
---
diff --git a/js/Makefile.am b/js/Makefile.am
index 87b95fd..0cd30ef 100644
--- a/js/Makefile.am
+++ b/js/Makefile.am
@@ -17,11 +17,6 @@ misc/config.js: misc/config.js.in Makefile
jsdir = $(pkgdatadir)/js
nobase_dist_js_DATA = \
- gdm/fingerprint.js \
- gdm/loginDialog.js \
- gdm/powerMenu.js \
- gdm/realmd.js \
- gdm/util.js \
extensionPrefs/main.js \
misc/batch.js \
misc/config.js \
@@ -96,7 +91,6 @@ nobase_dist_js_DATA = \
ui/status/bluetooth.js \
ui/switcherPopup.js \
ui/tweener.js \
- ui/unlockDialog.js \
ui/userAvatar.js \
ui/userMenu.js \
ui/userWidget.js \
@@ -109,6 +103,12 @@ nobase_dist_js_DATA = \
ui/workspacesView.js \
ui/workspaceSwitcherPopup.js \
ui/xdndHandler.js \
+ ui/auth/fingerprint.js \
+ ui/auth/loginDialog.js \
+ ui/auth/powerMenu.js \
+ ui/auth/realmd.js \
+ ui/auth/unlockDialog.js \
+ ui/auth/util.js \
ui/components/__init__.js \
ui/components/autorunManager.js \
ui/components/automountManager.js \
diff --git a/js/gdm/fingerprint.js b/js/ui/auth/fingerprint.js
similarity index 100%
rename from js/gdm/fingerprint.js
rename to js/ui/auth/fingerprint.js
diff --git a/js/gdm/loginDialog.js b/js/ui/auth/loginDialog.js
similarity index 97%
rename from js/gdm/loginDialog.js
rename to js/ui/auth/loginDialog.js
index 281f557..4503984 100644
--- a/js/gdm/loginDialog.js
+++ b/js/ui/auth/loginDialog.js
@@ -28,15 +28,15 @@ const Mainloop = imports.mainloop;
const Meta = imports.gi.Meta;
const Lang = imports.lang;
const Pango = imports.gi.Pango;
-const Realmd = imports.gdm.realmd;
+const Realmd = imports.ui.auth.realmd;
const Signals = imports.signals;
const Shell = imports.gi.Shell;
const St = imports.gi.St;
const Gdm = imports.gi.Gdm;
+const AuthUtil = imports.ui.auth.util;
const Batch = imports.misc.batch;
-const Fprint = imports.gdm.fingerprint;
-const GdmUtil = imports.gdm.util;
+const Fprint = imports.ui.auth.fingerprint;
const Main = imports.ui.main;
const ModalDialog = imports.ui.modalDialog;
const Tweener = imports.ui.tweener;
@@ -499,7 +499,7 @@ const LoginDialog = new Lang.Class({
Lang.bind(this, this._onTimedLoginRequested));
}
- this._userVerifier = new GdmUtil.ShellUserVerifier(this._greeterClient);
+ this._userVerifier = new AuthUtil.ShellUserVerifier(this._greeterClient);
this._userVerifier.connect('ask-question', Lang.bind(this, this._askQuestion));
this._userVerifier.connect('show-message', Lang.bind(this, this._showMessage));
this._userVerifier.connect('verification-failed', Lang.bind(this, this._verificationFailed));
@@ -508,15 +508,15 @@ const LoginDialog = new Lang.Class({
this._userVerifier.connect('hide-login-hint', Lang.bind(this, this._hideLoginHint));
this._verifyingUser = false;
- this._settings = new Gio.Settings({ schema: GdmUtil.LOGIN_SCREEN_SCHEMA });
+ this._settings = new Gio.Settings({ schema: AuthUtil.LOGIN_SCREEN_SCHEMA });
- this._settings.connect('changed::' + GdmUtil.BANNER_MESSAGE_KEY,
+ this._settings.connect('changed::' + AuthUtil.BANNER_MESSAGE_KEY,
Lang.bind(this, this._updateBanner));
- this._settings.connect('changed::' + GdmUtil.BANNER_MESSAGE_TEXT_KEY,
+ this._settings.connect('changed::' + AuthUtil.BANNER_MESSAGE_TEXT_KEY,
Lang.bind(this, this._updateBanner));
- this._settings.connect('changed::' + GdmUtil.DISABLE_USER_LIST_KEY,
+ this._settings.connect('changed::' + AuthUtil.DISABLE_USER_LIST_KEY,
Lang.bind(this, this._updateDisableUserList));
- this._settings.connect('changed::' + GdmUtil.LOGO_KEY,
+ this._settings.connect('changed::' + AuthUtil.LOGO_KEY,
Lang.bind(this, this._updateLogo));
this._textureCache = St.TextureCache.get_default();
@@ -638,7 +638,7 @@ const LoginDialog = new Lang.Class({
},
_updateDisableUserList: function() {
- let disableUserList = this._settings.get_boolean(GdmUtil.DISABLE_USER_LIST_KEY);
+ let disableUserList = this._settings.get_boolean(AuthUtil.DISABLE_USER_LIST_KEY);
// If this is the first time around, set initial focus
if (this._disableUserList == undefined && disableUserList)
@@ -653,8 +653,8 @@ const LoginDialog = new Lang.Class({
},
_updateBanner: function() {
- let enabled = this._settings.get_boolean(GdmUtil.BANNER_MESSAGE_KEY);
- let text = this._settings.get_string(GdmUtil.BANNER_MESSAGE_TEXT_KEY);
+ let enabled = this._settings.get_boolean(AuthUtil.BANNER_MESSAGE_KEY);
+ let text = this._settings.get_string(AuthUtil.BANNER_MESSAGE_TEXT_KEY);
if (enabled && text) {
this._bannerLabel.set_text(text);
@@ -676,7 +676,7 @@ const LoginDialog = new Lang.Class({
},
_updateLogo: function() {
- let path = this._settings.get_string(GdmUtil.LOGO_KEY);
+ let path = this._settings.get_string(AuthUtil.LOGO_KEY);
this._logoFileUri = path ? Gio.file_new_for_path(path).get_uri() : null;
this._updateLogoTexture(this._textureCache, this._logoFileUri);
@@ -1079,7 +1079,7 @@ const LoginDialog = new Lang.Class({
_hideUserListAndLogIn: function() {
this._setUserListExpanded(false);
- GdmUtil.cloneAndFadeOutActor(this._userSelectionBox);
+ AuthUtil.cloneAndFadeOutActor(this._userSelectionBox);
this._askForUsernameAndLogIn();
},
@@ -1111,7 +1111,7 @@ const LoginDialog = new Lang.Class({
_onUserListActivated: function(activatedItem) {
let tasks = [function() {
- return GdmUtil.cloneAndFadeOutActor(this._userSelectionBox);
+ return AuthUtil.cloneAndFadeOutActor(this._userSelectionBox);
},
function() {
this._setUserListExpanded(false);
diff --git a/js/gdm/powerMenu.js b/js/ui/auth/powerMenu.js
similarity index 97%
rename from js/gdm/powerMenu.js
rename to js/ui/auth/powerMenu.js
index a341619..9a50ac4 100644
--- a/js/gdm/powerMenu.js
+++ b/js/ui/auth/powerMenu.js
@@ -23,7 +23,7 @@ const Lang = imports.lang;
const LoginManager = imports.misc.loginManager;
-const GdmUtil = imports.gdm.util;
+const AuthUtil = imports.ui.auth.util;
const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
@@ -37,7 +37,7 @@ const PowerMenuButton = new Lang.Class({
this._loginManager = LoginManager.getLoginManager();
- this._settings = new Gio.Settings({ schema: GdmUtil.LOGIN_SCREEN_SCHEMA });
+ this._settings = new Gio.Settings({ schema: AuthUtil.LOGIN_SCREEN_SCHEMA });
this._settings.connect('changed::disable-restart-buttons',
Lang.bind(this, this._updateVisibility));
diff --git a/js/gdm/realmd.js b/js/ui/auth/realmd.js
similarity index 100%
rename from js/gdm/realmd.js
rename to js/ui/auth/realmd.js
diff --git a/js/ui/unlockDialog.js b/js/ui/auth/unlockDialog.js
similarity index 96%
rename from js/ui/unlockDialog.js
rename to js/ui/auth/unlockDialog.js
index 563f6af..48f31cd 100644
--- a/js/ui/unlockDialog.js
+++ b/js/ui/auth/unlockDialog.js
@@ -15,8 +15,8 @@ const ModalDialog = imports.ui.modalDialog;
const ShellEntry = imports.ui.shellEntry;
const UserWidget = imports.ui.userWidget;
+const AuthUtil = imports.ui.auth.util;
const Batch = imports.misc.batch;
-const GdmUtil = imports.gdm.util;
// The timeout before going back automatically to the lock screen (in seconds)
const IDLE_TIMEOUT = 2 * 60;
@@ -40,7 +40,7 @@ const UnlockDialog = new Lang.Class({
this._firstQuestion = true;
this._greeterClient = new Gdm.Client();
- this._userVerifier = new GdmUtil.ShellUserVerifier(this._greeterClient, { reauthenticationOnly: true
});
+ this._userVerifier = new AuthUtil.ShellUserVerifier(this._greeterClient, { reauthenticationOnly:
true });
this._userVerified = false;
this._userVerifier.connect('ask-question', Lang.bind(this, this._onAskQuestion));
@@ -157,9 +157,9 @@ const UnlockDialog = new Lang.Class({
if (message) {
this._promptMessage.text = message;
this._promptMessage.styleClass = styleClass;
- GdmUtil.fadeInActor(this._promptMessage);
+ AuthUtil.fadeInActor(this._promptMessage);
} else {
- GdmUtil.fadeOutActor(this._promptMessage);
+ AuthUtil.fadeOutActor(this._promptMessage);
}
},
@@ -188,11 +188,11 @@ const UnlockDialog = new Lang.Class({
_showLoginHint: function(verifier, message) {
this._promptLoginHint.set_text(message)
- GdmUtil.fadeInActor(this._promptLoginHint);
+ AuthUtil.fadeInActor(this._promptLoginHint);
},
_hideLoginHint: function() {
- GdmUtil.fadeOutActor(this._promptLoginHint);
+ AuthUtil.fadeOutActor(this._promptLoginHint);
},
_doUnlock: function() {
diff --git a/js/gdm/util.js b/js/ui/auth/util.js
similarity index 99%
rename from js/gdm/util.js
rename to js/ui/auth/util.js
index 57aa5f4..fca306b 100644
--- a/js/gdm/util.js
+++ b/js/ui/auth/util.js
@@ -8,7 +8,7 @@ const Mainloop = imports.mainloop;
const Signals = imports.signals;
const Batch = imports.misc.batch;
-const Fprint = imports.gdm.fingerprint;
+const Fprint = imports.ui.auth.fingerprint;
const Main = imports.ui.main;
const Params = imports.misc.params;
const Tweener = imports.ui.tweener;
diff --git a/js/ui/panel.js b/js/ui/panel.js
index 729a574..12ed6f7 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -856,7 +856,7 @@ const PANEL_ITEM_IMPLEMENTATIONS = {
'battery': imports.ui.status.power.Indicator,
'lockScreen': imports.ui.status.lockScreenMenu.Indicator,
'keyboard': imports.ui.status.keyboard.InputSourceIndicator,
- 'powerMenu': imports.gdm.powerMenu.PowerMenuButton,
+ 'powerMenu': imports.ui.auth.powerMenu.PowerMenuButton,
'userMenu': imports.ui.userMenu.UserMenuButton
};
diff --git a/js/ui/sessionMode.js b/js/ui/sessionMode.js
index 4738c2e..a171608 100644
--- a/js/ui/sessionMode.js
+++ b/js/ui/sessionMode.js
@@ -42,7 +42,7 @@ const _modes = {
hasNotifications: true,
isGreeter: true,
isPrimary: true,
- unlockDialog: imports.gdm.loginDialog.LoginDialog,
+ unlockDialog: imports.ui.auth.loginDialog.LoginDialog,
components: ['polkitAgent'],
panel: {
left: [],
@@ -89,7 +89,7 @@ const _modes = {
hasNotifications: true,
isLocked: false,
isPrimary: true,
- unlockDialog: imports.ui.unlockDialog.UnlockDialog,
+ unlockDialog: imports.ui.auth.unlockDialog.UnlockDialog,
components: ['networkAgent', 'polkitAgent', 'telepathyClient',
'keyring', 'recorder', 'autorunManager', 'automountManager'],
panel: {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]