]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/_controls_wrap.cpp
Enable TaskBarIcon for Mac too. Some cleanup.
[wxWidgets.git] / wxPython / src / msw / _controls_wrap.cpp
index 91b8aa4d9e70ff2cae6709ef0d9873ce518fad89..6870a49948bc57b3eabbbf1850d9936633cdab92 100644 (file)
@@ -599,11 +599,12 @@ void wxListBox_SetItemFont(wxListBox *self,int item,wxFont const &f){
     } 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);      
 
@@ -613,7 +614,7 @@ void wxListBox_SetItemFont(wxListBox *self,int item,wxFont const &f){
         Py_DECREF(o3);
     }
     return target;
-}
+  }