[recipes] app menu: Use same code path for Quit
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] app menu: Use same code path for Quit
- Date: Sun, 12 Mar 2017 02:07:32 +0000 (UTC)
commit c74519fea7a5a373fc5339cc400aeba3591f2f4e
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Mar 11 19:40:41 2017 -0500
app menu: Use same code path for Quit
Use the same code path as the window close button for
the app.quit action, so we get the confirmation dialog
for unsaved changes in this case as well.
src/gr-app.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/gr-app.c b/src/gr-app.c
index 90aedbc..c8aa649 100644
--- a/src/gr-app.c
+++ b/src/gr-app.c
@@ -138,7 +138,10 @@ quit_activated (GSimpleAction *action,
GVariant *parameter,
gpointer app)
{
- g_application_quit (G_APPLICATION (app));
+ GtkWindow *win;
+
+ win = gtk_application_get_active_window (GTK_APPLICATION (app));
+ gtk_window_close (win);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]