beremiz

Parents 95fa4e05e30f
Children b9a3f771aaab
Hook Beremiz Launcher AppStart to AdvancedSplash OnPaint event in order to ensure image is beeing displayed before loading.
  • +11 -6
    Beremiz.py
  • --- a/Beremiz.py Sun Feb 18 22:29:35 2018 +0100
    +++ b/Beremiz.py Mon Feb 19 13:24:57 2018 +0100
    @@ -52,11 +52,6 @@
    def Bpath(self, *args):
    return os.path.join(self.app_dir, *args)
    - def ShowSplashScreen(self):
    - bmp = wx.Image(self.splashPath).ConvertToBitmap()
    - self.splash = AdvancedSplash(None, bitmap=bmp, agwStyle=AS_NOTIMEOUT | AS_CENTER_ON_SCREEN)
    -
    -
    def Usage(self):
    print("Usage:")
    print("%s [Options] [Projectpath] [Buildpath]" % sys.argv[0])
    @@ -110,7 +105,6 @@
    class BeremizApp(BeremizAppType):
    def OnInit(_self):
    self.ShowSplashScreen()
    - wx.CallAfter(self.AppStart)
    return True
    self.app = BeremizApp(redirect=self.debug)
    @@ -118,6 +112,17 @@
    if wx.VERSION < (3, 0, 0):
    wx.InitAllImageHandlers()
    + def ShowSplashScreen(self):
    + class Splash(AdvancedSplash):
    + def OnPaint(_self, event):
    + AdvancedSplash.OnPaint(_self, event)
    + wx.CallAfter(self.AppStart)
    + bmp = wx.Image(self.splashPath).ConvertToBitmap()
    + self.splash = Splash(None,
    + bitmap=bmp,
    + agwStyle=AS_NOTIMEOUT | AS_CENTER_ON_SCREEN)
    +
    +
    def BackgroundInitialization(self):
    self.InitI18n()
    self.CheckUpdates()