[devhelp] App: simplify the quit GAction implementation



commit 18006d9e34661096704af440473af89148afc8da
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun Dec 17 19:22:59 2017 +0100

    App: simplify the quit GAction implementation

 src/dh-app.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/src/dh-app.c b/src/dh-app.c
index 09552dd..e8d6b84 100644
--- a/src/dh-app.c
+++ b/src/dh-app.c
@@ -116,13 +116,8 @@ quit_cb (GSimpleAction *action,
          gpointer       user_data)
 {
         DhApp *app = DH_APP (user_data);
-        GList *l;
 
-        /* Remove all windows registered in the application */
-        while ((l = gtk_application_get_windows (GTK_APPLICATION (app)))) {
-                gtk_application_remove_window (GTK_APPLICATION (app),
-                                               GTK_WINDOW (l->data));
-        }
+        g_application_quit (G_APPLICATION (app));
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]