X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2abc0a0f9bf1a1c4fb3e807be687850949603e5c..ab857a4ed6687929e308ea606f65ceedc43d1319:/utils/wxPython/src/_extras.py diff --git a/utils/wxPython/src/_extras.py b/utils/wxPython/src/_extras.py index 068413ea1b..a8a378d381 100644 --- a/utils/wxPython/src/_extras.py +++ b/utils/wxPython/src/_extras.py @@ -152,6 +152,9 @@ def EVT_IDLE(win, func): def EVT_UPDATE_UI(win, id, func): win.Connect(id, -1, wxEVT_UPDATE_UI, func) +def EVT_UPDATE_UI_RANGE(win, id, id2, func): + win.Connect(id, id2, wxEVT_UPDATE_UI, func) + # Mouse Events def EVT_LEFT_DOWN(win, func): @@ -781,7 +784,16 @@ class wxApp(wxPyApp): #---------------------------------------------------------------------------- # DO NOT hold any other references to this object. This is how we know when -# to cleanup system resources that wxWin is holding... +# to cleanup system resources that wxWin is holding. When this module is +# 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() + __cleanMeUp = __wxPyCleanup() #----------------------------------------------------------------------------