Add support for searching in other thread (#51)
This commit is contained in:
parent
22cc0ed592
commit
be30afdac6
|
@ -125,6 +125,10 @@ impl DuplicateFinder {
|
||||||
self.debug_print();
|
self.debug_print();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn get_check_method(&self) -> &CheckingMethod {
|
||||||
|
&self.check_method
|
||||||
|
}
|
||||||
|
|
||||||
pub fn get_files_sorted_by_size(&self) -> &BTreeMap<u64, Vec<FileEntry>> {
|
pub fn get_files_sorted_by_size(&self) -> &BTreeMap<u64, Vec<FileEntry>> {
|
||||||
&self.files_with_identical_size
|
&self.files_with_identical_size
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
use czkawka_core::common_messages::Messages;
|
use czkawka_core::common_messages::Messages;
|
||||||
use gtk::prelude::*;
|
use gtk::prelude::*;
|
||||||
use gtk::TreeViewColumn;
|
use gtk::TreeViewColumn;
|
||||||
|
use std::collections::HashMap;
|
||||||
|
|
||||||
pub enum ColumnsDuplicates {
|
pub enum ColumnsDuplicates {
|
||||||
// Columns for duplicate treeview
|
// Columns for duplicate treeview
|
||||||
|
@ -299,3 +300,28 @@ pub fn select_function_3column(_tree_selection: >k::TreeSelection, tree_model:
|
||||||
|
|
||||||
true
|
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
Loading…
Reference in a new issue