Fix deleting single item, fix stop button, smaller windows, disabled windows CI
This commit is contained in:
parent
daeb87219a
commit
7dd86e179c
48
Cargo.lock
generated
48
Cargo.lock
generated
|
@ -304,9 +304,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "cfg-expr"
|
||||
version = "0.10.2"
|
||||
version = "0.10.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5e068cb2806bbc15b439846dc16c5f89f8599f2c3e4d73d4449d38f9b2f0b6c5"
|
||||
checksum = "0aacacf4d96c24b2ad6eb8ee6df040e4f27b0d0b39a5710c30091baa830485db"
|
||||
dependencies = [
|
||||
"smallvec",
|
||||
]
|
||||
|
@ -1493,9 +1493,9 @@ checksum = "7efd1d698db0759e6ef11a7cd44407407399a910c774dd804c64c032da7826ff"
|
|||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.125"
|
||||
version = "0.2.126"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5916d2ae698f6de9bfb891ad7a8d65c09d232dc58cc4ac433c7da3b2fd84bc2b"
|
||||
checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836"
|
||||
|
||||
[[package]]
|
||||
name = "linked-hash-map"
|
||||
|
@ -1528,9 +1528,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lofty"
|
||||
version = "0.6.2"
|
||||
version = "0.6.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e9b0ac50022c34427688f83800b865c8a324ba2fe9f41f232b899b7517b3786c"
|
||||
checksum = "9e09702a8eff21fa1cf105d189d8eea3609d7074ab1503d7c49d5b37b7403a65"
|
||||
dependencies = [
|
||||
"base64 0.13.0",
|
||||
"byteorder",
|
||||
|
@ -1762,9 +1762,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.10.0"
|
||||
version = "1.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9"
|
||||
checksum = "7b10983b38c53aebdf33f542c6275b0f58a238129d00c4ae0e6fb59738d783ca"
|
||||
|
||||
[[package]]
|
||||
name = "opaque-debug"
|
||||
|
@ -2032,11 +2032,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.38"
|
||||
version = "1.0.39"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9027b48e9d4c9175fa2218adf3557f91c1137021739951d4932f5f8268ac48aa"
|
||||
checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f"
|
||||
dependencies = [
|
||||
"unicode-xid",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2148,9 +2148,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.5.5"
|
||||
version = "1.5.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286"
|
||||
checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
|
@ -2159,9 +2159,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.6.25"
|
||||
version = "0.6.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
|
||||
checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64"
|
||||
|
||||
[[package]]
|
||||
name = "remove_dir_all"
|
||||
|
@ -2684,13 +2684,13 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.94"
|
||||
version = "1.0.95"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a07e33e919ebcd69113d5be0e4d70c5707004ff45188910106854f38b960df4a"
|
||||
checksum = "fbaf6116ab8924f39d52792136fb74fd60a80194cf1b1c6ffa6453eef1c3f942"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-xid",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2919,6 +2919,12 @@ version = "0.3.8"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-normalization"
|
||||
version = "0.1.19"
|
||||
|
@ -2940,12 +2946,6 @@ version = "0.1.9"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-xid"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04"
|
||||
|
||||
[[package]]
|
||||
name = "uuid"
|
||||
version = "1.0.0"
|
||||
|
|
|
@ -3,10 +3,12 @@
|
|||
**Czkawka** (_tch•kav•ka_ (IPA: [ʈ͡ʂkafka]), "hiccup" in Polish) is a simple, fast and free app to remove unnecessary files from your computer.
|
||||
|
||||
## UNSTABLE WARNING
|
||||
**Currently this repository contains unstable GTK 4 port, so multiple regression, broken features etc. are expected.**
|
||||
**Currently master branch of this repository contains unstable GTK 4 port, so multiple regression, broken features etc. are expected.**
|
||||
|
||||
**You can use old stable version built with GTK 3 - [4.1.0](https://github.com/qarmin/czkawka/releases/tag/4.1.0) or compile app from git before GTK 4 PR merge.**
|
||||
|
||||
**Due build problems Windows binaries are not available yet, you can help by creating/modifying CI to produce valid windows binaries**
|
||||
|
||||
## Features
|
||||
- Written in memory-safe Rust
|
||||
- Amazingly fast - due to using more or less advanced algorithms and multithreading
|
||||
|
|
|
@ -247,6 +247,7 @@ bottom_show_upper_notebook_tooltip = Show/Hide upper notebook panel.
|
|||
|
||||
# Progress Window
|
||||
progress_stop_button = Stop
|
||||
progress_stop_additional_message = Stop requested
|
||||
|
||||
# About Window
|
||||
about_repository_button_tooltip = Link to repository page with source code.
|
||||
|
|
|
@ -143,6 +143,8 @@ pub fn connect_button_search(
|
|||
|
||||
let show_dialog = Arc::new(AtomicBool::new(true));
|
||||
|
||||
window_progress.set_title(Some(&flg!("window_progress_title")));
|
||||
|
||||
hide_all_buttons(&buttons_array);
|
||||
|
||||
notebook_main.set_sensitive(false);
|
||||
|
@ -169,6 +171,7 @@ pub fn connect_button_search(
|
|||
|
||||
label_stage.show();
|
||||
grid_progress_stages.show();
|
||||
window_progress.set_default_size(1, 1);
|
||||
|
||||
get_list_store(&tree_view_duplicate_finder).clear();
|
||||
|
||||
|
@ -213,6 +216,7 @@ pub fn connect_button_search(
|
|||
NotebookMainEnum::EmptyFiles => {
|
||||
label_stage.show();
|
||||
grid_progress_stages.hide();
|
||||
window_progress.set_default_size(1, 1);
|
||||
|
||||
get_list_store(&tree_view_empty_files_finder).clear();
|
||||
|
||||
|
@ -233,6 +237,7 @@ pub fn connect_button_search(
|
|||
NotebookMainEnum::EmptyDirectories => {
|
||||
label_stage.show();
|
||||
grid_progress_stages.hide();
|
||||
window_progress.set_default_size(1, 1);
|
||||
|
||||
get_list_store(&tree_view_empty_folder_finder).clear();
|
||||
|
||||
|
@ -250,6 +255,7 @@ pub fn connect_button_search(
|
|||
NotebookMainEnum::BigFiles => {
|
||||
label_stage.show();
|
||||
grid_progress_stages.hide();
|
||||
window_progress.set_default_size(1, 1);
|
||||
|
||||
get_list_store(&tree_view_big_files_finder).clear();
|
||||
|
||||
|
@ -273,6 +279,7 @@ pub fn connect_button_search(
|
|||
NotebookMainEnum::Temporary => {
|
||||
label_stage.show();
|
||||
grid_progress_stages.hide();
|
||||
window_progress.set_default_size(1, 1);
|
||||
|
||||
get_list_store(&tree_view_temporary_files_finder).clear();
|
||||
|
||||
|
@ -294,6 +301,7 @@ pub fn connect_button_search(
|
|||
|
||||
label_stage.show();
|
||||
grid_progress_stages.show();
|
||||
window_progress.set_default_size(1, 1);
|
||||
|
||||
get_list_store(&tree_view_similar_images_finder).clear();
|
||||
|
||||
|
@ -343,6 +351,7 @@ pub fn connect_button_search(
|
|||
NotebookMainEnum::SimilarVideos => {
|
||||
label_stage.show();
|
||||
grid_progress_stages.show();
|
||||
window_progress.set_default_size(1, 1);
|
||||
|
||||
get_list_store(&tree_view_similar_videos_finder).clear();
|
||||
|
||||
|
@ -377,6 +386,7 @@ pub fn connect_button_search(
|
|||
NotebookMainEnum::SameMusic => {
|
||||
label_stage.show();
|
||||
grid_progress_stages.show();
|
||||
window_progress.set_default_size(1, 1);
|
||||
|
||||
get_list_store(&tree_view_same_music_finder).clear();
|
||||
|
||||
|
@ -436,6 +446,7 @@ pub fn connect_button_search(
|
|||
NotebookMainEnum::Symlinks => {
|
||||
label_stage.show();
|
||||
grid_progress_stages.hide();
|
||||
window_progress.set_default_size(1, 1);
|
||||
|
||||
get_list_store(&tree_view_invalid_symlinks).clear();
|
||||
|
||||
|
@ -456,6 +467,7 @@ pub fn connect_button_search(
|
|||
NotebookMainEnum::BrokenFiles => {
|
||||
label_stage.show();
|
||||
grid_progress_stages.show();
|
||||
window_progress.set_default_size(1, 1);
|
||||
|
||||
get_list_store(&tree_view_broken_files).clear();
|
||||
|
||||
|
@ -478,6 +490,7 @@ pub fn connect_button_search(
|
|||
NotebookMainEnum::BadExtensions => {
|
||||
label_stage.show();
|
||||
grid_progress_stages.show();
|
||||
window_progress.set_default_size(1, 1);
|
||||
|
||||
get_list_store(&tree_view_bad_extensions).clear();
|
||||
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
use crossbeam_channel::{Sender, TrySendError};
|
||||
|
||||
use crate::flg;
|
||||
use crate::gui_structs::gui_data::GuiData;
|
||||
use crate::help_functions::KEY_ENTER;
|
||||
use gtk4::prelude::*;
|
||||
|
||||
fn send_stop_message(stop_sender: &Sender<()>) {
|
||||
stop_sender
|
||||
|
@ -12,18 +14,22 @@ fn send_stop_message(stop_sender: &Sender<()>) {
|
|||
|
||||
pub fn connect_button_stop(gui_data: &GuiData) {
|
||||
let evk_button_stop_in_dialog = gui_data.progress_window.evk_button_stop_in_dialog.clone();
|
||||
let stop_dialog = gui_data.progress_window.window_progress.clone();
|
||||
let stop_sender = gui_data.stop_sender.clone();
|
||||
evk_button_stop_in_dialog.connect_key_released(move |_, _, key_code, _| {
|
||||
if key_code == KEY_ENTER {
|
||||
// Only accept enter key to stop search
|
||||
stop_dialog.set_title(Some(&format!("{} ({})", flg!("window_progress_title"), flg!("progress_stop_additional_message"))));
|
||||
send_stop_message(&stop_sender);
|
||||
}
|
||||
});
|
||||
|
||||
let gc_button_stop_in_dialog = gui_data.progress_window.gc_button_stop_in_dialog.clone();
|
||||
let button_stop_in_dialog = gui_data.progress_window.button_stop_in_dialog.clone();
|
||||
let stop_dialog = gui_data.progress_window.window_progress.clone();
|
||||
let stop_sender = gui_data.stop_sender.clone();
|
||||
// TODO GTK 4 change this to connect released, not sure why not works here
|
||||
gc_button_stop_in_dialog.connect_pressed(move |_a, _b, _c, _d| {
|
||||
|
||||
button_stop_in_dialog.connect_clicked(move |_a| {
|
||||
stop_dialog.set_title(Some(&format!("{} ({})", flg!("window_progress_title"), flg!("progress_stop_additional_message"))));
|
||||
send_stop_message(&stop_sender);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -141,6 +141,8 @@ fn add_manually_directories(window_main: &Window, tree_view: &TreeView, excluded
|
|||
.modal(true)
|
||||
.build();
|
||||
|
||||
dialog.set_default_size(300, 0);
|
||||
|
||||
let entry: gtk4::Entry = gtk4::Entry::new();
|
||||
|
||||
let added_button = dialog.add_button(&flg!("general_ok_button"), ResponseType::Ok);
|
||||
|
|
|
@ -23,16 +23,7 @@ pub struct GuiBottomButtons {
|
|||
pub buttons_names: [BottomButtonsEnum; 8],
|
||||
pub buttons_array: [Widget; 8],
|
||||
|
||||
pub gc_buttons_search: gtk4::GestureClick,
|
||||
pub gc_buttons_select: gtk4::GestureClick,
|
||||
pub gc_buttons_delete: gtk4::GestureClick,
|
||||
pub gc_buttons_save: gtk4::GestureClick,
|
||||
pub gc_buttons_symlink: gtk4::GestureClick,
|
||||
pub gc_buttons_hardlink: gtk4::GestureClick,
|
||||
pub gc_buttons_move: gtk4::GestureClick,
|
||||
pub gc_buttons_compare: gtk4::GestureClick,
|
||||
pub gc_buttons_show_errors: gtk4::GestureClick,
|
||||
pub gc_buttons_show_upper_notebook: gtk4::GestureClick,
|
||||
}
|
||||
|
||||
impl GuiBottomButtons {
|
||||
|
@ -49,16 +40,7 @@ impl GuiBottomButtons {
|
|||
let buttons_show_errors: gtk4::Button = builder.object("buttons_show_errors").unwrap();
|
||||
let buttons_show_upper_notebook: gtk4::Button = builder.object("buttons_show_upper_notebook").unwrap();
|
||||
|
||||
let gc_buttons_search: GestureClick = GestureClick::new();
|
||||
let gc_buttons_select: GestureClick = GestureClick::new();
|
||||
let gc_buttons_delete: GestureClick = GestureClick::new();
|
||||
let gc_buttons_save: GestureClick = GestureClick::new();
|
||||
let gc_buttons_symlink: GestureClick = GestureClick::new();
|
||||
let gc_buttons_hardlink: GestureClick = GestureClick::new();
|
||||
let gc_buttons_move: GestureClick = GestureClick::new();
|
||||
let gc_buttons_compare: GestureClick = GestureClick::new();
|
||||
let gc_buttons_show_errors: GestureClick = GestureClick::new();
|
||||
let gc_buttons_show_upper_notebook: GestureClick = GestureClick::new();
|
||||
|
||||
buttons_select.add_controller(&gc_buttons_select);
|
||||
|
||||
|
@ -109,16 +91,7 @@ impl GuiBottomButtons {
|
|||
buttons_show_upper_notebook,
|
||||
buttons_names,
|
||||
buttons_array,
|
||||
gc_buttons_search,
|
||||
gc_buttons_select,
|
||||
gc_buttons_delete,
|
||||
gc_buttons_save,
|
||||
gc_buttons_symlink,
|
||||
gc_buttons_hardlink,
|
||||
gc_buttons_move,
|
||||
gc_buttons_compare,
|
||||
gc_buttons_show_errors,
|
||||
gc_buttons_show_upper_notebook,
|
||||
}
|
||||
}
|
||||
pub fn update_language(&self) {
|
||||
|
|
|
@ -19,7 +19,6 @@ pub struct GuiProgressDialog {
|
|||
|
||||
pub button_stop_in_dialog: gtk4::Button,
|
||||
pub evk_button_stop_in_dialog: gtk4::EventControllerKey,
|
||||
pub gc_button_stop_in_dialog: gtk4::GestureClick,
|
||||
}
|
||||
|
||||
impl GuiProgressDialog {
|
||||
|
@ -44,8 +43,6 @@ impl GuiProgressDialog {
|
|||
let button_stop_in_dialog: gtk4::Button = builder.object("button_stop_in_dialog").unwrap();
|
||||
let evk_button_stop_in_dialog = EventControllerKey::new();
|
||||
button_stop_in_dialog.add_controller(&evk_button_stop_in_dialog);
|
||||
let gc_button_stop_in_dialog = gtk4::GestureClick::new();
|
||||
button_stop_in_dialog.add_controller(&gc_button_stop_in_dialog);
|
||||
|
||||
set_icon_of_button(&button_stop_in_dialog, CZK_ICON_STOP);
|
||||
|
||||
|
@ -59,7 +56,6 @@ impl GuiProgressDialog {
|
|||
grid_progress_stages,
|
||||
button_stop_in_dialog,
|
||||
evk_button_stop_in_dialog,
|
||||
gc_button_stop_in_dialog,
|
||||
}
|
||||
}
|
||||
pub fn update_language(&self) {
|
||||
|
|
Loading…
Reference in a new issue