parent
cfd33fa2dd
commit
83b2c7cae1
4 changed files with 18 additions and 16 deletions
|
|
@ -359,7 +359,7 @@ impl LpEditCrop {
|
|||
|
||||
fn handle_error(&self, res: Result<(), EditingError>) {
|
||||
if let Err(err) = res {
|
||||
self.window().show_error(
|
||||
self.window_show_error(
|
||||
&gettext("Failed to Edit Image"),
|
||||
&format!("Failed to edit image: {err}"),
|
||||
ErrorType::General,
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ mod imp {
|
|||
if let Some(cancellable) = obj.imp().save_cancellable.replace(None) {
|
||||
cancellable.cancel();
|
||||
}
|
||||
obj.window().show_image();
|
||||
obj.window_inspect(|w| w.show_image());
|
||||
}
|
||||
|
||||
async fn save_copy(&self) {
|
||||
|
|
@ -232,7 +232,7 @@ mod imp {
|
|||
|
||||
file_dialog.set_initial_file(Some(&suggested_file));
|
||||
|
||||
match file_dialog.save_future(Some(&obj.window())).await {
|
||||
match file_dialog.save_future(obj.try_window().as_ref()).await {
|
||||
Err(err) => {
|
||||
log::error!("{}", err);
|
||||
}
|
||||
|
|
@ -241,7 +241,7 @@ mod imp {
|
|||
.save(current_file, new_file.clone(), cancellable.clone())
|
||||
.await
|
||||
{
|
||||
obj.window().show_specific_image(new_file);
|
||||
obj.window_inspect(|w| w.show_specific_image(new_file));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -290,7 +290,7 @@ mod imp {
|
|||
log::debug!("Trashing image canceled");
|
||||
return;
|
||||
} else if let Ok(Err(err)) = trash_result {
|
||||
obj.window().show_error(
|
||||
obj.window_show_error(
|
||||
&gettext("Failed to save image."),
|
||||
&format!("Failed to move image {current_path:?} to trash and therefore couldn't save image: {err}"),
|
||||
ErrorType::General,
|
||||
|
|
@ -316,7 +316,7 @@ mod imp {
|
|||
log::debug!("Moving image canceled");
|
||||
return;
|
||||
} else if let Ok(Err(err)) = move_result {
|
||||
obj.window().show_error(
|
||||
obj.window_show_error(
|
||||
&gettext("Failed to save image."),
|
||||
&format!(
|
||||
"Failed to move image image to {current_path:?}: {err} move {:?} to {:?}", tmp_file.path().unwrap(), original_file.path().unwrap()
|
||||
|
|
@ -326,7 +326,7 @@ mod imp {
|
|||
return;
|
||||
}
|
||||
|
||||
obj.window().show_specific_image(original_file);
|
||||
obj.window_inspect(|w| w.show_specific_image(original_file));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -363,7 +363,7 @@ mod imp {
|
|||
}
|
||||
Err(err) => {
|
||||
log::warn!("Failed to edit image: {err}");
|
||||
obj.window().show_error(
|
||||
obj.window_show_error(
|
||||
&gettext("Failed to edit image."),
|
||||
&format!("Failed to edit image:\n\n{err}\n\n{operations:#?}"),
|
||||
ErrorType::Loader,
|
||||
|
|
@ -373,7 +373,7 @@ mod imp {
|
|||
log::debug!("Saving edited image to '{}'", new_file.uri());
|
||||
match edit.data().get() {
|
||||
Err(err) => {
|
||||
obj.window().show_error(
|
||||
obj.window_show_error(
|
||||
&gettext("Failed to Save Image"),
|
||||
&format!("Failed to get binary data: {err}"),
|
||||
ErrorType::General,
|
||||
|
|
@ -396,7 +396,7 @@ mod imp {
|
|||
if save_result.is_err() {
|
||||
log::debug!("Saving image canceled");
|
||||
} else if let Ok(Err(err)) = save_result {
|
||||
obj.window().show_error(
|
||||
obj.window_show_error(
|
||||
&gettext("Failed to Save Image"),
|
||||
&format!("Failed to write file:\n\n{err:?}"),
|
||||
ErrorType::General,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue