def checkitem(self, title, cb=None): """ Utility method for easily creating a CheckMenuItem """ check_item = CheckMenuItem(title) if cb: check_item.connect("toggled", cb) check_item.show() return check_item
def checkitem(self, title, cb=None, active=False): from xpra.gtk_common.gtk_util import CheckMenuItem check_item = CheckMenuItem(title) check_item.set_active(active) if cb: check_item.connect("toggled", cb) check_item.show() return check_item