mirror of https://github.com/python/cpython
Added Application.cleanup method which asks all windows to close
themselves and returns true if they did.
This commit is contained in:
parent
81aa0e2888
commit
c75e1d052b
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue