1
0
Fork 0
mirror of synced 2024-06-15 08:54:47 +12:00

Merge 'master' into quality

This commit is contained in:
Caduser2020 2020-10-07 15:49:19 -05:00
parent d952c25a92
commit d6c8b2c3e3
3 changed files with 506 additions and 448 deletions

View file

@ -106,6 +106,10 @@ impl DuplicateFinder {
self.debug_print();
}
pub const fn get_check_method(&self) -> &CheckingMethod {
&self.check_method
}
pub const fn get_files_sorted_by_size(&self) -> &BTreeMap<u64, Vec<FileEntry>> {
&self.files_with_identical_size
}

View file

@ -1,6 +1,7 @@
use czkawka_core::common_messages::Messages;
use gtk::prelude::*;
use gtk::TreeViewColumn;
use std::collections::HashMap;
pub enum ColumnsDuplicates {
// Columns for duplicate treeview
@ -299,3 +300,28 @@ pub fn select_function_3column(_tree_selection: &gtk::TreeSelection, tree_model:
true
}
pub fn set_buttons(hashmap: &mut HashMap<String, bool>, buttons_array: &[gtk::Button], button_names: &[&str]) {
for (index, button) in buttons_array.iter().enumerate() {
if *hashmap.get_mut(button_names[index]).unwrap() {
button.show();
} else {
button.hide();
}
}
}
// pub fn hide_all_buttons(buttons_array: &[gtk::Button]) {
// for button in buttons_array {
// button.hide();
// }
// }
pub fn hide_all_buttons_except(except_name: &str, buttons_array: &[gtk::Button], button_names: &[&str]) {
for (index, button) in buttons_array.iter().enumerate() {
if except_name == button_names[index] {
button.show();
} else {
button.hide();
}
}
}

File diff suppressed because it is too large Load diff