X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bcd0d7b64b966cf5ccf4afba061d745244ec489e..eedf3bcbb39a0881f065e124ab3aadbf725dcbca:/wxPython/src/gtk/_core.py diff --git a/wxPython/src/gtk/_core.py b/wxPython/src/gtk/_core.py index 366bb71994..ceb9755a86 100644 --- a/wxPython/src/gtk/_core.py +++ b/wxPython/src/gtk/_core.py @@ -86,6 +86,7 @@ STATIC_BORDER = _core_.STATIC_BORDER TRANSPARENT_WINDOW = _core_.TRANSPARENT_WINDOW NO_BORDER = _core_.NO_BORDER DEFAULT_CONTROL_BORDER = _core_.DEFAULT_CONTROL_BORDER +DEFAULT_STATUSBAR_STYLE = _core_.DEFAULT_STATUSBAR_STYLE TAB_TRAVERSAL = _core_.TAB_TRAVERSAL WANTS_CHARS = _core_.WANTS_CHARS POPUP_WINDOW = _core_.POPUP_WINDOW @@ -5007,8 +5008,8 @@ class PyApp(EvtHandler): self.this = newobj.this self.thisown = 1 del newobj.thisown - self._setCallbackInfo(self, PyApp) - self._setOORInfo(self) + self._setCallbackInfo(self, PyApp, False) + self._setOORInfo(self, False) def __del__(self, destroy=_core_.delete_PyApp): """__del__(self)""" @@ -5017,7 +5018,7 @@ class PyApp(EvtHandler): except: pass def _setCallbackInfo(*args, **kwargs): - """_setCallbackInfo(self, PyObject self, PyObject _class)""" + """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)""" return _core_.PyApp__setCallbackInfo(*args, **kwargs) def GetAppName(*args, **kwargs): @@ -5693,9 +5694,12 @@ your Mac.""" def __del__(self): try: self.RestoreStdio() # Just in case the MainLoop was overridden - except: - pass + finally: + wx.PyApp.__del__(self) + def Destroy(self): + wx.PyApp.Destroy(self) + self.thisown = 0 def SetTopWindow(self, frame): """Set the \"main\" top level window""" @@ -8276,6 +8280,18 @@ def FindWindowByLabel(*args, **kwargs): def Window_FromHWND(*args, **kwargs): """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window""" return _core_.Window_FromHWND(*args, **kwargs) + +def GetTopLevelWindows(*args, **kwargs): + """ + GetTopLevelWindows() -> PyObject + + Returns a list of the the application's top-level windows, (frames, + dialogs, etc.) NOTE: Currently this is a copy of the list maintained + by wxWidgets, and so it is only valid as long as no top-level windows + are closed or new top-level windows are created. + + """ + return _core_.GetTopLevelWindows(*args, **kwargs) #--------------------------------------------------------------------------- class Validator(EvtHandler): @@ -11321,11 +11337,15 @@ if RELEASE_VERSION != _core_.RELEASE_VERSION: #---------------------------------------------------------------------------- -# Set the default string<-->unicode conversion encoding from the -# locale. This encoding is used when string or unicode objects need -# to be converted in order to pass them to wxWidgets. Please be aware -# that the default encoding within the same locale may be slightly -# different on different platforms. For example, please see +# Set wxPython's default string<-->unicode conversion encoding from +# the locale, but only if Python's default hasn't been changed. (We +# assume that if the user has customized it already then that is the +# encoding we need to use as well.) +# +# The encoding selected here is used when string or unicode objects +# need to be converted in order to pass them to wxWidgets. Please be +# aware that the default encoding within the same locale may be +# slightly different on different platforms. For example, please see # http://www.alanwood.net/demos/charsetdiffs.html for differences # between the common latin/roman encodings. @@ -11336,7 +11356,7 @@ if default == 'ascii': try: default = locale.getdefaultlocale()[1] codecs.lookup(default) - except (ValueError, LookupError): + except (ValueError, LookupError, TypeError): default = _sys.getdefaultencoding() del locale del codecs