]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_datetime.i
wxCheckListBox doesn't require wxUSE_OWNER_DRAWN when using WXUNIVERSAL
[wxWidgets.git] / wxPython / src / _datetime.i
index 9441f8ee1e782903d80c182e00f9617c3603557e..f0284ce688763161d28a33be8f8e9f3d146bba06 100644 (file)
@@ -372,7 +372,7 @@ public:
             wxString am;
             wxString pm;
             wxDateTime::GetAmPmStrings(&am, &pm);
-            bool blocked = wxPyBeginBlockThreads();
+            wxPyBlock_t blocked = wxPyBeginBlockThreads();
             PyObject* tup = PyTuple_New(2);
             PyTuple_SET_ITEM(tup, 0, wx2PyString(am));
             PyTuple_SET_ITEM(tup, 1, wx2PyString(pm));
@@ -860,12 +860,13 @@ public:
     %pythoncode {
     def __repr__(self):
         if self.IsValid():
-            return '<wx.DateTime: \"%s\" at %s>' % ( self.Format(), self.this)
+            f = self.Format().encode(wx.GetDefaultPyEncoding())
+            return '<wx.DateTime: \"%s\" at %s>' % ( f, self.this)
         else:
             return '<wx.DateTime: \"INVALID\" at %s>' % self.this
     def __str__(self):
         if self.IsValid():
-            return self.Format()
+            return self.Format().encode(wx.GetDefaultPyEncoding())
         else:
             return "INVALID DateTime"
     }
@@ -1011,9 +1012,10 @@ public:
 
     %pythoncode {
      def __repr__(self):
-         return '<wx.TimeSpan: \"%s\" at %s>' % ( self.Format(), self.this)
+         f = self.Format().encode(wx.GetDefaultPyEncoding())
+         return '<wx.TimeSpan: \"%s\" at %s>' % ( f, self.this)
      def __str__(self):
-         return self.Format()
+         return self.Format().encode(wx.GetDefaultPyEncoding())
      }
 };