edit_window: Don't show error for canceled loader

This commit is contained in:
Sophie Herold 2025-02-13 22:38:13 +01:00
parent bb72324a64
commit 7d3cdb93b9
5 changed files with 9 additions and 7 deletions

6
Cargo.lock generated
View file

@ -831,8 +831,7 @@ dependencies = [
[[package]] [[package]]
name = "glycin" name = "glycin"
version = "2.1.0-beta" version = "2.1.0-beta"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "git+https://gitlab.gnome.org/GNOME/glycin.git?rev=08d7799d6c29c544bfe6914d4e7921bbbeb5f3ff#08d7799d6c29c544bfe6914d4e7921bbbeb5f3ff"
checksum = "5a0156b1f142e88a923d8e122bbacc7ae893a9da975771ea8c4db33cf7a5a317"
dependencies = [ dependencies = [
"async-fs", "async-fs",
"async-io", "async-io",
@ -863,8 +862,7 @@ dependencies = [
[[package]] [[package]]
name = "glycin-utils" name = "glycin-utils"
version = "3.0.0-beta" version = "3.0.0-beta"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "git+https://gitlab.gnome.org/GNOME/glycin.git?rev=08d7799d6c29c544bfe6914d4e7921bbbeb5f3ff#08d7799d6c29c544bfe6914d4e7921bbbeb5f3ff"
checksum = "5be81f5ab01eec2fe54b24ab58f2c435275684916c3842b1157cd7351e07caa2"
dependencies = [ dependencies = [
"env_logger", "env_logger",
"gufo-common", "gufo-common",

View file

@ -27,7 +27,9 @@ chrono = { version = "0.4.38", default-features = false, features = ["std"] }
gettext-rs = { version = "0.7.0", features = ["gettext-system"] } gettext-rs = { version = "0.7.0", features = ["gettext-system"] }
gettext-sys = { version = "0.22.5", features = ["gettext-system"] } gettext-sys = { version = "0.22.5", features = ["gettext-system"] }
gio = { version = "0.20.0", features = ["v2_74"] } gio = { version = "0.20.0", features = ["v2_74"] }
glycin = { version = "2.1.0-beta", features = ["gdk4"] } glycin = { version = "2.1.0-beta", features = [
"gdk4",
], git = "https://gitlab.gnome.org/GNOME/glycin.git", rev = "08d7799d6c29c544bfe6914d4e7921bbbeb5f3ff" }
gtk = { package = "gtk4", version = "0.9.5", features = [ gtk = { package = "gtk4", version = "0.9.5", features = [
"v4_14", "v4_14",
"xml_validation", "xml_validation",

View file

@ -113,7 +113,7 @@
{ {
"type": "git", "type": "git",
"url": "https://gitlab.gnome.org/GNOME/glycin.git", "url": "https://gitlab.gnome.org/GNOME/glycin.git",
"commit": "52fe5cdb68abf24361ce31c88c2965bd6c203460" "commit": "08d7799d6c29c544bfe6914d4e7921bbbeb5f3ff"
} }
] ]
}, },

View file

@ -351,6 +351,9 @@ mod imp {
log::debug!("Computing edited image."); log::debug!("Computing edited image.");
let result = editor.apply_complete(&operations).await; let result = editor.apply_complete(&operations).await;
match result { match result {
Err(err) if matches!(err.error(), glycin::Error::Canceled(_)) => {
log::debug!("Computing edited image canceled");
}
Err(err) => { Err(err) => {
log::warn!("Failed to edit image: {err}"); log::warn!("Failed to edit image: {err}");
obj.window().show_error( obj.window().show_error(

View file

@ -1,5 +1,4 @@
// Copyright (c) 2024-2025 Sophie Herold // Copyright (c) 2024-2025 Sophie Herold
// Copyright (c) 2025 Rafael Fontenelle
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by