This commit is contained in:
Ward from fusion-voyager-3 2024-01-18 17:59:52 +03:00
parent f9ff19b033
commit 83abaed548

View File

@ -360,8 +360,19 @@ pub fn partitioning_page(content_stack: &gtk::Stack) {
let partition_method_automatic_luks_password_entry = adw::PasswordEntryRow::builder() let partition_method_automatic_luks_password_entry = adw::PasswordEntryRow::builder()
.title("LUKS Password") .title("LUKS Password")
.hexpand(true) .hexpand(true)
.sensitive(false)
.build(); .build();
let partition_method_automatic_luks_checkbutton_clone = partition_method_automatic_luks_checkbutton.clone();
let partition_method_automatic_luks_password_entry_clone = partition_method_automatic_luks_password_entry.clone();
partition_method_automatic_luks_checkbutton.connect_toggled(move |_| {
if partition_method_automatic_luks_checkbutton_clone.is_active() == true {
partition_method_automatic_luks_password_entry_clone.set_sensitive(true);
} else {
partition_method_automatic_luks_password_entry_clone.set_sensitive(false);
}
});
partition_method_automatic_luks_listbox.append(&partition_method_automatic_luks_password_entry); partition_method_automatic_luks_listbox.append(&partition_method_automatic_luks_password_entry);
partition_method_automatic_luks_box.append(&partition_method_automatic_luks_checkbutton); partition_method_automatic_luks_box.append(&partition_method_automatic_luks_checkbutton);
partition_method_automatic_luks_box.append(&partition_method_automatic_luks_listbox); partition_method_automatic_luks_box.append(&partition_method_automatic_luks_listbox);