示例#1
0
def setup():
    log.debug("Starting " + application.name + " %s" % (application.version, ))
    config.setup()
    fixes.setup()
    log.debug("Using %s %s" % (platform.system(), platform.architecture()[0]))
    log.debug("Application path is %s" % (paths.app_path(), ))
    log.debug("config path  is %s" % (paths.config_path(), ))
    sound.setup()
    output.setup()
    languageHandler.setLanguage(config.app["app-settings"]["language"])
    keys.setup()
    from controller import mainController
    from sessionmanager import sessionManager
    app = widgetUtils.mainLoopObject()
    if system == "Windows":
        if config.app["app-settings"]["donation_dialog_displayed"] == False:
            donation()
        updater.do_update()
    sm = sessionManager.sessionManagerController()
    sm.fill_list()
    if len(sm.sessions) == 0: sm.show()
    else:
        sm.do_ok()
    if hasattr(sm.view, "destroy"):
        sm.view.destroy()
    del sm
    r = mainController.Controller()
    r.view.show()
    r.do_work()
    r.check_invisible_at_startup()
    if system == "Windows":
        call_threaded(r.start)
    elif system == "Linux":
        GLib.idle_add(r.start)
    app.run()
示例#2
0
文件: main.py 项目: TWBlueQS/TWBlueQS
def setup():
    log.debug("Starting " + application.name + " %s" % (application.version,))
    config.setup()
    log.debug("Using %s %s" % (platform.system(), platform.architecture()[0]))
    log.debug("Application path is %s" % (paths.app_path(),))
    log.debug("config path  is %s" % (paths.config_path(),))
    sound.setup()
    output.setup()
    languageHandler.setLanguage(config.app["app-settings"]["language"])
    message(message=_(u"Loading files and configuration, please wait..."))
    fixes.setup()
    keys.setup()
    from controller import mainController
    from sessionmanager import sessionManager

    app = widgetUtils.mainLoopObject()
    gplwarning()

    if system == "Windows":
        if config.app["app-settings"]["donation_dialog_displayed"] == False:
            donation()
        if config.app["app-settings"]["check_updates"] == True:
            updater.do_update()
        else:
            message(message=_(u"Set to ignore updates at startup. To change this preference, go to global config"))
    sm = sessionManager.sessionManagerController()
    sm.fill_list()
    if len(sm.sessions) == 0:
        sm.show()
    else:
        sm.do_ok()
    if hasattr(sm.view, "destroy"):
        sm.view.destroy()
    del sm
    r = mainController.Controller()
    r.view.show()
    r.do_work()
    r.check_invisible_at_startup()
    if system == "Windows":
        call_threaded(r.start)
    elif system == "Linux":
        GLib.idle_add(r.start)
    message(
        message=_(u"Welcome to %s. Main application's window will appears shortly. Happy tweeting!") % application.name
    )
    app.run()
示例#3
0
	def check_for_updates(self, *args, **kwargs):
		update = updater.do_update()
		if update == False:
			commonMessages.no_update_available()