[gnome-shell] UnlockDialog: Move "Login as another user" at the bottom



commit 03db0d630ed5322f3638c4af725f1d0d06260ef3
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Tue Aug 7 17:38:12 2012 +0200

    UnlockDialog: Move "Login as another user" at the bottom
    
    The Unlock button is more logically related to the entry than
    this link, and having the latter in the middle breaks the workflow.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=681143

 data/theme/gnome-shell.css |    1 +
 js/ui/unlockDialog.js      |   24 ++++++++++++------------
 2 files changed, 13 insertions(+), 12 deletions(-)
---
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index 76c50ef..22e5e62 100644
--- a/data/theme/gnome-shell.css
+++ b/data/theme/gnome-shell.css
@@ -2092,6 +2092,7 @@ StButton.popup-menu-item:insensitive {
     font-size: 10.5pt;
     font-weight: bold;
     color: #666666;
+    padding-top: 1em;
 }
 
 .login-dialog-not-listed-button:hover .login-dialog-not-listed-label {
diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js
index 5cbe2e5..e129188 100644
--- a/js/ui/unlockDialog.js
+++ b/js/ui/unlockDialog.js
@@ -126,6 +126,15 @@ const UnlockDialog = new Lang.Class({
         this._promptFingerprintMessage.hide();
         this.contentLayout.add_actor(this._promptFingerprintMessage);
 
+        this._okButton = { label: _("Unlock"),
+                           action: Lang.bind(this, this._doUnlock),
+                           default: true };
+        this.setButtons([this._okButton]);
+        this.setActionKey(Clutter.KEY_Escape, Lang.bind(this, this._escape));
+
+        this._updateOkButton(false);
+        this._reset();
+
         let otherUserLabel = new St.Label({ text: _("Login as another user"),
                                             style_class: 'login-dialog-not-listed-label' });
         this._otherUserButton = new St.Button({ style_class: 'login-dialog-not-listed-button',
@@ -135,18 +144,9 @@ const UnlockDialog = new Lang.Class({
                                                 x_align: St.Align.START,
                                                 x_fill: true });
         this._otherUserButton.connect('clicked', Lang.bind(this, this._otherUserClicked));
-        this.contentLayout.add(this._otherUserButton,
-                               { x_align: St.Align.START,
-                                 x_fill: false });
-
-        this._okButton = { label: _("Unlock"),
-                           action: Lang.bind(this, this._doUnlock),
-                           default: true };
-        this.setButtons([this._okButton]);
-        this.setActionKey(Clutter.KEY_Escape, Lang.bind(this, this._escape));
-
-        this._updateOkButton(false);
-        this._reset();
+        this.dialogLayout.add(this._otherUserButton,
+                              { x_align: St.Align.START,
+                                x_fill: false });
 
         GLib.idle_add(GLib.PRIORITY_DEFAULT, Lang.bind(this, function() {
             this.emit('loaded');



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]