From 40587ed783dd8f7335b685263da11711d2fa5f7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20For=C3=A9?= Date: Mon, 3 Sep 2018 09:29:29 -0700 Subject: [PATCH] EncryptView: activate next button when activating entries --- src/Views/EncryptView.vala | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Views/EncryptView.vala b/src/Views/EncryptView.vala index 4fb3ef32e..eba4d2ef5 100644 --- a/src/Views/EncryptView.vala +++ b/src/Views/EncryptView.vala @@ -142,6 +142,7 @@ public class EncryptView : AbstractInstallerView { var back_button = new Gtk.Button.with_label (_("Back")); next_button = new Gtk.Button.with_label (_("Choose Password")); + next_button.can_default = true; next_button.get_style_context ().add_class (Gtk.STYLE_CLASS_SUGGESTED_ACTION); action_area.add (no_encrypt_button); @@ -246,6 +247,7 @@ public class EncryptView : AbstractInstallerView { private void update_next_button () { if (pw_entry.is_valid && confirm_entry.is_valid) { next_button.sensitive = true; + next_button.has_default = true; } else { next_button.sensitive = false; } @@ -253,6 +255,10 @@ public class EncryptView : AbstractInstallerView { private class ValidatedEntry : Gtk.Entry { public bool is_valid { get; set; default = false; } + + construct { + activates_default = true; + } } private class ErrorRevealer : Gtk.Revealer {