X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e757654cd8f9bb5f687694f9142e75ece3586a3a..2abd8d78a69cbe726f957de91929feeeac21cfb0:/wxPython/wx/py/crust.py diff --git a/wxPython/wx/py/crust.py b/wxPython/wx/py/crust.py index 2aa6b89276..21a71cc680 100644 --- a/wxPython/wx/py/crust.py +++ b/wxPython/wx/py/crust.py @@ -17,12 +17,6 @@ import frame from shell import Shell from version import VERSION -try: - True -except NameError: - True = 1==1 - False = 1==0 - class Crust(wx.SplitterWindow): """Crust based on SplitterWindow.""" @@ -117,23 +111,25 @@ class Calltip(wx.TextCtrl): """Text control containing the most recent shell calltip.""" def __init__(self, parent=None, id=-1): - style = wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_RICH2 - wx.TextCtrl.__init__(self, parent=parent, id=id, style=style) + style = (wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_RICH2) + wx.TextCtrl.__init__(self, parent, id, style=style) self.SetBackgroundColour(wx.Colour(255, 255, 232)) dispatcher.connect(receiver=self.display, signal='Shell.calltip') def display(self, calltip): """Receiver for Shell.calltip signal.""" - self.SetValue(calltip) + ## self.SetValue(calltip) # Caused refresh problem on Windows. + self.Clear() + self.AppendText(calltip) class SessionListing(wx.TextCtrl): """Text control containing all commands for session.""" def __init__(self, parent=None, id=-1): - style = wx.TE_MULTILINE | wx.TE_READONLY | \ - wx.TE_RICH2 | wx.TE_DONTWRAP - wx.TextCtrl.__init__(self, parent=parent, id=id, style=style) + style = (wx.TE_MULTILINE | wx.TE_READONLY | + wx.TE_RICH2 | wx.TE_DONTWRAP) + wx.TextCtrl.__init__(self, parent, id, style=style) dispatcher.connect(receiver=self.push, signal='Interpreter.push') def push(self, command, more): @@ -150,9 +146,9 @@ class DispatcherListing(wx.TextCtrl): """Text control containing all dispatches for session.""" def __init__(self, parent=None, id=-1): - style = wx.TE_MULTILINE | wx.TE_READONLY | \ - wx.TE_RICH2 | wx.TE_DONTWRAP - wx.TextCtrl.__init__(self, parent=parent, id=id, style=style) + style = (wx.TE_MULTILINE | wx.TE_READONLY | + wx.TE_RICH2 | wx.TE_DONTWRAP) + wx.TextCtrl.__init__(self, parent, id, style=style) dispatcher.connect(receiver=self.spy) def spy(self, signal, sender):