X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ae8162c88f5708d87e4d5fb78055256a72b5bd78..588066b7a39629e44bb39f1ab436b80f38c13f33:/wxPython/src/gtk/_controls_wrap.cpp?ds=sidebyside diff --git a/wxPython/src/gtk/_controls_wrap.cpp b/wxPython/src/gtk/_controls_wrap.cpp index 094fa27ed9..4b795853cb 100644 --- a/wxPython/src/gtk/_controls_wrap.cpp +++ b/wxPython/src/gtk/_controls_wrap.cpp @@ -793,17 +793,20 @@ public: } DEC_PYCALLBACK_STRING_LONGLONG(OnGetItemText); - DEC_PYCALLBACK_INT_LONG(OnGetItemImage); DEC_PYCALLBACK_LISTATTR_LONG(OnGetItemAttr); + // use the virtual version to avoid a confusing assert in the base class + DEC_PYCALLBACK_INT_LONG_virtual(OnGetItemImage); + PYPRIVATE; }; IMPLEMENT_ABSTRACT_CLASS(wxPyListCtrl, wxListCtrl); IMP_PYCALLBACK_STRING_LONGLONG(wxPyListCtrl, wxListCtrl, OnGetItemText); -IMP_PYCALLBACK_INT_LONG(wxPyListCtrl, wxListCtrl, OnGetItemImage); IMP_PYCALLBACK_LISTATTR_LONG(wxPyListCtrl, wxListCtrl, OnGetItemAttr); +IMP_PYCALLBACK_INT_LONG_virtual(wxPyListCtrl, wxListCtrl, OnGetItemImage); + wxListItem *wxPyListCtrl_GetColumn(wxPyListCtrl *self,int col){ wxListItem item; @@ -22244,7 +22247,7 @@ static PyObject *_wrap_ListCtrl_SetItemImage(PyObject *, PyObject *args, PyObjec wxPyListCtrl *arg1 = (wxPyListCtrl *) 0 ; long arg2 ; int arg3 ; - int arg4 ; + int arg4 = (int) -1 ; bool result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -22254,15 +22257,17 @@ static PyObject *_wrap_ListCtrl_SetItemImage(PyObject *, PyObject *args, PyObjec (char *) "self",(char *) "item",(char *) "image",(char *) "selImage", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:ListCtrl_SetItemImage",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:ListCtrl_SetItemImage",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxPyListCtrl, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; arg2 = (long)SWIG_As_long(obj1); if (PyErr_Occurred()) SWIG_fail; arg3 = (int)SWIG_As_int(obj2); if (PyErr_Occurred()) SWIG_fail; - arg4 = (int)SWIG_As_int(obj3); - if (PyErr_Occurred()) SWIG_fail; + if (obj3) { + arg4 = (int)SWIG_As_int(obj3); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->SetItemImage(arg2,arg3,arg4);