Make UI take less space (#500)

This commit is contained in:
Rafał Mikrut 2021-12-13 19:13:53 +01:00 committed by GitHub
parent 89f24f14b5
commit 975b285c1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 590 additions and 1083 deletions

View File

@ -91,31 +91,31 @@ Similar images which check 349 image files that occupied 1.7 GB
Bleachbit is a master at finding and removing temporary files, while Czkawka only finds the most basic ones. So these two apps shouldn't be compared directly or be considered as an alternative to one another. Bleachbit is a master at finding and removing temporary files, while Czkawka only finds the most basic ones. So these two apps shouldn't be compared directly or be considered as an alternative to one another.
| | Czkawka | FSlint | DupeGuru | Bleachbit | | | Czkawka | FSlint | DupeGuru | Bleachbit |
|:----------------------:|:-----------:|:----------:|:-----------------:|:-----------:| |:----------------------:|:-----------:|:----------:|:-----------------:|:-----------:|
| Language | Rust | Python | Python/Obj-C | Python | | Language | Rust | Python | Python/Obj-C | Python |
| OS | Lin,Mac,Win | Lin | Lin,Mac,Win | Lin,Mac,Win | | OS | Lin,Mac,Win | Lin | Lin,Mac,Win | Lin,Mac,Win |
| Framework | GTK 3 | PyGTK2 | Qt 5 (PyQt)/Cocoa | PyGTK3 | | Framework | GTK 3 | PyGTK2 | Qt 5 (PyQt)/Cocoa | PyGTK3 |
| Duplicate finder | | • | • | | | Duplicate finder | | • | • | |
| Empty files | | • | | | | Empty files | | • | | |
| Empty folders | | • | | | | Empty folders | | • | | |
| Temporary files | | • | | • | | Temporary files | | • | | • |
| Big files | | | | | | Big files | | | | |
| Similar images | | | • | | | Similar images | | | • | |
| Similar videos | | | | | | Similar videos | | | | |
| Music duplicates(tags) | | | • | | | Music duplicates(tags) | | | • | |
| Invalid symlinks | | • | | | | Invalid symlinks | | • | | |
| Broken files | | | | | | Broken files | | | | |
| Names conflict | | • | | | | Names conflict | | • | | |
| Installed packages | | • | | | | Installed packages | | • | | |
| Invalid names | | • | | | | Invalid names | | • | | |
| Bad ID | | • | | | | Bad ID | | • | | |
| Non stripped binaries | | • | | | | Non stripped binaries | | • | | |
| Redundant whitespace | | • | | | | Redundant whitespace | | • | | |
| Overwriting files | | • | | • | | Overwriting files | | • | | • |
| Multiple languages(po) | | • | • | • | | Multiple languages(po) | • | • | • | • |
| Cache support | | | • | | | Cache support | | | • | |
| In active development | Yes | No | Yes | Yes | | In active development | Yes | No | Yes | Yes |
## Other apps ## Other apps
There are many similar applications to Czkawka on the Internet, which do some things better and some things worse. There are many similar applications to Czkawka on the Internet, which do some things better and some things worse.

View File

@ -36,7 +36,7 @@ pub struct ProgressData {
pub files_to_check: usize, pub files_to_check: usize,
} }
#[derive(PartialEq, Eq, Clone, Debug)] #[derive(PartialEq, Eq, Clone, Debug, Copy)]
pub enum CheckingMethod { pub enum CheckingMethod {
None, None,
Name, Name,
@ -502,7 +502,7 @@ impl DuplicateFinder {
let progress_send = progress_sender.clone(); let progress_send = progress_sender.clone();
let progress_thread_run = progress_thread_run.clone(); let progress_thread_run = progress_thread_run.clone();
let atomic_file_counter = atomic_file_counter.clone(); let atomic_file_counter = atomic_file_counter.clone();
let checking_method = self.check_method.clone(); let checking_method = self.check_method;
let max_stage = match self.check_method { let max_stage = match self.check_method {
CheckingMethod::Size => 0, CheckingMethod::Size => 0,
CheckingMethod::Hash => 2, CheckingMethod::Hash => 2,
@ -511,7 +511,7 @@ impl DuplicateFinder {
progress_thread_handle = thread::spawn(move || loop { progress_thread_handle = thread::spawn(move || loop {
progress_send progress_send
.unbounded_send(ProgressData { .unbounded_send(ProgressData {
checking_method: checking_method.clone(), checking_method,
current_stage: 0, current_stage: 0,
max_stage, max_stage,
files_checked: atomic_file_counter.load(Ordering::Relaxed) as usize, files_checked: atomic_file_counter.load(Ordering::Relaxed) as usize,
@ -688,11 +688,11 @@ impl DuplicateFinder {
let progress_thread_run = progress_thread_run.clone(); let progress_thread_run = progress_thread_run.clone();
let atomic_file_counter = atomic_file_counter.clone(); let atomic_file_counter = atomic_file_counter.clone();
let files_to_check = self.files_with_identical_size.iter().map(|e| e.1.len()).sum(); let files_to_check = self.files_with_identical_size.iter().map(|e| e.1.len()).sum();
let checking_method = self.check_method.clone(); let checking_method = self.check_method;
progress_thread_handle = thread::spawn(move || loop { progress_thread_handle = thread::spawn(move || loop {
progress_send progress_send
.unbounded_send(ProgressData { .unbounded_send(ProgressData {
checking_method: checking_method.clone(), checking_method,
current_stage: 1, current_stage: 1,
max_stage: 2, max_stage: 2,
files_checked: atomic_file_counter.load(Ordering::Relaxed) as usize, files_checked: atomic_file_counter.load(Ordering::Relaxed) as usize,
@ -855,11 +855,11 @@ impl DuplicateFinder {
let progress_thread_run = progress_thread_run.clone(); let progress_thread_run = progress_thread_run.clone();
let atomic_file_counter = atomic_file_counter.clone(); let atomic_file_counter = atomic_file_counter.clone();
let files_to_check = pre_checked_map.iter().map(|(_size, vec_file_entry)| vec_file_entry.len()).sum(); let files_to_check = pre_checked_map.iter().map(|(_size, vec_file_entry)| vec_file_entry.len()).sum();
let checking_method = self.check_method.clone(); let checking_method = self.check_method;
progress_thread_handle = thread::spawn(move || loop { progress_thread_handle = thread::spawn(move || loop {
progress_send progress_send
.unbounded_send(ProgressData { .unbounded_send(ProgressData {
checking_method: checking_method.clone(), checking_method,
current_stage: 2, current_stage: 2,
max_stage: 2, max_stage: 2,
files_checked: atomic_file_counter.load(Ordering::Relaxed) as usize, files_checked: atomic_file_counter.load(Ordering::Relaxed) as usize,

View File

@ -14,10 +14,12 @@ use czkawka_core::same_music::MusicSimilarity;
use czkawka_core::similar_images; use czkawka_core::similar_images;
use crate::gui_data::GuiData; use crate::gui_data::GuiData;
use crate::help_combo_box::IMAGES_HASH_SIZE_COMBO_BOX;
use crate::help_functions::*; use crate::help_functions::*;
use crate::notebook_enums::*; use crate::notebook_enums::*;
pub fn connect_compute_results(gui_data: &GuiData, glib_stop_receiver: Receiver<Message>) { pub fn connect_compute_results(gui_data: &GuiData, glib_stop_receiver: Receiver<Message>) {
let combo_box_image_hash_size = gui_data.main_notebook.combo_box_image_hash_size.clone();
let buttons_search = gui_data.bottom_buttons.buttons_search.clone(); let buttons_search = gui_data.bottom_buttons.buttons_search.clone();
let notebook_main = gui_data.main_notebook.notebook_main.clone(); let notebook_main = gui_data.main_notebook.notebook_main.clone();
let entry_info = gui_data.entry_info.clone(); let entry_info = gui_data.entry_info.clone();
@ -47,10 +49,6 @@ pub fn connect_compute_results(gui_data: &GuiData, glib_stop_receiver: Receiver<
let buttons_names = gui_data.bottom_buttons.buttons_names.clone(); let buttons_names = gui_data.bottom_buttons.buttons_names.clone();
let window_progress = gui_data.progress_window.window_progress.clone(); let window_progress = gui_data.progress_window.window_progress.clone();
let taskbar_state = gui_data.taskbar_state.clone(); let taskbar_state = gui_data.taskbar_state.clone();
let radio_button_similar_hash_size_8 = gui_data.main_notebook.radio_button_similar_hash_size_8.clone();
let radio_button_similar_hash_size_16 = gui_data.main_notebook.radio_button_similar_hash_size_16.clone();
let radio_button_similar_hash_size_32 = gui_data.main_notebook.radio_button_similar_hash_size_32.clone();
let radio_button_similar_hash_size_64 = gui_data.main_notebook.radio_button_similar_hash_size_64.clone();
let notebook_upper = gui_data.upper_notebook.notebook_upper.clone(); let notebook_upper = gui_data.upper_notebook.notebook_upper.clone();
let button_settings = gui_data.header.button_settings.clone(); let button_settings = gui_data.header.button_settings.clone();
let button_app_info = gui_data.header.button_app_info.clone(); let button_app_info = gui_data.header.button_app_info.clone();
@ -70,18 +68,8 @@ pub fn connect_compute_results(gui_data: &GuiData, glib_stop_receiver: Receiver<
taskbar_state.borrow().hide(); taskbar_state.borrow().hide();
let hash_size; let hash_size_index = combo_box_image_hash_size.active().unwrap() as usize;
if radio_button_similar_hash_size_8.is_active() { let hash_size = IMAGES_HASH_SIZE_COMBO_BOX[hash_size_index] as u8;
hash_size = 8;
} else if radio_button_similar_hash_size_16.is_active() {
hash_size = 16;
} else if radio_button_similar_hash_size_32.is_active() {
hash_size = 32;
} else if radio_button_similar_hash_size_64.is_active() {
hash_size = 64;
} else {
panic!("No radio button is pressed");
}
match msg { match msg {
Message::Duplicates(df) => { Message::Duplicates(df) => {

View File

@ -4,12 +4,11 @@ use std::thread;
use glib::Sender; use glib::Sender;
use gtk::prelude::*; use gtk::prelude::*;
use img_hash::{FilterType, HashAlg};
use crate::fl; use crate::fl;
use czkawka_core::big_file::BigFile; use czkawka_core::big_file::BigFile;
use czkawka_core::broken_files::BrokenFiles; use czkawka_core::broken_files::BrokenFiles;
use czkawka_core::duplicate::{DuplicateFinder, HashType}; use czkawka_core::duplicate::DuplicateFinder;
use czkawka_core::empty_files::EmptyFiles; use czkawka_core::empty_files::EmptyFiles;
use czkawka_core::empty_folder::EmptyFolder; use czkawka_core::empty_folder::EmptyFolder;
use czkawka_core::invalid_symlinks::InvalidSymlinks; use czkawka_core::invalid_symlinks::InvalidSymlinks;
@ -20,6 +19,7 @@ use czkawka_core::temporary::Temporary;
use czkawka_core::*; use czkawka_core::*;
use crate::gui_data::GuiData; use crate::gui_data::GuiData;
use crate::help_combo_box::{DUPLICATES_CHECK_METHOD_COMBO_BOX, DUPLICATES_HASH_TYPE_COMBO_BOX, IMAGES_HASH_SIZE_COMBO_BOX, IMAGES_HASH_TYPE_COMBO_BOX, IMAGES_RESIZE_ALGORITHM_COMBO_BOX};
use crate::help_functions::*; use crate::help_functions::*;
use crate::notebook_enums::*; use crate::notebook_enums::*;
use crate::taskbar_progress::tbp_flags::TBPF_NOPROGRESS; use crate::taskbar_progress::tbp_flags::TBPF_NOPROGRESS;
@ -39,6 +39,11 @@ pub fn connect_button_search(
futures_sender_invalid_symlinks: futures::channel::mpsc::UnboundedSender<invalid_symlinks::ProgressData>, futures_sender_invalid_symlinks: futures::channel::mpsc::UnboundedSender<invalid_symlinks::ProgressData>,
futures_sender_broken_files: futures::channel::mpsc::UnboundedSender<broken_files::ProgressData>, futures_sender_broken_files: futures::channel::mpsc::UnboundedSender<broken_files::ProgressData>,
) { ) {
let combo_box_image_hash_size = gui_data.main_notebook.combo_box_image_hash_size.clone();
let combo_box_image_hash_algorithm = gui_data.main_notebook.combo_box_image_hash_algorithm.clone();
let combo_box_image_resize_algorithm = gui_data.main_notebook.combo_box_image_resize_algorithm.clone();
let combo_box_duplicate_check_method = gui_data.main_notebook.combo_box_duplicate_check_method.clone();
let combo_box_duplicate_hash_type = gui_data.main_notebook.combo_box_duplicate_hash_type.clone();
let buttons_array = gui_data.bottom_buttons.buttons_array.clone(); let buttons_array = gui_data.bottom_buttons.buttons_array.clone();
let check_button_image_ignore_same_size = gui_data.main_notebook.check_button_image_ignore_same_size.clone(); let check_button_image_ignore_same_size = gui_data.main_notebook.check_button_image_ignore_same_size.clone();
let buttons_names = gui_data.bottom_buttons.buttons_names.clone(); let buttons_names = gui_data.bottom_buttons.buttons_names.clone();
@ -57,17 +62,11 @@ pub fn connect_button_search(
let check_button_settings_use_cache = gui_data.settings.check_button_settings_use_cache.clone(); let check_button_settings_use_cache = gui_data.settings.check_button_settings_use_cache.clone();
let entry_allowed_extensions = gui_data.upper_notebook.entry_allowed_extensions.clone(); let entry_allowed_extensions = gui_data.upper_notebook.entry_allowed_extensions.clone();
let entry_big_files_number = gui_data.main_notebook.entry_big_files_number.clone(); let entry_big_files_number = gui_data.main_notebook.entry_big_files_number.clone();
let entry_duplicate_maximal_size = gui_data.main_notebook.entry_duplicate_maximal_size.clone();
let entry_duplicate_minimal_size = gui_data.main_notebook.entry_duplicate_minimal_size.clone();
let entry_excluded_items = gui_data.upper_notebook.entry_excluded_items.clone(); let entry_excluded_items = gui_data.upper_notebook.entry_excluded_items.clone();
let entry_same_music_maximal_size = gui_data.main_notebook.entry_same_music_maximal_size.clone(); let entry_general_maximal_size = gui_data.upper_notebook.entry_general_maximal_size.clone();
let entry_same_music_minimal_size = gui_data.main_notebook.entry_same_music_minimal_size.clone(); let entry_general_minimal_size = gui_data.upper_notebook.entry_general_minimal_size.clone();
let entry_settings_cache_file_minimal_size = gui_data.settings.entry_settings_cache_file_minimal_size.clone(); let entry_settings_cache_file_minimal_size = gui_data.settings.entry_settings_cache_file_minimal_size.clone();
let entry_settings_prehash_cache_file_minimal_size = gui_data.settings.entry_settings_prehash_cache_file_minimal_size.clone(); let entry_settings_prehash_cache_file_minimal_size = gui_data.settings.entry_settings_prehash_cache_file_minimal_size.clone();
let entry_similar_images_maximal_size = gui_data.main_notebook.entry_similar_images_maximal_size.clone();
let entry_similar_images_minimal_size = gui_data.main_notebook.entry_similar_images_minimal_size.clone();
let entry_similar_videos_maximal_size = gui_data.main_notebook.entry_similar_videos_maximal_size.clone();
let entry_similar_videos_minimal_size = gui_data.main_notebook.entry_similar_videos_minimal_size.clone();
let grid_progress_stages = gui_data.progress_window.grid_progress_stages.clone(); let grid_progress_stages = gui_data.progress_window.grid_progress_stages.clone();
let image_preview_similar_images = gui_data.main_notebook.image_preview_similar_images.clone(); let image_preview_similar_images = gui_data.main_notebook.image_preview_similar_images.clone();
let label_stage = gui_data.progress_window.label_stage.clone(); let label_stage = gui_data.progress_window.label_stage.clone();
@ -75,26 +74,6 @@ pub fn connect_button_search(
let notebook_upper = gui_data.upper_notebook.notebook_upper.clone(); let notebook_upper = gui_data.upper_notebook.notebook_upper.clone();
let progress_bar_all_stages = gui_data.progress_window.progress_bar_all_stages.clone(); let progress_bar_all_stages = gui_data.progress_window.progress_bar_all_stages.clone();
let progress_bar_current_stage = gui_data.progress_window.progress_bar_current_stage.clone(); let progress_bar_current_stage = gui_data.progress_window.progress_bar_current_stage.clone();
let radio_button_duplicates_hash = gui_data.main_notebook.radio_button_duplicates_hash.clone();
let radio_button_duplicates_name = gui_data.main_notebook.radio_button_duplicates_name.clone();
let radio_button_duplicates_size = gui_data.main_notebook.radio_button_duplicates_size.clone();
let radio_button_hash_type_blake3 = gui_data.main_notebook.radio_button_hash_type_blake3.clone();
let radio_button_hash_type_crc32 = gui_data.main_notebook.radio_button_hash_type_crc32.clone();
let radio_button_hash_type_xxh3 = gui_data.main_notebook.radio_button_hash_type_xxh3.clone();
let radio_button_resize_algorithm_catmullrom = gui_data.main_notebook.radio_button_resize_algorithm_catmullrom.clone();
let radio_button_resize_algorithm_gaussian = gui_data.main_notebook.radio_button_resize_algorithm_gaussian.clone();
let radio_button_resize_algorithm_lanczos3 = gui_data.main_notebook.radio_button_resize_algorithm_lanczos3.clone();
let radio_button_resize_algorithm_nearest = gui_data.main_notebook.radio_button_resize_algorithm_nearest.clone();
let radio_button_resize_algorithm_triangle = gui_data.main_notebook.radio_button_resize_algorithm_triangle.clone();
let radio_button_similar_hash_algorithm_blockhash = gui_data.main_notebook.radio_button_similar_hash_algorithm_blockhash.clone();
let radio_button_similar_hash_algorithm_doublegradient = gui_data.main_notebook.radio_button_similar_hash_algorithm_doublegradient.clone();
let radio_button_similar_hash_algorithm_gradient = gui_data.main_notebook.radio_button_similar_hash_algorithm_gradient.clone();
let radio_button_similar_hash_algorithm_mean = gui_data.main_notebook.radio_button_similar_hash_algorithm_mean.clone();
let radio_button_similar_hash_algorithm_vertgradient = gui_data.main_notebook.radio_button_similar_hash_algorithm_vertgradient.clone();
let radio_button_similar_hash_size_16 = gui_data.main_notebook.radio_button_similar_hash_size_16.clone();
let radio_button_similar_hash_size_32 = gui_data.main_notebook.radio_button_similar_hash_size_32.clone();
let radio_button_similar_hash_size_64 = gui_data.main_notebook.radio_button_similar_hash_size_64.clone();
let radio_button_similar_hash_size_8 = gui_data.main_notebook.radio_button_similar_hash_size_8.clone();
let scale_similarity_similar_images = gui_data.main_notebook.scale_similarity_similar_images.clone(); let scale_similarity_similar_images = gui_data.main_notebook.scale_similarity_similar_images.clone();
let scale_similarity_similar_videos = gui_data.main_notebook.scale_similarity_similar_videos.clone(); let scale_similarity_similar_videos = gui_data.main_notebook.scale_similarity_similar_videos.clone();
let shared_buttons = gui_data.shared_buttons.clone(); let shared_buttons = gui_data.shared_buttons.clone();
@ -157,29 +136,14 @@ pub fn connect_button_search(
get_list_store(&tree_view_duplicate_finder).clear(); get_list_store(&tree_view_duplicate_finder).clear();
let check_method; let check_method_index = combo_box_duplicate_check_method.active().unwrap() as usize;
if radio_button_duplicates_name.is_active() { let check_method = DUPLICATES_CHECK_METHOD_COMBO_BOX[check_method_index].check_method;
check_method = duplicate::CheckingMethod::Name;
} else if radio_button_duplicates_size.is_active() {
check_method = duplicate::CheckingMethod::Size;
} else if radio_button_duplicates_hash.is_active() {
check_method = duplicate::CheckingMethod::Hash;
} else {
panic!("No radio button is pressed");
}
let minimal_file_size = entry_duplicate_minimal_size.text().as_str().parse::<u64>().unwrap_or(1024 * 8);
let maximal_file_size = entry_duplicate_maximal_size.text().as_str().parse::<u64>().unwrap_or(1024 * 1024 * 1024 * 1024);
let hash_type: HashType; let hash_type_index = combo_box_duplicate_hash_type.active().unwrap() as usize;
if radio_button_hash_type_blake3.is_active() { let hash_type = DUPLICATES_HASH_TYPE_COMBO_BOX[hash_type_index].hash_type;
hash_type = duplicate::HashType::Blake3;
} else if radio_button_hash_type_crc32.is_active() { let minimal_file_size = entry_general_minimal_size.text().as_str().parse::<u64>().unwrap_or(1024 * 8);
hash_type = duplicate::HashType::Crc32; let maximal_file_size = entry_general_maximal_size.text().as_str().parse::<u64>().unwrap_or(1024 * 1024 * 1024 * 1024);
} else if radio_button_hash_type_xxh3.is_active() {
hash_type = duplicate::HashType::Xxh3;
} else {
panic!("No radio button is pressed");
}
let use_prehash_cache = check_button_duplicates_use_prehash_cache.is_active(); let use_prehash_cache = check_button_duplicates_use_prehash_cache.is_active();
let minimal_prehash_cache_file_size = entry_settings_prehash_cache_file_minimal_size.text().as_str().parse::<u64>().unwrap_or(0); let minimal_prehash_cache_file_size = entry_settings_prehash_cache_file_minimal_size.text().as_str().parse::<u64>().unwrap_or(0);
@ -300,51 +264,17 @@ pub fn connect_button_search(
get_list_store(&tree_view_similar_images_finder).clear(); get_list_store(&tree_view_similar_images_finder).clear();
let hash_size; let hash_size_index = combo_box_image_hash_size.active().unwrap() as usize;
if radio_button_similar_hash_size_8.is_active() { let hash_size = IMAGES_HASH_SIZE_COMBO_BOX[hash_size_index] as u8;
hash_size = 8;
} else if radio_button_similar_hash_size_16.is_active() {
hash_size = 16;
} else if radio_button_similar_hash_size_32.is_active() {
hash_size = 32;
} else if radio_button_similar_hash_size_64.is_active() {
hash_size = 64;
} else {
panic!("No radio button is pressed");
}
let image_filter; let image_filter_index = combo_box_image_resize_algorithm.active().unwrap() as usize;
if radio_button_resize_algorithm_catmullrom.is_active() { let image_filter = IMAGES_RESIZE_ALGORITHM_COMBO_BOX[image_filter_index].filter;
image_filter = FilterType::CatmullRom;
} else if radio_button_resize_algorithm_lanczos3.is_active() {
image_filter = FilterType::Lanczos3;
} else if radio_button_resize_algorithm_nearest.is_active() {
image_filter = FilterType::Nearest;
} else if radio_button_resize_algorithm_triangle.is_active() {
image_filter = FilterType::Triangle;
} else if radio_button_resize_algorithm_gaussian.is_active() {
image_filter = FilterType::Gaussian;
} else {
panic!("No radio button is pressed");
}
let hash_alg; let hash_alg_index = combo_box_image_hash_algorithm.active().unwrap() as usize;
if radio_button_similar_hash_algorithm_blockhash.is_active() { let hash_alg = IMAGES_HASH_TYPE_COMBO_BOX[hash_alg_index].hash_alg;
hash_alg = HashAlg::Blockhash;
} else if radio_button_similar_hash_algorithm_gradient.is_active() {
hash_alg = HashAlg::Gradient;
} else if radio_button_similar_hash_algorithm_mean.is_active() {
hash_alg = HashAlg::Mean;
} else if radio_button_similar_hash_algorithm_vertgradient.is_active() {
hash_alg = HashAlg::VertGradient;
} else if radio_button_similar_hash_algorithm_doublegradient.is_active() {
hash_alg = HashAlg::DoubleGradient;
} else {
panic!("No radio button is pressed");
}
let minimal_file_size = entry_similar_images_minimal_size.text().as_str().parse::<u64>().unwrap_or(1024 * 16); let minimal_file_size = entry_general_minimal_size.text().as_str().parse::<u64>().unwrap_or(1024 * 16);
let maximal_file_size = entry_similar_images_maximal_size.text().as_str().parse::<u64>().unwrap_or(1024 * 1024 * 1024 * 1024); let maximal_file_size = entry_general_maximal_size.text().as_str().parse::<u64>().unwrap_or(1024 * 1024 * 1024 * 1024);
let ignore_same_size = check_button_image_ignore_same_size.is_active(); let ignore_same_size = check_button_image_ignore_same_size.is_active();
@ -381,8 +311,8 @@ pub fn connect_button_search(
get_list_store(&tree_view_similar_videos_finder).clear(); get_list_store(&tree_view_similar_videos_finder).clear();
let minimal_file_size = entry_similar_videos_minimal_size.text().as_str().parse::<u64>().unwrap_or(1024 * 16); let minimal_file_size = entry_general_minimal_size.text().as_str().parse::<u64>().unwrap_or(1024 * 16);
let maximal_file_size = entry_similar_videos_maximal_size.text().as_str().parse::<u64>().unwrap_or(1024 * 1024 * 1024 * 1024); let maximal_file_size = entry_general_maximal_size.text().as_str().parse::<u64>().unwrap_or(1024 * 1024 * 1024 * 1024);
let tolerance = scale_similarity_similar_videos.value() as i32; let tolerance = scale_similarity_similar_videos.value() as i32;
@ -413,8 +343,8 @@ pub fn connect_button_search(
get_list_store(&tree_view_same_music_finder).clear(); get_list_store(&tree_view_same_music_finder).clear();
let minimal_file_size = entry_same_music_minimal_size.text().as_str().parse::<u64>().unwrap_or(1024 * 8); let minimal_file_size = entry_general_minimal_size.text().as_str().parse::<u64>().unwrap_or(1024 * 8);
let maximal_file_size = entry_same_music_maximal_size.text().as_str().parse::<u64>().unwrap_or(1024 * 1024 * 1024 * 1024); let maximal_file_size = entry_general_maximal_size.text().as_str().parse::<u64>().unwrap_or(1024 * 1024 * 1024 * 1024);
let approximate_comparison = check_button_music_approximate_comparison.is_active(); let approximate_comparison = check_button_music_approximate_comparison.is_active();
let mut music_similarity: MusicSimilarity = MusicSimilarity::NONE; let mut music_similarity: MusicSimilarity = MusicSimilarity::NONE;

View File

@ -1,21 +1,18 @@
use czkawka_core::duplicate::CheckingMethod;
use gtk::prelude::*; use gtk::prelude::*;
use crate::gui_data::GuiData; use crate::gui_data::GuiData;
use crate::help_combo_box::DUPLICATES_CHECK_METHOD_COMBO_BOX;
pub fn connect_duplicate_buttons(gui_data: &GuiData) { pub fn connect_duplicate_combo_box(gui_data: &GuiData) {
let radio_button_duplicates_hash = gui_data.main_notebook.radio_button_duplicates_hash.clone(); let combo_box_duplicate_check_method = gui_data.main_notebook.combo_box_duplicate_check_method.clone();
let radio_button_hash_type_blake3 = gui_data.main_notebook.radio_button_hash_type_blake3.clone(); let combo_box_duplicate_hash_type = gui_data.main_notebook.combo_box_duplicate_hash_type.clone();
let radio_button_hash_type_xxh3 = gui_data.main_notebook.radio_button_hash_type_xxh3.clone(); combo_box_duplicate_check_method.connect_changed(move |combo_box_duplicate_check_method| {
let radio_button_hash_type_crc32 = gui_data.main_notebook.radio_button_hash_type_crc32.clone(); let chosen_index = combo_box_duplicate_check_method.active().unwrap() as usize;
radio_button_duplicates_hash.connect_toggled(move |radio_button_duplicates_hash| { if DUPLICATES_CHECK_METHOD_COMBO_BOX[chosen_index].check_method == CheckingMethod::Hash {
if radio_button_duplicates_hash.is_active() { combo_box_duplicate_hash_type.set_sensitive(true);
radio_button_hash_type_blake3.set_sensitive(true);
radio_button_hash_type_xxh3.set_sensitive(true);
radio_button_hash_type_crc32.set_sensitive(true);
} else { } else {
radio_button_hash_type_blake3.set_sensitive(false); combo_box_duplicate_hash_type.set_sensitive(false);
radio_button_hash_type_xxh3.set_sensitive(false);
radio_button_hash_type_crc32.set_sensitive(false);
} }
}); });
} }

View File

@ -3,49 +3,40 @@ use gtk::prelude::*;
use czkawka_core::similar_images::{get_string_from_similarity, Similarity, SIMILAR_VALUES}; use czkawka_core::similar_images::{get_string_from_similarity, Similarity, SIMILAR_VALUES};
use crate::gui_data::GuiData; use crate::gui_data::GuiData;
use crate::help_combo_box::IMAGES_HASH_SIZE_COMBO_BOX;
pub fn connect_similar_image_size_change(gui_data: &GuiData) { pub fn connect_similar_image_size_change(gui_data: &GuiData) {
let label_similar_images_minimal_similarity = gui_data.main_notebook.label_similar_images_minimal_similarity.clone(); let label_similar_images_minimal_similarity = gui_data.main_notebook.label_similar_images_minimal_similarity.clone();
label_similar_images_minimal_similarity.set_text(&get_string_from_similarity(&Similarity::Similar(SIMILAR_VALUES[0][5]), 8)); label_similar_images_minimal_similarity.set_text(&get_string_from_similarity(&Similarity::Similar(SIMILAR_VALUES[0][5]), 8));
{ let combo_box_image_hash_size = gui_data.main_notebook.combo_box_image_hash_size.clone();
let radio_button_similar_hash_size_8 = gui_data.main_notebook.radio_button_similar_hash_size_8.clone(); let label_similar_images_minimal_similarity = gui_data.main_notebook.label_similar_images_minimal_similarity.clone();
let label_similar_images_minimal_similarity = gui_data.main_notebook.label_similar_images_minimal_similarity.clone(); let scale_similarity_similar_images = gui_data.main_notebook.scale_similarity_similar_images.clone();
let scale_similarity_similar_images = gui_data.main_notebook.scale_similarity_similar_images.clone(); combo_box_image_hash_size.connect_changed(move |combo_box_image_hash_size| {
radio_button_similar_hash_size_8.connect_toggled(move |_| { let hash_size_index = combo_box_image_hash_size.active().unwrap() as usize;
scale_similarity_similar_images.set_range(0_f64, SIMILAR_VALUES[0][5] as f64); let hash_size = IMAGES_HASH_SIZE_COMBO_BOX[hash_size_index];
scale_similarity_similar_images.set_fill_level(SIMILAR_VALUES[0][5] as f64); match hash_size {
label_similar_images_minimal_similarity.set_text(&get_string_from_similarity(&Similarity::Similar(SIMILAR_VALUES[0][5]), 8)); 8 => {
}); scale_similarity_similar_images.set_range(0_f64, SIMILAR_VALUES[0][5] as f64);
} scale_similarity_similar_images.set_fill_level(SIMILAR_VALUES[0][5] as f64);
{ label_similar_images_minimal_similarity.set_text(&get_string_from_similarity(&Similarity::Similar(SIMILAR_VALUES[0][5]), 8));
let radio_button_similar_hash_size_16 = gui_data.main_notebook.radio_button_similar_hash_size_16.clone(); }
let label_similar_images_minimal_similarity = gui_data.main_notebook.label_similar_images_minimal_similarity.clone(); 16 => {
let scale_similarity_similar_images = gui_data.main_notebook.scale_similarity_similar_images.clone(); scale_similarity_similar_images.set_range(0_f64, SIMILAR_VALUES[1][5] as f64);
radio_button_similar_hash_size_16.connect_toggled(move |_| { scale_similarity_similar_images.set_fill_level(SIMILAR_VALUES[1][5] as f64);
scale_similarity_similar_images.set_range(0_f64, SIMILAR_VALUES[1][5] as f64); label_similar_images_minimal_similarity.set_text(&get_string_from_similarity(&Similarity::Similar(SIMILAR_VALUES[1][5]), 16));
scale_similarity_similar_images.set_fill_level(SIMILAR_VALUES[1][5] as f64); }
label_similar_images_minimal_similarity.set_text(&get_string_from_similarity(&Similarity::Similar(SIMILAR_VALUES[1][5]), 16)); 32 => {
}); scale_similarity_similar_images.set_range(0_f64, SIMILAR_VALUES[2][5] as f64);
} scale_similarity_similar_images.set_fill_level(SIMILAR_VALUES[2][5] as f64);
{ label_similar_images_minimal_similarity.set_text(&get_string_from_similarity(&Similarity::Similar(SIMILAR_VALUES[2][5]), 32));
let radio_button_similar_hash_size_32 = gui_data.main_notebook.radio_button_similar_hash_size_32.clone(); }
let label_similar_images_minimal_similarity = gui_data.main_notebook.label_similar_images_minimal_similarity.clone(); 64 => {
let scale_similarity_similar_images = gui_data.main_notebook.scale_similarity_similar_images.clone(); scale_similarity_similar_images.set_range(0_f64, SIMILAR_VALUES[3][5] as f64);
radio_button_similar_hash_size_32.connect_toggled(move |_| { scale_similarity_similar_images.set_fill_level(SIMILAR_VALUES[3][5] as f64);
scale_similarity_similar_images.set_range(0_f64, SIMILAR_VALUES[2][5] as f64); label_similar_images_minimal_similarity.set_text(&get_string_from_similarity(&Similarity::Similar(SIMILAR_VALUES[3][5]), 64));
scale_similarity_similar_images.set_fill_level(SIMILAR_VALUES[2][5] as f64); }
label_similar_images_minimal_similarity.set_text(&get_string_from_similarity(&Similarity::Similar(SIMILAR_VALUES[2][5]), 32)); _ => panic!(),
}); }
} });
{
let radio_button_similar_hash_size_64 = gui_data.main_notebook.radio_button_similar_hash_size_64.clone();
let label_similar_images_minimal_similarity = gui_data.main_notebook.label_similar_images_minimal_similarity.clone();
let scale_similarity_similar_images = gui_data.main_notebook.scale_similarity_similar_images.clone();
radio_button_similar_hash_size_64.connect_toggled(move |_| {
scale_similarity_similar_images.set_range(0_f64, SIMILAR_VALUES[3][5] as f64);
scale_similarity_similar_images.set_fill_level(SIMILAR_VALUES[3][5] as f64);
label_similar_images_minimal_similarity.set_text(&get_string_from_similarity(&Similarity::Similar(SIMILAR_VALUES[3][5]), 64));
});
}
} }

View File

@ -1,4 +1,6 @@
use crate::fl; use crate::fl;
use crate::help_combo_box::IMAGES_HASH_SIZE_COMBO_BOX;
use czkawka_core::similar_images::{get_string_from_similarity, Similarity, SIMILAR_VALUES};
use gtk::prelude::*; use gtk::prelude::*;
use gtk::{EventControllerKey, TreeView}; use gtk::{EventControllerKey, TreeView};
@ -30,7 +32,8 @@ pub struct GuiMainNotebook {
pub tree_view_invalid_symlinks: gtk::TreeView, pub tree_view_invalid_symlinks: gtk::TreeView,
pub tree_view_broken_files: gtk::TreeView, pub tree_view_broken_files: gtk::TreeView,
pub evk_tree_view_duplicate_finder: gtk::EventControllerKey, // TODO, in GTK4 this can be changed to e.g. add_controller which is not 100% compatible with this - https://discourse.gnome.org/t/how-to-convert-code-to-use-eventcontrollerkey/8198/2 // TODO, in GTK4 this can be changed to e.g. add_controller which is not 100% compatible with this - https://discourse.gnome.org/t/how-to-convert-code-to-use-eventcontrollerkey/8198/2
pub evk_tree_view_duplicate_finder: gtk::EventControllerKey,
pub evk_tree_view_empty_folder_finder: gtk::EventControllerKey, pub evk_tree_view_empty_folder_finder: gtk::EventControllerKey,
pub evk_tree_view_empty_files_finder: gtk::EventControllerKey, pub evk_tree_view_empty_files_finder: gtk::EventControllerKey,
pub evk_tree_view_temporary_files_finder: gtk::EventControllerKey, pub evk_tree_view_temporary_files_finder: gtk::EventControllerKey,
@ -41,85 +44,54 @@ pub struct GuiMainNotebook {
pub evk_tree_view_invalid_symlinks: gtk::EventControllerKey, pub evk_tree_view_invalid_symlinks: gtk::EventControllerKey,
pub evk_tree_view_broken_files: gtk::EventControllerKey, pub evk_tree_view_broken_files: gtk::EventControllerKey,
pub entry_similar_images_minimal_size: gtk::Entry, // General
pub entry_similar_images_maximal_size: gtk::Entry,
pub entry_similar_videos_minimal_size: gtk::Entry,
pub entry_similar_videos_maximal_size: gtk::Entry,
pub entry_duplicate_minimal_size: gtk::Entry,
pub entry_duplicate_maximal_size: gtk::Entry,
pub entry_same_music_minimal_size: gtk::Entry,
pub entry_same_music_maximal_size: gtk::Entry,
// Duplicate
pub combo_box_duplicate_check_method: gtk::ComboBoxText,
pub combo_box_duplicate_hash_type: gtk::ComboBoxText,
pub label_duplicate_check_method: gtk::Label,
pub label_duplicate_hash_type: gtk::Label,
pub image_preview_duplicates: gtk::Image,
// Big file
pub label_big_shown_files: gtk::Label,
pub entry_big_files_number: gtk::Entry, pub entry_big_files_number: gtk::Entry,
//// Check Buttons // Similar Images
pub scale_similarity_similar_images: gtk::Scale,
pub label_image_resize_algorithm: gtk::Label,
pub label_image_hash_type: gtk::Label,
pub label_image_hash_size: gtk::Label,
pub combo_box_image_resize_algorithm: gtk::ComboBoxText,
pub combo_box_image_hash_algorithm: gtk::ComboBoxText,
pub combo_box_image_hash_size: gtk::ComboBoxText,
pub check_button_image_ignore_same_size: gtk::CheckButton,
pub check_button_video_ignore_same_size: gtk::CheckButton,
pub label_image_similarity: gtk::Label,
pub label_image_similarity_max: gtk::Label,
pub image_preview_similar_images: gtk::Image,
pub label_similar_images_minimal_similarity: gtk::Label,
// Video
pub label_video_similarity: gtk::Label,
pub label_video_similarity_min: gtk::Label,
pub label_video_similarity_max: gtk::Label,
pub scale_similarity_similar_videos: gtk::Scale,
// Music
pub check_button_music_title: gtk::CheckButton, pub check_button_music_title: gtk::CheckButton,
pub check_button_music_artist: gtk::CheckButton, pub check_button_music_artist: gtk::CheckButton,
pub check_button_music_album_title: gtk::CheckButton, pub check_button_music_album_title: gtk::CheckButton,
pub check_button_music_album_artist: gtk::CheckButton, pub check_button_music_album_artist: gtk::CheckButton,
pub check_button_music_year: gtk::CheckButton, pub check_button_music_year: gtk::CheckButton,
pub check_button_music_approximate_comparison: gtk::CheckButton, pub check_button_music_approximate_comparison: gtk::CheckButton,
//// Radio Buttons
// Duplicates
pub radio_button_duplicates_name: gtk::RadioButton,
pub radio_button_duplicates_size: gtk::RadioButton,
pub radio_button_duplicates_hash: gtk::RadioButton,
pub scale_similarity_similar_images: gtk::Scale,
pub scale_similarity_similar_videos: gtk::Scale,
pub radio_button_hash_type_blake3: gtk::RadioButton,
pub radio_button_hash_type_crc32: gtk::RadioButton,
pub radio_button_hash_type_xxh3: gtk::RadioButton,
pub radio_button_resize_algorithm_lanczos3: gtk::RadioButton,
pub radio_button_resize_algorithm_nearest: gtk::RadioButton,
pub radio_button_resize_algorithm_triangle: gtk::RadioButton,
pub radio_button_resize_algorithm_gaussian: gtk::RadioButton,
pub radio_button_resize_algorithm_catmullrom: gtk::RadioButton,
pub radio_button_similar_hash_algorithm_gradient: gtk::RadioButton,
pub radio_button_similar_hash_algorithm_blockhash: gtk::RadioButton,
pub radio_button_similar_hash_algorithm_mean: gtk::RadioButton,
pub radio_button_similar_hash_algorithm_vertgradient: gtk::RadioButton,
pub radio_button_similar_hash_algorithm_doublegradient: gtk::RadioButton,
pub radio_button_similar_hash_size_8: gtk::RadioButton,
pub radio_button_similar_hash_size_16: gtk::RadioButton,
pub radio_button_similar_hash_size_32: gtk::RadioButton,
pub radio_button_similar_hash_size_64: gtk::RadioButton,
pub check_button_image_ignore_same_size: gtk::CheckButton,
pub label_similar_images_minimal_similarity: gtk::Label,
pub label_duplicate_check_method: gtk::Label,
pub label_duplicate_hash_type: gtk::Label,
pub label_duplicate_size_bytes: gtk::Label,
pub label_duplicate_min_size: gtk::Label,
pub label_duplicate_max_size: gtk::Label,
pub label_big_shown_files: gtk::Label,
pub label_image_resize_algorithm: gtk::Label,
pub label_image_hash_type: gtk::Label,
pub label_image_hash_size: gtk::Label,
pub label_image_size_bytes: gtk::Label,
pub label_image_min_size: gtk::Label,
pub label_image_max_size: gtk::Label,
pub label_image_similarity: gtk::Label,
pub label_image_similarity_max: gtk::Label,
pub label_video_similarity: gtk::Label,
pub label_video_similarity_min: gtk::Label,
pub label_video_similarity_max: gtk::Label,
pub label_video_size_bytes: gtk::Label,
pub label_video_min_size: gtk::Label,
pub label_video_max_size: gtk::Label,
pub label_music_size_bytes: gtk::Label,
pub label_music_min_size: gtk::Label,
pub label_music_max_size: gtk::Label,
pub image_preview_similar_images: gtk::Image,
pub image_preview_duplicates: gtk::Image,
} }
impl GuiMainNotebook { impl GuiMainNotebook {
@ -182,14 +154,8 @@ impl GuiMainNotebook {
// let evk_tree_view_broken_files: gtk4::EventControllerKey = EventControllerKey::new(); // let evk_tree_view_broken_files: gtk4::EventControllerKey = EventControllerKey::new();
// tree_view_broken_files.add_controller(&evk_tree_view_broken_files); // tree_view_broken_files.add_controller(&evk_tree_view_broken_files);
let entry_similar_images_minimal_size: gtk::Entry = builder.object("entry_similar_images_minimal_size").unwrap(); let combo_box_duplicate_check_method: gtk::ComboBoxText = builder.object("combo_box_duplicate_check_method").unwrap();
let entry_similar_images_maximal_size: gtk::Entry = builder.object("entry_similar_images_maximal_size").unwrap(); let combo_box_duplicate_hash_type: gtk::ComboBoxText = builder.object("combo_box_duplicate_hash_type").unwrap();
let entry_similar_videos_minimal_size: gtk::Entry = builder.object("entry_similar_videos_minimal_size").unwrap();
let entry_similar_videos_maximal_size: gtk::Entry = builder.object("entry_similar_videos_maximal_size").unwrap();
let entry_duplicate_minimal_size: gtk::Entry = builder.object("entry_duplicate_minimal_size").unwrap();
let entry_duplicate_maximal_size: gtk::Entry = builder.object("entry_duplicate_maximal_size").unwrap();
let entry_same_music_minimal_size: gtk::Entry = builder.object("entry_same_music_minimal_size").unwrap();
let entry_same_music_maximal_size: gtk::Entry = builder.object("entry_same_music_maximal_size").unwrap();
let entry_big_files_number: gtk::Entry = builder.object("entry_big_files_number").unwrap(); let entry_big_files_number: gtk::Entry = builder.object("entry_big_files_number").unwrap();
@ -202,61 +168,30 @@ impl GuiMainNotebook {
let check_button_music_approximate_comparison: gtk::CheckButton = builder.object("check_button_music_approximate_comparison").unwrap(); let check_button_music_approximate_comparison: gtk::CheckButton = builder.object("check_button_music_approximate_comparison").unwrap();
//// Radio Buttons //// Radio Buttons
let radio_button_duplicates_name: gtk::RadioButton = builder.object("radio_button_duplicates_name").unwrap();
let radio_button_duplicates_size: gtk::RadioButton = builder.object("radio_button_duplicates_size").unwrap();
let radio_button_duplicates_hash: gtk::RadioButton = builder.object("radio_button_duplicates_hash").unwrap();
let scale_similarity_similar_images: gtk::Scale = builder.object("scale_similarity_similar_images").unwrap(); let scale_similarity_similar_images: gtk::Scale = builder.object("scale_similarity_similar_images").unwrap();
let scale_similarity_similar_videos: gtk::Scale = builder.object("scale_similarity_similar_videos").unwrap(); let scale_similarity_similar_videos: gtk::Scale = builder.object("scale_similarity_similar_videos").unwrap();
let radio_button_hash_type_blake3: gtk::RadioButton = builder.object("radio_button_hash_type_blake3").unwrap(); let combo_box_image_resize_algorithm: gtk::ComboBoxText = builder.object("combo_box_image_resize_algorithm").unwrap();
let radio_button_hash_type_crc32: gtk::RadioButton = builder.object("radio_button_hash_type_crc32").unwrap(); let combo_box_image_hash_algorithm: gtk::ComboBoxText = builder.object("combo_box_image_hash_algorithm").unwrap();
let radio_button_hash_type_xxh3: gtk::RadioButton = builder.object("radio_button_hash_type_xxh3").unwrap(); let combo_box_image_hash_size: gtk::ComboBoxText = builder.object("combo_box_image_hash_size").unwrap();
let radio_button_resize_algorithm_lanczos3: gtk::RadioButton = builder.object("radio_button_resize_algorithm_lanczos3").unwrap();
let radio_button_resize_algorithm_nearest: gtk::RadioButton = builder.object("radio_button_resize_algorithm_nearest").unwrap();
let radio_button_resize_algorithm_triangle: gtk::RadioButton = builder.object("radio_button_resize_algorithm_triangle").unwrap();
let radio_button_resize_algorithm_gaussian: gtk::RadioButton = builder.object("radio_button_resize_algorithm_gaussian").unwrap();
let radio_button_resize_algorithm_catmullrom: gtk::RadioButton = builder.object("radio_button_resize_algorithm_catmullrom").unwrap();
let radio_button_similar_hash_algorithm_gradient: gtk::RadioButton = builder.object("radio_button_similar_hash_algorithm_gradient").unwrap();
let radio_button_similar_hash_algorithm_blockhash: gtk::RadioButton = builder.object("radio_button_similar_hash_algorithm_blockhash").unwrap();
let radio_button_similar_hash_algorithm_mean: gtk::RadioButton = builder.object("radio_button_similar_hash_algorithm_mean").unwrap();
let radio_button_similar_hash_algorithm_vertgradient: gtk::RadioButton = builder.object("radio_button_similar_hash_algorithm_vertgradient").unwrap();
let radio_button_similar_hash_algorithm_doublegradient: gtk::RadioButton = builder.object("radio_button_similar_hash_algorithm_doublegradient").unwrap();
let radio_button_similar_hash_size_8: gtk::RadioButton = builder.object("radio_button_similar_hash_size_8").unwrap();
let radio_button_similar_hash_size_16: gtk::RadioButton = builder.object("radio_button_similar_hash_size_16").unwrap();
let radio_button_similar_hash_size_32: gtk::RadioButton = builder.object("radio_button_similar_hash_size_32").unwrap();
let radio_button_similar_hash_size_64: gtk::RadioButton = builder.object("radio_button_similar_hash_size_64").unwrap();
let check_button_image_ignore_same_size: gtk::CheckButton = builder.object("check_button_image_ignore_same_size").unwrap(); let check_button_image_ignore_same_size: gtk::CheckButton = builder.object("check_button_image_ignore_same_size").unwrap();
let check_button_video_ignore_same_size: gtk::CheckButton = builder.object("check_button_video_ignore_same_size").unwrap();
let label_similar_images_minimal_similarity: gtk::Label = builder.object("label_similar_images_minimal_similarity").unwrap(); let label_similar_images_minimal_similarity: gtk::Label = builder.object("label_similar_images_minimal_similarity").unwrap();
let label_duplicate_check_method: gtk::Label = builder.object("label_duplicate_check_method").unwrap(); let label_duplicate_check_method: gtk::Label = builder.object("label_duplicate_check_method").unwrap();
let label_duplicate_hash_type: gtk::Label = builder.object("label_duplicate_hash_type").unwrap(); let label_duplicate_hash_type: gtk::Label = builder.object("label_duplicate_hash_type").unwrap();
let label_duplicate_size_bytes: gtk::Label = builder.object("label_duplicate_size_bytes").unwrap();
let label_duplicate_min_size: gtk::Label = builder.object("label_duplicate_min_size").unwrap();
let label_duplicate_max_size: gtk::Label = builder.object("label_duplicate_max_size").unwrap();
let label_big_shown_files: gtk::Label = builder.object("label_big_shown_files").unwrap(); let label_big_shown_files: gtk::Label = builder.object("label_big_shown_files").unwrap();
let label_image_resize_algorithm: gtk::Label = builder.object("label_image_resize_algorithm").unwrap(); let label_image_resize_algorithm: gtk::Label = builder.object("label_image_resize_algorithm").unwrap();
let label_image_hash_type: gtk::Label = builder.object("label_image_hash_type").unwrap(); let label_image_hash_type: gtk::Label = builder.object("label_image_hash_type").unwrap();
let label_image_hash_size: gtk::Label = builder.object("label_image_hash_size").unwrap(); let label_image_hash_size: gtk::Label = builder.object("label_image_hash_size").unwrap();
let label_image_size_bytes: gtk::Label = builder.object("label_image_size_bytes").unwrap();
let label_image_min_size: gtk::Label = builder.object("label_image_min_size").unwrap();
let label_image_max_size: gtk::Label = builder.object("label_image_max_size").unwrap();
let label_image_similarity: gtk::Label = builder.object("label_image_similarity").unwrap(); let label_image_similarity: gtk::Label = builder.object("label_image_similarity").unwrap();
let label_image_similarity_max: gtk::Label = builder.object("label_image_similarity_max").unwrap(); let label_image_similarity_max: gtk::Label = builder.object("label_image_similarity_max").unwrap();
let label_video_similarity: gtk::Label = builder.object("label_video_similarity").unwrap(); let label_video_similarity: gtk::Label = builder.object("label_video_similarity").unwrap();
let label_video_similarity_min: gtk::Label = builder.object("label_video_similarity_min").unwrap(); let label_video_similarity_min: gtk::Label = builder.object("label_video_similarity_min").unwrap();
let label_video_similarity_max: gtk::Label = builder.object("label_video_similarity_max").unwrap(); let label_video_similarity_max: gtk::Label = builder.object("label_video_similarity_max").unwrap();
let label_video_size_bytes: gtk::Label = builder.object("label_video_size_bytes").unwrap();
let label_video_min_size: gtk::Label = builder.object("label_video_min_size").unwrap();
let label_video_max_size: gtk::Label = builder.object("label_video_max_size").unwrap();
let label_music_size_bytes: gtk::Label = builder.object("label_music_size_bytes").unwrap();
let label_music_min_size: gtk::Label = builder.object("label_music_min_size").unwrap();
let label_music_max_size: gtk::Label = builder.object("label_music_max_size").unwrap();
let image_preview_similar_images: gtk::Image = builder.object("image_preview_similar_images").unwrap(); let image_preview_similar_images: gtk::Image = builder.object("image_preview_similar_images").unwrap();
let image_preview_duplicates: gtk::Image = builder.object("image_preview_duplicates").unwrap(); let image_preview_duplicates: gtk::Image = builder.object("image_preview_duplicates").unwrap();
@ -293,70 +228,36 @@ impl GuiMainNotebook {
evk_tree_view_same_music_finder, evk_tree_view_same_music_finder,
evk_tree_view_invalid_symlinks, evk_tree_view_invalid_symlinks,
evk_tree_view_broken_files, evk_tree_view_broken_files,
entry_similar_images_minimal_size,
entry_similar_images_maximal_size,
entry_similar_videos_minimal_size,
entry_similar_videos_maximal_size,
entry_duplicate_minimal_size,
entry_big_files_number, entry_big_files_number,
entry_same_music_minimal_size,
check_button_music_title, check_button_music_title,
check_button_music_artist, check_button_music_artist,
check_button_music_album_title, check_button_music_album_title,
check_button_music_album_artist, check_button_music_album_artist,
check_button_music_year, check_button_music_year,
check_button_music_approximate_comparison, check_button_music_approximate_comparison,
radio_button_duplicates_name,
radio_button_duplicates_size,
radio_button_duplicates_hash,
scale_similarity_similar_images, scale_similarity_similar_images,
scale_similarity_similar_videos, scale_similarity_similar_videos,
radio_button_hash_type_blake3,
radio_button_hash_type_crc32,
radio_button_hash_type_xxh3,
radio_button_resize_algorithm_lanczos3,
radio_button_resize_algorithm_nearest,
radio_button_resize_algorithm_triangle,
radio_button_resize_algorithm_gaussian,
radio_button_resize_algorithm_catmullrom,
radio_button_similar_hash_algorithm_gradient,
radio_button_similar_hash_algorithm_blockhash,
radio_button_similar_hash_algorithm_mean,
radio_button_similar_hash_algorithm_vertgradient,
radio_button_similar_hash_algorithm_doublegradient,
radio_button_similar_hash_size_8,
radio_button_similar_hash_size_16,
radio_button_similar_hash_size_32,
radio_button_similar_hash_size_64,
check_button_image_ignore_same_size, check_button_image_ignore_same_size,
label_similar_images_minimal_similarity, label_similar_images_minimal_similarity,
label_duplicate_check_method, label_duplicate_check_method,
label_duplicate_hash_type, label_duplicate_hash_type,
label_duplicate_size_bytes, combo_box_duplicate_check_method,
label_duplicate_min_size,
label_duplicate_max_size,
label_big_shown_files, label_big_shown_files,
label_image_resize_algorithm, label_image_resize_algorithm,
label_image_hash_type, label_image_hash_type,
label_image_hash_size, label_image_hash_size,
label_image_size_bytes, combo_box_image_resize_algorithm,
label_image_min_size, combo_box_image_hash_algorithm,
label_image_max_size,
label_image_similarity, label_image_similarity,
label_image_similarity_max, label_image_similarity_max,
label_video_similarity, label_video_similarity,
label_video_similarity_min, label_video_similarity_min,
label_video_similarity_max, label_video_similarity_max,
label_video_size_bytes,
label_video_min_size,
label_video_max_size,
label_music_size_bytes,
label_music_min_size,
label_music_max_size,
image_preview_similar_images, image_preview_similar_images,
entry_duplicate_maximal_size,
entry_same_music_maximal_size,
image_preview_duplicates, image_preview_duplicates,
combo_box_duplicate_hash_type,
combo_box_image_hash_size,
check_button_video_ignore_same_size,
} }
} }
@ -383,46 +284,58 @@ impl GuiMainNotebook {
self.check_button_music_year.set_label(&fl!("music_year_checkbox")); self.check_button_music_year.set_label(&fl!("music_year_checkbox"));
self.check_button_music_approximate_comparison.set_label(&fl!("music_comparison_checkbox")); self.check_button_music_approximate_comparison.set_label(&fl!("music_comparison_checkbox"));
self.radio_button_duplicates_name.set_label(&fl!("duplicate_mode_name_checkbox")); self.check_button_music_approximate_comparison.set_tooltip_text(Some(&fl!("music_comparison_checkbox_tooltip")));
self.radio_button_duplicates_size.set_label(&fl!("duplicate_mode_size_checkbox"));
self.radio_button_duplicates_hash.set_label(&fl!("duplicate_mode_hash_checkbox"));
self.radio_button_duplicates_name.set_tooltip_text(Some(&fl!("duplicate_mode_name_checkbox_tooltip")));
self.radio_button_duplicates_size.set_tooltip_text(Some(&fl!("duplicate_mode_size_checkbox_tooltip")));
self.radio_button_duplicates_hash.set_tooltip_text(Some(&fl!("duplicate_mode_hash_checkbox_tooltip")));
self.radio_button_hash_type_blake3.set_tooltip_text(Some(&fl!("duplicate_hash_checkbox_blake3")));
self.radio_button_hash_type_crc32.set_tooltip_text(Some(&fl!("duplicate_hash_checkbox_crc32")));
self.radio_button_hash_type_xxh3.set_tooltip_text(Some(&fl!("duplicate_hash_checkbox_xxh3")));
self.radio_button_similar_hash_size_8.set_tooltip_text(Some(&fl!("image_hash_checkbox_8")));
self.radio_button_similar_hash_size_16.set_tooltip_text(Some(&fl!("image_hash_checkbox_16")));
self.radio_button_similar_hash_size_32.set_tooltip_text(Some(&fl!("image_hash_checkbox_32")));
self.radio_button_similar_hash_size_64.set_tooltip_text(Some(&fl!("image_hash_checkbox_64")));
self.label_duplicate_check_method.set_label(&fl!("main_label_check_method")); self.label_duplicate_check_method.set_label(&fl!("main_label_check_method"));
self.label_duplicate_hash_type.set_label(&fl!("main_label_hash_type")); self.label_duplicate_hash_type.set_label(&fl!("main_label_hash_type"));
self.label_duplicate_size_bytes.set_label(&fl!("main_label_size_bytes"));
self.label_duplicate_min_size.set_label(&fl!("main_label_min_size"));
self.label_duplicate_max_size.set_label(&fl!("main_label_max_size"));
self.label_big_shown_files.set_label(&fl!("main_label_shown_files")); self.label_big_shown_files.set_label(&fl!("main_label_shown_files"));
self.label_image_resize_algorithm.set_label(&fl!("main_label_resize_algorithm")); self.label_image_resize_algorithm.set_label(&fl!("main_label_resize_algorithm"));
self.label_image_hash_type.set_label(&fl!("main_label_hash_type")); self.label_image_hash_type.set_label(&fl!("main_label_hash_type"));
self.label_image_hash_size.set_label(&fl!("main_label_hash_size")); self.label_image_hash_size.set_label(&fl!("main_label_hash_size"));
self.label_image_size_bytes.set_label(&fl!("main_label_size_bytes"));
self.label_image_min_size.set_label(&fl!("main_label_min_size"));
self.label_image_max_size.set_label(&fl!("main_label_max_size"));
self.label_image_similarity.set_label(&fl!("main_label_similarity")); self.label_image_similarity.set_label(&fl!("main_label_similarity"));
self.label_image_similarity_max.set_label(&fl!("core_similarity_very_high")); self.label_image_similarity_max.set_label(&fl!("core_similarity_very_high"));
self.label_video_similarity.set_label(&fl!("main_label_similarity")); self.label_video_similarity.set_label(&fl!("main_label_similarity"));
self.label_video_similarity_min.set_label(&fl!("core_similarity_minimal")); self.label_video_similarity_min.set_label(&fl!("core_similarity_minimal"));
self.label_video_similarity_max.set_label(&fl!("core_similarity_very_high")); self.label_video_similarity_max.set_label(&fl!("core_similarity_very_high"));
self.label_video_size_bytes.set_label(&fl!("main_label_size_bytes"));
self.label_video_min_size.set_label(&fl!("main_label_min_size")); self.label_duplicate_check_method.set_tooltip_text(Some(&fl!("duplicate_check_method_tooltip")));
self.label_video_max_size.set_label(&fl!("main_label_max_size")); self.combo_box_duplicate_check_method.set_tooltip_text(Some(&fl!("duplicate_check_method_tooltip")));
self.label_music_size_bytes.set_label(&fl!("main_label_size_bytes")); self.label_duplicate_hash_type.set_tooltip_text(Some(&fl!("duplicate_hash_type_tooltip")));
self.label_music_min_size.set_label(&fl!("main_label_min_size")); self.combo_box_duplicate_hash_type.set_tooltip_text(Some(&fl!("duplicate_hash_type_tooltip")));
self.label_music_max_size.set_label(&fl!("main_label_max_size"));
self.combo_box_image_hash_size.set_tooltip_text(Some(&fl!("image_hash_size_tooltip")));
self.label_image_hash_size.set_tooltip_text(Some(&fl!("image_hash_size_tooltip")));
self.combo_box_image_resize_algorithm.set_tooltip_text(Some(&fl!("image_resize_filter_tooltip")));
self.label_image_resize_algorithm.set_tooltip_text(Some(&fl!("image_resize_filter_tooltip")));
self.combo_box_image_hash_algorithm.set_tooltip_text(Some(&fl!("image_hash_alg_tooltip")));
self.label_image_hash_type.set_tooltip_text(Some(&fl!("image_hash_alg_tooltip")));
self.check_button_image_ignore_same_size.set_tooltip_text(Some(&fl!("check_button_general_same_size_tooltip")));
self.check_button_video_ignore_same_size.set_tooltip_text(Some(&fl!("check_button_general_same_size_tooltip")));
self.check_button_image_ignore_same_size.set_label(&fl!("check_button_general_same_size"));
self.check_button_video_ignore_same_size.set_label(&fl!("check_button_general_same_size"));
{
let hash_size_index = self.combo_box_image_hash_size.active().unwrap() as usize;
let hash_size = IMAGES_HASH_SIZE_COMBO_BOX[hash_size_index];
match hash_size {
8 => {
self.label_similar_images_minimal_similarity.set_text(&get_string_from_similarity(&Similarity::Similar(SIMILAR_VALUES[0][5]), 8));
}
16 => {
self.label_similar_images_minimal_similarity.set_text(&get_string_from_similarity(&Similarity::Similar(SIMILAR_VALUES[1][5]), 16));
}
32 => {
self.label_similar_images_minimal_similarity.set_text(&get_string_from_similarity(&Similarity::Similar(SIMILAR_VALUES[2][5]), 32));
}
64 => {
self.label_similar_images_minimal_similarity.set_text(&get_string_from_similarity(&Similarity::Similar(SIMILAR_VALUES[3][5]), 64));
}
_ => panic!(),
}
}
// Change name of main notebook tabs // Change name of main notebook tabs
let vec_children: Vec<gtk::Widget> = self.notebook_main.children(); let vec_children: Vec<gtk::Widget> = self.notebook_main.children();

View File

@ -31,6 +31,12 @@ pub struct GuiUpperNotebook {
pub label_excluded_items: gtk::Label, pub label_excluded_items: gtk::Label,
pub label_allowed_extensions: gtk::Label, pub label_allowed_extensions: gtk::Label,
pub entry_general_minimal_size: gtk::Entry,
pub entry_general_maximal_size: gtk::Entry,
pub label_general_size_bytes: gtk::Label,
pub label_general_min_size: gtk::Label,
pub label_general_max_size: gtk::Label,
} }
impl GuiUpperNotebook { impl GuiUpperNotebook {
@ -61,6 +67,12 @@ impl GuiUpperNotebook {
let label_excluded_items: gtk::Label = builder.object("label_excluded_items").unwrap(); let label_excluded_items: gtk::Label = builder.object("label_excluded_items").unwrap();
let label_allowed_extensions: gtk::Label = builder.object("label_allowed_extensions").unwrap(); let label_allowed_extensions: gtk::Label = builder.object("label_allowed_extensions").unwrap();
let entry_general_minimal_size: gtk::Entry = builder.object("entry_general_minimal_size").unwrap();
let entry_general_maximal_size: gtk::Entry = builder.object("entry_general_maximal_size").unwrap();
let label_general_size_bytes: gtk::Label = builder.object("label_general_size_bytes").unwrap();
let label_general_min_size: gtk::Label = builder.object("label_general_min_size").unwrap();
let label_general_max_size: gtk::Label = builder.object("label_general_max_size").unwrap();
Self { Self {
notebook_upper, notebook_upper,
scrolled_window_included_directories, scrolled_window_included_directories,
@ -80,6 +92,11 @@ impl GuiUpperNotebook {
buttons_remove_excluded_directory, buttons_remove_excluded_directory,
label_excluded_items, label_excluded_items,
label_allowed_extensions, label_allowed_extensions,
entry_general_minimal_size,
entry_general_maximal_size,
label_general_size_bytes,
label_general_min_size,
label_general_max_size,
} }
} }
pub fn update_language(&self) { pub fn update_language(&self) {
@ -108,6 +125,16 @@ impl GuiUpperNotebook {
self.label_excluded_items.set_label(&fl!("upper_excluded_items")); self.label_excluded_items.set_label(&fl!("upper_excluded_items"));
self.label_allowed_extensions.set_label(&fl!("upper_allowed_extensions")); self.label_allowed_extensions.set_label(&fl!("upper_allowed_extensions"));
self.label_general_size_bytes.set_label(&fl!("main_label_size_bytes"));
self.label_general_min_size.set_label(&fl!("main_label_min_size"));
self.label_general_max_size.set_label(&fl!("main_label_max_size"));
self.label_general_size_bytes.set_tooltip_text(Some(&fl!("main_label_size_bytes_tooltip")));
self.label_general_min_size.set_tooltip_text(Some(&fl!("main_label_size_bytes_tooltip")));
self.label_general_max_size.set_tooltip_text(Some(&fl!("main_label_size_bytes_tooltip")));
self.entry_general_minimal_size.set_tooltip_text(Some(&fl!("main_label_size_bytes_tooltip")));
self.entry_general_maximal_size.set_tooltip_text(Some(&fl!("main_label_size_bytes_tooltip")));
let vec_children: Vec<gtk::Widget> = self.notebook_upper.children(); let vec_children: Vec<gtk::Widget> = self.notebook_upper.children();
for (upper_enum, fl_thing) in [ for (upper_enum, fl_thing) in [

View File

@ -0,0 +1,89 @@
use czkawka_core::duplicate::{CheckingMethod, HashType};
use img_hash::{FilterType, HashAlg};
pub struct HashTypeStruct {
pub eng_name: &'static str,
pub hash_type: HashType,
}
pub const DUPLICATES_HASH_TYPE_COMBO_BOX: [HashTypeStruct; 3] = [
HashTypeStruct {
eng_name: "Blake3",
hash_type: HashType::Blake3,
},
HashTypeStruct { eng_name: "CRC32", hash_type: HashType::Crc32 },
HashTypeStruct { eng_name: "XXH3", hash_type: HashType::Xxh3 },
];
pub struct CheckMethodStruct {
pub eng_name: &'static str,
pub check_method: CheckingMethod,
}
pub const DUPLICATES_CHECK_METHOD_COMBO_BOX: [CheckMethodStruct; 3] = [
CheckMethodStruct {
eng_name: "Hash",
check_method: CheckingMethod::Hash,
},
CheckMethodStruct {
eng_name: "Size",
check_method: CheckingMethod::Size,
},
CheckMethodStruct {
eng_name: "Name",
check_method: CheckingMethod::Name,
},
];
pub struct ImageResizeAlgStruct {
pub eng_name: &'static str,
pub filter: FilterType,
}
pub const IMAGES_RESIZE_ALGORITHM_COMBO_BOX: [ImageResizeAlgStruct; 5] = [
ImageResizeAlgStruct {
eng_name: "Lanczos3",
filter: FilterType::Lanczos3,
},
ImageResizeAlgStruct {
eng_name: "Nearest",
filter: FilterType::Nearest,
},
ImageResizeAlgStruct {
eng_name: "Triangle",
filter: FilterType::Triangle,
},
ImageResizeAlgStruct {
eng_name: "Gaussian",
filter: FilterType::Gaussian,
},
ImageResizeAlgStruct {
eng_name: "CatmullRom",
filter: FilterType::CatmullRom,
},
];
pub struct ImageHashTypeStruct {
pub eng_name: &'static str,
pub hash_alg: HashAlg,
}
pub const IMAGES_HASH_TYPE_COMBO_BOX: [ImageHashTypeStruct; 5] = [
ImageHashTypeStruct {
eng_name: "Gradient",
hash_alg: HashAlg::Gradient,
},
ImageHashTypeStruct { eng_name: "Mean", hash_alg: HashAlg::Mean },
ImageHashTypeStruct {
eng_name: "VertGradient",
hash_alg: HashAlg::VertGradient,
},
ImageHashTypeStruct {
eng_name: "Blackhash",
hash_alg: HashAlg::Blockhash,
},
ImageHashTypeStruct {
eng_name: "DoubleGradient",
hash_alg: HashAlg::DoubleGradient,
},
];
pub const IMAGES_HASH_SIZE_COMBO_BOX: [i32; 4] = [8, 16, 32, 64];

View File

@ -17,6 +17,7 @@ use czkawka_core::similar_videos::MAX_TOLERANCE;
use crate::create_tree_view::*; use crate::create_tree_view::*;
use crate::delete_things; use crate::delete_things;
use crate::gui_data::*; use crate::gui_data::*;
use crate::help_combo_box::{DUPLICATES_CHECK_METHOD_COMBO_BOX, DUPLICATES_HASH_TYPE_COMBO_BOX, IMAGES_HASH_SIZE_COMBO_BOX, IMAGES_HASH_TYPE_COMBO_BOX, IMAGES_RESIZE_ALGORITHM_COMBO_BOX};
use crate::help_functions::*; use crate::help_functions::*;
use crate::language_functions::LANGUAGES_ALL; use crate::language_functions::LANGUAGES_ALL;
use crate::notebook_enums::NotebookMainEnum; use crate::notebook_enums::NotebookMainEnum;
@ -42,7 +43,7 @@ pub fn initialize_gui(gui_data: &mut GuiData) {
buttons_hardlink.hide(); buttons_hardlink.hide();
buttons_move.hide(); buttons_move.hide();
} }
//// Initialize language combobox //// Initialize language combo box
{ {
let combo_box_settings_language = gui_data.settings.combo_box_settings_language.clone(); let combo_box_settings_language = gui_data.settings.combo_box_settings_language.clone();
for lang in LANGUAGES_ALL { for lang in LANGUAGES_ALL {
@ -50,6 +51,46 @@ pub fn initialize_gui(gui_data: &mut GuiData) {
} }
combo_box_settings_language.set_active(Some(0)); combo_box_settings_language.set_active(Some(0));
} }
//// Initialize main window combo boxes
{
{
let combo_box_duplicate_check_method = gui_data.main_notebook.combo_box_duplicate_check_method.clone();
for check_type in &DUPLICATES_CHECK_METHOD_COMBO_BOX {
combo_box_duplicate_check_method.append_text(check_type.eng_name);
}
combo_box_duplicate_check_method.set_active(Some(0));
}
{
let combo_box_duplicate_hash_type = gui_data.main_notebook.combo_box_duplicate_hash_type.clone();
for hash_type in &DUPLICATES_HASH_TYPE_COMBO_BOX {
combo_box_duplicate_hash_type.append_text(hash_type.eng_name);
}
combo_box_duplicate_hash_type.set_active(Some(0));
}
}
{
{
let combo_box_image_hash_algorithm = gui_data.main_notebook.combo_box_image_hash_algorithm.clone();
for check_type in &IMAGES_HASH_TYPE_COMBO_BOX {
combo_box_image_hash_algorithm.append_text(check_type.eng_name);
}
combo_box_image_hash_algorithm.set_active(Some(0));
}
{
let combo_box_image_hash_size = gui_data.main_notebook.combo_box_image_hash_size.clone();
for check_type in &IMAGES_HASH_SIZE_COMBO_BOX {
combo_box_image_hash_size.append_text(&check_type.to_string());
}
combo_box_image_hash_size.set_active(Some(0));
}
{
let combo_box_image_resize_algorithm = gui_data.main_notebook.combo_box_image_resize_algorithm.clone();
for resize in &IMAGES_RESIZE_ALGORITHM_COMBO_BOX {
combo_box_image_resize_algorithm.append_text(resize.eng_name);
}
combo_box_image_resize_algorithm.set_active(Some(0));
}
}
//// Initialize main scrolled view with notebook //// Initialize main scrolled view with notebook
{ {

View File

@ -17,7 +17,7 @@ use crate::connect_button_search::*;
use crate::connect_button_select::*; use crate::connect_button_select::*;
use crate::connect_button_stop::*; use crate::connect_button_stop::*;
use crate::connect_change_language::*; use crate::connect_change_language::*;
use crate::connect_duplicate_buttons::*; use crate::connect_duplicate_buttons::connect_duplicate_combo_box;
use crate::connect_header_buttons::*; use crate::connect_header_buttons::*;
use crate::connect_notebook_tabs::*; use crate::connect_notebook_tabs::*;
use crate::connect_popovers::*; use crate::connect_popovers::*;
@ -60,6 +60,7 @@ mod gui_popovers;
mod gui_progress_dialog; mod gui_progress_dialog;
mod gui_settings; mod gui_settings;
mod gui_upper_notebook; mod gui_upper_notebook;
mod help_combo_box;
mod help_functions; mod help_functions;
mod initialize_gui; mod initialize_gui;
mod language_functions; mod language_functions;
@ -127,7 +128,7 @@ fn main() {
connect_button_stop(&gui_data); connect_button_stop(&gui_data);
connect_button_hardlink_symlink(&gui_data); connect_button_hardlink_symlink(&gui_data);
connect_button_move(&gui_data); connect_button_move(&gui_data);
connect_duplicate_buttons(&gui_data); connect_duplicate_combo_box(&gui_data);
connect_notebook_tabs(&gui_data); connect_notebook_tabs(&gui_data);
connect_selection_of_directories(&gui_data); connect_selection_of_directories(&gui_data);
connect_popovers(&gui_data); connect_popovers(&gui_data);

View File

@ -479,7 +479,7 @@ Author: Rafał Mikrut
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">2</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -513,6 +513,86 @@ Author: Rafał Mikrut
</packing> </packing>
</child> </child>
</object> </object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="spacing">8</property>
<child>
<object class="GtkLabel" id="label_general_size_bytes">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">File Size(bytes)</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_general_min_size">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Min:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_general_minimal_size">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">15</property>
<property name="text" translatable="yes">8192</property>
<property name="caps-lock-warning">False</property>
<property name="input-purpose">number</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_general_max_size">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Max:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_general_maximal_size">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">15</property>
<property name="text" translatable="yes">1099512000000</property>
<property name="caps-lock-warning">False</property>
<property name="input-purpose">number</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
</object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
@ -567,7 +647,8 @@ Author: Rafał Mikrut
<object class="GtkLabel" id="label_duplicate_check_method"> <object class="GtkLabel" id="label_duplicate_check_method">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Check method:</property> <property name="margin-end">3</property>
<property name="label" translatable="yes">Check method</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -576,13 +657,9 @@ Author: Rafał Mikrut
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkRadioButton" id="radio_button_duplicates_hash"> <object class="GtkComboBoxText" id="combo_box_duplicate_check_method">
<property name="label" translatable="yes">Hash</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">False</property>
<property name="receives-default">False</property>
<property name="active">True</property>
<property name="draw-indicator">True</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -591,13 +668,23 @@ Author: Rafał Mikrut
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkRadioButton" id="radio_button_duplicates_size"> <object class="GtkLabel" id="label_duplicate_hash_type">
<property name="label" translatable="yes">Size</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">False</property>
<property name="receives-default">False</property> <property name="margin-start">5</property>
<property name="draw-indicator">True</property> <property name="margin-end">2</property>
<property name="group">radio_button_duplicates_hash</property> <property name="label" translatable="yes">Hash type</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="combo_box_duplicate_hash_type">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -605,21 +692,6 @@ Author: Rafał Mikrut
<property name="position">3</property> <property name="position">3</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkRadioButton" id="radio_button_duplicates_name">
<property name="label" translatable="yes">Name</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
<property name="group">radio_button_duplicates_hash</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -627,157 +699,6 @@ Author: Rafał Mikrut
<property name="position">0</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<child>
<object class="GtkLabel" id="label_duplicate_hash_type">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Hash type:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="radio_button_hash_type_blake3">
<property name="label" translatable="yes">Blake3</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="active">True</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="radio_button_hash_type_crc32">
<property name="label" translatable="yes">CRC32</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
<property name="group">radio_button_hash_type_blake3</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="radio_button_hash_type_xxh3">
<property name="label" translatable="yes">XXH3</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
<property name="group">radio_button_hash_type_blake3</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">2</property>
<property name="spacing">8</property>
<child>
<object class="GtkLabel" id="label_duplicate_size_bytes">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Size(bytes)</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_duplicate_min_size">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Min:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_duplicate_minimal_size">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">15</property>
<property name="text" translatable="yes">8192</property>
<property name="caps-lock-warning">False</property>
<property name="input-purpose">number</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_duplicate_max_size">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Max:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_duplicate_maximal_size">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">15</property>
<property name="text" translatable="yes">1099512000000</property>
<property name="caps-lock-warning">False</property>
<property name="input-purpose">number</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child> <child>
<object class="GtkScrolledWindow" id="scrolled_window_duplicate_finder"> <object class="GtkScrolledWindow" id="scrolled_window_duplicate_finder">
<property name="visible">True</property> <property name="visible">True</property>
@ -997,7 +918,8 @@ Author: Rafał Mikrut
<object class="GtkLabel" id="label_image_resize_algorithm"> <object class="GtkLabel" id="label_image_resize_algorithm">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Resize algorithm:</property> <property name="margin-end">2</property>
<property name="label" translatable="yes">Resize algorithm</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -1006,13 +928,9 @@ Author: Rafał Mikrut
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkRadioButton" id="radio_button_resize_algorithm_lanczos3"> <object class="GtkComboBoxText" id="combo_box_image_resize_algorithm">
<property name="label" translatable="yes">Lanczos3</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">False</property>
<property name="receives-default">False</property>
<property name="active">True</property>
<property name="draw-indicator">True</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -1021,14 +939,12 @@ Author: Rafał Mikrut
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkRadioButton" id="radio_button_resize_algorithm_nearest"> <object class="GtkLabel" id="label_image_hash_size">
<property name="label" translatable="yes">Nearest</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">False</property>
<property name="receives-default">False</property> <property name="margin-start">5</property>
<property name="active">True</property> <property name="margin-end">2</property>
<property name="draw-indicator">True</property> <property name="label" translatable="yes">Hash size:</property>
<property name="group">radio_button_resize_algorithm_lanczos3</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -1037,14 +953,9 @@ Author: Rafał Mikrut
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkRadioButton" id="radio_button_resize_algorithm_triangle"> <object class="GtkComboBoxText" id="combo_box_image_hash_size">
<property name="label" translatable="yes">Triangle</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">False</property>
<property name="receives-default">False</property>
<property name="active">True</property>
<property name="draw-indicator">True</property>
<property name="group">radio_button_resize_algorithm_lanczos3</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -1053,14 +964,12 @@ Author: Rafał Mikrut
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkRadioButton" id="radio_button_resize_algorithm_gaussian"> <object class="GtkLabel" id="label_image_hash_type">
<property name="label" translatable="yes">Gaussian</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">False</property>
<property name="receives-default">False</property> <property name="margin-start">5</property>
<property name="active">True</property> <property name="margin-end">2</property>
<property name="draw-indicator">True</property> <property name="label" translatable="yes">Hash type:</property>
<property name="group">radio_button_resize_algorithm_lanczos3</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -1069,14 +978,9 @@ Author: Rafał Mikrut
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkRadioButton" id="radio_button_resize_algorithm_catmullrom"> <object class="GtkComboBoxText" id="combo_box_image_hash_algorithm">
<property name="label" translatable="yes">CatmullRom</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">False</property>
<property name="receives-default">False</property>
<property name="active">True</property>
<property name="draw-indicator">True</property>
<property name="group">radio_button_resize_algorithm_lanczos3</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -1091,290 +995,6 @@ Author: Rafał Mikrut
<property name="position">0</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<child>
<object class="GtkLabel" id="label_image_hash_type">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Hash type:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="radio_button_similar_hash_algorithm_gradient">
<property name="label" translatable="yes">Gradient</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="active">True</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="radio_button_similar_hash_algorithm_blockhash">
<property name="label" translatable="yes">Blockhash</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="active">True</property>
<property name="draw-indicator">True</property>
<property name="group">radio_button_similar_hash_algorithm_gradient</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="radio_button_similar_hash_algorithm_mean">
<property name="label" translatable="yes">Mean</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="active">True</property>
<property name="draw-indicator">True</property>
<property name="group">radio_button_similar_hash_algorithm_gradient</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="radio_button_similar_hash_algorithm_vertgradient">
<property name="label" translatable="yes">VertGradient</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="active">True</property>
<property name="draw-indicator">True</property>
<property name="group">radio_button_similar_hash_algorithm_gradient</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="radio_button_similar_hash_algorithm_doublegradient">
<property name="label" translatable="yes">DoubleGradient</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="active">True</property>
<property name="draw-indicator">True</property>
<property name="group">radio_button_similar_hash_algorithm_gradient</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<child>
<object class="GtkLabel" id="label_image_hash_size">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Hash size:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="radio_button_similar_hash_size_8">
<property name="label" translatable="yes">8</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="active">True</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="radio_button_similar_hash_size_16">
<property name="label" translatable="yes">16</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="active">True</property>
<property name="draw-indicator">True</property>
<property name="group">radio_button_similar_hash_size_8</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="radio_button_similar_hash_size_32">
<property name="label" translatable="yes">32</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
<property name="group">radio_button_similar_hash_size_8</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="radio_button_similar_hash_size_64">
<property name="label" translatable="yes">64</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
<property name="group">radio_button_similar_hash_size_8</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="spacing">8</property>
<child>
<object class="GtkLabel" id="label_image_size_bytes">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Size(bytes)</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_image_min_size">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Min:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_similar_images_minimal_size">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">15</property>
<property name="text" translatable="yes">16384</property>
<property name="caps-lock-warning">False</property>
<property name="input-purpose">number</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_image_max_size">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Max:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_similar_images_maximal_size">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">15</property>
<property name="text" translatable="yes">1099512000000</property>
<property name="caps-lock-warning">False</property>
<property name="input-purpose">number</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="check_button_image_ignore_same_size">
<property name="label" translatable="yes">Ignore same size</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
@ -1435,6 +1055,21 @@ Author: Rafał Mikrut
<property name="position">3</property> <property name="position">3</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkCheckButton" id="check_button_image_ignore_same_size">
<property name="label" translatable="yes">Ignore same size</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="margin-start">7</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -1500,87 +1135,6 @@ Author: Rafał Mikrut
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">2</property>
<property name="spacing">8</property>
<child>
<object class="GtkLabel" id="label_video_size_bytes">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Size(bytes)</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_video_min_size">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Min:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_similar_videos_minimal_size">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">15</property>
<property name="text" translatable="yes">16384</property>
<property name="caps-lock-warning">False</property>
<property name="input-purpose">number</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_video_max_size">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Max:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_similar_videos_maximal_size">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">15</property>
<property name="text" translatable="yes">1099512000000</property>
<property name="caps-lock-warning">False</property>
<property name="input-purpose">number</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
@ -1641,6 +1195,21 @@ Author: Rafał Mikrut
<property name="position">3</property> <property name="position">3</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkCheckButton" id="check_button_video_ignore_same_size">
<property name="label" translatable="yes">Ignore same size</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="margin-start">7</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -1684,87 +1253,6 @@ Author: Rafał Mikrut
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">2</property>
<property name="spacing">8</property>
<child>
<object class="GtkLabel" id="label_music_size_bytes">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Size(bytes)</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_music_min_size">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Min:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_same_music_minimal_size">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">15</property>
<property name="text" translatable="yes">8192</property>
<property name="caps-lock-warning">False</property>
<property name="input-purpose">number</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_music_max_size">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Max:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_same_music_maximal_size">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">15</property>
<property name="text" translatable="yes">1099512000000</property>
<property name="caps-lock-warning">False</property>
<property name="input-purpose">number</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
@ -2067,7 +1555,7 @@ Author: Rafał Mikrut
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="halign">center</property> <property name="halign">center</property>
<property name="icon-name">text-x-script</property> <property name="icon-name">utilities-system-monitor</property>
</object> </object>
</child> </child>
</object> </object>

View File

@ -22,35 +22,43 @@ music_album_artist_checkbox = Album Artist
music_year_checkbox = Year music_year_checkbox = Year
music_comparison_checkbox = Approximate Comparison music_comparison_checkbox = Approximate Comparison
duplicate_mode_name_checkbox = Name music_comparison_checkbox_tooltip =
duplicate_mode_size_checkbox = Size It searches for similar music files using AI, which uses machine learning to remove parentheses from a phrase, e.g. with this option enabled, the files in question will be considered duplicates:
duplicate_mode_hash_checkbox = Hash
duplicate_mode_name_checkbox_tooltip =
Finds files which have same name.
This mode not checking what file contain inside, so be carefully when using it.
duplicate_mode_size_checkbox_tooltip = Świędziżłób --- Świędziżłób (Remix Lato 2021)
Finds files which have same size.
This mode not checking what file contain inside, so be carefully when using it. duplicate_mode_name_combo_box = Name
duplicate_mode_size_combo_box = Size
duplicate_mode_hash_combo_box = Hash
duplicate_hash_type_tooltip =
Czkawka offers 3 types of hashes, which could be used:
Blake3 - cryptographic hash function. It is used as default hash algorithm, because it is very fast.
CRC32 - simple hash function. It should be faster than Blake3, but probably may have very rarely some collisions.
XXH3 - very similar in case of performance and hash quality to Blake3, so such modes can be easily used.
duplicate_check_method_tooltip =
For now, Czkawka offers three types of method to find duplicates by:
Name - Finds files which have same name.
Size - Finds files which have same size.
Hash - Finds files which have the same content. This mode hashes file and later compare this hashes to find duplicates. This mode is the safest way to find duplicates. Tool heavily uses cache, so second and further scans of same data should be a lot of faster that first.
image_hash_size_tooltip =
Czkawka offers changing size of generated hash for each images. Bigger hash cause allows to finds images with lower amount of differences between images, but also it is a little slower to use.
duplicate_mode_hash_checkbox_tooltip = Default value for hash is 8 bytes, which allows to find very similar and different images. 16 and 32 hashes should be used only for nearly identical images. 64 bytes hash shouldn't be used, except situation where really small differences are needed to find
Finds files which have the same content.
This mode hashes file and later compare this hashes to find duplicates.
Tool heavily uses cache, so second and further scans of same data should be a lot of faster that first.
duplicate_hash_checkbox_blake3 = Blake3 is cryptographic hash function. It is used as default hash algorithm, because it is very fast. image_resize_filter_tooltip =
duplicate_hash_checkbox_crc32 = CRC32 is simple hash function. It should be faster than Blake3, but probably may have very rarely some collisions. To compute hash of image, library must first resize it. Depend on choosen algorithm, resulted image will looks little different. The fastest algotithm to use, but also one which gives the worst results is Nearest.
duplicate_hash_checkbox_xxh3 = XXH3 is very similar in case of performance and hash quality to Blake3, so such modes can be easily used.
image_hash_checkbox_8 = Default hash size, with very high similarity it produce quite good results and don't save too much data too cache. image_hash_alg_tooltip =
image_hash_checkbox_16 = More precise than 8, so can be used to find very similar pictures, but create bigger cache entries. Users can choose one from many algorithms of calculating hash. Each have both strong and weaker points and will give sometimes better and sometimes worse results for different images, so to choose the best one, manual testing is required.
image_hash_checkbox_32 = Hash of this size provide very big similarity which is more than enough for most usages.
image_hash_checkbox_64 = Paranoid mode, such tool create really big cache files and will catch almost same images.
main_notebook_duplicates = Duplicate Files main_notebook_duplicates = Duplicate Files
main_notebook_empty_directories = Empty Directories main_notebook_empty_directories = Empty Directories
@ -80,16 +88,21 @@ main_tree_view_column_symlink_folder = Symlnik Folder
main_tree_view_column_destination_path = Destination Path main_tree_view_column_destination_path = Destination Path
main_tree_view_column_type_of_error = Type Of Error main_tree_view_column_type_of_error = Type Of Error
main_label_check_method = Check method: main_label_check_method = Check method
main_label_hash_type = Hash type: main_label_hash_type = Hash type
main_label_hash_size = Hash size: main_label_hash_size = Hash size
main_label_size_bytes = Size(bytes) main_label_size_bytes = Size(bytes)
main_label_min_size = Min: main_label_min_size = Min
main_label_max_size = Max: main_label_max_size = Max
main_label_shown_files = Number of shown files: main_label_shown_files = Number of shown files
main_label_resize_algorithm = Resize algorithm: main_label_resize_algorithm = Resize algorithm
main_label_similarity = Similarity{" "} main_label_similarity = Similarity{" "}
check_button_general_same_size = Ignore same size
check_button_general_same_size_tooltip = Ignore from results, files which have identical size - usually this are 1:1 duplicates
main_label_size_bytes_tooltip = Size of files which will be used in scan
# Upper window # Upper window
upper_recursive_button = Recursive upper_recursive_button = Recursive
upper_recursive_button_tooltip = If selected, search also for files which are not placed directly under chosen folders upper_recursive_button_tooltip = If selected, search also for files which are not placed directly under chosen folders

View File

@ -22,10 +22,23 @@ music_album_artist_checkbox = Wykonawca Albumu
music_year_checkbox = Rok music_year_checkbox = Rok
music_comparison_checkbox = Przybliżone Porównywanie music_comparison_checkbox = Przybliżone Porównywanie
music_comparison_checkbox_tooltip =
Wyszukuje podobne pliki muzyczne za pomocą AI, która to za pomocą uczenia maszynowego usuwa nawiasy z wyrażenia np. z włączoną opcją, dane pliki zostaną uznane za duplikaty:
Świędziżłób --- Świędziżłób (Remix Lato 2021)
duplicate_mode_name_checkbox = Nazwa duplicate_mode_name_checkbox = Nazwa
duplicate_mode_size_checkbox = Rozmiar duplicate_mode_size_checkbox = Rozmiar
duplicate_mode_hash_checkbox = Hash duplicate_mode_hash_checkbox = Hash
duplicate_hash_type_tooltip =
Czkawka oferuje 3 różne algorytmy do tworzenia hashu pliku:
Blake3 - kryptograficzna funkcja haszująca. Z racji połączenia szybkości i niskiej ilości kolizji jest to domyślny tryb.
CRC32 - prosta funkcja haszująca. Powinna być szybsza niż Blake3, lecz bardzo rzadko może mogą wystąpić kolizje hashy.
XXH3 - zarówno pod względem jakości hashu jak i wydajności jest podobny do Blake3, dlatego te algorytmy mogą być używane wymiennie.
duplicate_mode_name_checkbox_tooltip = duplicate_mode_name_checkbox_tooltip =
Służy do znajdowania plików o identycznych nazwach. Służy do znajdowania plików o identycznych nazwach.
@ -44,14 +57,25 @@ duplicate_mode_hash_checkbox_tooltip =
Ten tryb używa pamięci podręcznej do przechowywania raz obliczonych hashy, dlatego drugie i kolejne skanowanie, powinno być o wiele szybsze niż pierwsze. Ten tryb używa pamięci podręcznej do przechowywania raz obliczonych hashy, dlatego drugie i kolejne skanowanie, powinno być o wiele szybsze niż pierwsze.
duplicate_hash_checkbox_blake3 = Blake3 jest kryptograficzną funkcją haszującą. Z racji połączenia szybkości i niskiej ilości kolizji jest to domyślny tryb. duplicate_check_method_tooltip =
duplicate_hash_checkbox_crc32 = CRC32 to prosta funkcja haszująca. Powinna być szybsza niż Blake3, lecz bardzo rzadko może mogą wystąpić kolizje hashy. Na chwilę obecną, Czkawka oferuje 3 tryby wyszukiwania duplicatów poprzez:
duplicate_hash_checkbox_xxh3 = XXH3 zarówno pod względem jakości hashu jak i wydajności jest podobny do Blake3, dlatego te algorytmy mogą być używane wymiennie.
image_hash_checkbox_8 = Domyślna wielkość hasha, pozwala na wyszukanie obrazów od bardzo do minimalnie podobnych. Przy niższych poziomach podobieństwa, może grupować wiele niepodobnych obrazków. Nazwę - Znajduje identycznie nazywające się pliki.
image_hash_checkbox_16 = Bardziej precyzyjny od 8. Przydatny gdy ze względu na dużą ilość zdjęć i kolizji między hashami niższy hash wyświetla nieprawidłowe dane.
image_hash_checkbox_32 = Umożliwia wyszukiwanie niemal identycznych obrazów, różniących się niewielkimi szczegółami. Rozmiar - Znajduje pliki o identycznych rozmiarach.
image_hash_checkbox_64 = Tryb predatora, tworzy ogromne hashe które porównywane, wczytywane i zapisywane znacznie dłużej od poprzedników. Z racji wad nie powinien być raczej stosowany.
Hash - Wyszukuje pliki o tej samej zawartości. W tym trybie, każdy plik jest hasowany a następnie każdy hash jest porównywany z innymi. Ten tryb używa pamięci podręcznej do przechowywania raz obliczonych hashy, dlatego drugie i kolejne skanowanie, powinno być o wiele szybsze niż pierwsze. Jest to najbezpieczniejszy sposób na znalezienie duplikatów.
image_hash_size_tooltip =
Czkawka umożliwia zmianę wielkości generowanego hashu dla każdego obrazu. Im większy, tym mniejsze różnice może znaleźć pomiędzy obrazami, lecz również jest nieco wolniejszy w użytkowaniu.
Domyśną wielkością hashu jest 8, które pozwala wyszukiwać zarówno bardzo jak i mało podobne do siebie obrazy. Hashe 16 i 32 powinny być głównie używane dla niemal identycznych plików. Hash 64 bajtowy nie powinien być stosowany, chyba że wymagane jest znalezienie bardzo małych różnic pomiędzy obrazami.
image_resize_filter_tooltip =
By obliczyć hash obrazu, biblioteka musi najpierw go zmniejszyć. W zależności od wybranego algorytmu, obraz będzie wyglądał nieco inaczej. Najszybszym, lecz za razem dającym najgorsze efekty jest algorytm Nearest.
image_hash_alg_tooltip =
Do wyboru jest kilka algorytmów obliczenia hashu obrazu. Każdy z nich ma swoje słabe i silne punkty i będzie dawał czasem lepsze a czasem gorsze rezultaty w zależności od obrazów, dlatego najlepiej będzie przetestować je na własną rękę.
main_notebook_duplicates = Duplikaty main_notebook_duplicates = Duplikaty
main_notebook_empty_directories = Puste Katalogi main_notebook_empty_directories = Puste Katalogi
@ -81,15 +105,20 @@ main_tree_view_column_symlink_folder = Folder Symlinka
main_tree_view_column_destination_path = Docelowa Ścieżka main_tree_view_column_destination_path = Docelowa Ścieżka
main_tree_view_column_type_of_error = Typ Błędu main_tree_view_column_type_of_error = Typ Błędu
main_label_check_method = Metoda sprawdzania: main_label_check_method = Metoda sprawdzania
main_label_hash_type = Typ hashu: main_label_hash_type = Typ hashu
main_label_hash_size = Rozmiar hashu: main_label_hash_size = Rozmiar hashu
main_label_size_bytes = Rozmiar(bajty) main_label_size_bytes = Rozmiar(bajty)
main_label_min_size = Min: main_label_min_size = Min
main_label_max_size = Max: main_label_max_size = Max
main_label_shown_files = Liczba wyświetlanych plików: main_label_shown_files = Liczba wyświetlanych plików
main_label_resize_algorithm = Algorytm zmiany rozmiaru: main_label_resize_algorithm = Algorytm zmiany rozmiaru
main_label_similarity = Podobieństwo{" "} main_label_similarity = Podobieństwo{" "}
check_button_general_same_size = Ignoruj identyczny rozmiar
check_button_general_same_size_tooltip = Wyrzuca z wyników skanowania pliki, które posiadają identyczny rozmiar, po to by w wynikach zostały tylko niemal identyczne rekordy.
main_label_size_bytes_tooltip = Rozmiar plików które będą zawarte przy przeszukiwaniu
# Górne okno # Górne okno
upper_recursive_button = Rekursywnie upper_recursive_button = Rekursywnie
upper_recursive_button_tooltip = Jeśli zaznaczony, szuka plików i folderów również w katalogach wewnątrz, nawet jeśli nie znajdują się one bezpośrednio w tym folderze. upper_recursive_button_tooltip = Jeśli zaznaczony, szuka plików i folderów również w katalogach wewnątrz, nawet jeśli nie znajdują się one bezpośrednio w tym folderze.