From c75e1d052ba7c7fe3a33731e69fdb30a90a9846e Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 23 Dec 1996 17:22:40 +0000 Subject: Added Application.cleanup method which asks all windows to close themselves and returns true if they did. --- Mac/Lib/FrameWork.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Mac/Lib/FrameWork.py b/Mac/Lib/FrameWork.py index 5741972..da07d13 100644 --- a/Mac/Lib/FrameWork.py +++ b/Mac/Lib/FrameWork.py @@ -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 -- cgit v0.12