X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c368d904fc27d35ae1e533155e2154dc496432e4..cd72551c2b6cbf67a4a5caf0ba00ba64e41183b2:/wxPython/src/msw/filesys.py diff --git a/wxPython/src/msw/filesys.py b/wxPython/src/msw/filesys.py index b0f442faea..aa62469411 100644 --- a/wxPython/src/msw/filesys.py +++ b/wxPython/src/msw/filesys.py @@ -24,7 +24,7 @@ def wxMemoryFSHandler_AddFile(filename, a, b=''): __wxMemoryFSHandler_AddFile_Data(filename, a) else: raise TypeError, 'wxImage, wxBitmap or string expected' -class wxFSFilePtr : +class wxFSFilePtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -54,7 +54,7 @@ class wxFSFile(wxFSFilePtr): -class wxCPPFileSystemHandlerPtr : +class wxCPPFileSystemHandlerPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -71,15 +71,14 @@ class wxFileSystemHandlerPtr(wxCPPFileSystemHandlerPtr): def __init__(self,this): self.this = this self.thisown = 0 - def _setSelf(self, *_args, **_kwargs): - val = apply(filesysc.wxFileSystemHandler__setSelf,(self,) + _args, _kwargs) + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler__setCallbackInfo,(self,) + _args, _kwargs) return val def CanOpen(self, *_args, **_kwargs): val = apply(filesysc.wxFileSystemHandler_CanOpen,(self,) + _args, _kwargs) return val def OpenFile(self, *_args, **_kwargs): val = apply(filesysc.wxFileSystemHandler_OpenFile,(self,) + _args, _kwargs) - if val: val = wxFSFilePtr(val) return val def FindFirst(self, *_args, **_kwargs): val = apply(filesysc.wxFileSystemHandler_FindFirst,(self,) + _args, _kwargs) @@ -108,12 +107,12 @@ class wxFileSystemHandler(wxFileSystemHandlerPtr): def __init__(self,*_args,**_kwargs): self.this = apply(filesysc.new_wxFileSystemHandler,_args,_kwargs) self.thisown = 1 - self._setSelf(self, wxFileSystemHandler) + self._setCallbackInfo(self, wxFileSystemHandler) -class wxFileSystemPtr : +class wxFileSystemPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -125,7 +124,6 @@ class wxFileSystemPtr : return val def OpenFile(self, *_args, **_kwargs): val = apply(filesysc.wxFileSystem_OpenFile,(self,) + _args, _kwargs) - if val: val = wxFSFilePtr(val) return val def FindFirst(self, *_args, **_kwargs): val = apply(filesysc.wxFileSystem_FindFirst,(self,) + _args, _kwargs) @@ -152,7 +150,6 @@ class wxInternetFSHandlerPtr(wxCPPFileSystemHandlerPtr): return val def OpenFile(self, *_args, **_kwargs): val = apply(filesysc.wxInternetFSHandler_OpenFile,(self,) + _args, _kwargs) - if val: val = wxFSFilePtr(val) return val def __repr__(self): return "" % (self.this,) @@ -173,7 +170,6 @@ class wxZipFSHandlerPtr(wxCPPFileSystemHandlerPtr): return val def OpenFile(self, *_args, **_kwargs): val = apply(filesysc.wxZipFSHandler_OpenFile,(self,) + _args, _kwargs) - if val: val = wxFSFilePtr(val) return val def FindFirst(self, *_args, **_kwargs): val = apply(filesysc.wxZipFSHandler_FindFirst,(self,) + _args, _kwargs) @@ -200,7 +196,6 @@ class wxMemoryFSHandlerPtr(wxCPPFileSystemHandlerPtr): return val def OpenFile(self, *_args, **_kwargs): val = apply(filesysc.wxMemoryFSHandler_OpenFile,(self,) + _args, _kwargs) - if val: val = wxFSFilePtr(val) return val def FindFirst(self, *_args, **_kwargs): val = apply(filesysc.wxMemoryFSHandler_FindFirst,(self,) + _args, _kwargs)