From 40717797927f8fcc8588f793977e40314cf70205 Mon Sep 17 00:00:00 2001 From: Philip Ridout Date: Sun, 23 Jan 2011 14:33:50 +0000 Subject: [PATCH 1/2] Added the option to disable the update check on start up. (I think it defualts to false) --- openlp.pyw | 7 +++++-- openlp/core/ui/generaltab.py | 9 +++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/openlp.pyw b/openlp.pyw index 017e12774..8d20080c9 100755 --- a/openlp.pyw +++ b/openlp.pyw @@ -194,7 +194,10 @@ class OpenLP(QtGui.QApplication): # now kill the splashscreen self.splash.finish(self.mainWindow) self.mainWindow.repaint() - VersionThread(self.mainWindow, app_version).start() + update_check = QtCore.QSettings().value( + u'general/update check', QtCore.QVariant(True)).toBool() + if update_check: + VersionThread(self.mainWindow, app_version).start() return self.exec_() def hookException(self, exctype, value, traceback): @@ -280,4 +283,4 @@ if __name__ == u'__main__': """ Instantiate and run the application. """ - main() \ No newline at end of file + main() diff --git a/openlp/core/ui/generaltab.py b/openlp/core/ui/generaltab.py index 773637481..686abcaaa 100644 --- a/openlp/core/ui/generaltab.py +++ b/openlp/core/ui/generaltab.py @@ -113,6 +113,9 @@ class GeneralTab(SettingsTab): self.showSplashCheckBox = QtGui.QCheckBox(self.startupGroupBox) self.showSplashCheckBox.setObjectName(u'showSplashCheckBox') self.startupLayout.addWidget(self.showSplashCheckBox) + self.checkForUpdatesCheckBox = QtGui.QCheckBox(self.startupGroupBox) + self.checkForUpdatesCheckBox.setObjectName(u'checkForUpdatesCheckBox') + self.startupLayout.addWidget(self.checkForUpdatesCheckBox) self.leftLayout.addWidget(self.startupGroupBox) self.settingsGroupBox = QtGui.QGroupBox(self.leftColumn) self.settingsGroupBox.setObjectName(u'settingsGroupBox') @@ -249,6 +252,8 @@ class GeneralTab(SettingsTab): 'Automatically open the last service')) self.showSplashCheckBox.setText( translate('OpenLP.GeneralTab', 'Show the splash screen')) + self.checkForUpdatesCheckBox.setText( + translate('OpenLP.GeneralTab', 'Check for updates')) self.settingsGroupBox.setTitle( translate('OpenLP.GeneralTab', 'Application Settings')) self.saveCheckServiceCheckBox.setText(translate('OpenLP.GeneralTab', @@ -317,6 +322,8 @@ class GeneralTab(SettingsTab): QtCore.QVariant(False)).toBool()) self.showSplashCheckBox.setChecked(settings.value(u'show splash', QtCore.QVariant(True)).toBool()) + self.checkForUpdatesCheckBox.setChecked(settings.value(u'update check', + QtCore.QVariant(True)).toBool()) self.autoPreviewCheckBox.setChecked(settings.value(u'auto preview', QtCore.QVariant(False)).toBool()) self.timeoutSpinBox.setValue(settings.value(u'loop delay', @@ -363,6 +370,8 @@ class GeneralTab(SettingsTab): QtCore.QVariant(self.autoOpenCheckBox.isChecked())) settings.setValue(u'show splash', QtCore.QVariant(self.showSplashCheckBox.isChecked())) + settings.setValue(u'update check', + QtCore.QVariant(self.checkForUpdatesCheckBox.isChecked())) settings.setValue(u'save prompt', QtCore.QVariant(self.saveCheckServiceCheckBox.isChecked())) settings.setValue(u'auto preview', From 323cb4f001fee3e0d08e35f2330f73ae261919a6 Mon Sep 17 00:00:00 2001 From: Philip Ridout Date: Sun, 23 Jan 2011 15:55:59 +0000 Subject: [PATCH 2/2] Description of check box changed --- openlp/core/ui/generaltab.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/core/ui/generaltab.py b/openlp/core/ui/generaltab.py index 686abcaaa..edace883f 100644 --- a/openlp/core/ui/generaltab.py +++ b/openlp/core/ui/generaltab.py @@ -253,7 +253,7 @@ class GeneralTab(SettingsTab): self.showSplashCheckBox.setText( translate('OpenLP.GeneralTab', 'Show the splash screen')) self.checkForUpdatesCheckBox.setText( - translate('OpenLP.GeneralTab', 'Check for updates')) + translate('OpenLP.GeneralTab', 'Check for updates to OpenLP')) self.settingsGroupBox.setTitle( translate('OpenLP.GeneralTab', 'Application Settings')) self.saveCheckServiceCheckBox.setText(translate('OpenLP.GeneralTab',