[gnome-boxes/release-gnome-3.36.4: 3/5] auth-notification: Grab focus for password field



commit a9395a27d3487d84f235cc061392ce75326c4a80
Author: Manuel Wassermann <manuel wassermann97 gmail com>
Date:   Fri May 8 14:33:07 2020 +0200

    auth-notification: Grab focus for password field
    
    When only a password was required for a remote
    server connection, the password field did not
    grab the focus

 data/ui/auth-notification.ui | 1 +
 src/auth-notification.vala   | 5 +++++
 2 files changed, 6 insertions(+)
---
diff --git a/data/ui/auth-notification.ui b/data/ui/auth-notification.ui
index 285fadac..64d28e42 100644
--- a/data/ui/auth-notification.ui
+++ b/data/ui/auth-notification.ui
@@ -88,6 +88,7 @@
             <property name="visibility">False</property>
             <signal name="focus-in-event" handler="on_entry_focus_in_event"/>
             <signal name="focus-out-event" handler="on_entry_focus_out_event"/>
+            <signal name="map" handler="on_password_entry_map"/>
             <signal name="activate" handler="on_password_entry_activated"/>
           </object>
 
diff --git a/src/auth-notification.vala b/src/auth-notification.vala
index 3f33f479..df0762fd 100644
--- a/src/auth-notification.vala
+++ b/src/auth-notification.vala
@@ -73,6 +73,11 @@ private void on_username_entry_activated () {
         password_entry.grab_focus ();
     }
 
+    [GtkCallback]
+    private void on_password_entry_map () {
+        password_entry.grab_focus ();
+    }
+
     [GtkCallback]
     private void on_password_entry_activated () {
         auth_button.activate ();


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