Changed the logic of app.quit accelerator, introduced a dialog in it.

Also made functions such is_save_senstive() and save_overwrite()
publicly accessible for logic building.

Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/576>
This commit is contained in:
Abhinandan Thakur 2026-02-19 12:16:05 +05:30 • committed by Marge Bot
parent f2d4fa6e0d
commit eb4e5c469a
3 changed files with 14 additions and 9 deletions

View file

@ -25,6 +25,7 @@ use glycin::Operations;
use super::LpImage;
use super::edit::LpEditCrop;
use crate::LpApplication;
use crate::deps::*;
use crate::util::ErrorType;
use crate::util::gettext::*;
@ -489,12 +490,15 @@ impl LpEditWindow {
self.imp().is_save_sensitive()
}
pub fn save_as(&self) {
pub fn save_as_and_quit(&self, app: LpApplication) {
glib::spawn_future_local(glib::clone!(
#[weak(rename_to=win)]
self,
#[strong]
app,
async move {
win.imp().save_overwrite().await;
app.quit()
}
));
}