]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/py/crust.py
Don't override methods that are in wxControlWithItems
[wxWidgets.git] / wxPython / wx / py / crust.py
index c7ac81fa929ff6c73a46a0fe0e156e9147ee2007..2a26da1c5c01d254f72f9c827bb042d2f5a2b0de 100644 (file)
@@ -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."""
@@ -62,20 +56,20 @@ class Crust(wx.SplitterWindow):
         self.notebook.AddPage(page=self.sessionlisting, text='Session')
         self.dispatcherlisting = DispatcherListing(parent=self.notebook)
         self.notebook.AddPage(page=self.dispatcherlisting, text='Dispatcher')
-        from wxd import wx_
-        self.wxdocs = Filling(parent=self.notebook, 
-                              rootObject=wx_,
-                              rootLabel='wx', 
-                              rootIsNamespace=False,
-                              static=True)
-        self.notebook.AddPage(page=self.wxdocs, text='wxPython Docs')
-        from wxd import stc_
-        self.stcdocs = Filling(parent=self.notebook, 
-                               rootObject=stc_.StyledTextCtrl,
-                               rootLabel='StyledTextCtrl', 
-                               rootIsNamespace=False,
-                               static=True)
-        self.notebook.AddPage(page=self.stcdocs, text='StyledTextCtrl Docs')
+##         from wxd import wx_
+##         self.wxdocs = Filling(parent=self.notebook, 
+##                               rootObject=wx_,
+##                               rootLabel='wx', 
+##                               rootIsNamespace=False,
+##                               static=True)
+##         self.notebook.AddPage(page=self.wxdocs, text='wxPython Docs')
+##         from wxd import stc_
+##         self.stcdocs = Filling(parent=self.notebook, 
+##                                rootObject=stc_.StyledTextCtrl,
+##                                rootLabel='StyledTextCtrl', 
+##                                rootIsNamespace=False,
+##                                static=True)
+##         self.notebook.AddPage(page=self.stcdocs, text='StyledTextCtrl Docs')
         self.SplitHorizontally(self.shell, self.notebook, 300)
         self.SetMinimumPaneSize(1)
 
@@ -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, parentid, 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, parentid, 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, parentid, style=style)
         dispatcher.connect(receiver=self.spy)
 
     def spy(self, signal, sender):
@@ -212,9 +208,10 @@ class CrustFrame(frame.Frame):
                'the other half is still in the oven.\n\n' + \
                'Shell Revision: %s\n' % self.shell.revision + \
                'Interpreter Revision: %s\n\n' % self.shell.interp.revision + \
+               'Platform: %s\n' % sys.platform + \
                'Python Version: %s\n' % sys.version.split()[0] + \
                'wxPython Version: %s\n' % wx.VERSION_STRING + \
-               'Platform: %s\n' % sys.platform
+               ('\t(%s)\n' % ", ".join(wx.PlatformInfo[1:])) 
         dialog = wx.MessageDialog(self, text, title,
                                   wx.OK | wx.ICON_INFORMATION)
         dialog.ShowModal()