def tray_on_enso_restart(systray, get_state = False):
    if not get_state:
        if not retreat.is_locked():
            subprocess.Popen([config.ENSO_EXECUTABLE, "--restart " + str(os.getpid())])
            tray_on_enso_quit(systray)
        else:
            displayMessage(config.BLOCKED_BY_RETREAT_MSG)
Exemple #2
0
def tray_on_enso_restart(systray, get_state=False):
    if not get_state:
        if not retreat.is_locked():
            subprocess.Popen(
                [config.ENSO_EXECUTABLE, "--restart " + str(os.getpid())])
            tray_on_enso_quit(systray)
        else:
            displayMessage(config.BLOCKED_BY_RETREAT_MSG)
Exemple #3
0
def cmd_enso(ensoapi, action):
    """ Enso system command
    <b>Actions:</b><br>
    &nbsp;&nbsp- quit - quit Enso<br>
    &nbsp;&nbsp- restart - restart Enso<br>
    &nbsp;&nbsp- refresh - reload shortcuts available for the 'open' command<br>
    &nbsp;&nbsp- settings - open Enso settings page<br>
    &nbsp;&nbsp- commands - open Enso command list<br>
    &nbsp;&nbsp- tasks - open Enso task editor<br>
    &nbsp;&nbsp- editor - open Enso command editor<br>
    &nbsp;&nbsp- about - show application information<br>
    """
    if action == 'quit':
        if not retreat.is_locked():
            EventManager.get().stop()
        else:
            displayMessage(config.BLOCKED_BY_RETREAT_MSG)
    elif action == 'restart':
        if not retreat.is_locked():
            EventManager.get().stop()
            subprocess.Popen(
                [config.ENSO_EXECUTABLE, "--restart " + str(os.getpid())])
        else:
            displayMessage(config.BLOCKED_BY_RETREAT_MSG)
    elif action == 'refresh':
        Shortcuts.get().refreshShortcuts()
        ScriptTracker.get()._reloadPyScripts()
        displayMessage(config.REFRESHING_MSG_XML)
    elif action == 'settings':
        if config.ENABLE_WEB_UI:
            os.startfile("http://" + webui.HOST + ":" + str(webui.PORT) +
                         "/options.html")
    elif action == 'commands':
        if config.ENABLE_WEB_UI:
            os.startfile("http://" + webui.HOST + ":" + str(webui.PORT) +
                         "/commands.html")
    elif action == 'tasks':
        if config.ENABLE_WEB_UI:
            os.startfile("http://" + webui.HOST + ":" + str(webui.PORT) +
                         "/tasks.html")
    elif action == 'editor':
        if config.ENABLE_WEB_UI:
            os.startfile("http://" + webui.HOST + ":" + str(webui.PORT) +
                         "/edit.html")
    elif action == 'about':
        displayMessage(enso.config.ABOUT_BOX_XML)
Exemple #4
0
def cmd_enso(ensoapi, action):
    """ Enso system command
    <b>Actions:</b><br>
    &nbsp;&nbsp- quit - quit Enso<br>
    &nbsp;&nbsp- restart - restart Enso<br>
    &nbsp;&nbsp- settings - open Enso settings page<br>
    &nbsp;&nbsp- commands - open Enso command list<br>
    &nbsp;&nbsp- task - open Enso task editor<br>
    &nbsp;&nbsp- editor - open Enso command editor<br>
    &nbsp;&nbsp- about - show application information<br>
    """
    if action == 'quit':
        if not retreat.is_locked():
            EventManager.get().stop()
        else:
            displayMessage(config.BLOCKED_BY_RETREAT_MSG)
    elif action == 'restart':
        if not retreat.is_locked():
            EventManager.get().stop()
            subprocess.Popen([config.ENSO_EXECUTABLE, "--restart " + str(os.getpid())])
        else:
            displayMessage(config.BLOCKED_BY_RETREAT_MSG)
    elif action == 'settings':
        if config.ENABLE_WEB_UI:
            os.startfile("http://" + webui.HOST + ":" + str(webui.PORT) + "/options.html")
    elif action == 'commands':
        if config.ENABLE_WEB_UI:
            os.startfile("http://" + webui.HOST + ":" + str(webui.PORT) + "/commands.html")
    elif action == 'tasks':
        if config.ENABLE_WEB_UI:
            os.startfile("http://" + webui.HOST + ":" + str(webui.PORT) + "/tasks.html")
    elif action == 'editor':
        if config.ENABLE_WEB_UI:
            os.startfile("http://" + webui.HOST + ":" + str(webui.PORT) + "/edit.html")
    elif action == 'about':
        displayMessage(enso.config.ABOUT_BOX_XML)
def tray_on_enso_quit(systray):
    if not retreat.is_locked():
        EventManager.get().stop()
    else:
        displayMessage(config.BLOCKED_BY_RETREAT_MSG)
Exemple #6
0
def tray_on_enso_quit(systray):
    if not retreat.is_locked():
        EventManager.get().stop()
    else:
        displayMessage(config.BLOCKED_BY_RETREAT_MSG)