Added the option to disable the update check on start up. (I think it defualts to false)

This commit is contained in:
Philip Ridout 2011-01-23 14:33:50 +00:00
parent 5d41a9fb90
commit 4071779792
2 changed files with 14 additions and 2 deletions

View File

@ -194,7 +194,10 @@ class OpenLP(QtGui.QApplication):
# now kill the splashscreen # now kill the splashscreen
self.splash.finish(self.mainWindow) self.splash.finish(self.mainWindow)
self.mainWindow.repaint() 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_() return self.exec_()
def hookException(self, exctype, value, traceback): def hookException(self, exctype, value, traceback):

View File

@ -113,6 +113,9 @@ class GeneralTab(SettingsTab):
self.showSplashCheckBox = QtGui.QCheckBox(self.startupGroupBox) self.showSplashCheckBox = QtGui.QCheckBox(self.startupGroupBox)
self.showSplashCheckBox.setObjectName(u'showSplashCheckBox') self.showSplashCheckBox.setObjectName(u'showSplashCheckBox')
self.startupLayout.addWidget(self.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.leftLayout.addWidget(self.startupGroupBox)
self.settingsGroupBox = QtGui.QGroupBox(self.leftColumn) self.settingsGroupBox = QtGui.QGroupBox(self.leftColumn)
self.settingsGroupBox.setObjectName(u'settingsGroupBox') self.settingsGroupBox.setObjectName(u'settingsGroupBox')
@ -249,6 +252,8 @@ class GeneralTab(SettingsTab):
'Automatically open the last service')) 'Automatically open the last service'))
self.showSplashCheckBox.setText( self.showSplashCheckBox.setText(
translate('OpenLP.GeneralTab', 'Show the splash screen')) translate('OpenLP.GeneralTab', 'Show the splash screen'))
self.checkForUpdatesCheckBox.setText(
translate('OpenLP.GeneralTab', 'Check for updates'))
self.settingsGroupBox.setTitle( self.settingsGroupBox.setTitle(
translate('OpenLP.GeneralTab', 'Application Settings')) translate('OpenLP.GeneralTab', 'Application Settings'))
self.saveCheckServiceCheckBox.setText(translate('OpenLP.GeneralTab', self.saveCheckServiceCheckBox.setText(translate('OpenLP.GeneralTab',
@ -317,6 +322,8 @@ class GeneralTab(SettingsTab):
QtCore.QVariant(False)).toBool()) QtCore.QVariant(False)).toBool())
self.showSplashCheckBox.setChecked(settings.value(u'show splash', self.showSplashCheckBox.setChecked(settings.value(u'show splash',
QtCore.QVariant(True)).toBool()) QtCore.QVariant(True)).toBool())
self.checkForUpdatesCheckBox.setChecked(settings.value(u'update check',
QtCore.QVariant(True)).toBool())
self.autoPreviewCheckBox.setChecked(settings.value(u'auto preview', self.autoPreviewCheckBox.setChecked(settings.value(u'auto preview',
QtCore.QVariant(False)).toBool()) QtCore.QVariant(False)).toBool())
self.timeoutSpinBox.setValue(settings.value(u'loop delay', self.timeoutSpinBox.setValue(settings.value(u'loop delay',
@ -363,6 +370,8 @@ class GeneralTab(SettingsTab):
QtCore.QVariant(self.autoOpenCheckBox.isChecked())) QtCore.QVariant(self.autoOpenCheckBox.isChecked()))
settings.setValue(u'show splash', settings.setValue(u'show splash',
QtCore.QVariant(self.showSplashCheckBox.isChecked())) QtCore.QVariant(self.showSplashCheckBox.isChecked()))
settings.setValue(u'update check',
QtCore.QVariant(self.checkForUpdatesCheckBox.isChecked()))
settings.setValue(u'save prompt', settings.setValue(u'save prompt',
QtCore.QVariant(self.saveCheckServiceCheckBox.isChecked())) QtCore.QVariant(self.saveCheckServiceCheckBox.isChecked()))
settings.setValue(u'auto preview', settings.setValue(u'auto preview',