diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index 92b34badd..aad6f1fec 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -34,6 +34,7 @@ from tempfile import NamedTemporaryFile from PyQt5 import QtCore, QtGui, QtWidgets +from openlp.core.state import State from openlp.core.common import ThemeLevel, delete_file from openlp.core.common.actions import ActionList, CategoryOrder from openlp.core.common.applocation import AppLocation @@ -828,7 +829,7 @@ class ServiceManager(QtWidgets.QWidget, RegistryBase, Ui_ServiceManager, LogMixi self.auto_start_action.setIcon(UiIcons().inactive) self.auto_start_action.setText(translate('OpenLP.ServiceManager', '&Auto Start - inactive')) if service_item['service_item'].is_text(): - for plugin in self.plugin_manager.plugins: + for plugin in State().list_plugins(): if plugin.name == 'custom' and plugin.status == PluginStatus.Active: self.create_custom_action.setVisible(True) break diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index 4a3aa5073..06a76372d 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -30,6 +30,7 @@ from xml.etree.ElementTree import XML, ElementTree from PyQt5 import QtCore, QtWidgets +from openlp.core.state import State from openlp.core.common import delete_file from openlp.core.common.applocation import AppLocation from openlp.core.common.i18n import UiStrings, get_locale_key, translate @@ -293,7 +294,7 @@ class ThemeManager(QtWidgets.QWidget, RegistryBase, Ui_ThemeManager, LogMixin, R old_theme_data = self.get_theme_data(old_theme_name) self.clone_theme_data(old_theme_data, new_theme_name) self.delete_theme(old_theme_name) - for plugin in self.plugin_manager.plugins: + for plugin in State().list_plugins(): if plugin.uses_theme(old_theme_name): plugin.rename_theme(old_theme_name, new_theme_name) self.renderer.set_theme(self.get_theme_data(new_theme_name)) @@ -771,7 +772,7 @@ class ThemeManager(QtWidgets.QWidget, RegistryBase, Ui_ThemeManager, LogMixin, R # check for use in the system else where. if test_plugin: plugin_usage = "" - for plugin in self.plugin_manager.plugins: + for plugin in State().list_plugins(): used_count = plugin.uses_theme(theme) if used_count: plugin_usage = "{plug}{text}".format(plug=plugin_usage, diff --git a/openlp/plugins/songs/forms/editsongform.py b/openlp/plugins/songs/forms/editsongform.py index 62d0eb7d7..e442e66d5 100644 --- a/openlp/plugins/songs/forms/editsongform.py +++ b/openlp/plugins/songs/forms/editsongform.py @@ -29,6 +29,7 @@ from shutil import copyfile from PyQt5 import QtCore, QtWidgets +from openlp.core.state import State from openlp.core.common.applocation import AppLocation from openlp.core.common.i18n import UiStrings, get_natural_key, translate from openlp.core.common.mixins import RegistryProperties @@ -416,7 +417,7 @@ class EditSongForm(QtWidgets.QDialog, Ui_EditSongDialog, RegistryProperties): Load the media files into a combobox. """ self.from_media_button.setVisible(False) - for plugin in self.plugin_manager.plugins: + for plugin in State().list_plugins(): if plugin.name == 'media' and plugin.status == PluginStatus.Active: self.from_media_button.setVisible(True) self.media_form.populate_files(plugin.media_item.get_list(MediaType.Audio))