edit_window: Don't show saving overlay after error
This commit is contained in:
parent
6ae58ab02b
commit
e25473ab3b
2 changed files with 7 additions and 0 deletions
1
news.d/51.alpha/fixed-editing-overlay-afer-error
Normal file
1
news.d/51.alpha/fixed-editing-overlay-afer-error
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Don't keep showing saving overlay after error. !597
|
||||||
|
|
@ -279,6 +279,7 @@ mod imp {
|
||||||
|
|
||||||
if written {
|
if written {
|
||||||
tracing::debug!("Moving image to trash '{}'", original_file.uri());
|
tracing::debug!("Moving image to trash '{}'", original_file.uri());
|
||||||
|
self.set_saving_status(Some(gettext("Moving Original to Trash")));
|
||||||
let trash_result = gio::CancellableFuture::new(
|
let trash_result = gio::CancellableFuture::new(
|
||||||
original_file.trash_future(glib::Priority::DEFAULT),
|
original_file.trash_future(glib::Priority::DEFAULT),
|
||||||
cancellable.clone(),
|
cancellable.clone(),
|
||||||
|
|
@ -288,6 +289,7 @@ mod imp {
|
||||||
if trash_result.is_err() {
|
if trash_result.is_err() {
|
||||||
// Canceled
|
// Canceled
|
||||||
tracing::debug!("Trashing image canceled");
|
tracing::debug!("Trashing image canceled");
|
||||||
|
self.set_saving_status(None);
|
||||||
return Err(());
|
return Err(());
|
||||||
} else if let Ok(Err(err)) = trash_result {
|
} else if let Ok(Err(err)) = trash_result {
|
||||||
obj.window_show_error(
|
obj.window_show_error(
|
||||||
|
|
@ -295,10 +297,12 @@ mod imp {
|
||||||
&format!("Failed to move image {current_path:?} to trash and therefore couldn't save image: {err}"),
|
&format!("Failed to move image {current_path:?} to trash and therefore couldn't save image: {err}"),
|
||||||
ErrorType::General,
|
ErrorType::General,
|
||||||
);
|
);
|
||||||
|
self.set_saving_status(None);
|
||||||
return Err(());
|
return Err(());
|
||||||
}
|
}
|
||||||
|
|
||||||
tracing::debug!("Moving '{}' to '{}'", tmp_file.uri(), original_file.uri());
|
tracing::debug!("Moving '{}' to '{}'", tmp_file.uri(), original_file.uri());
|
||||||
|
self.set_saving_status(Some(gettext("Finalizing Save Operation")));
|
||||||
let move_result = gio::CancellableFuture::new(
|
let move_result = gio::CancellableFuture::new(
|
||||||
tmp_file
|
tmp_file
|
||||||
.move_future(
|
.move_future(
|
||||||
|
|
@ -314,6 +318,7 @@ mod imp {
|
||||||
if move_result.is_err() {
|
if move_result.is_err() {
|
||||||
// Canceled
|
// Canceled
|
||||||
tracing::debug!("Moving image canceled");
|
tracing::debug!("Moving image canceled");
|
||||||
|
self.set_saving_status(None);
|
||||||
return Err(());
|
return Err(());
|
||||||
} else if let Ok(Err(err)) = move_result {
|
} else if let Ok(Err(err)) = move_result {
|
||||||
obj.window_show_error(
|
obj.window_show_error(
|
||||||
|
|
@ -323,6 +328,7 @@ mod imp {
|
||||||
),
|
),
|
||||||
ErrorType::General,
|
ErrorType::General,
|
||||||
);
|
);
|
||||||
|
self.set_saving_status(None);
|
||||||
return Err(());
|
return Err(());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue