diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index 990f2141c..d13f32f50 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -92,8 +92,7 @@ class Settings(QtCore.QSettings): then the Settings constructor (without any arguments) will create a Settings object for accessing settings stored in that Ini file. """ - # TODO change - __filePath = u'' + __filePath__ = u'' @staticmethod def setFilename(iniFile): @@ -102,12 +101,12 @@ class Settings(QtCore.QSettings): Does not affect existing Settings objects. """ - Settings.__filePath = iniFile + Settings.__filePath__ = iniFile def __init__(self, *args): - if not args and Settings.__filePath and (Settings.defaultFormat() == - Settings.IniFormat): - QtCore.QSettings.__init__(self, Settings.__filePath, + if not args and Settings.__filePath__ and \ + Settings.defaultFormat() == Settings.IniFormat: + QtCore.QSettings.__init__(self, Settings.__filePath__, Settings.IniFormat) else: QtCore.QSettings.__init__(self, *args) @@ -130,7 +129,7 @@ class Settings(QtCore.QSettings): extended if a certain type is missing! """ setting = super(Settings, self).value(key, defaultValue) - # An empty list saved to the settings results ins a None type being + # An empty list saved to the settings results in a None type being # returned. if setting is None: return [] diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 274df7eb7..8c90db8f1 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -699,7 +699,6 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): self.liveController.screenSizeChanged() log.info(u'Load data from Settings') if Settings().value(u'advanced/save current plugin', False): - # TODO: QtCore.QVariant()).toInt()[0] savedPlugin = Settings().value(u'advanced/current media plugin', -1) if savedPlugin != -1: self.mediaToolBox.setCurrentIndex(savedPlugin) diff --git a/openlp/core/ui/themeform.py b/openlp/core/ui/themeform.py index 7ac17b122..cf2706bdf 100644 --- a/openlp/core/ui/themeform.py +++ b/openlp/core/ui/themeform.py @@ -205,8 +205,6 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): """ Updates the lines on a page on the wizard """ - #TODO check - print type(lines) self.mainLineCountLabel.setText(translate('OpenLP.ThemeForm', '(approximately %d lines per slide)') % int(lines)) @@ -233,7 +231,7 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): background_image = BackgroundType.to_string(BackgroundType.Image) if self.page(self.currentId()) == self.backgroundPage and \ self.theme.background_type == background_image and \ - self.imageFileEdit.text().isEmpty(): + not self.imageFileEdit.text(): QtGui.QMessageBox.critical(self, translate('OpenLP.ThemeWizard', 'Background Image Empty'), translate('OpenLP.ThemeWizard', 'You have not selected a ' diff --git a/openlp/plugins/bibles/lib/biblestab.py b/openlp/plugins/bibles/lib/biblestab.py index b6f67170b..cce348733 100644 --- a/openlp/plugins/bibles/lib/biblestab.py +++ b/openlp/plugins/bibles/lib/biblestab.py @@ -332,7 +332,7 @@ class BiblesTab(SettingsTab): if self.verseSeparatorLineEdit.isModified(): text = self.verseSeparatorLineEdit.text() if text == get_reference_separator(u'sep_v_default') or \ - text.remove(u'|').isEmpty(): + not text.replace(u'|', u''): self.verseSeparatorCheckBox.setChecked(False) self.verseSeparatorLineEdit.setText( get_reference_separator(u'sep_v_default')) @@ -357,7 +357,7 @@ class BiblesTab(SettingsTab): if self.rangeSeparatorLineEdit.isModified(): text = self.rangeSeparatorLineEdit.text() if text == get_reference_separator(u'sep_r_default') or \ - text.remove(u'|').isEmpty(): + not text.replace(u'|', u''): self.rangeSeparatorCheckBox.setChecked(False) self.rangeSeparatorLineEdit.setText( get_reference_separator(u'sep_r_default')) @@ -382,7 +382,7 @@ class BiblesTab(SettingsTab): if self.listSeparatorLineEdit.isModified(): text = self.listSeparatorLineEdit.text() if text == get_reference_separator(u'sep_l_default') or \ - text.remove(u'|').isEmpty(): + not text.replace(u'|', u''): self.listSeparatorCheckBox.setChecked(False) self.listSeparatorLineEdit.setText( get_reference_separator(u'sep_l_default')) @@ -407,7 +407,7 @@ class BiblesTab(SettingsTab): if self.endSeparatorLineEdit.isModified(): text = self.endSeparatorLineEdit.text() if text == get_reference_separator(u'sep_e_default') or \ - text.remove(u'|').isEmpty(): + not text.replace(u'|', u''): self.endSeparatorCheckBox.setChecked(False) self.endSeparatorLineEdit.setText( get_reference_separator(u'sep_e_default'))