From 83abaed54846c2c56b529cb060ae551fddb42b00 Mon Sep 17 00:00:00 2001 From: Ward from fusion-voyager-3 Date: Thu, 18 Jan 2024 17:59:52 +0300 Subject: [PATCH] luks --- src/partitioning_page.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/partitioning_page.rs b/src/partitioning_page.rs index adfbab2..9e189ac 100644 --- a/src/partitioning_page.rs +++ b/src/partitioning_page.rs @@ -360,8 +360,19 @@ pub fn partitioning_page(content_stack: >k::Stack) { let partition_method_automatic_luks_password_entry = adw::PasswordEntryRow::builder() .title("LUKS Password") .hexpand(true) + .sensitive(false) .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_box.append(&partition_method_automatic_luks_checkbutton); partition_method_automatic_luks_box.append(&partition_method_automatic_luks_listbox);