Пример #1
0
 def __init__(self, window):
  self.hold_window = window
  self.hold_window.Hide()
  sessionManagerWindow = sessionManagerUI.sessionManagerWindow()
  if sessionManagerWindow.ShowModal() == wx.ID_OK:
   self.hold_window.Destroy()
   self.window = gui.main.mainFrame()
   self.window.Show()
   self.window.showing = True
   if config.main != None and config.main["general"]["hide_gui"] == True:
    self.window.show_hide()
    self.window.Hide()
   wx.GetApp().SetTopWindow(self.window)
  else:
   self.hold_window.Show()
   
Пример #2
0
#app = wx.App(redirect=True, useBestVisual=True, filename=paths.logs_path('tracebacks.log'))
configured = False
configs = []
for i in os.listdir(paths.config_path()):
 if os.path.isdir(paths.config_path(i)): configs.append(i)
if len(configs) == 1:
 manager.manager.set_current_session(configs[0])
 config.MAINFILE = "%s/session.conf" % (manager.manager.get_current_session())
 config.setup()
 lang=config.main['general']['language']
 languageHandler.setLanguage(lang)
 sound.setup()
 output.setup()
 configured = True
else:
 ssmg = smGUI.sessionManagerWindow()
if configured == True or ssmg.ShowModal() == wx.ID_OK:
 frame = gui.main.mainFrame()
 frame.Show()
 frame.showing = True
 if config.main != None and config.main["general"]["hide_gui"] == True and platform.system() == "Windows":
  frame.show_hide()
  frame.Hide()
 app.SetTopWindow(frame)
else:
 app.Exit()
 ### I should uncomment this
#if platform.system() != "Windows":
if languageHandler.getLanguage() != "en":
 local = wx.Locale(wxLangs.getLanguage())
 local.AddCatalogLookupPathPrefix(paths.locale_path())
Пример #3
0
configured = False
configs = []
for i in os.listdir(paths.config_path()):
    if os.path.isdir(paths.config_path(i)): configs.append(i)
if len(configs) == 1:
    manager.manager.set_current_session(configs[0])
    config.MAINFILE = "%s/session.conf" % (
        manager.manager.get_current_session())
    config.setup()
    lang = config.main['general']['language']
    languageHandler.setLanguage(lang)
    sound.setup()
    output.setup()
    configured = True
else:
    ssmg = smGUI.sessionManagerWindow()
if configured == True or ssmg.ShowModal() == wx.ID_OK:
    frame = gui.main.mainFrame()
    frame.Show()
    frame.showing = True
    if config.main != None and config.main["general"][
            "hide_gui"] == True and platform.system() == "Windows":
        frame.show_hide()
        frame.Hide()
    app.SetTopWindow(frame)
else:
    app.Exit()
    ### I should uncomment this
#if platform.system() != "Windows":
if languageHandler.getLanguage() != "en":
    local = wx.Locale(wxLangs.getLanguage())