]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_listbox.i
comment out test code
[wxWidgets.git] / wxPython / src / _listbox.i
index e4f638f3c0fc12d9296145a98e74d9c87002e361..22960358a414391897da15b7b96abe01681b036c 100644 (file)
@@ -104,10 +104,9 @@ public:
     // works for single as well as multiple selection listboxes (unlike
     // GetSelection which only works for listboxes with single selection)
     //virtual int GetSelections(wxArrayInt& aSelections) const;
-    %extend
-    {
-        PyObject* GetSelections()
-        {
+    %extend {
+        PyObject* GetSelections() {
+            wxPyBlock_t blocked = wxPyBeginBlockThreads();
             wxArrayInt lst;
             self->GetSelections(lst);
             PyObject *tup = PyTuple_New(lst.GetCount());
@@ -115,6 +114,7 @@ public:
             {
                 PyTuple_SetItem(tup, i, PyInt_FromLong(lst[i]));
             }
+            wxPyEndBlockThreads(blocked);
             return tup;
         }
     }
@@ -165,6 +165,8 @@ public:
 
     static wxVisualAttributes
     GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
+    
+    %property(Selections, GetSelections, doc="See `GetSelections`");
 };
 
 
@@ -205,7 +207,14 @@ public:
 
 #if defined(__WXMSW__) || defined(__WXGTK__)
     int GetItemHeight();
+#else
+    %pythoncode {
+        def GetItemHeight(self):
+            raise NotImplementedError
+    }
 #endif
+
+    %property(ItemHeight, GetItemHeight, doc="See `GetItemHeight`");
 };
 
 //---------------------------------------------------------------------------