From 648d33688ac31f0b4cbc8556b83debccc5764df9 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Fri, 11 Mar 2011 18:36:34 +0200 Subject: [PATCH] Fixed some things from my last merge proposal. --- openlp.pyw | 8 ++++---- openlp/core/ui/firsttimeform.py | 4 +--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/openlp.pyw b/openlp.pyw index cec743f01..3dee7452b 100755 --- a/openlp.pyw +++ b/openlp.pyw @@ -186,7 +186,7 @@ class OpenLP(QtGui.QApplication): # start the main app window self.appClipboard = self.clipboard() self.mainWindow = MainWindow(screens, app_version, self.appClipboard, - firstTime) + has_run_wizard) self.mainWindow.show() if show_splash: # now kill the splashscreen @@ -271,11 +271,11 @@ def main(): # Now create and actually run the application. app = OpenLP(qt_args) # Define the settings environment - QtCore.QSettings(u'OpenLP', u'OpenLP') + settings = QtCore.QSettings(u'OpenLP', u'OpenLP') # First time checks in settings # Use explicit reference as not inside a QT environment yet - if QtCore.QSettings(u'OpenLP', u'OpenLP').value( - u'general/first time', QtCore.QVariant(True)).toBool(): + if not settings.value(u'general/has run wizard', + QtCore.QVariant(False)).toBool(): if not FirstTimeLanguageForm().exec_(): # if cancel then stop processing sys.exit() diff --git a/openlp/core/ui/firsttimeform.py b/openlp/core/ui/firsttimeform.py index b2895cb47..9f211e49e 100644 --- a/openlp/core/ui/firsttimeform.py +++ b/openlp/core/ui/firsttimeform.py @@ -28,7 +28,6 @@ import io import logging import os import urllib -from random import randint from tempfile import gettempdir from ConfigParser import SafeConfigParser @@ -58,8 +57,7 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard): if self.webAccess: files = self.webAccess.read() self.config.readfp(io.BytesIO(files)) - for screen in screens.get_screen_list(): - self.displayComboBox.addItem(screen) + self.displayComboBox.addItems(screens.get_screen_list()) self.downloading = unicode(translate('OpenLP.FirstTimeWizard', 'Downloading %s...')) QtCore.QObject.connect(self,