1
0
Fork 0
mirror of synced 2024-05-20 04:12:28 +12:00

Confusion

This commit is contained in:
Rafał Mikrut 2023-04-01 17:40:53 +02:00
parent 610c15cc85
commit 6041ee0bc1
7 changed files with 26 additions and 13 deletions

View file

@ -301,6 +301,7 @@ fn computer_bad_extensions(
}
}
}
fn computer_broken_files(
br: BrokenFiles,
entry_info: &Entry,
@ -373,6 +374,7 @@ fn computer_broken_files(
}
}
}
fn computer_invalid_symlinks(
ifs: InvalidSymlinks,
entry_info: &Entry,
@ -451,6 +453,7 @@ fn computer_invalid_symlinks(
}
}
}
fn computer_same_music(
mf: SameMusic,
entry_info: &Entry,
@ -917,6 +920,7 @@ fn computer_temporary_files(
}
}
}
fn computer_big_files(
bf: BigFile,
entry_info: &Entry,
@ -983,6 +987,7 @@ fn computer_big_files(
}
}
}
fn computer_empty_files(
vf: EmptyFiles,
entry_info: &Entry,
@ -1054,6 +1059,7 @@ fn computer_empty_files(
}
}
}
fn computer_empty_folders(
ef: EmptyFolder,
entry_info: &Entry,
@ -1124,6 +1130,7 @@ fn computer_empty_folders(
}
}
}
fn computer_duplicate_finder(
df: DuplicateFinder,
entry_info: &Entry,
@ -1425,6 +1432,7 @@ fn computer_duplicate_finder(
}
}
}
fn duplicates_add_to_list_store(list_store: &ListStore, file: &str, directory: &str, size: u64, modified_date: u64, is_header: bool, is_reference_folder: bool) {
const COLUMNS_NUMBER: usize = 11;
let size_str;
@ -1454,6 +1462,7 @@ fn duplicates_add_to_list_store(list_store: &ListStore, file: &str, directory: &
];
list_store.set(&list_store.append(), &values);
}
fn similar_images_add_to_list_store(
list_store: &ListStore,
file: &str,
@ -1528,6 +1537,7 @@ fn similar_videos_add_to_list_store(list_store: &ListStore, file: &str, director
list_store.set(&list_store.append(), &values);
}
fn same_music_add_to_list_store(
list_store: &ListStore,
file: &str,
@ -1579,6 +1589,7 @@ fn same_music_add_to_list_store(
list_store.set(&list_store.append(), &values);
}
fn set_specific_buttons_as_active(buttons_array: &Rc<RefCell<HashMap<NotebookMainEnum, HashMap<BottomButtonsEnum, bool>>>>, notebook_enum: &NotebookMainEnum, value_to_set: bool) {
let mut b_mut = buttons_array.borrow_mut();
let butt = b_mut.get_mut(notebook_enum).unwrap();

View file

@ -395,13 +395,13 @@ fn generate_cache_for_results(vector_with_path: Vec<(String, String, TreePath)>)
#[allow(clippy::never_loop)]
loop {
let Some(pixbuf_big) = resize_pixbuf_dimension(&pixbuf, (BIG_PREVIEW_SIZE, BIG_PREVIEW_SIZE), InterpType::Bilinear) else{
println!("Failed to resize image {full_path}.");
break;
let Some(pixbuf_big) = resize_pixbuf_dimension(&pixbuf, (BIG_PREVIEW_SIZE, BIG_PREVIEW_SIZE), InterpType::Bilinear) else {
println!("Failed to resize image {full_path}.");
break;
};
let Some(pixbuf_small) = resize_pixbuf_dimension(&pixbuf_big, (SMALL_PREVIEW_SIZE, SMALL_PREVIEW_SIZE), InterpType::Bilinear) else {
println!("Failed to resize image {full_path}.");
break;
let Some(pixbuf_small) = resize_pixbuf_dimension(&pixbuf_big, (SMALL_PREVIEW_SIZE, SMALL_PREVIEW_SIZE), InterpType::Bilinear) else {
println!("Failed to resize image {full_path}.");
break;
};
big_img.set_from_pixbuf(Some(&pixbuf_big));

View file

@ -1,9 +1,10 @@
use gtk4::prelude::*;
use crate::gui_structs::gui_data::GuiData;
use crate::gui_structs::gui_popovers_sort::GuiSortPopovers;
use crate::help_functions::PopoverTypes;
use crate::notebook_enums::{to_notebook_main_enum, NotebookMainEnum};
use crate::notebook_info::NOTEBOOKS_INFO;
use gtk4::prelude::*;
pub fn connect_button_sort(gui_data: &GuiData) {
let popovers_sort = gui_data.popovers_sort.clone();

View file

@ -1,6 +1,7 @@
use std::fmt::Debug;
use gtk4::prelude::*;
use gtk4::{ListStore, TreeIter};
use std::fmt::Debug;
use crate::gui_structs::gui_data::GuiData;
use crate::help_functions::*;
@ -118,10 +119,11 @@ pub fn connect_popover_sort(gui_data: &GuiData) {
#[cfg(test)]
mod test {
use crate::connect_things::connect_popovers_sort::{popover_sort_general, sort_iters};
use gtk4::prelude::*;
use gtk4::{Popover, TreeView};
use crate::connect_things::connect_popovers_sort::{popover_sort_general, sort_iters};
#[gtk4::test]
fn test_sort_iters() {
let columns_types: &[glib::types::Type] = &[glib::types::Type::U32, glib::types::Type::STRING];

View file

@ -244,8 +244,8 @@ pub fn get_string_from_list_store(tree_view: &TreeView, column_full_path: i32, c
let mut string_vector: Vec<String> = Vec::new();
let Some(tree_iter) = list_store.iter_first() else {
return string_vector;
let Some(tree_iter) = list_store.iter_first() else {
return string_vector;
};
match column_selection {
Some(column_selection) => loop {

View file

@ -1,5 +1,4 @@
use std::cell::RefCell;
use std::path::Path;
use std::rc::Rc;

View file

@ -5,11 +5,11 @@ use std::io::{Read, Write};
use std::path::{Path, PathBuf};
use std::{env, fs};
use czkawka_core::common::get_default_number_of_threads;
use directories_next::ProjectDirs;
use gtk4::prelude::*;
use gtk4::{ComboBoxText, ScrolledWindow, TextView, TreeView};
use czkawka_core::common::get_default_number_of_threads;
use czkawka_core::common_dir_traversal::CheckingMethod;
use czkawka_core::similar_images::SIMILAR_VALUES;