From 425e9cb2df9a847d42b287d9b18ea848176d8f35 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 28 Jul 2003 16:01:26 +0000 Subject: [PATCH] Release ownersihp of the image list in the Assign*ImageList methods git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@22344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/contrib/gizmos/gizmos.i | 6 ++++++ wxPython/contrib/gizmos/gizmos.py | 3 +++ 2 files changed, 9 insertions(+) diff --git a/wxPython/contrib/gizmos/gizmos.i b/wxPython/contrib/gizmos/gizmos.i index e677f65e8c..ba673eba1d 100644 --- a/wxPython/contrib/gizmos/gizmos.i +++ b/wxPython/contrib/gizmos/gizmos.i @@ -553,9 +553,15 @@ public: void SetImageList(wxImageList *imageList); void SetStateImageList(wxImageList *imageList); void SetButtonsImageList(wxImageList *imageList); + void AssignImageList(wxImageList *imageList); + %pragma(python) addtomethod = "AssignImageList:_args[0].thisown = 0" + void AssignStateImageList(wxImageList *imageList); + %pragma(python) addtomethod = "AssignStateImageList:_args[0].thisown = 0" + void AssignButtonsImageList(wxImageList *imageList); + %pragma(python) addtomethod = "AssignButtonsImageList:_args[0].thisown = 0" diff --git a/wxPython/contrib/gizmos/gizmos.py b/wxPython/contrib/gizmos/gizmos.py index 9ad14b4827..bbd10067db 100644 --- a/wxPython/contrib/gizmos/gizmos.py +++ b/wxPython/contrib/gizmos/gizmos.py @@ -375,12 +375,15 @@ class wxTreeListCtrlPtr(wxControlPtr): return val def AssignImageList(self, *_args, **_kwargs): val = gizmosc.wxTreeListCtrl_AssignImageList(self, *_args, **_kwargs) + _args[0].thisown = 0 return val def AssignStateImageList(self, *_args, **_kwargs): val = gizmosc.wxTreeListCtrl_AssignStateImageList(self, *_args, **_kwargs) + _args[0].thisown = 0 return val def AssignButtonsImageList(self, *_args, **_kwargs): val = gizmosc.wxTreeListCtrl_AssignButtonsImageList(self, *_args, **_kwargs) + _args[0].thisown = 0 return val def AddColumn(self, *_args, **_kwargs): val = gizmosc.wxTreeListCtrl_AddColumn(self, *_args, **_kwargs)