示例#1
0
def floobits_stop_everything():
    if G.AGENT:
        reactor.stop()
        G.AGENT = None
    floobits_pause()
    # TODO: get this value from vim and reset it
    vim.command('set updatetime=4000')
示例#2
0
def floobits_stop_everything():
    if G.AGENT:
        reactor.stop()
        G.AGENT = None
    floobits_pause()
    # TODO: get this value from vim and reset it
    vim.command('set updatetime=4000')
 def run(self):
     if G.AGENT:
         reactor.stop()
         G.AGENT = None
         # TODO: Mention the name of the thing we left
         sublime.error_message('You have left the workspace.')
     else:
         sublime.error_message('You are not joined to any workspace.')
def disconnect_dialog():
    if G.AGENT and G.AGENT.joined_workspace:
        disconnect = sublime.ok_cancel_dialog('You can only be in one workspace at a time.', 'Leave %s/%s' % (G.AGENT.owner, G.AGENT.workspace))
        if disconnect:
            msg.debug('Stopping agent.')
            reactor.stop()
            G.AGENT = None
        return disconnect
    return True
示例#5
0
def disconnect_dialog():
    if G.AGENT and G.AGENT.joined_workspace:
        disconnect = sublime.ok_cancel_dialog('You can only be in one workspace at a time.', 'Leave %s/%s' % (G.AGENT.owner, G.AGENT.workspace))
        if disconnect:
            msg.debug('Stopping agent.')
            reactor.stop()
            G.AGENT = None
        return disconnect
    return True
示例#6
0
 def run(self):
     if G.AGENT:
         message = 'You have left the workspace.'
         G.AGENT.update_status_msg(message)
         reactor.stop()
         G.AGENT = None
         # TODO: Mention the name of the thing we left
         if not G.EXPERT_MODE:
             sublime.error_message(message)
     else:
         sublime.error_message('You are not joined to any workspace.')
 def run(self):
     if G.AGENT:
         message = 'You have left the workspace.'
         G.AGENT.update_status_msg(message)
         reactor.stop()
         G.AGENT = None
         # TODO: Mention the name of the thing we left
         if not G.EXPERT_MODE:
             sublime.error_message(message)
     else:
         sublime.error_message('You are not joined to any workspace.')
 def run_agent(owner, workspace, host, port, secure):
     global on_room_info_waterfall
     if G.AGENT:
         msg.debug('Stopping agent.')
         reactor.stop()
         G.AGENT = None
     on_room_info_waterfall.add(update_recent_workspaces, {'url': workspace_url})
     try:
         conn = SublimeConnection(owner, workspace, agent_conn_kwargs.get('get_bufs', True))
         reactor.connect(conn, host, port, secure)
         conn.once('room_info', on_room_info_waterfall.call)
         on_room_info_waterfall = utils.Waterfall()
     except Exception as e:
         print(e)
         tb = traceback.format_exc()
         print(tb)
 def run_agent(owner, workspace, host, port, secure, upload):
     if G.AGENT:
         msg.debug('Stopping agent.')
         reactor.stop()
         G.AGENT = None
     try:
         auth = G.AUTH.get(host)
         if not auth:
             success = yield link_account, host
             if not success:
                 return
             auth = G.AUTH.get(host)
         conn = SublimeConnection(owner, workspace, auth, upload)
         reactor.connect(conn, host, port, secure)
     except Exception as e:
         msg.error(str_e(e))
示例#10
0
 def run_agent(owner, workspace, host, port, secure, upload):
     if G.AGENT:
         msg.debug('Stopping agent.')
         reactor.stop()
         G.AGENT = None
     try:
         auth = G.AUTH.get(host)
         if not auth:
             success = yield link_account, host
             if not success:
                 return
             auth = G.AUTH.get(host)
         conn = SublimeConnection(owner, workspace, auth, upload)
         reactor.connect(conn, host, port, secure)
     except Exception as e:
         msg.error(str_e(e))