← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~meths/openlp/trivialfixes into lp:openlp

 

Jon Tibble has proposed merging lp:~meths/openlp/trivialfixes into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)


Fix alerts not being screen width
Fix screen size not updating when override check box is unchecked
Whitespace tweak
-- 
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/31468
Your team OpenLP Core is requested to review the proposed merge of lp:~meths/openlp/trivialfixes into lp:openlp.
=== modified file 'openlp/core/ui/generaltab.py'
--- openlp/core/ui/generaltab.py	2010-07-28 12:44:33 +0000
+++ openlp/core/ui/generaltab.py	2010-07-31 22:28:44 +0000
@@ -38,6 +38,7 @@
         """
         self.screens = screens
         self.monitorNumber = 0
+        self.overrideChanged = False
         SettingsTab.__init__(self, u'General')
 
     def preLoad(self):
@@ -473,16 +474,18 @@
         Receiver.send_message(u'slidecontroller_live_spin_delay',
             self.timeoutSpinBox.value())
         # Reset screens after initial definition
-        self.screens.override[u'size'] = QtCore.QRect(
-            int(self.customXValueEdit.text()),
-            int(self.customYValueEdit.text()),
-            int(self.customWidthValueEdit.text()),
-            int(self.customHeightValueEdit.text()))
-        if self.overrideCheckBox.isChecked():
-            self.screens.set_override_display()
-            Receiver.send_message(u'config_screen_changed')
-        else:
-            self.screens.reset_current_display()
+        if self.overrideChanged:
+            self.screens.override[u'size'] = QtCore.QRect(
+                int(self.customXValueEdit.text()),
+                int(self.customYValueEdit.text()),
+                int(self.customWidthValueEdit.text()),
+                int(self.customHeightValueEdit.text()))
+            if self.overrideCheckBox.isChecked():
+                self.screens.set_override_display()
+                Receiver.send_message(u'config_screen_changed')
+            else:
+                self.screens.reset_current_display()
+                Receiver.send_message(u'config_screen_changed')
 
     def onOverrideCheckBoxToggled(self, checked):
         """

=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py	2010-07-28 09:58:11 +0000
+++ openlp/core/ui/maindisplay.py	2010-07-31 22:28:44 +0000
@@ -252,6 +252,7 @@
             self.size().height())
         self.webView.setGeometry(0, 0, self.size().width(),
             self.size().height())
+        self.alertText.setTextWidth(self.size().width())
         #Build a custom splash screen
         self.initialFrame = QtGui.QImage(
             self.screen[u'size'].width(),
@@ -322,7 +323,6 @@
 
     def setupAlert(self):
         self.alertText = QtGui.QGraphicsTextItem()
-        self.alertText.setTextWidth(self.size().width())
         self.alertText.setZValue(8)
         self.scene.addItem(self.alertText)
 

=== modified file 'openlp/plugins/alerts/alertsplugin.py'
--- openlp/plugins/alerts/alertsplugin.py	2010-07-31 00:46:15 +0000
+++ openlp/plugins/alerts/alertsplugin.py	2010-07-31 22:28:44 +0000
@@ -88,8 +88,7 @@
 
     def toggleAlertsState(self):
         self.alertsActive = not self.alertsActive
-        QtCore.QSettings().setValue(
-            self.settingsSection + u'/active',
+        QtCore.QSettings().setValue(self.settingsSection + u'/active',
             QtCore.QVariant(self.alertsActive))
 
     def onAlertsTrigger(self):


Follow ups