From 7e57701f1f85014a6dc43f8968f4eca3a80b7053 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Sat, 9 Dec 2023 09:37:02 -0800 Subject: [PATCH] Use focus_widget property --- src/PolkitDialog.vala | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/PolkitDialog.vala b/src/PolkitDialog.vala index 0777b52..e20ca98 100644 --- a/src/PolkitDialog.vala +++ b/src/PolkitDialog.vala @@ -117,15 +117,12 @@ public class Ag.PolkitDialog : Granite.MessageDialog { authenticate_button.clicked.connect (authenticate); default_widget = authenticate_button; + focus_widget = password_entry; close.connect (cancel); update_idents (); select_session (); - - ((Gtk.Widget) this).realize.connect (() => { - password_entry.grab_focus (); - }); } private void update_idents () {