[gnome-shell] polkit-agent: Remove hack to focus password entry



commit bc0c490ec32e0c6ee5bc2712c75718d6dc38e382
Author: Florian MÃllner <fmuellner gnome org>
Date:   Thu Sep 15 14:04:15 2011 +0200

    polkit-agent: Remove hack to focus password entry
    
    As dialog buttons used to "steal" the initial key focus, the polkit
    dialog delayed focusing the password entry. With buttons no longer
    overwriting the manually set focus, this is no longer necessary.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=659133

 js/ui/polkitAuthenticationAgent.js |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)
---
diff --git a/js/ui/polkitAuthenticationAgent.js b/js/ui/polkitAuthenticationAgent.js
index 8ab7e48..f5b027b 100644
--- a/js/ui/polkitAuthenticationAgent.js
+++ b/js/ui/polkitAuthenticationAgent.js
@@ -142,6 +142,7 @@ AuthenticationDialog.prototype = {
         this._passwordEntry.clutter_text.connect('activate', Lang.bind(this, this._onEntryActivate));
         this._passwordBox.add(this._passwordEntry,
                               {expand: true });
+        this.setInitialKeyFocus(this._passwordEntry);
         this._passwordBox.hide();
 
         this._errorMessageLabel = new St.Label({ style_class: 'polkit-dialog-error-label' });
@@ -186,13 +187,6 @@ AuthenticationDialog.prototype = {
         this._session.connect('request', Lang.bind(this, this._onSessionRequest));
         this._session.connect('show-error', Lang.bind(this, this._onSessionShowError));
         this._session.connect('show-info', Lang.bind(this, this._onSessionShowInfo));
-
-        // Delay focus grab to avoid ModalDialog stealing focus with
-        // its buttons
-        this.connect('opened',
-                     Lang.bind(this, function() {
-                         this._passwordEntry.grab_key_focus();
-                     }));
     },
 
     startAuthentication: function() {



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