mirror of https://gitlab.com/openlp/openlp.git
Small fix ups and corrections. Plugin list obeys can_be_diabled
This commit is contained in:
commit
7ee0549df2
|
@ -90,7 +90,7 @@ class PluginManager(object):
|
||||||
try:
|
try:
|
||||||
__import__(modulename, globals(), locals(), [])
|
__import__(modulename, globals(), locals(), [])
|
||||||
except ImportError, e:
|
except ImportError, e:
|
||||||
log.error(u'Failed to import module %s on path %s for reason %s',
|
log.exception(u'Failed to import module %s on path %s for reason %s',
|
||||||
modulename, path, e.args[0])
|
modulename, path, e.args[0])
|
||||||
plugin_classes = Plugin.__subclasses__()
|
plugin_classes = Plugin.__subclasses__()
|
||||||
self.plugins = []
|
self.plugins = []
|
||||||
|
|
|
@ -528,18 +528,16 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||||
self.versionCheck()
|
self.versionCheck()
|
||||||
|
|
||||||
def versionCheck(self):
|
def versionCheck(self):
|
||||||
# We do not want this in development!
|
applicationVersion = self.generalConfig.get_config(u'Application version', u'1.9.0-595')
|
||||||
if not log.isEnabledFor(logging.DEBUG):
|
version = LatestVersion(self.generalConfig).checkVersion(applicationVersion)
|
||||||
applicationVersion = self.generalConfig.get_config(u'Application version', u'1.9.0')
|
if applicationVersion != version:
|
||||||
version = LatestVersion(self.generalConfig).checkVersion(applicationVersion)
|
QtGui.QMessageBox.question(None,
|
||||||
if applicationVersion != version:
|
translate(u'mainWindow', u'OpenLP version Updated'),
|
||||||
QtGui.QMessageBox.question(None,
|
translate(u'mainWindow', u'OpenLP version %s has been updated to version %s'
|
||||||
translate(u'mainWindow', u'OpenLP version Updated'),
|
% (applicationVersion, version)),
|
||||||
translate(u'mainWindow', u'OpenLP version %s has been updated to version %s'
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
|
||||||
% (applicationVersion, version)),
|
QtGui.QMessageBox.Ok)
|
||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
|
self.generalConfig.set_config(u'Application version', version)
|
||||||
QtGui.QMessageBox.Ok)
|
|
||||||
self.generalConfig.set_config(u'Application version', version)
|
|
||||||
|
|
||||||
|
|
||||||
def getMonitorNumber(self):
|
def getMonitorNumber(self):
|
||||||
|
|
|
@ -83,7 +83,11 @@ class PluginForm(QtGui.QDialog, Ui_PluginViewDialog):
|
||||||
log.debug('PluginStatus: %s', str(self.activePlugin.status))
|
log.debug('PluginStatus: %s', str(self.activePlugin.status))
|
||||||
self.VersionNumberLabel.setText(self.activePlugin.version)
|
self.VersionNumberLabel.setText(self.activePlugin.version)
|
||||||
self.AboutTextBrowser.setHtml(self.activePlugin.about())
|
self.AboutTextBrowser.setHtml(self.activePlugin.about())
|
||||||
self.StatusComboBox.setCurrentIndex(int(self.activePlugin.status))
|
if self.activePlugin.can_be_disabled():
|
||||||
|
self.StatusComboBox.setCurrentIndex(int(self.activePlugin.status))
|
||||||
|
self.StatusComboBox.setEnabled(True)
|
||||||
|
else:
|
||||||
|
self.StatusComboBox.setEnabled(False)
|
||||||
|
|
||||||
def onPluginListWidgetSelectionChanged(self):
|
def onPluginListWidgetSelectionChanged(self):
|
||||||
if self.PluginListWidget.currentItem() is None:
|
if self.PluginListWidget.currentItem() is None:
|
||||||
|
|
Loading…
Reference in New Issue