Exemplo n.º 1
0
    def run(self, *args):
        def print_msg(chat_view):
            msg.log('Opened message view')
            if not agent:
                msg.log('Not joined to a room.')

        msg.get_or_create_chat(print_msg)
Exemplo n.º 2
0
    def run(self, *args):
        def print_msg(chat_view):
            msg.log('Opened message view')
            if not agent:
                msg.log('Not joined to a room.')

        msg.get_or_create_chat(print_msg)
Exemplo n.º 3
0
        def open_room_window3(cb):
            G.ROOM_WINDOW = utils.get_room_window()
            if not G.ROOM_WINDOW:
                G.ROOM_WINDOW = sublime.active_window()
            msg.debug('Setting project data. Path: %s' % G.PROJECT_PATH)
            G.ROOM_WINDOW.set_project_data({'folders': [{'path': G.PROJECT_PATH}]})

            def truncate_chat_view(chat_view):
                chat_view.set_read_only(False)
                chat_view.run_command('floo_view_replace_region', {'r': [0, chat_view.size()], 'data': ''})
                chat_view.set_read_only(True)
                cb()

            with open(os.path.join(G.COLAB_DIR, 'msgs.floobits.log'), 'a') as msgs_fd:
                msgs_fd.write('')
            msg.get_or_create_chat(truncate_chat_view)
Exemplo n.º 4
0
        def open_room_window3(cb):
            G.ROOM_WINDOW = utils.get_room_window()
            if not G.ROOM_WINDOW:
                G.ROOM_WINDOW = sublime.active_window()
            msg.debug('Setting project data. Path: %s' % G.PROJECT_PATH)
            G.ROOM_WINDOW.set_project_data(
                {'folders': [{
                    'path': G.PROJECT_PATH
                }]})

            def truncate_chat_view(chat_view):
                chat_view.set_read_only(False)
                chat_view.run_command('floo_view_replace_region', {
                    'r': [0, chat_view.size()],
                    'data': ''
                })
                chat_view.set_read_only(True)
                cb()

            with open(os.path.join(G.COLAB_DIR, 'msgs.floobits.log'),
                      'a') as msgs_fd:
                msgs_fd.write('')
            msg.get_or_create_chat(truncate_chat_view)
Exemplo n.º 5
0
 def create_chat_view():
     with open(os.path.join(G.COLAB_DIR, 'msgs.floobits.log'), 'w') as msgs_fd:
         msgs_fd.write('')
     msg.get_or_create_chat(cb)
Exemplo n.º 6
0
 def create_chat_view():
     with open(os.path.join(G.COLAB_DIR, 'msgs.floobits.log'),
               'a') as msgs_fd:
         msgs_fd.write('')
     msg.get_or_create_chat(truncate_chat_view)