X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/eb7159455d8967dbfa384e338eb584d09964d3fa..08f6ac314ae712e2bc8fa59cf688e6bcff76181f:/utils/wxPython/src/_extras.py diff --git a/utils/wxPython/src/_extras.py b/utils/wxPython/src/_extras.py index a8a378d381..aa94aefeed 100644 --- a/utils/wxPython/src/_extras.py +++ b/utils/wxPython/src/_extras.py @@ -666,6 +666,8 @@ wxPyDefaultSize.Set(-1,-1) wxDefaultPosition = wxPyDefaultPosition wxDefaultSize = wxPyDefaultSize +# backwards compatibility +wxNoRefBitmap = wxBitmap #---------------------------------------------------------------------- # This helper function will take a wxPython object and convert it to @@ -695,7 +697,8 @@ def wxPyTypeCast(obj, typeStr): newPtr = ptrcast(obj, typeStr+"_p") theClass = globals()[typeStr+"Ptr"] theObj = theClass(newPtr) - theObj.thisown = obj.thisown + if hasattr(obj, "this"): + theObj.thisown = obj.thisown return theObj @@ -780,6 +783,13 @@ class wxApp(wxPyApp): if self.stdioWin != None: self.stdioWin.close() +#---------------------------------------------------------------------------- + +class wxPySimpleApp(wxApp): + def __init__(self): + wxApp.__init__(self, 0) + def OnInit(self): + return true #----------------------------------------------------------------------------