A fix for Python 2.2 which can sometimes call __wxCleanup before all

the other wxPython objects have been deleted.

Other various things to match recent CVS changes in wx.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14163 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-02-12 21:28:41 +00:00
parent a3215b22a3
commit be43cc441a
9 changed files with 123 additions and 17 deletions

View File

@@ -98,6 +98,9 @@ def EVT_INIT_DIALOG(win, func):
def EVT_SYS_COLOUR_CHANGED(win, func):
win.Connect(-1, -1, wxEVT_SYS_COLOUR_CHANGED, func)
def EVT_DISPLAY_CHANGED(win, func):
win.Connect(-1, -1, wxEVT_DISPLAY_CHANGED, func)
def EVT_SHOW(win, func):
win.Connect(-1, -1, wxEVT_SHOW, func)
@@ -772,13 +775,20 @@ class wxPyWidgetTester(wxApp):
# unloaded, the refcount on __cleanMeUp goes to zero and it calls the
# wxApp_CleanUp function.
class __wxPyCleanup:
def __init__(self):
self.cleanup = wxc.wxApp_CleanUp
def __del__(self):
self.cleanup()
## class __wxPyCleanup:
## def __init__(self):
## self.cleanup = wxc.wxApp_CleanUp
## def __del__(self):
## self.cleanup()
## __cleanMeUp = __wxPyCleanup()
if sys.version[0] == '2':
import atexit
atexit.register(wxc.wxApp_CleanUp)
else:
sys.exitfunc = wxc.wxApp_CleanUp
__cleanMeUp = __wxPyCleanup()
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------