X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d14a1e28567de23c586bc80017073d0c39f8d18f..44b8f8e051af41775c9eaeace6a3be139bcbe729:/wxPython/wx/lib/ClickableHtmlWindow.py?ds=inline diff --git a/wxPython/wx/lib/ClickableHtmlWindow.py b/wxPython/wx/lib/ClickableHtmlWindow.py index 372f7d1057..51c812630e 100644 --- a/wxPython/wx/lib/ClickableHtmlWindow.py +++ b/wxPython/wx/lib/ClickableHtmlWindow.py @@ -1,3 +1,12 @@ +# 12/01/2003 - Jeff Grimmett (grimmtooth@softhome.net) +# +# o Updated for wx namespace. Not tested though. +# +# 12/17/2003 - Jeff Grimmett (grimmtooth@softhome.net) +# +# o Removed wx prefix from class name, +# updated reverse renamer +# """ sorry no documentation... @@ -5,28 +14,27 @@ Christopher J. Fama """ +import wx +import wx.html as html -from wxPython.wx import * -from wxPython.html import * - -class wxPyClickableHtmlWindow(wxHtmlWindow): +class PyClickableHtmlWindow(html.HtmlWindow): """ Class for a wxHtmlWindow which responds to clicks on links by opening a browser pointed at that link, and to shift-clicks by copying the link to the clipboard. """ def __init__(self,parent,ID,**kw): - apply(wxHtmlWindow.__init__,(self,parent,ID),kw) + apply(html.HtmlWindow.__init__,(self,parent,ID),kw) def OnLinkClicked(self,link): - self.link = wxTextDataObject(link.GetHref()) + self.link = wx.TextDataObject(link.GetHref()) if link.GetEvent().ShiftDown(): - if wxTheClipboard.Open(): - wxTheClipboard.SetData(self.link) - wxTheClipboard.Close() + if wx.TheClipboard.Open(): + wx.TheClipboard.SetData(self.link) + wx.TheClipboard.Close() else: - dlg = wxMessageDialog(self,"Couldn't open clipboard!\n",wxOK) - wxBell() + dlg = wx.MessageDialog(self,"Couldn't open clipboard!\n",wx.OK) + wx.Bell() dlg.ShowModal() dlg.Destroy() else: