complete used partition callback
This commit is contained in:
parent
c58290e1c6
commit
d3d7636db4
@ -152,7 +152,9 @@ fn create_mount_row(
|
||||
used_partition_array_refcell: &Rc<RefCell<Vec<String>>>,
|
||||
do_used_part_check_refcell: &Rc<RefCell<bool>>,
|
||||
) -> DriveMountRow {
|
||||
let partition_scroll_child = gtk::ListBox::builder().build();
|
||||
let partition_scroll_child = gtk::ListBox::builder()
|
||||
.selection_mode(gtk::SelectionMode::None)
|
||||
.build();
|
||||
|
||||
let partitions_scroll = gtk::ScrolledWindow::builder()
|
||||
.hexpand(true)
|
||||
@ -163,6 +165,8 @@ fn create_mount_row(
|
||||
// Create row
|
||||
let row = DriveMountRow::new_with_scroll(&partitions_scroll);
|
||||
|
||||
row.set_deletable(true);
|
||||
|
||||
let null_checkbutton = gtk::CheckButton::builder().build();
|
||||
|
||||
for partition in partition_array {
|
||||
@ -206,8 +210,6 @@ fn create_mount_row(
|
||||
#[weak]
|
||||
row,
|
||||
#[weak]
|
||||
listbox,
|
||||
#[weak]
|
||||
partition_button,
|
||||
#[strong]
|
||||
partition_changed_action,
|
||||
@ -262,9 +264,15 @@ fn create_mount_row(
|
||||
closure_local!(
|
||||
#[strong]
|
||||
row,
|
||||
#[strong]
|
||||
used_partition_array_refcell,
|
||||
#[strong]
|
||||
partition_changed_action,
|
||||
move |row: DriveMountRow|
|
||||
{
|
||||
listbox_clone.remove(&row);
|
||||
(*used_partition_array_refcell.borrow_mut()).retain(|x| x != &row.partition());
|
||||
partition_changed_action.activate(None);
|
||||
}
|
||||
),
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user