X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3bcd5e1c64a85bee7005dcb65bee98784dad1f0f..74bcba0e3300839a9184ccaacc25dd5c05c1fad3:/wxPython/src/gtk/windows.cpp diff --git a/wxPython/src/gtk/windows.cpp b/wxPython/src/gtk/windows.cpp index f66b8f4562..0d1bd05917 100644 --- a/wxPython/src/gtk/windows.cpp +++ b/wxPython/src/gtk/windows.cpp @@ -446,6 +446,14 @@ static void wxEvtHandler_Connect(wxEvtHandler *self,int id,int lastId,int ev (wxObjectEventFunction) &wxPyCallback::EventThunker, new wxPyCallback(func)); } + else if (func == Py_None) { + self->Disconnect(id, lastId, eventType, + (wxObjectEventFunction) + &wxPyCallback::EventThunker); + } + else { + PyErr_SetString(PyExc_TypeError, "Expected callable object or None."); + } } static PyObject *_wrap_wxEvtHandler_Connect(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1823,18 +1831,12 @@ static PyObject *_wrap_wxWindow_GetFont(PyObject *self, PyObject *args, PyObject } { wxPy_BEGIN_ALLOW_THREADS; - wxFont & _result_ref = wxWindow_GetFont(_arg0); - _result = (wxFont *) &_result_ref; + _result = new wxFont (wxWindow_GetFont(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -4530,13 +4532,13 @@ static PyObject *_wrap_wxWindow_Show(PyObject *self, PyObject *args, PyObject *k PyObject * _resultobj; bool _result; wxWindow * _arg0; - bool _arg1; + bool _arg1 = (bool ) TRUE; PyObject * _argo0 = 0; - int tempbool1; + int tempbool1 = (int) TRUE; char *_kwnames[] = { "self","show", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxWindow_Show",_kwnames,&_argo0,&tempbool1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxWindow_Show",_kwnames,&_argo0,&tempbool1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5000,7 +5002,7 @@ static PyObject *_wrap_wxWindow_GetSizer(PyObject *self, PyObject *args, PyObjec wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -}{ _resultobj = wxPyMake_wxObject(_result); } +}{ _resultobj = wxPyMake_wxSizer(_result); } return _resultobj; }