]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp
changed background color reference from light gray to assigned bkgd color
[wxWidgets.git] / wxPython / contrib / gizmos / gtk / gizmos_wrap.cpp
index a1be92de781ec9a48144b3cd78d18c2b9873ea18..8a54bffbe560b188d222137df3815608ed58172c 100644 (file)
@@ -1037,7 +1037,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj)
          PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
                       type, otype);
        }
-       Py_DECREF(str);
+       if (str)
+          Py_DECREF(str);
        return;
       }
     }   
@@ -2521,15 +2522,11 @@ static PyObject *_wrap_EditableListBox_SetStrings(PyObject *, PyObject *args, Py
         int i, len=PySequence_Length(obj1);
         for (i=0; i<len; i++) {
             PyObject* item = PySequence_GetItem(obj1, i);
-#if wxUSE_UNICODE
-            PyObject* str  = PyObject_Unicode(item);
-#else
-            PyObject* str  = PyObject_Str(item);
-#endif
+            wxString* s = wxString_in_helper(item);
             if (PyErr_Occurred())  SWIG_fail;
-            arg2->Add(Py2wxString(str));
+            arg2->Add(*s);
+            delete s;
             Py_DECREF(item);
-            Py_DECREF(str);
         }
     }
     {