forked from openlp/openlp
fix missing state code
This commit is contained in:
parent
8ce94115c9
commit
df2ace541e
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user