]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/grid_wrap.cpp
Optimized sizers to not call CalcMin more often than neccessary
[wxWidgets.git] / wxPython / src / msw / grid_wrap.cpp
index a3bdc540104518163e1b951545c92741157938d4..d9dda4c5b77d27bd43c8d63b3d57da776e675c2d 100644 (file)
@@ -1252,6 +1252,11 @@ public:
             PyObject* ro;
             ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",row,col));
             if (ro) {
+                if (!PyString_Check(ro) && !PyUnicode_Check(ro)) {
+                    PyObject* old = ro;
+                    ro = PyObject_Str(ro);
+                    Py_DECREF(old);
+                }
                 rval = Py2wxString(ro);
                 Py_DECREF(ro);
             }
@@ -1381,7 +1386,7 @@ bool wxGridCellCoords_helper(PyObject* source, wxGridCellCoords** obj) {
 
 bool wxGridCellCoords_typecheck(PyObject* source) {
     void* ptr;
-    
+
     if (wxPySwigInstance_Check(source) &&
         wxPyConvertSwigPtr(source, (void **)&ptr, wxT("wxGridCellCoords")))
         return True;
@@ -1389,7 +1394,7 @@ bool wxGridCellCoords_typecheck(PyObject* source) {
     PyErr_Clear();
     if (PySequence_Check(source) && PySequence_Length(source) == 2)
         return True;
-    
+
     return False;
 }
 
@@ -4779,6 +4784,32 @@ static PyObject *_wrap_GridCellAttr_IsReadOnly(PyObject *self, PyObject *args, P
 }
 
 
+static PyObject *_wrap_GridCellAttr_GetKind(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject *resultobj;
+    wxGridCellAttr *arg1 = (wxGridCellAttr *) 0 ;
+    int result;
+    PyObject * obj0 = 0 ;
+    char *kwnames[] = {
+        (char *) "self", NULL 
+    };
+    
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:GridCellAttr_GetKind",kwnames,&obj0)) goto fail;
+    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGridCellAttr,
+    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+    {
+        PyThreadState* __tstate = wxPyBeginAllowThreads();
+        result = (int)(arg1)->GetKind();
+        
+        wxPyEndAllowThreads(__tstate);
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    resultobj = SWIG_FromInt((int)result);
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
 static PyObject *_wrap_GridCellAttr_SetDefAttr(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxGridCellAttr *arg1 = (wxGridCellAttr *) 0 ;
@@ -15710,6 +15741,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"GridCellAttr_GetRenderer", (PyCFunction) _wrap_GridCellAttr_GetRenderer, METH_VARARGS | METH_KEYWORDS },
         { (char *)"GridCellAttr_GetEditor", (PyCFunction) _wrap_GridCellAttr_GetEditor, METH_VARARGS | METH_KEYWORDS },
         { (char *)"GridCellAttr_IsReadOnly", (PyCFunction) _wrap_GridCellAttr_IsReadOnly, METH_VARARGS | METH_KEYWORDS },
+        { (char *)"GridCellAttr_GetKind", (PyCFunction) _wrap_GridCellAttr_GetKind, METH_VARARGS | METH_KEYWORDS },
         { (char *)"GridCellAttr_SetDefAttr", (PyCFunction) _wrap_GridCellAttr_SetDefAttr, METH_VARARGS | METH_KEYWORDS },
         { (char *)"GridCellAttr_swigregister", GridCellAttr_swigregister, METH_VARARGS },
         { (char *)"new_GridCellAttrProvider", (PyCFunction) _wrap_new_GridCellAttrProvider, METH_VARARGS | METH_KEYWORDS },