X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/df5204e0a48e819dd1e63f5064c593576c7caa97..d0ee33f5c6908b4ac5e1364381f0ef00942e3936:/wxPython/demo/Main.py diff --git a/wxPython/demo/Main.py b/wxPython/demo/Main.py index 4938824bf8..152a858a44 100644 --- a/wxPython/demo/Main.py +++ b/wxPython/demo/Main.py @@ -47,10 +47,10 @@ import images _treeList = [ # new stuff ('Recent Additions/Updates', [ - 'StandardPaths', - 'MediaCtrl', - 'DatePickerCtrl', - 'MouseGestures', + 'FoldPanelBar', + 'GIFAnimationCtrl', + 'HyperLinkCtrl', + 'MultiSplitterWindow', ]), # managed windows == things with a (optional) caption you can close @@ -70,6 +70,7 @@ _treeList = [ 'FindReplaceDialog', 'FontDialog', 'MessageDialog', + 'MultiChoiceDialog', 'PageSetupDialog', 'PrintDialog', 'ProgressDialog', @@ -154,9 +155,13 @@ _treeList = [ 'FileBrowseButton', 'FloatBar', 'FloatCanvas', + 'FoldPanelBar', + 'GIFAnimationCtrl', 'HtmlWindow', + 'HyperLinkCtrl', 'IntCtrl', 'MediaCtrl', + 'MultiSplitterWindow', 'MVCTree', 'MaskedEditControls', 'MaskedNumCtrl', @@ -212,6 +217,7 @@ _treeList = [ 'ArtProvider', 'Cursor', 'DragImage', + 'GIFAnimationCtrl', 'Image', 'ImageAlpha', 'ImageFromStream', @@ -933,7 +939,7 @@ class DemoErrorPanel(wx.Panel): self.box = wx.BoxSizer(wx.VERTICAL) # Main Label - self.box.Add(wx.StaticText(self, -1, "An error has occured while trying to run the demo") + self.box.Add(wx.StaticText(self, -1, "An error has occurred while trying to run the demo") , 0, wx.ALIGN_CENTER | wx.TOP, 10) # Exception Information @@ -1076,8 +1082,7 @@ class DemoTaskBarIcon(wx.TaskBarIcon): def OnTaskBarChange(self, evt): - names = [ "WXPdemo", "WXP", "Mondrian", "Test2m", - "Blom08m", "Blom10m", "Blom15m" ] + names = [ "WXPdemo", "Mondrian", "Pencil", "Carrot" ] name = names[self.imgidx] getFunc = getattr(images, "get%sImage" % name) @@ -1401,7 +1406,7 @@ class wxPythonDemo(wx.Frame): # o The RunTest() for all samples must now return a window that can # be palced in a tab in the main notebook. - # o If an error occurs (or has occured before) an error tab is created. + # o If an error occurs (or has occurred before) an error tab is created. if module is not None: wx.LogMessage("Running demo module...") @@ -1671,18 +1676,33 @@ class wxPythonDemo(wx.Frame): class MySplashScreen(wx.SplashScreen): def __init__(self): - bmp = wx.Image(opj("bitmaps/splash.gif")).ConvertToBitmap() + bmp = wx.Image(opj("bitmaps/splash.png")).ConvertToBitmap() wx.SplashScreen.__init__(self, bmp, wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT, - 3000, None, -1) + 5000, None, -1) self.Bind(wx.EVT_CLOSE, self.OnClose) + self.fc = wx.FutureCall(2000, self.ShowMain) + def OnClose(self, evt): + # Make sure the default handler runs too so this window gets + # destroyed + evt.Skip() self.Hide() + + # if the timer is still running then go ahead and show the + # main frame now + if self.fc.IsRunning(): + self.fc.Stop() + self.ShowMain() + + + def ShowMain(self): frame = wxPythonDemo(None, "wxPython: (A Demonstration)") frame.Show() - evt.Skip() # Make sure the default handler runs too... - + if self.fc.IsRunning(): + self.Raise() + class MyApp(wx.App): def OnInit(self): @@ -1701,7 +1721,7 @@ class MyApp(wx.App): # initialization, finally creating and showing the main # application window(s). In this case we have nothing else to # do so we'll delay showing the main frame until later (see - # OnClose above) so the users can see the SplashScreen effect. + # ShowMain above) so the users can see the SplashScreen effect. splash = MySplashScreen() splash.Show()