]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/calendar.i
Patches from KevinO that work around issues where the widget isn't
[wxWidgets.git] / wxPython / src / calendar.i
index b98a1e330a1a295cd133469b5747a9e920a892fc..8f2f16602b99d3b74241a60001690b1d893d186d 100644 (file)
@@ -23,7 +23,8 @@
 //----------------------------------------------------------------------
 
 %import misc.i
-%pythoncode { wx = core }
+%pythoncode { wx = _core }
+%pythoncode { __docfilter__ = wx.__docfilter__ }
 
 %include _calendar_rename.i
 
@@ -200,8 +201,10 @@ public:
     %pythonAppend wxCalendarCtrl()    ""
 
     DocStr(wxCalendarCtrl, "Create and show a calendar control.");
+    RefDoc(wxCalendarCtrl, ""); // turn it off for the ctors
+    
     wxCalendarCtrl(wxWindow *parent,
-                   wxWindowID id,
+                   wxWindowID id=-1,
                    const wxDateTime& date = wxDefaultDateTime,
                    const wxPoint& pos = wxDefaultPosition,
                    const wxSize& size = wxDefaultSize,
@@ -352,12 +355,12 @@ validity of the remaining two values.  The result codes are:
             wxDateTime* date = new wxDateTime;
             wxDateTime::WeekDay wd;
             wxCalendarHitTestResult result = self->HitTest(pos, date, &wd);
-            wxPyBeginBlockThreads();
+            bool blocked = wxPyBeginBlockThreads();
             PyObject* tup = PyTuple_New(3);
             PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(result));
             PyTuple_SET_ITEM(tup, 1, wxPyConstructObject(date, wxT("wxDateTime"), 1));
             PyTuple_SET_ITEM(tup, 2, PyInt_FromLong(wd));
-            wxPyEndBlockThreads();
+            wxPyEndBlockThreads(blocked);
             return tup;
         }
     }