]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/_core.py
Updating with Vadim's API changes.
[wxWidgets.git] / wxPython / src / gtk / _core.py
index a9d60cfe2a1fda2067f0087f8cfb93620b0a3d63..dbe7f46a8c77083b58b2f81c031500dfa815c33c 100644 (file)
@@ -8921,6 +8921,15 @@ class Window(EvtHandler):
         """
         return _core_.Window_IsRetained(*args, **kwargs)
 
+    def ToggleWindowStyle(*args, **kwargs):
+        """
+        ToggleWindowStyle(self, int flag) -> bool
+
+        Turn the flag on if it had been turned off before and vice versa,
+        returns True if the flag is turned on by this function call.
+        """
+        return _core_.Window_ToggleWindowStyle(*args, **kwargs)
+
     def SetExtraStyle(*args, **kwargs):
         """
         SetExtraStyle(self, long exStyle)
@@ -13700,7 +13709,10 @@ if default == 'ascii':
     import locale
     import codecs
     try:
-        default = locale.getdefaultlocale()[1]
+        if hasattr(locale, 'getpreferredencoding'):
+            default = locale.getpreferredencoding()
+        else:
+            default = locale.getdefaultlocale()[1]
         codecs.lookup(default)
     except (ValueError, LookupError, TypeError):
         default = _sys.getdefaultencoding()