[meld] meldapp: Ensure that quit gets called when no windows remain (#565)



commit 726f0db999e8342250bf76788f82acab4db7061c
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Apr 25 09:28:20 2021 +1000

    meldapp: Ensure that quit gets called when no windows remain (#565)

 meld/meldapp.py | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/meld/meldapp.py b/meld/meldapp.py
index 128c1ec2..684b7a2f 100644
--- a/meld/meldapp.py
+++ b/meld/meldapp.py
@@ -104,6 +104,11 @@ class MeldApp(Gtk.Application):
         self.activate()
         return 0
 
+    def do_window_removed(self, widget):
+        Gtk.Application.do_window_removed(self, widget)
+        if not len(self.get_windows()):
+            self.quit()
+
     # We can't override do_local_command_line because it has no introspection
     # annotations: https://bugzilla.gnome.org/show_bug.cgi?id=687912
 


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