]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Added Application.cleanup method which asks all windows to close
authorJack Jansen <jack.jansen@cwi.nl>
Mon, 23 Dec 1996 17:22:40 +0000 (17:22 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Mon, 23 Dec 1996 17:22:40 +0000 (17:22 +0000)
themselves and returns true if they did.

Mac/Lib/FrameWork.py

index 5741972343e5da91b7049caa430836c7c39ff16b..da07d139224f29ca7df36c7ec2ba5e434ba8aa87 100644 (file)
@@ -115,6 +115,11 @@ class Application:
        def _quit(self, *args):
                self.quitting = 1
                
+       def cleanup(self):
+               for w in self._windows.values():
+                       w.do_close()
+               return self._windows == {}
+               
        def appendwindow(self, wid, window):
                self._windows[wid] = window