X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fe5e444a73f6d089ba152b7c429128010b961d08..0a5bb138a71dfc1c706fc0858fb2801500e2c2e8:/wxPython/src/_clipbrd.i diff --git a/wxPython/src/_clipbrd.i b/wxPython/src/_clipbrd.i index 8fb471613e..b11ac31e96 100644 --- a/wxPython/src/_clipbrd.i +++ b/wxPython/src/_clipbrd.i @@ -65,7 +65,7 @@ True on success.", ""); - %apply SWIGTYPE *DISOWN { wxDataObject *data }; + %disownarg( wxDataObject *data ); DocDeclStr( virtual bool , AddData( wxDataObject *data ), @@ -84,8 +84,8 @@ do not delete the data explicitly. :see: `wx.DataObject`", ""); - - %clear wxDataObject *data; + %cleardisown( wxDataObject *data ); + DocDeclStr( virtual bool , IsSupported( const wxDataFormat& format ), @@ -113,7 +113,7 @@ exit. Returns False if the operation is unsuccesful for any reason.", ""); DocDeclStr( - virtual void , UsePrimarySelection( bool primary = True ), + virtual void , UsePrimarySelection( bool primary = true ), "On platforms supporting it (the X11 based platforms), selects the so called PRIMARY SELECTION as the clipboard as opposed to the normal clipboard, if primary is True.", ""); @@ -122,6 +122,8 @@ normal clipboard, if primary is True.", ""); DocDeclStr( static wxClipboard *, Get(), "Returns global instance (wxTheClipboard) of the object.", ""); + + %property(Data, GetData, SetData, doc="See `GetData` and `SetData`"); }; @@ -142,7 +144,8 @@ normal clipboard, if primary is True.", ""); self._instance = None def _checkInstance(self): if self._instance is None: - self._instance = self._initfunc(*self._args, **self._kwargs) + if wx.GetApp(): + self._instance = self._initfunc(*self._args, **self._kwargs) def __getattr__(self, name): self._checkInstance() return getattr(self._instance, name)