Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
Walk up the family tree of widget to see if any ancestors are of type

        def has_ancestor(widget, wtype):
    """Walk up the family tree of widget to see if any ancestors are of type"""
    while widget:
        widget = widget.get_parent()
        if isinstance(widget, wtype):
            return(True)
    return(False)
        


src/n/i/NINJA-PingU-HEAD/lib/terminator/terminatorlib/terminal.py   NINJA-PingU(Download)
            menu.append(item)
 
        if util.has_ancestor(self, gtk.Notebook):
            item = gtk.MenuItem(_('G_roup all in tab'))
            item.connect('activate', lambda x: self.emit('group_tab'))