Fixed splash screen
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -27,14 +27,15 @@ _ = wx.GetTranslation
|
|||||||
|
|
||||||
class TextEditorApplication(pydocview.DocApp):
|
class TextEditorApplication(pydocview.DocApp):
|
||||||
|
|
||||||
|
SPLASH = "splash.png"
|
||||||
|
|
||||||
def OnInit(self):
|
def OnInit(self):
|
||||||
# Call the super - this is important!!!
|
# Call the super - this is important!!!
|
||||||
pydocview.DocApp.OnInit(self)
|
pydocview.DocApp.OnInit(self)
|
||||||
|
|
||||||
# Show the splash dialog while everything is loading up
|
# Show the splash dialog while everything is loading up
|
||||||
if os.path.exists("splash.png"):
|
if os.path.exists(TextEditorApplication.SPLASH):
|
||||||
self.ShowSplash("splash.png")
|
self.ShowSplash(TextEditorApplication.SPLASH)
|
||||||
|
|
||||||
# Set the name and the icon
|
# Set the name and the icon
|
||||||
self.SetAppName(_("wxPython PyDocView Demo"))
|
self.SetAppName(_("wxPython PyDocView Demo"))
|
||||||
@@ -63,8 +64,8 @@ class TextEditorApplication(pydocview.DocApp):
|
|||||||
optionsService = self.InstallService(pydocview.DocOptionsService(supportedModes=wx.lib.docview.DOC_MDI))
|
optionsService = self.InstallService(pydocview.DocOptionsService(supportedModes=wx.lib.docview.DOC_MDI))
|
||||||
windowMenuService = self.InstallService(pydocview.WindowMenuService())
|
windowMenuService = self.InstallService(pydocview.WindowMenuService())
|
||||||
filePropertiesService = self.InstallService(pydocview.FilePropertiesService())
|
filePropertiesService = self.InstallService(pydocview.FilePropertiesService())
|
||||||
if os.path.exists("splash.jpg"):
|
if os.path.exists(TextEditorApplication.SPLASH):
|
||||||
aboutService = self.InstallService(pydocview.AboutService(image=wx.Image("splash.jpg")))
|
aboutService = self.InstallService(pydocview.AboutService(image=wx.Image(TextEditorApplication.SPLASH)))
|
||||||
else:
|
else:
|
||||||
aboutService = self.InstallService(pydocview.AboutService())
|
aboutService = self.InstallService(pydocview.AboutService())
|
||||||
|
|
||||||
@@ -82,7 +83,7 @@ class TextEditorApplication(pydocview.DocApp):
|
|||||||
textTemplate.CreateDocument('', docview.DOC_NEW).OnNewDocument()
|
textTemplate.CreateDocument('', docview.DOC_NEW).OnNewDocument()
|
||||||
|
|
||||||
# Close the splash dialog
|
# Close the splash dialog
|
||||||
if os.path.exists("splash.jpg"):
|
if os.path.exists(TextEditorApplication.SPLASH):
|
||||||
self.CloseSplash()
|
self.CloseSplash()
|
||||||
|
|
||||||
# Show the tips dialog
|
# Show the tips dialog
|
||||||
|
Reference in New Issue
Block a user