X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c370783e915cbf999619624ee6a082e99b028981..fc71d09b42c69406f1b5da07cef9924807557a23:/wxPython/contrib/gizmos/mac/gizmos_wrap.cpp?ds=sidebyside diff --git a/wxPython/contrib/gizmos/mac/gizmos_wrap.cpp b/wxPython/contrib/gizmos/mac/gizmos_wrap.cpp index a19ffa4097..fa24918ad0 100644 --- a/wxPython/contrib/gizmos/mac/gizmos_wrap.cpp +++ b/wxPython/contrib/gizmos/mac/gizmos_wrap.cpp @@ -476,8 +476,8 @@ public: bool blocked = wxPyBeginBlockThreads(); if ((found = wxPyCBH_findCallback(m_myInst, "DrawItem"))) { PyObject* dcobj = wxPyMake_wxObject(&dc,false); - PyObject* idobj = wxPyConstructObject((void*)&id, wxT("wxTreeItemId"), False); - PyObject* recobj= wxPyConstructObject((void*)&rect, wxT("wxRect"), False); + PyObject* idobj = wxPyConstructObject((void*)&id, wxT("wxTreeItemId"), false); + PyObject* recobj= wxPyConstructObject((void*)&rect, wxT("wxRect"), false); wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOO)", dcobj, idobj, recobj)); Py_DECREF(dcobj); Py_DECREF(idobj); @@ -755,7 +755,7 @@ PyObject *wxPyTreeListCtrl_GetSelections(wxPyTreeListCtrl *self){ num = self->GetSelections(array); for (x=0; x < num; x++) { wxTreeItemId *tii = new wxTreeItemId(array.Item(x)); - PyObject* item = wxPyConstructObject((void*)tii, wxT("wxTreeItemId"), True); + PyObject* item = wxPyConstructObject((void*)tii, wxT("wxTreeItemId"), true); PyList_Append(rval, item); } wxPyEndBlockThreads(blocked); @@ -766,7 +766,7 @@ PyObject *wxPyTreeListCtrl_GetFirstChild(wxPyTreeListCtrl *self,wxTreeItemId con wxTreeItemId* ritem = new wxTreeItemId(self->GetFirstChild(item, cookie)); bool blocked = wxPyBeginBlockThreads(); PyObject* tup = PyTuple_New(2); - PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), True)); + PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), true)); PyTuple_SET_ITEM(tup, 1, wxPyMakeSwigPtr(cookie, wxT("void"))); wxPyEndBlockThreads(blocked); return tup; @@ -775,7 +775,7 @@ PyObject *wxPyTreeListCtrl_GetNextChild(wxPyTreeListCtrl *self,wxTreeItemId cons wxTreeItemId* ritem = new wxTreeItemId(self->GetNextChild(item, cookie)); bool blocked = wxPyBeginBlockThreads(); PyObject* tup = PyTuple_New(2); - PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), True)); + PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), true)); PyTuple_SET_ITEM(tup, 1, wxPyMakeSwigPtr(cookie, wxT("void"))); wxPyEndBlockThreads(blocked); return tup; @@ -790,11 +790,12 @@ PyObject *wxPyTreeListCtrl_GetNextChild(wxPyTreeListCtrl *self,wxTreeItemId cons } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } o3 = PyTuple_New(1); PyTuple_SetItem(o3, 0, o); @@ -804,7 +805,7 @@ PyObject *wxPyTreeListCtrl_GetNextChild(wxPyTreeListCtrl *self,wxTreeItemId cons Py_DECREF(o3); } return target; -} + } PyObject *wxPyTreeListCtrl_GetBoundingRect(wxPyTreeListCtrl *self,wxTreeItemId const &item,bool textOnly){ @@ -963,7 +964,7 @@ static PyObject *_wrap_new_DynamicSashWindow(PyObject *, PyObject *args, PyObjec wxDynamicSashWindow *result; wxPoint temp3 ; wxSize temp4 ; - bool temp6 = False ; + bool temp6 = false ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; @@ -1001,7 +1002,7 @@ static PyObject *_wrap_new_DynamicSashWindow(PyObject *, PyObject *args, PyObjec { arg6 = wxString_in_helper(obj5); if (arg6 == NULL) SWIG_fail; - temp6 = True; + temp6 = true; } } { @@ -1065,7 +1066,7 @@ static PyObject *_wrap_DynamicSashWindow_Create(PyObject *, PyObject *args, PyOb bool result; wxPoint temp4 ; wxSize temp5 ; - bool temp7 = False ; + bool temp7 = false ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; @@ -1106,7 +1107,7 @@ static PyObject *_wrap_DynamicSashWindow_Create(PyObject *, PyObject *args, PyOb { arg7 = wxString_in_helper(obj6); if (arg7 == NULL) SWIG_fail; - temp7 = True; + temp7 = true; } } { @@ -1214,10 +1215,10 @@ static PyObject *_wrap_new_EditableListBox(PyObject *, PyObject *args, PyObject wxString const &arg7_defvalue = wxPyEditableListBoxNameStr ; wxString *arg7 = (wxString *) &arg7_defvalue ; wxEditableListBox *result; - bool temp3 = False ; + bool temp3 = false ; wxPoint temp4 ; wxSize temp5 ; - bool temp7 = False ; + bool temp7 = false ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; @@ -1240,7 +1241,7 @@ static PyObject *_wrap_new_EditableListBox(PyObject *, PyObject *args, PyObject { arg3 = wxString_in_helper(obj2); if (arg3 == NULL) SWIG_fail; - temp3 = True; + temp3 = true; } } if (obj3) { @@ -1263,7 +1264,7 @@ static PyObject *_wrap_new_EditableListBox(PyObject *, PyObject *args, PyObject { arg7 = wxString_in_helper(obj6); if (arg7 == NULL) SWIG_fail; - temp7 = True; + temp7 = true; } } { @@ -1301,7 +1302,7 @@ static PyObject *_wrap_EditableListBox_SetStrings(PyObject *, PyObject *args, Py PyObject *resultobj; wxEditableListBox *arg1 = (wxEditableListBox *) 0 ; wxArrayString *arg2 = 0 ; - bool temp2 = False ; + bool temp2 = false ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *kwnames[] = { @@ -1317,7 +1318,7 @@ static PyObject *_wrap_EditableListBox_SetStrings(PyObject *, PyObject *args, Py SWIG_fail; } arg2 = new wxArrayString; - temp2 = True; + temp2 = true; int i, len=PySequence_Length(obj1); for (i=0; i