fmt and add icons to welcome and part method selector
This commit is contained in:
parent
f699268608
commit
ccf90bc310
@ -652,31 +652,46 @@ pub fn automatic_partitioning_page(
|
|||||||
advanced_home_seperation_selection_checkbutton_none,
|
advanced_home_seperation_selection_checkbutton_none,
|
||||||
move |_, _| {
|
move |_, _| {
|
||||||
automatic_partitioning_page.set_page_title(t!("automatic_partitioning_page_title"));
|
automatic_partitioning_page.set_page_title(t!("automatic_partitioning_page_title"));
|
||||||
automatic_partitioning_page.set_page_subtitle(t!("automatic_partitioning_page_subtitle"));
|
automatic_partitioning_page
|
||||||
|
.set_page_subtitle(t!("automatic_partitioning_page_subtitle"));
|
||||||
automatic_partitioning_page.set_back_tooltip_label(t!("back"));
|
automatic_partitioning_page.set_back_tooltip_label(t!("back"));
|
||||||
automatic_partitioning_page.set_next_tooltip_label(t!("next"));
|
automatic_partitioning_page.set_next_tooltip_label(t!("next"));
|
||||||
//
|
//
|
||||||
devices_selection_expander_row.set_title(&t!("devices_selection_expander_row_title_no_drive_selected"));
|
devices_selection_expander_row.set_title(&t!(
|
||||||
|
"devices_selection_expander_row_title_no_drive_selected"
|
||||||
|
));
|
||||||
//
|
//
|
||||||
partition_method_automatic_disk_nodisk_error_label.set_label(&t!("partition_method_automatic_disk_nodisk_error_label_label"));
|
partition_method_automatic_disk_nodisk_error_label.set_label(&t!(
|
||||||
|
"partition_method_automatic_disk_nodisk_error_label_label"
|
||||||
|
));
|
||||||
//
|
//
|
||||||
partition_method_automatic_disk_small_error_label
|
partition_method_automatic_disk_small_error_label.set_label(&t!(
|
||||||
.set_label(&t!("partition_method_automatic_disk_small_error_label_label"));
|
"partition_method_automatic_disk_small_error_label_label"
|
||||||
|
));
|
||||||
//
|
//
|
||||||
partition_method_automatic_luks_empty_error_label.set_label(&t!("partition_method_automatic_luks_empty_error_label_label"));
|
partition_method_automatic_luks_empty_error_label.set_label(&t!(
|
||||||
|
"partition_method_automatic_luks_empty_error_label_label"
|
||||||
|
));
|
||||||
//
|
//
|
||||||
partition_method_automatic_luks_missmatch_error_label.set_label(&t!("partition_method_automatic_luks_missmatch_error_label_label"));
|
partition_method_automatic_luks_missmatch_error_label.set_label(&t!(
|
||||||
|
"partition_method_automatic_luks_missmatch_error_label_label"
|
||||||
|
));
|
||||||
//
|
//
|
||||||
partition_method_automatic_luks_checkbutton.set_label(Some(&t!("partition_method_automatic_luks_checkbutton_label")));
|
partition_method_automatic_luks_checkbutton.set_label(Some(&t!(
|
||||||
|
"partition_method_automatic_luks_checkbutton_label"
|
||||||
|
)));
|
||||||
//
|
//
|
||||||
partition_method_automatic_luks_password_entry.set_title(&t!("partition_method_automatic_luks_password_entry_label"));
|
partition_method_automatic_luks_password_entry
|
||||||
|
.set_title(&t!("partition_method_automatic_luks_password_entry_label"));
|
||||||
//
|
//
|
||||||
partition_method_automatic_luks_password_confirm_entry
|
partition_method_automatic_luks_password_confirm_entry.set_title(&t!(
|
||||||
.set_title(&t!("partition_method_automatic_luks_password_entry_label_confirm"));
|
"partition_method_automatic_luks_password_entry_label_confirm"
|
||||||
|
));
|
||||||
//
|
//
|
||||||
advanced_expander.set_label(Some(&t!("advanced_expander_label")));
|
advanced_expander.set_label(Some(&t!("advanced_expander_label")));
|
||||||
//
|
//
|
||||||
advanced_filesystem_selection_frame.set_label(Some(&t!("advanced_filesystem_selection_frame_label")));
|
advanced_filesystem_selection_frame
|
||||||
|
.set_label(Some(&t!("advanced_filesystem_selection_frame_label")));
|
||||||
//
|
//
|
||||||
advanced_home_seperation_selection_frame
|
advanced_home_seperation_selection_frame
|
||||||
.set_label(Some(&t!("advanced_home_seperation_selection_frame_label")));
|
.set_label(Some(&t!("advanced_home_seperation_selection_frame_label")));
|
||||||
|
@ -234,7 +234,8 @@ impl ObjectImpl for DriveMountRow {
|
|||||||
#[weak]
|
#[weak]
|
||||||
mountopts_entry_row,
|
mountopts_entry_row,
|
||||||
move |_, _| {
|
move |_, _| {
|
||||||
partition_row_expander.set_subtitle(&t!("partition_row_expander_subtitle"));
|
partition_row_expander
|
||||||
|
.set_subtitle(&t!("partition_row_expander_subtitle"));
|
||||||
mountpoint_entry_row.set_title(&t!("mountpoint_entry_row_title"));
|
mountpoint_entry_row.set_title(&t!("mountpoint_entry_row_title"));
|
||||||
mountopts_entry_row.set_title(&t!("mountopts_entry_row_title"));
|
mountopts_entry_row.set_title(&t!("mountopts_entry_row_title"));
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,8 @@ pub fn keyboard_page(
|
|||||||
keyboard_page.set_back_tooltip_label(t!("back"));
|
keyboard_page.set_back_tooltip_label(t!("back"));
|
||||||
keyboard_page.set_next_tooltip_label(t!("next"));
|
keyboard_page.set_next_tooltip_label(t!("next"));
|
||||||
//
|
//
|
||||||
keyboard_search_bar.set_placeholder_text(Some(&t!("keyboard_search_bar_placeholder_text")));
|
keyboard_search_bar
|
||||||
|
.set_placeholder_text(Some(&t!("keyboard_search_bar_placeholder_text")));
|
||||||
//
|
//
|
||||||
keyboard_test_entry.set_title(&t!("keyboard_test_entry_title"))
|
keyboard_test_entry.set_title(&t!("keyboard_test_entry_title"))
|
||||||
}
|
}
|
||||||
|
@ -195,7 +195,7 @@ fn create_efi_row(
|
|||||||
.build();
|
.build();
|
||||||
prow
|
prow
|
||||||
},
|
},
|
||||||
swap_fs_error: Rc::new(RefCell::new(false)),
|
swap_fs_error: Rc::new(RefCell::new(false)),
|
||||||
hardcode_fs_error: Rc::new(RefCell::new(false)),
|
hardcode_fs_error: Rc::new(RefCell::new(false)),
|
||||||
used: Rc::new(RefCell::new(0)),
|
used: Rc::new(RefCell::new(0)),
|
||||||
never: Rc::new(RefCell::new(true)),
|
never: Rc::new(RefCell::new(true)),
|
||||||
@ -220,7 +220,7 @@ fn create_efi_row(
|
|||||||
.build();
|
.build();
|
||||||
prow
|
prow
|
||||||
},
|
},
|
||||||
swap_fs_error: Rc::new(RefCell::new(false)),
|
swap_fs_error: Rc::new(RefCell::new(false)),
|
||||||
hardcode_fs_error: Rc::new(RefCell::new(false)),
|
hardcode_fs_error: Rc::new(RefCell::new(false)),
|
||||||
used: Rc::new(RefCell::new(1)),
|
used: Rc::new(RefCell::new(1)),
|
||||||
never: Rc::new(RefCell::new(false)),
|
never: Rc::new(RefCell::new(false)),
|
||||||
@ -236,7 +236,7 @@ fn create_efi_row(
|
|||||||
.build();
|
.build();
|
||||||
prow
|
prow
|
||||||
},
|
},
|
||||||
swap_fs_error: Rc::new(RefCell::new(false)),
|
swap_fs_error: Rc::new(RefCell::new(false)),
|
||||||
hardcode_fs_error: Rc::new(RefCell::new(true)),
|
hardcode_fs_error: Rc::new(RefCell::new(true)),
|
||||||
used: Rc::new(RefCell::new(0)),
|
used: Rc::new(RefCell::new(0)),
|
||||||
never: Rc::new(RefCell::new(true)),
|
never: Rc::new(RefCell::new(true)),
|
||||||
@ -252,7 +252,7 @@ fn create_efi_row(
|
|||||||
.build();
|
.build();
|
||||||
prow
|
prow
|
||||||
},
|
},
|
||||||
swap_fs_error: Rc::new(RefCell::new(false)),
|
swap_fs_error: Rc::new(RefCell::new(false)),
|
||||||
hardcode_fs_error: Rc::new(RefCell::new(true)),
|
hardcode_fs_error: Rc::new(RefCell::new(true)),
|
||||||
used: Rc::new(RefCell::new(0)),
|
used: Rc::new(RefCell::new(0)),
|
||||||
never: Rc::new(RefCell::new(true)),
|
never: Rc::new(RefCell::new(true)),
|
||||||
@ -272,13 +272,21 @@ fn create_efi_row(
|
|||||||
.build();
|
.build();
|
||||||
prow
|
prow
|
||||||
},
|
},
|
||||||
swap_fs_error: Rc::new(RefCell::new(false)),
|
swap_fs_error: Rc::new(RefCell::new(false)),
|
||||||
hardcode_fs_error: Rc::new(RefCell::new(false)),
|
hardcode_fs_error: Rc::new(RefCell::new(false)),
|
||||||
used: Rc::new(RefCell::new(0)),
|
used: Rc::new(RefCell::new(0)),
|
||||||
never: Rc::new(RefCell::new(false)),
|
never: Rc::new(RefCell::new(false)),
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
post_check_drive_mount(&row, &partition_row_struct, &partition_button, &partition_changed_action, &partition, &used_partition_array_refcell, &subvol_partition_array_refcell);
|
post_check_drive_mount(
|
||||||
|
&row,
|
||||||
|
&partition_row_struct,
|
||||||
|
&partition_button,
|
||||||
|
&partition_changed_action,
|
||||||
|
&partition,
|
||||||
|
&used_partition_array_refcell,
|
||||||
|
&subvol_partition_array_refcell,
|
||||||
|
);
|
||||||
partition_scroll_child.append(&partition_row_struct.widget);
|
partition_scroll_child.append(&partition_row_struct.widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -293,8 +301,7 @@ fn create_efi_row(
|
|||||||
if row.mountopts().contains("subvol=") || row.mountopts().contains("subvolid") {
|
if row.mountopts().contains("subvol=") || row.mountopts().contains("subvolid") {
|
||||||
(*subvol_partition_array_refcell.borrow_mut()).push(row.partition());
|
(*subvol_partition_array_refcell.borrow_mut()).push(row.partition());
|
||||||
} else {
|
} else {
|
||||||
(*subvol_partition_array_refcell.borrow_mut())
|
(*subvol_partition_array_refcell.borrow_mut()).retain(|x| x != &row.partition());
|
||||||
.retain(|x| x != &row.partition());
|
|
||||||
}
|
}
|
||||||
partition_changed_action.activate(None);
|
partition_changed_action.activate(None);
|
||||||
}
|
}
|
||||||
@ -377,7 +384,7 @@ fn create_boot_row(
|
|||||||
.build();
|
.build();
|
||||||
prow
|
prow
|
||||||
},
|
},
|
||||||
swap_fs_error: Rc::new(RefCell::new(false)),
|
swap_fs_error: Rc::new(RefCell::new(false)),
|
||||||
hardcode_fs_error: Rc::new(RefCell::new(false)),
|
hardcode_fs_error: Rc::new(RefCell::new(false)),
|
||||||
used: Rc::new(RefCell::new(0)),
|
used: Rc::new(RefCell::new(0)),
|
||||||
never: Rc::new(RefCell::new(true)),
|
never: Rc::new(RefCell::new(true)),
|
||||||
@ -402,7 +409,7 @@ fn create_boot_row(
|
|||||||
.build();
|
.build();
|
||||||
prow
|
prow
|
||||||
},
|
},
|
||||||
swap_fs_error: Rc::new(RefCell::new(false)),
|
swap_fs_error: Rc::new(RefCell::new(false)),
|
||||||
hardcode_fs_error: Rc::new(RefCell::new(false)),
|
hardcode_fs_error: Rc::new(RefCell::new(false)),
|
||||||
used: Rc::new(RefCell::new(1)),
|
used: Rc::new(RefCell::new(1)),
|
||||||
never: Rc::new(RefCell::new(false)),
|
never: Rc::new(RefCell::new(false)),
|
||||||
@ -418,7 +425,7 @@ fn create_boot_row(
|
|||||||
.build();
|
.build();
|
||||||
prow
|
prow
|
||||||
},
|
},
|
||||||
swap_fs_error: Rc::new(RefCell::new(false)),
|
swap_fs_error: Rc::new(RefCell::new(false)),
|
||||||
hardcode_fs_error: Rc::new(RefCell::new(true)),
|
hardcode_fs_error: Rc::new(RefCell::new(true)),
|
||||||
used: Rc::new(RefCell::new(0)),
|
used: Rc::new(RefCell::new(0)),
|
||||||
never: Rc::new(RefCell::new(true)),
|
never: Rc::new(RefCell::new(true)),
|
||||||
@ -434,7 +441,7 @@ fn create_boot_row(
|
|||||||
.build();
|
.build();
|
||||||
prow
|
prow
|
||||||
},
|
},
|
||||||
swap_fs_error: Rc::new(RefCell::new(false)),
|
swap_fs_error: Rc::new(RefCell::new(false)),
|
||||||
hardcode_fs_error: Rc::new(RefCell::new(true)),
|
hardcode_fs_error: Rc::new(RefCell::new(true)),
|
||||||
used: Rc::new(RefCell::new(0)),
|
used: Rc::new(RefCell::new(0)),
|
||||||
never: Rc::new(RefCell::new(true)),
|
never: Rc::new(RefCell::new(true)),
|
||||||
@ -454,13 +461,21 @@ fn create_boot_row(
|
|||||||
.build();
|
.build();
|
||||||
prow
|
prow
|
||||||
},
|
},
|
||||||
swap_fs_error: Rc::new(RefCell::new(false)),
|
swap_fs_error: Rc::new(RefCell::new(false)),
|
||||||
hardcode_fs_error: Rc::new(RefCell::new(false)),
|
hardcode_fs_error: Rc::new(RefCell::new(false)),
|
||||||
used: Rc::new(RefCell::new(0)),
|
used: Rc::new(RefCell::new(0)),
|
||||||
never: Rc::new(RefCell::new(false)),
|
never: Rc::new(RefCell::new(false)),
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
post_check_drive_mount(&row, &partition_row_struct, &partition_button, &partition_changed_action, &partition, &used_partition_array_refcell, &subvol_partition_array_refcell);
|
post_check_drive_mount(
|
||||||
|
&row,
|
||||||
|
&partition_row_struct,
|
||||||
|
&partition_button,
|
||||||
|
&partition_changed_action,
|
||||||
|
&partition,
|
||||||
|
&used_partition_array_refcell,
|
||||||
|
&subvol_partition_array_refcell,
|
||||||
|
);
|
||||||
partition_scroll_child.append(&partition_row_struct.widget);
|
partition_scroll_child.append(&partition_row_struct.widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -475,8 +490,7 @@ fn create_boot_row(
|
|||||||
if row.mountopts().contains("subvol=") || row.mountopts().contains("subvolid") {
|
if row.mountopts().contains("subvol=") || row.mountopts().contains("subvolid") {
|
||||||
(*subvol_partition_array_refcell.borrow_mut()).push(row.partition());
|
(*subvol_partition_array_refcell.borrow_mut()).push(row.partition());
|
||||||
} else {
|
} else {
|
||||||
(*subvol_partition_array_refcell.borrow_mut())
|
(*subvol_partition_array_refcell.borrow_mut()).retain(|x| x != &row.partition());
|
||||||
.retain(|x| x != &row.partition());
|
|
||||||
}
|
}
|
||||||
partition_changed_action.activate(None);
|
partition_changed_action.activate(None);
|
||||||
}
|
}
|
||||||
@ -559,7 +573,7 @@ fn create_root_row(
|
|||||||
.build();
|
.build();
|
||||||
prow
|
prow
|
||||||
},
|
},
|
||||||
swap_fs_error: Rc::new(RefCell::new(false)),
|
swap_fs_error: Rc::new(RefCell::new(false)),
|
||||||
hardcode_fs_error: Rc::new(RefCell::new(false)),
|
hardcode_fs_error: Rc::new(RefCell::new(false)),
|
||||||
used: Rc::new(RefCell::new(0)),
|
used: Rc::new(RefCell::new(0)),
|
||||||
never: Rc::new(RefCell::new(true)),
|
never: Rc::new(RefCell::new(true)),
|
||||||
@ -584,16 +598,16 @@ fn create_root_row(
|
|||||||
.build();
|
.build();
|
||||||
prow
|
prow
|
||||||
},
|
},
|
||||||
swap_fs_error: Rc::new(RefCell::new(false)),
|
swap_fs_error: Rc::new(RefCell::new(false)),
|
||||||
hardcode_fs_error: Rc::new(RefCell::new(false)),
|
hardcode_fs_error: Rc::new(RefCell::new(false)),
|
||||||
used: Rc::new(RefCell::new(1)),
|
used: Rc::new(RefCell::new(1)),
|
||||||
never: Rc::new(RefCell::new(false)),
|
never: Rc::new(RefCell::new(false)),
|
||||||
}
|
}
|
||||||
} else if partition.part_fs == "vfat"
|
} else if partition.part_fs == "vfat"
|
||||||
|| partition.part_fs == "ntfs"
|
|| partition.part_fs == "ntfs"
|
||||||
|| partition.part_fs == "swap"
|
|| partition.part_fs == "swap"
|
||||||
|| partition.part_fs == "exfat"
|
|| partition.part_fs == "exfat"
|
||||||
|| partition.part_fs == "BitLocker"
|
|| partition.part_fs == "BitLocker"
|
||||||
{
|
{
|
||||||
PartitionRow {
|
PartitionRow {
|
||||||
widget: {
|
widget: {
|
||||||
@ -605,7 +619,7 @@ fn create_root_row(
|
|||||||
.build();
|
.build();
|
||||||
prow
|
prow
|
||||||
},
|
},
|
||||||
swap_fs_error: Rc::new(RefCell::new(false)),
|
swap_fs_error: Rc::new(RefCell::new(false)),
|
||||||
hardcode_fs_error: Rc::new(RefCell::new(true)),
|
hardcode_fs_error: Rc::new(RefCell::new(true)),
|
||||||
used: Rc::new(RefCell::new(0)),
|
used: Rc::new(RefCell::new(0)),
|
||||||
never: Rc::new(RefCell::new(true)),
|
never: Rc::new(RefCell::new(true)),
|
||||||
@ -642,12 +656,20 @@ fn create_root_row(
|
|||||||
prow
|
prow
|
||||||
},
|
},
|
||||||
hardcode_fs_error: Rc::new(RefCell::new(false)),
|
hardcode_fs_error: Rc::new(RefCell::new(false)),
|
||||||
swap_fs_error: Rc::new(RefCell::new(false)),
|
swap_fs_error: Rc::new(RefCell::new(false)),
|
||||||
used: Rc::new(RefCell::new(0)),
|
used: Rc::new(RefCell::new(0)),
|
||||||
never: Rc::new(RefCell::new(false)),
|
never: Rc::new(RefCell::new(false)),
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
post_check_drive_mount(&row, &partition_row_struct, &partition_button, &partition_changed_action, &partition, &used_partition_array_refcell, &subvol_partition_array_refcell);
|
post_check_drive_mount(
|
||||||
|
&row,
|
||||||
|
&partition_row_struct,
|
||||||
|
&partition_button,
|
||||||
|
&partition_changed_action,
|
||||||
|
&partition,
|
||||||
|
&used_partition_array_refcell,
|
||||||
|
&subvol_partition_array_refcell,
|
||||||
|
);
|
||||||
partition_scroll_child.append(&partition_row_struct.widget);
|
partition_scroll_child.append(&partition_row_struct.widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -662,8 +684,7 @@ fn create_root_row(
|
|||||||
if row.mountopts().contains("subvol=") || row.mountopts().contains("subvolid") {
|
if row.mountopts().contains("subvol=") || row.mountopts().contains("subvolid") {
|
||||||
(*subvol_partition_array_refcell.borrow_mut()).push(row.partition());
|
(*subvol_partition_array_refcell.borrow_mut()).push(row.partition());
|
||||||
} else {
|
} else {
|
||||||
(*subvol_partition_array_refcell.borrow_mut())
|
(*subvol_partition_array_refcell.borrow_mut()).retain(|x| x != &row.partition());
|
||||||
.retain(|x| x != &row.partition());
|
|
||||||
}
|
}
|
||||||
partition_changed_action.activate(None);
|
partition_changed_action.activate(None);
|
||||||
}
|
}
|
||||||
@ -745,7 +766,7 @@ fn create_mount_row(
|
|||||||
prow
|
prow
|
||||||
},
|
},
|
||||||
hardcode_fs_error: Rc::new(RefCell::new(false)),
|
hardcode_fs_error: Rc::new(RefCell::new(false)),
|
||||||
swap_fs_error: Rc::new(RefCell::new(false)),
|
swap_fs_error: Rc::new(RefCell::new(false)),
|
||||||
used: Rc::new(RefCell::new(0)),
|
used: Rc::new(RefCell::new(0)),
|
||||||
never: Rc::new(RefCell::new(true)),
|
never: Rc::new(RefCell::new(true)),
|
||||||
}
|
}
|
||||||
@ -770,7 +791,7 @@ fn create_mount_row(
|
|||||||
prow
|
prow
|
||||||
},
|
},
|
||||||
hardcode_fs_error: Rc::new(RefCell::new(false)),
|
hardcode_fs_error: Rc::new(RefCell::new(false)),
|
||||||
swap_fs_error: Rc::new(RefCell::new(false)),
|
swap_fs_error: Rc::new(RefCell::new(false)),
|
||||||
used: Rc::new(RefCell::new(1)),
|
used: Rc::new(RefCell::new(1)),
|
||||||
never: Rc::new(RefCell::new(false)),
|
never: Rc::new(RefCell::new(false)),
|
||||||
}
|
}
|
||||||
@ -790,12 +811,20 @@ fn create_mount_row(
|
|||||||
prow
|
prow
|
||||||
},
|
},
|
||||||
hardcode_fs_error: Rc::new(RefCell::new(false)),
|
hardcode_fs_error: Rc::new(RefCell::new(false)),
|
||||||
swap_fs_error: Rc::new(RefCell::new(false)),
|
swap_fs_error: Rc::new(RefCell::new(false)),
|
||||||
used: Rc::new(RefCell::new(0)),
|
used: Rc::new(RefCell::new(0)),
|
||||||
never: Rc::new(RefCell::new(false)),
|
never: Rc::new(RefCell::new(false)),
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
post_check_drive_mount(&row, &partition_row_struct, &partition_button, &partition_changed_action, &partition, &used_partition_array_refcell, &subvol_partition_array_refcell);
|
post_check_drive_mount(
|
||||||
|
&row,
|
||||||
|
&partition_row_struct,
|
||||||
|
&partition_button,
|
||||||
|
&partition_changed_action,
|
||||||
|
&partition,
|
||||||
|
&used_partition_array_refcell,
|
||||||
|
&subvol_partition_array_refcell,
|
||||||
|
);
|
||||||
partition_scroll_child.append(&partition_row_struct.widget);
|
partition_scroll_child.append(&partition_row_struct.widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -810,8 +839,7 @@ fn create_mount_row(
|
|||||||
if row.mountopts().contains("subvol=") || row.mountopts().contains("subvolid") {
|
if row.mountopts().contains("subvol=") || row.mountopts().contains("subvolid") {
|
||||||
(*subvol_partition_array_refcell.borrow_mut()).push(row.partition());
|
(*subvol_partition_array_refcell.borrow_mut()).push(row.partition());
|
||||||
} else {
|
} else {
|
||||||
(*subvol_partition_array_refcell.borrow_mut())
|
(*subvol_partition_array_refcell.borrow_mut()).retain(|x| x != &row.partition());
|
||||||
.retain(|x| x != &row.partition());
|
|
||||||
}
|
}
|
||||||
partition_changed_action.activate(None);
|
partition_changed_action.activate(None);
|
||||||
}
|
}
|
||||||
@ -840,7 +868,15 @@ fn create_mount_row(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn post_check_drive_mount(row: &DriveMountRow, partition_row_struct: &PartitionRow, partition_button: >k::CheckButton, partition_changed_action: &gio::SimpleAction, partition: &Partition, used_partition_array_refcell: &Rc<RefCell<Vec<String>>>, subvol_partition_array_refcell: &Rc<RefCell<Vec<String>>>) {
|
fn post_check_drive_mount(
|
||||||
|
row: &DriveMountRow,
|
||||||
|
partition_row_struct: &PartitionRow,
|
||||||
|
partition_button: >k::CheckButton,
|
||||||
|
partition_changed_action: &gio::SimpleAction,
|
||||||
|
partition: &Partition,
|
||||||
|
used_partition_array_refcell: &Rc<RefCell<Vec<String>>>,
|
||||||
|
subvol_partition_array_refcell: &Rc<RefCell<Vec<String>>>,
|
||||||
|
) {
|
||||||
partition_row_struct.widget.add_prefix(partition_button);
|
partition_row_struct.widget.add_prefix(partition_button);
|
||||||
partition_button.connect_toggled(clone!(
|
partition_button.connect_toggled(clone!(
|
||||||
#[weak]
|
#[weak]
|
||||||
@ -859,8 +895,7 @@ fn post_check_drive_mount(row: &DriveMountRow, partition_row_struct: &PartitionR
|
|||||||
row.set_partition(part_name.to_string());
|
row.set_partition(part_name.to_string());
|
||||||
(*used_partition_array_refcell.borrow_mut()).push(part_name.to_string());
|
(*used_partition_array_refcell.borrow_mut()).push(part_name.to_string());
|
||||||
} else {
|
} else {
|
||||||
(*used_partition_array_refcell.borrow_mut())
|
(*used_partition_array_refcell.borrow_mut()).retain(|x| x != &partition.part_name);
|
||||||
.retain(|x| x != &partition.part_name);
|
|
||||||
}
|
}
|
||||||
partition_changed_action.activate(None);
|
partition_changed_action.activate(None);
|
||||||
}
|
}
|
||||||
@ -876,7 +911,10 @@ fn post_check_drive_mount(row: &DriveMountRow, partition_row_struct: &PartitionR
|
|||||||
if row.mountpoint() == "[SWAP]" {
|
if row.mountpoint() == "[SWAP]" {
|
||||||
if partition.part_fs == "linux-swap" {
|
if partition.part_fs == "linux-swap" {
|
||||||
(*partition_row_struct.swap_fs_error.borrow_mut()) = false;
|
(*partition_row_struct.swap_fs_error.borrow_mut()) = false;
|
||||||
if *partition_row_struct.never.borrow() == false && *partition_row_struct.swap_fs_error.borrow() == false && *partition_row_struct.hardcode_fs_error.borrow() == false {
|
if *partition_row_struct.never.borrow() == false
|
||||||
|
&& *partition_row_struct.swap_fs_error.borrow() == false
|
||||||
|
&& *partition_row_struct.hardcode_fs_error.borrow() == false
|
||||||
|
{
|
||||||
partition_row_struct.widget.set_sensitive(true);
|
partition_row_struct.widget.set_sensitive(true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -905,29 +943,35 @@ fn post_check_drive_mount(row: &DriveMountRow, partition_row_struct: &PartitionR
|
|||||||
#[strong]
|
#[strong]
|
||||||
subvol_partition_array_refcell,
|
subvol_partition_array_refcell,
|
||||||
move |_, _| {
|
move |_, _| {
|
||||||
let part_name = &partition.part_name;
|
let part_name = &partition.part_name;
|
||||||
let used_partition_array = used_partition_array_refcell.borrow();
|
let used_partition_array = used_partition_array_refcell.borrow();
|
||||||
let subvol_partition_array = subvol_partition_array_refcell.borrow();
|
let subvol_partition_array = subvol_partition_array_refcell.borrow();
|
||||||
if used_partition_array
|
if used_partition_array
|
||||||
|
.iter()
|
||||||
|
.any(|e| part_name == e && part_name != &row.partition())
|
||||||
|
{
|
||||||
|
if subvol_partition_array
|
||||||
.iter()
|
.iter()
|
||||||
.any(|e| part_name == e && part_name != &row.partition())
|
.any(|e| part_name == e && part_name != &row.partition())
|
||||||
{
|
{
|
||||||
if subvol_partition_array
|
if *partition_row_struct.never.borrow() == false
|
||||||
.iter()
|
&& *partition_row_struct.swap_fs_error.borrow() == false
|
||||||
.any(|e| part_name == e && part_name != &row.partition())
|
&& *partition_row_struct.hardcode_fs_error.borrow() == false
|
||||||
{
|
{
|
||||||
if *partition_row_struct.never.borrow() == false && *partition_row_struct.swap_fs_error.borrow() == false && *partition_row_struct.hardcode_fs_error.borrow() == false {
|
partition_row_struct.widget.set_sensitive(true);
|
||||||
partition_row_struct.widget.set_sensitive(true);
|
|
||||||
}
|
|
||||||
(*partition_row_struct.used.borrow_mut()) = 2;
|
|
||||||
} else {
|
|
||||||
partition_row_struct.widget.set_sensitive(false);
|
|
||||||
(*partition_row_struct.used.borrow_mut()) = 1;
|
|
||||||
}
|
}
|
||||||
} else if *partition_row_struct.never.borrow() == false && *partition_row_struct.swap_fs_error.borrow() == false && *partition_row_struct.hardcode_fs_error.borrow() == false {
|
(*partition_row_struct.used.borrow_mut()) = 2;
|
||||||
partition_row_struct.widget.set_sensitive(true);
|
} else {
|
||||||
(*partition_row_struct.used.borrow_mut()) = 0;
|
partition_row_struct.widget.set_sensitive(false);
|
||||||
|
(*partition_row_struct.used.borrow_mut()) = 1;
|
||||||
}
|
}
|
||||||
|
} else if *partition_row_struct.never.borrow() == false
|
||||||
|
&& *partition_row_struct.swap_fs_error.borrow() == false
|
||||||
|
&& *partition_row_struct.hardcode_fs_error.borrow() == false
|
||||||
|
{
|
||||||
|
partition_row_struct.widget.set_sensitive(true);
|
||||||
|
(*partition_row_struct.used.borrow_mut()) = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@ -941,7 +985,6 @@ fn create_hardcoded_rows(
|
|||||||
used_partition_array_refcell: &Rc<RefCell<Vec<String>>>,
|
used_partition_array_refcell: &Rc<RefCell<Vec<String>>>,
|
||||||
subvol_partition_array_refcell: &Rc<RefCell<Vec<String>>>,
|
subvol_partition_array_refcell: &Rc<RefCell<Vec<String>>>,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
let drive_mount_add_button_icon = gtk::Image::builder()
|
let drive_mount_add_button_icon = gtk::Image::builder()
|
||||||
.icon_name("list-add")
|
.icon_name("list-add")
|
||||||
.halign(gtk::Align::Start)
|
.halign(gtk::Align::Start)
|
||||||
|
@ -46,10 +46,55 @@ pub fn partitioning_page(
|
|||||||
|
|
||||||
content_box.add_css_class("linked");
|
content_box.add_css_class("linked");
|
||||||
|
|
||||||
let automatic_method_button = gtk::Button::builder().icon_name("builder").build();
|
let manual_method_button_icon = gtk::Image::builder()
|
||||||
|
.icon_name("emblem-system-symbolic")
|
||||||
|
.margin_end(2)
|
||||||
|
.halign(gtk::Align::Start)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
let manual_method_button_label = gtk::Label::builder()
|
||||||
|
.label(t!("manual_method_button_label"))
|
||||||
|
.halign(gtk::Align::Center)
|
||||||
|
.hexpand(true)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
let manual_method_button_child_box = gtk::Box::new(gtk::Orientation::Horizontal, 0);
|
||||||
|
|
||||||
|
manual_method_button_child_box.append(&manual_method_button_icon);
|
||||||
|
manual_method_button_child_box.append(&manual_method_button_label);
|
||||||
|
|
||||||
|
let automatic_method_button_icon = gtk::Image::builder()
|
||||||
|
.icon_name("builder")
|
||||||
|
.margin_end(2)
|
||||||
|
.halign(gtk::Align::Start)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
let automatic_method_button_label = gtk::Label::builder()
|
||||||
|
.label(t!("automatic_method_button_label"))
|
||||||
|
.halign(gtk::Align::Center)
|
||||||
|
.hexpand(true)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
let automatic_method_button_child_box = gtk::Box::new(gtk::Orientation::Horizontal, 0);
|
||||||
|
|
||||||
|
automatic_method_button_child_box.append(&automatic_method_button_icon);
|
||||||
|
automatic_method_button_child_box.append(&automatic_method_button_label);
|
||||||
|
|
||||||
|
let method_labels_size_group = gtk::SizeGroup::new(gtk::SizeGroupMode::Both);
|
||||||
|
let method_icons_size_group = gtk::SizeGroup::new(gtk::SizeGroupMode::Both);
|
||||||
|
|
||||||
|
method_labels_size_group.add_widget(&manual_method_button_label);
|
||||||
|
method_labels_size_group.add_widget(&automatic_method_button_label);
|
||||||
|
|
||||||
|
method_icons_size_group.add_widget(&manual_method_button_icon);
|
||||||
|
method_icons_size_group.add_widget(&automatic_method_button_icon);
|
||||||
|
|
||||||
let manual_method_button = gtk::Button::builder()
|
let manual_method_button = gtk::Button::builder()
|
||||||
.icon_name("emblem-system-symbolics")
|
.child(&manual_method_button_child_box)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
let automatic_method_button = gtk::Button::builder()
|
||||||
|
.child(&automatic_method_button_child_box)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
automatic_method_button.connect_clicked(clone!(
|
automatic_method_button.connect_clicked(clone!(
|
||||||
@ -79,9 +124,9 @@ pub fn partitioning_page(
|
|||||||
partitioning_page.set_back_tooltip_label(t!("back"));
|
partitioning_page.set_back_tooltip_label(t!("back"));
|
||||||
partitioning_page.set_next_tooltip_label(t!("next"));
|
partitioning_page.set_next_tooltip_label(t!("next"));
|
||||||
//
|
//
|
||||||
automatic_method_button.set_label(&t!("automatic_method_button_label"));
|
automatic_method_button_label.set_label(&t!("automatic_method_button_label"));
|
||||||
//
|
//
|
||||||
manual_method_button.set_label(&t!("manual_method_button_label"));
|
manual_method_button_label.set_label(&t!("manual_method_button_label"));
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
//
|
//
|
||||||
|
@ -159,7 +159,8 @@ pub fn timezone_page(
|
|||||||
timezone_page.set_back_tooltip_label(t!("back"));
|
timezone_page.set_back_tooltip_label(t!("back"));
|
||||||
timezone_page.set_next_tooltip_label(t!("next"));
|
timezone_page.set_next_tooltip_label(t!("next"));
|
||||||
//
|
//
|
||||||
timezone_search_bar.set_placeholder_text(Some(&t!("timezone_search_bar_placeholder_text")));
|
timezone_search_bar
|
||||||
|
.set_placeholder_text(Some(&t!("timezone_search_bar_placeholder_text")));
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
//
|
//
|
||||||
|
@ -21,14 +21,55 @@ pub fn welcome_page(window: &adw::ApplicationWindow, main_carousel: &adw::Carous
|
|||||||
|
|
||||||
content_box.add_css_class("linked");
|
content_box.add_css_class("linked");
|
||||||
|
|
||||||
let live_media_button = gtk::Button::builder()
|
let live_media_button_icon = gtk::Image::builder()
|
||||||
.icon_name("drive-optical")
|
.icon_name("drive-optical")
|
||||||
|
.margin_end(2)
|
||||||
|
.halign(gtk::Align::Start)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
let live_media_button_label = gtk::Label::builder()
|
||||||
.label(t!("live_media_button_label"))
|
.label(t!("live_media_button_label"))
|
||||||
|
.halign(gtk::Align::Center)
|
||||||
|
.hexpand(true)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
let live_media_button_child_box = gtk::Box::new(gtk::Orientation::Horizontal, 0);
|
||||||
|
|
||||||
|
live_media_button_child_box.append(&live_media_button_icon);
|
||||||
|
live_media_button_child_box.append(&live_media_button_label);
|
||||||
|
|
||||||
|
let install_media_button_icon = gtk::Image::builder()
|
||||||
|
.icon_name("drive-harddisk")
|
||||||
|
.margin_end(2)
|
||||||
|
.halign(gtk::Align::Start)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
let install_media_button_label = gtk::Label::builder()
|
||||||
|
.label(t!("install_media_button_label"))
|
||||||
|
.halign(gtk::Align::Center)
|
||||||
|
.hexpand(true)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
let install_media_button_child_box = gtk::Box::new(gtk::Orientation::Horizontal, 0);
|
||||||
|
|
||||||
|
install_media_button_child_box.append(&install_media_button_icon);
|
||||||
|
install_media_button_child_box.append(&install_media_button_label);
|
||||||
|
|
||||||
|
let media_labels_size_group = gtk::SizeGroup::new(gtk::SizeGroupMode::Both);
|
||||||
|
let media_icons_size_group = gtk::SizeGroup::new(gtk::SizeGroupMode::Both);
|
||||||
|
|
||||||
|
media_labels_size_group.add_widget(&live_media_button_label);
|
||||||
|
media_labels_size_group.add_widget(&install_media_button_label);
|
||||||
|
|
||||||
|
media_icons_size_group.add_widget(&live_media_button_icon);
|
||||||
|
media_icons_size_group.add_widget(&install_media_button_icon);
|
||||||
|
|
||||||
|
let live_media_button = gtk::Button::builder()
|
||||||
|
.child(&live_media_button_child_box)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
let install_media_button = gtk::Button::builder()
|
let install_media_button = gtk::Button::builder()
|
||||||
.icon_name("drive-harddisk")
|
.child(&install_media_button_child_box)
|
||||||
.label(t!("install_media_button_label"))
|
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
install_media_button.connect_clicked(clone!(
|
install_media_button.connect_clicked(clone!(
|
||||||
|
Loading…
Reference in New Issue
Block a user