From e482866ccb2ac184e4842e3fe4bf694187b7cdc8 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Mon, 21 Mar 2011 09:03:05 +0100 Subject: [PATCH 1/3] update screen list in first time wizard when the system detects new screens --- openlp/core/ui/firsttimeform.py | 13 ++++++++++++- openlp/core/ui/firsttimewizard.py | 2 -- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/openlp/core/ui/firsttimeform.py b/openlp/core/ui/firsttimeform.py index b3b580203..c1f062956 100644 --- a/openlp/core/ui/firsttimeform.py +++ b/openlp/core/ui/firsttimeform.py @@ -50,6 +50,7 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard): def __init__(self, screens, parent=None): QtGui.QWizard.__init__(self, parent) self.setupUi(self) + self.screens = screens # check to see if we have web access self.web = u'http://openlp.org/files/frw/' self.config = SafeConfigParser() @@ -57,11 +58,13 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard): if self.webAccess: files = self.webAccess.read() self.config.readfp(io.BytesIO(files)) - self.displayComboBox.addItems(screens.get_screen_list()) + self.updateScreenListCombo() self.downloading = unicode(translate('OpenLP.FirstTimeWizard', 'Downloading %s...')) QtCore.QObject.connect(self, QtCore.SIGNAL(u'currentIdChanged(int)'), self.onCurrentIdChanged) + QtCore.QObject.connect(Receiver.get_receiver(), + QtCore.SIGNAL(u'config_screen_changed'), self.updateScreenListCombo) def exec_(self, edit=False): """ @@ -159,6 +162,14 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard): self._performWizard() self._postWizard() + def updateScreenListCombo(self): + """ + The user changed screen resolution or enabled/disabled more screens, so + we need to update the combo box. + """ + self.displayComboBox.clear() + self.displayComboBox.addItems(self.screens.get_screen_list()) + def _getFileSize(self, url): site = urllib.urlopen(url) meta = site.info() diff --git a/openlp/core/ui/firsttimewizard.py b/openlp/core/ui/firsttimewizard.py index 9a8d2515e..9ed5e7193 100644 --- a/openlp/core/ui/firsttimewizard.py +++ b/openlp/core/ui/firsttimewizard.py @@ -158,8 +158,6 @@ class Ui_FirstTimeWizard(object): self.displayComboBox = QtGui.QComboBox(self.defaultsPage) self.displayComboBox.setEditable(False) self.displayComboBox.setInsertPolicy(QtGui.QComboBox.NoInsert) - self.displayComboBox.setSizeAdjustPolicy( - QtGui.QComboBox.AdjustToContents) self.displayComboBox.setObjectName(u'displayComboBox') self.defaultsLayout.addRow(self.displayLabel, self.displayComboBox) self.themeLabel = QtGui.QLabel(self.defaultsPage) From 2952e36a956209e768d476aac954984c1ee543e1 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Mon, 21 Mar 2011 12:51:14 +0100 Subject: [PATCH 2/3] select last screen in the list --- openlp/core/ui/firsttimeform.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openlp/core/ui/firsttimeform.py b/openlp/core/ui/firsttimeform.py index c1f062956..ba912641d 100644 --- a/openlp/core/ui/firsttimeform.py +++ b/openlp/core/ui/firsttimeform.py @@ -169,6 +169,7 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard): """ self.displayComboBox.clear() self.displayComboBox.addItems(self.screens.get_screen_list()) + self.displayComboBox.setCurrentIndex(self.displayComboBox.count() - 1) def _getFileSize(self, url): site = urllib.urlopen(url) From f2291463639f2eece9511cade84e3e64dc9dd74f Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Tue, 22 Mar 2011 08:43:31 +0200 Subject: [PATCH 3/3] Fixed a bug where not all Bible versions were shown with multiple versions. --- openlp/plugins/bibles/lib/versereferencelist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/plugins/bibles/lib/versereferencelist.py b/openlp/plugins/bibles/lib/versereferencelist.py index 52030fe91..46c228f39 100644 --- a/openlp/plugins/bibles/lib/versereferencelist.py +++ b/openlp/plugins/bibles/lib/versereferencelist.py @@ -71,7 +71,7 @@ class VerseReferenceList(object): continue prev = index - 1 if self.verse_list[prev][u'version'] != verse[u'version']: - result = u'%s (%s)' % (result, verse[u'version']) + result = u'%s (%s)' % (result, self.verse_list[prev][u'version']) result = result + u', ' if self.verse_list[prev][u'book'] != verse[u'book']: result = u'%s%s %s:' % (result, verse[u'book'],