home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyo (Python 2.5)
-
- from peak.util.imports import lazyModule, whenImported
- wx = lazyModule('wx')
- os = lazyModule('os')
- wintypes = lazyModule('ctypes.wintypes')
-
- def browse(url):
-
- def go():
- os.startfile(url)
-
- if False and pref('browser.threaded', type = bool, default = False):
- t = Thread(target = go)
- t.setDaemon(True)
- t.start()
- else:
-
- try:
- go()
- except WindowsError:
- pass
-
-
- wx.LaunchDefaultBrowser = browse
-
- def wxRectToRECT(rect):
- r = wintypes.RECT()
- r.left = rect.X
- r.top = rect.Y
- r.right = rect.X + rect.Width
- r.bottom = rect.Y + rect.Height
- return r
-
-
- def wxRectFromRECT(rect):
- return wx.Rect(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top)
-
-
- def GetRECT(win):
- return wxRectToRECT(win.Rect)
-
-
- def GetLRECT(win):
- return wxRectToRECT(wx.RectS(win.GetSize()))
-
-
- def _monkeypatch(*a, **k):
- WindowClass = None if wx.WXPY else wx.Window
- WindowClass.GetRECT = GetRECT
- WindowClass.RECT = property(GetRECT)
- WindowClass.GetLRECT = GetLRECT
- WindowClass.LRECT = property(GetLRECT)
- wx.Rect.FromRECT = staticmethod(wxRectFromRECT)
- wx.Rect.RECT = property(wxRectToRECT)
-
- whenImported('wx', _monkeypatch)
-