def show_main_gui(): # create and show main frame from lmgr.frame import GMFrame mainframe = GMFrame(parent=None, id=wx.ID_ANY, workspace=self.workspaceFile) mainframe.Show() self.SetTopWindow(mainframe)
def OnInit(self): """ Initialize all available image handlers :return: True """ if not globalvar.CheckWxVersion([2, 9]): wx.InitAllImageHandlers() # create splash screen introImagePath = os.path.join(globalvar.IMGDIR, "splash_screen.png") introImage = wx.Image(introImagePath, wx.BITMAP_TYPE_PNG) introBmp = introImage.ConvertToBitmap() if SC and sys.platform != 'darwin': # AdvancedSplash is buggy on the Mac as of 2.8.12.1 # and raises annoying (though seemingly harmless) errors everytime # the GUI is started splash = SC.AdvancedSplash(bitmap=introBmp, timeout=2000, parent=None, id=wx.ID_ANY) splash.SetText(_('Starting GRASS GUI...')) splash.SetTextColour(wx.Colour(45, 52, 27)) splash.SetTextFont( wx.Font(pointSize=15, family=wx.DEFAULT, style=wx.NORMAL, weight=wx.BOLD)) splash.SetTextPosition((150, 430)) else: if globalvar.wxPythonPhoenix: import wx.adv as wxadv wxadv.SplashScreen(bitmap=introBmp, splashStyle=wxadv.SPLASH_CENTRE_ON_SCREEN | wxadv.SPLASH_TIMEOUT, milliseconds=2000, parent=None, id=wx.ID_ANY) else: wx.SplashScreen(bitmap=introBmp, splashStyle=wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT, milliseconds=2000, parent=None, id=wx.ID_ANY) wx.Yield() # create and show main frame from lmgr.frame import GMFrame mainframe = GMFrame(parent=None, id=wx.ID_ANY, workspace=self.workspaceFile) mainframe.Show() self.SetTopWindow(mainframe) return True
def OnInit(self): """Initialize all available image handlers :return: True """ # Internal and display name of the app (if supported by/on platform) self.SetAppName("GRASS GIS") self.SetVendorName("The GRASS Development Team") # create splash screen introImagePath = os.path.join(globalvar.IMGDIR, "splash_screen.png") introImage = wx.Image(introImagePath, wx.BITMAP_TYPE_PNG) introBmp = introImage.ConvertToBitmap() if SC and sys.platform != "darwin": # AdvancedSplash is buggy on the Mac as of 2.8.12.1 # and raises annoying (though seemingly harmless) errors everytime # the GUI is started splash = SC.AdvancedSplash(bitmap=introBmp, timeout=2000, parent=None, id=wx.ID_ANY) splash.SetText(_("Starting GRASS GUI...")) splash.SetTextColour(wx.Colour(45, 52, 27)) splash.SetTextFont( wx.Font(pointSize=15, family=wx.DEFAULT, style=wx.NORMAL, weight=wx.BOLD)) splash.SetTextPosition((150, 430)) else: if globalvar.wxPythonPhoenix: import wx.adv as wxadv wxadv.SplashScreen( bitmap=introBmp, splashStyle=wxadv.SPLASH_CENTRE_ON_SCREEN | wxadv.SPLASH_TIMEOUT, milliseconds=2000, parent=None, id=wx.ID_ANY, ) else: wx.SplashScreen( bitmap=introBmp, splashStyle=wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT, milliseconds=2000, parent=None, id=wx.ID_ANY, ) wx.GetApp().Yield() # create and show main frame from lmgr.frame import GMFrame mainframe = GMFrame(parent=None, id=wx.ID_ANY, workspace=self.workspaceFile) # testing purposes # from main_window.frame import GMFrame # mainframe = GMFrame(parent=None, id=wx.ID_ANY, workspace=self.workspaceFile) mainframe.Show() self.SetTopWindow(mainframe) return True