def load_cover_art_providers(self): """Load available providers, initialize provider-specific options, restore state of each """ providers = cover_art_providers() for provider in providers: try: title = _(provider.TITLE) except AttributeError: title = provider.NAME checked = is_provider_enabled(provider.NAME) self.ui.ca_providers_list.addItem(CheckboxListItem(title, checked=checked, data=provider.NAME))
def load_cover_art_providers(self): """Load available providers, initialize provider-specific options, restore state of each """ providers = cover_art_providers() for provider in providers: try: title = _(provider.TITLE) except AttributeError: title = provider.NAME checked = is_provider_enabled(provider.NAME) self.ui.ca_providers_list.addItem( CheckboxListItem(title, checked=checked, data=provider.NAME))
def load_cover_art_providers(self): """Load available providers, initialize provider-specific options, restore state of each """ providers = cover_art_providers() for provider in providers: try: title = _(provider.TITLE) except AttributeError: title = provider.NAME checked = is_provider_enabled(provider.NAME) self.provider_list_widget.addItem(SortableCheckboxListItem(title, checked=checked, data=provider.NAME)) def update_providers_options(items): self.ca_providers = [(item.data, item.checked) for item in items] self.provider_list_widget.changed.connect(update_providers_options)