X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/86a12675f1ecd20a9d1da1710619bb69462b9065..53663be8a5ea8e1c6f178839209b67e8228e4642:/wxPython/src/msw/windows2.py diff --git a/wxPython/src/msw/windows2.py b/wxPython/src/msw/windows2.py index f985011582..b263d3c4c7 100644 --- a/wxPython/src/msw/windows2.py +++ b/wxPython/src/msw/windows2.py @@ -249,9 +249,12 @@ class wxTaskBarIconPtr(wxEvtHandlerPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,windows2c=windows2c): - if self.thisown == 1 : - windows2c.delete_wxTaskBarIcon(self) + def __del__(self, delfunc=windows2c.delete_wxTaskBarIcon): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def SetIcon(self, *_args, **_kwargs): val = apply(windows2c.wxTaskBarIcon_SetIcon,(self,) + _args, _kwargs) return val @@ -342,6 +345,12 @@ class wxPyWindowPtr(wxWindowPtr): val = apply(windows2c.wxPyWindow_base_GetMaxSize,(self,) + _args, _kwargs) if val: val = wxSizePtr(val) ; val.thisown = 1 return val + def base_AddChild(self, *_args, **_kwargs): + val = apply(windows2c.wxPyWindow_base_AddChild,(self,) + _args, _kwargs) + return val + def base_RemoveChild(self, *_args, **_kwargs): + val = apply(windows2c.wxPyWindow_base_RemoveChild,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxPyWindow(wxPyWindowPtr): @@ -412,6 +421,12 @@ class wxPyControlPtr(wxControlPtr): val = apply(windows2c.wxPyControl_base_GetMaxSize,(self,) + _args, _kwargs) if val: val = wxSizePtr(val) ; val.thisown = 1 return val + def base_AddChild(self, *_args, **_kwargs): + val = apply(windows2c.wxPyControl_base_AddChild,(self,) + _args, _kwargs) + return val + def base_RemoveChild(self, *_args, **_kwargs): + val = apply(windows2c.wxPyControl_base_RemoveChild,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxPyControl(wxPyControlPtr): @@ -482,6 +497,12 @@ class wxPyPanelPtr(wxPanelPtr): val = apply(windows2c.wxPyPanel_base_GetMaxSize,(self,) + _args, _kwargs) if val: val = wxSizePtr(val) ; val.thisown = 1 return val + def base_AddChild(self, *_args, **_kwargs): + val = apply(windows2c.wxPyPanel_base_AddChild,(self,) + _args, _kwargs) + return val + def base_RemoveChild(self, *_args, **_kwargs): + val = apply(windows2c.wxPyPanel_base_RemoveChild,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxPyPanel(wxPyPanelPtr):