def make_item(self): """Make a corresponding CheckItem object.""" chk = CheckItem(self.title, (_('Coop') if self.is_coop else _('SP')), self.mod_time, hover_text=self.desc) chk.p2c = self return chk
def make_packitems() -> Iterable[CheckItem]: """Make the checkitems used in the details view.""" pack_items.clear() for pack in packageLoader.packages.values(): # type: packageLoader.Package pack_items[pack.id] = item = CheckItem( pack.disp_name, hover_text=pack.desc or 'No description!', # The clean package can't be disabled! lock_check=(pack.id == packageLoader.CLEAN_PACKAGE), state=pack.enabled) item.package = pack return pack_items.values()