X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5647b95a6620f7792620528aaa1795812eac1162..d1b736b7968ceea4233f3fceecdb01173f68a9a3:/wxPython/src/helpers.cpp diff --git a/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp index c38e2f3648..a99061c732 100644 --- a/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -297,6 +297,17 @@ void wxPyApp::MacOpenFile(const wxString &fileName) wxPyEndBlockThreads(blocked); } +void wxPyApp::MacOpenURL(const wxString &url) +{ + wxPyBlock_t blocked = wxPyBeginBlockThreads(); + if (wxPyCBH_findCallback(m_myInst, "MacOpenURL")) { + PyObject* s = wx2PyString(url); + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", s)); + Py_DECREF(s); + } + wxPyEndBlockThreads(blocked); +} + void wxPyApp::MacPrintFile(const wxString &fileName) { wxPyBlock_t blocked = wxPyBeginBlockThreads(); @@ -831,6 +842,7 @@ void wxPyOORClientData_dtor(wxPyOORClientData* self) { //Py_INCREF(deadObjectClass); Py_DECREF(klass); Py_DECREF(name); + Py_DECREF(dict); } } @@ -2524,6 +2536,17 @@ bool wxPoint_helper(PyObject* source, wxPoint** obj) +bool wxPosition_helper(PyObject* source, wxPosition** obj) +{ + if (source == Py_None) { + **obj = wxPosition(-1,-1); + return true; + } + return wxPyTwoIntItem_helper(source, obj, wxT("wxPosition")); +} + + + bool wxRealPoint_helper(PyObject* source, wxRealPoint** obj) { if (source == Py_None) {