X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8668c242808de89b9a8debf2b5a8e62d46e10972..49bffb1482cd2a6a30b38280f6c9bffc72dbfe42:/wxPython/src/_dnd.i diff --git a/wxPython/src/_dnd.i b/wxPython/src/_dnd.i index 19a9494430..cf7c3c84b9 100644 --- a/wxPython/src/_dnd.i +++ b/wxPython/src/_dnd.i @@ -118,7 +118,7 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyDropTarget, wxDropTarget, OnDrop); %name(DropTarget) class wxPyDropTarget // : public wxDropTarget { public: - %addtofunc wxPyDropTarget + %pythonAppend wxPyDropTarget "self._setCallbackInfo(self, DropTarget)" %apply SWIGTYPE *DISOWN { wxDataObject *dataObject }; @@ -180,7 +180,7 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyTextDropTarget, wxTextDropTarget, OnDrop); %name(TextDropTarget) class wxPyTextDropTarget : public wxPyDropTarget { public: - %addtofunc wxPyTextDropTarget "self._setCallbackInfo(self, TextDropTarget)" + %pythonAppend wxPyTextDropTarget "self._setCallbackInfo(self, TextDropTarget)" wxPyTextDropTarget(); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -217,13 +217,13 @@ public: bool wxPyFileDropTarget::OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames) { bool rval = False; - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); if (wxPyCBH_findCallback(m_myInst, "OnDropFiles")) { PyObject* list = wxArrayString2PyList_helper(filenames); rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)",x,y,list)); Py_DECREF(list); } - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); return rval; } @@ -241,7 +241,7 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyFileDropTarget, wxFileDropTarget, OnDrop); %name(FileDropTarget) class wxPyFileDropTarget : public wxPyDropTarget { public: - %addtofunc wxPyFileDropTarget "self._setCallbackInfo(self, FileDropTarget)" + %pythonAppend wxPyFileDropTarget "self._setCallbackInfo(self, FileDropTarget)" wxPyFileDropTarget(); void _setCallbackInfo(PyObject* self, PyObject* _class);