X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6063c1944749546743aa9c4ae975daf43e1d916..42d0aa30b801d8c2ea7cd16a2a191bec4fbfa876:/wxPython/demo/Main.py diff --git a/wxPython/demo/Main.py b/wxPython/demo/Main.py index 884b8ee32c..e1a23d9fce 100644 --- a/wxPython/demo/Main.py +++ b/wxPython/demo/Main.py @@ -30,8 +30,9 @@ import images _treeList = [ # new stuff - ('Recent Additions and Updates', [ + ('Recent Additions/Updates', [ 'OGL', + 'FloatCanvas', ]), # managed windows == things with a (optional) caption you can close @@ -250,7 +251,7 @@ class MyTP(wx.PyTipProvider): # try: - ##raise ImportError + ##raise ImportError # for testing the alternate implementation from wx import stc from StyledTextCtrl_2 import PythonSTC class DemoCodeViewer(PythonSTC): @@ -260,6 +261,8 @@ try: # Some methods to make it compatible with how the wxTextCtrl is used def SetValue(self, value): + if wx.USE_UNICODE: + value = value.decode('iso8859_1') self.SetReadOnly(False) self.SetText(value) self.SetReadOnly(True) @@ -434,12 +437,9 @@ class wxPythonDemo(wx.Frame): if wx.Platform != '__WXMAC__': # setup a taskbar icon, and catch some events from it - if wx.Platform == '__WXGTK__': - dimension = 22 - else: - dimension = 16 + dim = 16 # (may want to use 22 on wxGTK, but 16b looks okay too) icon = wx.IconFromBitmap( - images.getMondrianImage().Scale(dimension,dimension).ConvertToBitmap() ) + images.getMondrianImage().Scale(dim,dim).ConvertToBitmap() ) #icon = wx.Icon('bmp_source/mondrian.ico', wx.BITMAP_TYPE_ICO) #icon = images.getMondrianIcon() self.tbicon = wx.TaskBarIcon() @@ -738,6 +738,8 @@ class wxPythonDemo(wx.Frame): lead = text[:6] if lead != '' and lead != '': text = '
'.join(text.split('\n')) + if wx.USE_UNICODE: + text = text.decode('iso8859_1') self.ovr.SetPage(text) self.nb.SetPageText(0, name) @@ -916,6 +918,9 @@ class MyApp(wx.App): the main frame when it is time to do so. """ + # For debugging + #self.SetAssertMode(wx.PYAPP_ASSERT_DIALOG) + # Normally when using a SplashScreen you would create it, show # it and then continue on with the applicaiton's # initialization, finally creating and showing the main