Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions src/Views/EncryptView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ public class EncryptView : AbstractInstallerView {
"slate"
);

var message_box = new Gtk.ListBox () {
selection_mode = BROWSE
};
message_box.add_css_class (Granite.STYLE_CLASS_RICH_LIST);
message_box.add_css_class (Granite.STYLE_CLASS_BACKGROUND);
message_box.append (protect_row);
message_box.append (restart_row);
message_box.append (keyboard_row);

pw_error_revealer = new ErrorRevealer (".");
pw_error_revealer.label_widget.add_css_class (Granite.STYLE_CLASS_WARNING);

Expand Down Expand Up @@ -114,9 +123,7 @@ public class EncryptView : AbstractInstallerView {
title_area.append (title_label);

content_area.valign = CENTER;
content_area.append (protect_row);
content_area.append (restart_row);
content_area.append (keyboard_row);
content_area.append (message_box);
content_area.append (password_box);

encrypt_button = new Gtk.Button.with_label (_("Set Encryption Password")) {
Expand Down Expand Up @@ -154,6 +161,21 @@ public class EncryptView : AbstractInstallerView {
confirm_entry.is_valid = confirm_password ();
update_next_button ();
});

// Forward keys so we can type immediate when list is focused
var key_controller = new Gtk.EventControllerKey ();
key_controller.key_pressed.connect ((keyval, keycode, state) => {
if (Gdk.keyval_to_unicode (keyval) != 0) {
key_controller.forward (pw_entry.get_delegate ());
pw_entry.grab_focus ();
pw_entry.select_region (-1, -1);
return Gdk.EVENT_STOP;
}

return Gdk.EVENT_PROPAGATE;
});

message_box.add_controller (key_controller);
}

private bool check_password () {
Expand Down
8 changes: 8 additions & 0 deletions src/Widgets/DescriptionRow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,13 @@ public class DescriptionRow : Gtk.Box {
spacing = 12;
append (image);
append (description_label);

// prevent titles from being skipped
map.connect (() => {
parent.update_property (
Gtk.AccessibleProperty.LABEL, description,
-1
);
});
}
}