(self, uuid, type)
Split a terminal horizontally o?r vertically, by UUID
Split a terminal horizontally o?r vertically, by UUID
Split a terminal horizontally o?r vertically by UUID
def new_terminal(self, uuid, type):
        """Split a terminal horizontally o?r vertically, by UUID"""
        dbg('dbus method called: %s' % type)
        if not uuid:
            return "ERROR: No UUID specified"
        terminal = self.terminator.find_terminal_by_uuid(uuid)
        terminals_before = set(self.get_terminals())
        if not terminal:
            return "ERROR: Terminal with supplied UUID not found"
        elif type == 'tab':
            terminal.key_new_tab()
        elif type == 'hsplit':
            terminal.key_split_horiz()
        elif type == 'vsplit':
            terminal.key_split_vert()
        else:
            return "ERROR: Unknown type \"%s\" specified" % (type)
        terminals_after = set(self.get_terminals())
        # Detect the new terminal UUID
        new_terminal_set = list(terminals_after - terminals_before)
        if len(new_terminal_set) != 1:
            return "ERROR: Cannot determine the UUID of the added terminal"
        else:
            return new_terminal_set[0]
def new_terminal ( self , uuid , type ) : dbg ( 'dbus method called: %s' % type ) if not uuid : return "ERROR: No UUID specified" terminal = self . terminator . find_terminal_by_uuid ( uuid ) terminals_before = set ( self . get_terminals ( ) ) if not terminal : return "ERROR: Terminal with supplied UUID not found" elif type == 'tab' : terminal . key_new_tab ( ) elif type == 'hsplit' : terminal . key_split_horiz ( ) elif type == 'vsplit' : terminal . key_split_vert ( ) else : return "ERROR: Unknown type \"%s\" specified" % ( type ) terminals_after = set ( self . get_terminals ( ) ) # Detect the new terminal UUID new_terminal_set = list ( terminals_after - terminals_before ) if len ( new_terminal_set ) != 1 : return "ERROR: Cannot determine the UUID of the added terminal" else : return new_terminal_set [ 0 ]