From: Jack Jansen Date: Mon, 23 Dec 1996 17:22:40 +0000 (+0000) Subject: Added Application.cleanup method which asks all windows to close X-Git-Tag: v1.5a1~657 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c75e1d052ba7c7fe3a33731e69fdb30a90a9846e;p=thirdparty%2FPython%2Fcpython.git Added Application.cleanup method which asks all windows to close themselves and returns true if they did. --- diff --git a/Mac/Lib/FrameWork.py b/Mac/Lib/FrameWork.py index 5741972343e5..da07d139224f 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