X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/15665b4790c94192130f032508de2b3b8c6a2c97..9e477492e29e03c02827b1e42a16cb09a13f5149:/wxPython/src/msw/_core.py diff --git a/wxPython/src/msw/_core.py b/wxPython/src/msw/_core.py index 365a9af8f6..f9cf4a8438 100644 --- a/wxPython/src/msw/_core.py +++ b/wxPython/src/msw/_core.py @@ -8800,6 +8800,14 @@ class Window(EvtHandler): """ return _core_.Window_GetVirtualSizeTuple(*args, **kwargs) + def GetWindowBorderSize(*args, **kwargs): + """ + GetWindowBorderSize(self) -> Size + + Return the size of the left/right and top/bottom borders. + """ + return _core_.Window_GetWindowBorderSize(*args, **kwargs) + def GetBestVirtualSize(*args, **kwargs): """ GetBestVirtualSize(self) -> Size @@ -8913,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) @@ -13696,7 +13713,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()