X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cbdf0fb0b809f0f47fc650252973b2e772a3376e..248802d0100093c48f67a60a6463d7765f14d5f0:/wxPython/src/gtk/_core.py diff --git a/wxPython/src/gtk/_core.py b/wxPython/src/gtk/_core.py index a9d60cfe2a..dbe7f46a8c 100644 --- a/wxPython/src/gtk/_core.py +++ b/wxPython/src/gtk/_core.py @@ -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()