openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #07370
[Merge] lp:~googol-hush/openlp/trivial into lp:openlp
Andreas Preikschat has proposed merging lp:~googol-hush/openlp/trivial into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~googol-hush/openlp/trivial/+merge/54160
Hello,
update the screen list combo box when a screen was changed/added/removed
--
https://code.launchpad.net/~googol-hush/openlp/trivial/+merge/54160
Your team OpenLP Core is requested to review the proposed merge of lp:~googol-hush/openlp/trivial into lp:openlp.
=== modified file 'openlp/core/ui/firsttimeform.py'
--- openlp/core/ui/firsttimeform.py 2011-03-20 16:56:01 +0000
+++ openlp/core/ui/firsttimeform.py 2011-03-21 08:14:28 +0000
@@ -50,6 +50,7 @@
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 @@
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 @@
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()
=== modified file 'openlp/core/ui/firsttimewizard.py'
--- openlp/core/ui/firsttimewizard.py 2011-03-11 10:20:09 +0000
+++ openlp/core/ui/firsttimewizard.py 2011-03-21 08:14:28 +0000
@@ -158,8 +158,6 @@
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)
Follow ups