Small fix ups and corrections. Plugin list obeys can_be_diabled

This commit is contained in:
Tim Bentley 2009-10-11 20:31:46 +01:00
commit 7ee0549df2
3 changed files with 16 additions and 14 deletions

View File

@ -90,7 +90,7 @@ class PluginManager(object):
try:
__import__(modulename, globals(), locals(), [])
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])
plugin_classes = Plugin.__subclasses__()
self.plugins = []

View File

@ -528,18 +528,16 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
self.versionCheck()
def versionCheck(self):
# We do not want this in development!
if not log.isEnabledFor(logging.DEBUG):
applicationVersion = self.generalConfig.get_config(u'Application version', u'1.9.0')
version = LatestVersion(self.generalConfig).checkVersion(applicationVersion)
if applicationVersion != version:
QtGui.QMessageBox.question(None,
translate(u'mainWindow', u'OpenLP version Updated'),
translate(u'mainWindow', u'OpenLP version %s has been updated to version %s'
% (applicationVersion, version)),
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
QtGui.QMessageBox.Ok)
self.generalConfig.set_config(u'Application version', version)
applicationVersion = self.generalConfig.get_config(u'Application version', u'1.9.0-595')
version = LatestVersion(self.generalConfig).checkVersion(applicationVersion)
if applicationVersion != version:
QtGui.QMessageBox.question(None,
translate(u'mainWindow', u'OpenLP version Updated'),
translate(u'mainWindow', u'OpenLP version %s has been updated to version %s'
% (applicationVersion, version)),
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
QtGui.QMessageBox.Ok)
self.generalConfig.set_config(u'Application version', version)
def getMonitorNumber(self):

View File

@ -83,7 +83,11 @@ class PluginForm(QtGui.QDialog, Ui_PluginViewDialog):
log.debug('PluginStatus: %s', str(self.activePlugin.status))
self.VersionNumberLabel.setText(self.activePlugin.version)
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):
if self.PluginListWidget.currentItem() is None: