def OnInit(self): """Inicializacion de GUI""" import app global use_splash #self.presLan_en = gettext.translation("proCxx", "./locale", # languages=['en']) #self.locale = wx.Locale(wxLANGUAGE_ENGLISH) #locale.setlocale(locale.LC_ALL, 'EN') #self.presLan_en.install() self.projects = [] self.workspaces = [] """ context.app = self stack = tran.TransactionStack(50) self.log = logger() self.log.SetFile('.proCxx.log') wx.Log.EnableLogging() stack.SetLogger(self.log) """ if use_splash: splash = app.AppSplashScreen() splash.Show() else: app.mainWindow(self) context.frame.Show() wx.GetApp().SetTopWindow(context.frame) stack = tran.TransactionStack(50) self.log = logger() self.log.SetFile('.proCxx.log') wx.Log.EnableLogging() stack.SetLogger(self.log) context.app = self return True
def OnExit(self, evt): """Continue process""" import app self.Hide() app.mainWindow(self) context.frame.Show() wx.GetApp().SetTopWindow(context.frame) # The program will freeze without this line. evt.Skip() # Make sure the default handler runs too...