forked from openlp/openlp
fixes
This commit is contained in:
parent
7f799b09d2
commit
df3bbc1ec0
@ -46,7 +46,7 @@ class PluginForm(QtWidgets.QDialog, Ui_PluginViewDialog, RegistryProperties):
|
||||
super(PluginForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
|
||||
QtCore.Qt.WindowCloseButtonHint)
|
||||
self.active_plugin = None
|
||||
self.programatic_change = False
|
||||
self.programmatic_change = False
|
||||
self.setupUi(self)
|
||||
self.load()
|
||||
self._clear_details()
|
||||
@ -59,11 +59,12 @@ class PluginForm(QtWidgets.QDialog, Ui_PluginViewDialog, RegistryProperties):
|
||||
Load the plugin details into the screen
|
||||
"""
|
||||
self.plugin_list_widget.clear()
|
||||
self.programatic_change = True
|
||||
self.programmatic_change = True
|
||||
self._clear_details()
|
||||
self.programatic_change = True
|
||||
self.programmatic_change = True
|
||||
plugin_list_width = 0
|
||||
for plugin in State().list_plugins():
|
||||
if plugin:
|
||||
item = QtWidgets.QListWidgetItem(self.plugin_list_widget)
|
||||
# We do this just to make 100% sure the status is an integer as
|
||||
# sometimes when it's loaded from the config, it isn't cast to int.
|
||||
@ -99,14 +100,14 @@ class PluginForm(QtWidgets.QDialog, Ui_PluginViewDialog, RegistryProperties):
|
||||
"""
|
||||
log.debug('PluginStatus: {status}'.format(status=str(self.active_plugin.status)))
|
||||
self.about_text_browser.setHtml(self.active_plugin.about())
|
||||
self.programatic_change = True
|
||||
self.programmatic_change = True
|
||||
if self.active_plugin.status != PluginStatus.Disabled:
|
||||
self.status_checkbox.setChecked(self.active_plugin.status == PluginStatus.Active)
|
||||
self.status_checkbox.setEnabled(True)
|
||||
else:
|
||||
self.status_checkbox.setChecked(False)
|
||||
self.status_checkbox.setEnabled(False)
|
||||
self.programatic_change = False
|
||||
self.programmatic_change = False
|
||||
|
||||
def on_plugin_list_widget_selection_changed(self):
|
||||
"""
|
||||
@ -130,7 +131,7 @@ class PluginForm(QtWidgets.QDialog, Ui_PluginViewDialog, RegistryProperties):
|
||||
"""
|
||||
If the status of a plugin is altered, apply the change
|
||||
"""
|
||||
if self.programatic_change or self.active_plugin is None:
|
||||
if self.programmatic_change or self.active_plugin is None:
|
||||
return
|
||||
if status:
|
||||
self.application.set_busy_cursor()
|
||||
|
Loading…
Reference in New Issue
Block a user