]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/grid_wrap.cpp
Enable TaskBarIcon for Mac too. Some cleanup.
[wxWidgets.git] / wxPython / src / gtk / grid_wrap.cpp
index 90afbcb962061b51265b4e7e7d986d9c05d0ad86..1bbfcd6ef168d880fc85c2bb8f1d0f19c6bac9ed 100644 (file)
@@ -1203,11 +1203,12 @@ void wxGridCellAttr__setOORInfo(wxGridCellAttr *self,PyObject *_self){
     } 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);      
 
@@ -1217,7 +1218,7 @@ void wxGridCellAttr__setOORInfo(wxGridCellAttr *self,PyObject *_self){
         Py_DECREF(o3);
     }
     return target;
-}
+  }
 
 
 void wxGridCellAttrProvider__setOORInfo(wxGridCellAttrProvider *self,PyObject *_self){