def METHOD_NAME(self, button, data):
    active = button.get_active()
    self.enabled_types[data] = active
    self.type_tags[data].props.invisible = not active
    self.textbuffer.set_modified(True)