Make 'enter' in password dialog activate 'OK'
authorSam Thursfield <samthursfield@codethink.co.uk>
Wed, 15 Jun 2011 10:57:52 +0000 (11:57 +0100)
committerJavier Jardón <javier.jardon@codethink.co.uk>
Wed, 15 Jun 2011 13:38:38 +0000 (14:38 +0100)
src/moonshot-password-dialog.vala

index c2a6782..35f239b 100644 (file)
@@ -20,6 +20,7 @@ class AddPasswordDialog : Dialog
 
         this.add_buttons (_("Send"), ResponseType.OK,
                           _("Return to application"), ResponseType.CANCEL);
+        this.set_default_response (ResponseType.OK);
 
         var content_area = this.get_content_area ();
         ((Box) content_area).set_spacing (12);
@@ -29,6 +30,7 @@ class AddPasswordDialog : Dialog
         this.password_entry = new Entry ();
         password_entry.set_invisible_char ('*');
         password_entry.set_visibility (false);
+        password_entry.activates_default = true;
         remember_checkbutton = new CheckButton.with_label (_("Remember password"));
 
         set_atk_relation (password_entry, password_entry, Atk.RelationType.LABEL_FOR);