Manual Partitioning GUI
This commit is contained in:
parent
d2eaa01389
commit
e93ba20dfd
@ -498,6 +498,7 @@ pub fn partitioning_page(content_stack: >k::Stack) {
|
|||||||
let partition_method_manual_luks_password_entry = adw::PasswordEntryRow::builder()
|
let partition_method_manual_luks_password_entry = adw::PasswordEntryRow::builder()
|
||||||
.title("LUKS Password")
|
.title("LUKS Password")
|
||||||
.hexpand(true)
|
.hexpand(true)
|
||||||
|
.sensitive(false)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
let partition_method_manual_status_label = gtk::Label::builder()
|
let partition_method_manual_status_label = gtk::Label::builder()
|
||||||
@ -528,16 +529,23 @@ pub fn partitioning_page(content_stack: >k::Stack) {
|
|||||||
partition_method_manual_chroot_dir_button.connect_clicked(move |_| {
|
partition_method_manual_chroot_dir_button.connect_clicked(move |_| {
|
||||||
partition_method_manual_chroot_dir_file_dialog_clone.show();
|
partition_method_manual_chroot_dir_file_dialog_clone.show();
|
||||||
});
|
});
|
||||||
let partition_method_manual_chroot_dir_button_clone = partition_method_manual_chroot_dir_button.clone();
|
let partition_method_manual_chroot_dir_entry_clone = partition_method_manual_chroot_dir_entry.clone();
|
||||||
partition_method_manual_chroot_dir_file_dialog.connect_response(clone!(@weak partition_method_manual_chroot_dir_file_dialog => move |_, response| {
|
partition_method_manual_chroot_dir_file_dialog.connect_response(clone!(@weak partition_method_manual_chroot_dir_file_dialog => move |_, response| {
|
||||||
if response == gtk::ResponseType::Accept {
|
if response == gtk::ResponseType::Accept {
|
||||||
let file = partition_method_manual_chroot_dir_file_dialog.file().unwrap();
|
if partition_method_manual_chroot_dir_file_dialog.file().is_some() {
|
||||||
let path_buf = file.path().unwrap();
|
partition_method_manual_chroot_dir_entry.set_text(&partition_method_manual_chroot_dir_file_dialog.file().expect("FILE PATHING FAIL").path().expect("PATH STRINGING FAIL").into_os_string().into_string().unwrap());
|
||||||
|
}
|
||||||
println!("Opening database file: {}", path_buf.as_path().display());
|
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
partition_method_manual_luks_checkbutton.connect_toggled(clone!(@weak partition_method_manual_luks_checkbutton => move |_| {
|
||||||
|
if partition_method_manual_luks_checkbutton.is_active() {
|
||||||
|
partition_method_manual_luks_password_entry.set_sensitive(true)
|
||||||
|
} else {
|
||||||
|
partition_method_manual_luks_password_entry.set_sensitive(false)
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
/// add all pages to partitioning stack
|
/// add all pages to partitioning stack
|
||||||
partitioning_stack.add_titled(&partitioning_method_main_box, Some("partition_method_select_page"), "partition_method_select_page");
|
partitioning_stack.add_titled(&partitioning_method_main_box, Some("partition_method_select_page"), "partition_method_select_page");
|
||||||
partitioning_stack.add_titled(&partition_method_automatic_main_box, Some("partition_method_automatic_page"), "partition_method_automatic_page");
|
partitioning_stack.add_titled(&partition_method_automatic_main_box, Some("partition_method_automatic_page"), "partition_method_automatic_page");
|
||||||
|
Loading…
Reference in New Issue
Block a user