(self, uuid=None)
Return the UUID of the parent tab of a given terminal
Return the UUID of the parent tab of a given terminal
Return the UUID of the parent tab of a given terminal
def get_tab(self, uuid=None):
        """Return the UUID of the parent tab of a given terminal"""
        maker = Factory()
        terminal = self.terminator.find_terminal_by_uuid(uuid)
        window = terminal.get_toplevel()
        root_widget = window.get_children()[0]
        if maker.isinstance(root_widget, 'Notebook'):
            #return root_widget.uuid.urn
            for tab_child in root_widget.get_children():
                terms = [tab_child]
                if not maker.isinstance(terms[0], "Terminal"):
                    terms = enumerate_descendants(tab_child)[1]
                if terminal in terms:
                    # FIXME: There are no uuid's assigned to the the notebook, or the actual tabs!
                    # This would fail: return root_widget.uuid.urn
                    return ""
def get_tab ( self , uuid = None ) : maker = Factory ( ) terminal = self . terminator . find_terminal_by_uuid ( uuid ) window = terminal . get_toplevel ( ) root_widget = window . get_children ( ) [ 0 ] if maker . isinstance ( root_widget , 'Notebook' ) : #return root_widget.uuid.urn for tab_child in root_widget . get_children ( ) : terms = [ tab_child ] if not maker . isinstance ( terms [ 0 ] , "Terminal" ) : terms = enumerate_descendants ( tab_child ) [ 1 ] if terminal in terms : # FIXME: There are no uuid's assigned to the the notebook, or the actual tabs! # This would fail: return root_widget.uuid.urn return ""