Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
qarmin committed Nov 24, 2023
1 parent b7c552c commit 1244a3e
Show file tree
Hide file tree
Showing 8 changed files with 365 additions and 410 deletions.
731 changes: 345 additions & 386 deletions Cargo.lock

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ repository = "https://github.com/qarmin/szyszka"
rust-version = "1.69.0"

[dependencies]
gdk4 = "0.6"
gio = "0.17"
glib = "0.17"
gdk4 = "0.7"
gio = "0.18"
glib = "0.18"

directories-next = "2.0.0"

Expand All @@ -25,7 +25,7 @@ humansize = "2.1"
chrono = "0.4.24"

# For opening files
open = "4.1"
open = "5.0"

# For slugs
slugmin = "1.0"
Expand All @@ -36,13 +36,13 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

# Language
i18n-embed = { version = "0.13", features = ["fluent-system", "desktop-requester"] }
i18n-embed-fl = "0.6"
rust-embed = "6.6"
i18n-embed = { version = "0.14", features = ["fluent-system", "desktop-requester"] }
i18n-embed-fl = "0.7"
rust-embed = "8.0"
once_cell = "1.17"

[dependencies.gtk4]
version = "0.6"
version = "0.7"
default-features = false # just in case
features = ["v4_6"]

Expand Down
6 changes: 3 additions & 3 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ pub const RULES_FILE_NAME: &str = "rules_settings.json";
pub const LANGUAGE_FILE_NAME: &str = "language.txt";
pub const DARK_THEME_FILE_NAME: &str = "dark_theme.txt";

const BASIC_CUSTOM_COMMANDS: &str = r#"FILE_$(N).$(EXT)
const BASIC_CUSTOM_COMMANDS: &str = r"FILE_$(N).$(EXT)
FILE_$(K).$(EXT)
$(PARENT) $(N).$(EXT)
$(PARENT) $(K).$(EXT)
"#;
";

const BASIC_RULE_CONTENT: &str = r#"[]"#;
const BASIC_RULE_CONTENT: &str = r"[]";

pub fn get_dark_theme_config_path() -> Option<PathBuf> {
if let Some(proj_dirs) = ProjectDirs::from("pl", "Qarmin", "Szyszka") {
Expand Down
9 changes: 2 additions & 7 deletions src/gui_connection/connect_add_folders_button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::cell::RefCell;
use std::path::PathBuf;
use std::rc::Rc;

use glib::signal::Inhibit;
use glib::Propagation;
use gtk4::prelude::*;
use gtk4::{Orientation, ResponseType, Widget, Window};

Expand All @@ -25,11 +25,6 @@ pub fn connect_add_folders_button(gui_data: &GuiData) {

let file_chooser_dialog_add_folders = gui_data.upper_buttons.file_chooser_dialog_add_folders.clone();

let shared_result_entries = shared_result_entries;
let label_files_folders = label_files_folders;
let tree_view_results = tree_view_results;
let rules = rules;

file_chooser_dialog_add_folders.connect_response(move |file_chooser_dialog_add_folders, response| {
let shared_result_entries = shared_result_entries.clone();
if response == ResponseType::Accept {
Expand Down Expand Up @@ -102,7 +97,7 @@ fn create_scan_inside_ignore_files_dialog(
let sif = switch_ignore_folders.clone();
switch_scan_inside.connect_state_set(move |_, b| {
sif.set_sensitive(b);
Inhibit(false)
Propagation::Stop
});

dialog.connect_response(move |dialog, response| {
Expand Down
4 changes: 2 additions & 2 deletions src/gui_connection/connect_button_settings.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use glib::signal::Inhibit;
use glib::Propagation;
use gtk4::prelude::*;

use crate::GuiData;
Expand All @@ -13,6 +13,6 @@ pub fn connect_button_settings(gui_data: &GuiData) {
let window_settings = gui_data.settings.window_settings.clone();
window_settings.connect_close_request(|window_settings| {
window_settings.hide();
Inhibit(true)
Propagation::Stop
});
}
3 changes: 2 additions & 1 deletion src/gui_connection/connect_rule_window_close.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use gtk4::prelude::*;

use crate::gui_data_things::gui_data::GuiData;
use glib::Propagation;

pub fn connect_rule_window_close(gui_data: &GuiData) {
let window_with_rules = gui_data.window_rules.window_with_rules.clone();
Expand All @@ -16,6 +17,6 @@ pub fn connect_rule_window_close(gui_data: &GuiData) {

window_main.set_sensitive(true);
e.hide();
gtk4::Inhibit(true)
Propagation::Stop
});
}
2 changes: 1 addition & 1 deletion src/gui_connection/connect_start_renaming.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ fn connect_renaming_response(chooser: &Dialog, shared_result_entries: &Rc<RefCel
match typ {
DirFileType::Directory => {
let how_much = old_name.matches(CHARACTER).count();
folder_renames.entry(how_much).or_insert_with(Vec::new);
folder_renames.entry(how_much).or_default();
folder_renames.get_mut(&how_much).unwrap().push((old_name, new_name));
}
DirFileType::File => {
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use std::env;

use gio::ApplicationFlags;
use glib::signal::Inhibit;
use glib::Propagation;
use gtk4::prelude::*;
use gtk4::Application;

Expand Down Expand Up @@ -136,6 +136,6 @@ fn build_ui(application: &Application, arguments: &[String]) {
window_main.connect_close_request(move |_| {
let gui_data_cloned = gui_data_cloned.clone();
save_language(&gui_data_cloned);
Inhibit(false)
Propagation::Stop
});
}

0 comments on commit 1244a3e

Please sign in to comment.