From c8e9496db1717692bc7ec6584f7b195f1a47919b Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sat, 29 Oct 2011 20:13:11 +0100 Subject: [PATCH] Fix up review comments --- openlp/core/ui/__init__.py | 6 +++--- openlp/core/ui/maindisplay.py | 6 +++--- openlp/plugins/alerts/lib/alertstab.py | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/openlp/core/ui/__init__.py b/openlp/core/ui/__init__.py index f5fece1f0..6a04a080b 100644 --- a/openlp/core/ui/__init__.py +++ b/openlp/core/ui/__init__.py @@ -52,10 +52,10 @@ class HideMode(object): Theme = 2 Screen = 3 -class Location(object): +class AlertLocation(object): """ - This is an enumeration class which specifies the different modes of hiding - the display. + This is an enumeration class which controls where Alerts are placed on the + screen. ``Top`` Place the text at the top of the screen. diff --git a/openlp/core/ui/maindisplay.py b/openlp/core/ui/maindisplay.py index 90203922f..0f932c2f5 100644 --- a/openlp/core/ui/maindisplay.py +++ b/openlp/core/ui/maindisplay.py @@ -37,7 +37,7 @@ from PyQt4.phonon import Phonon from openlp.core.lib import Receiver, build_html, ServiceItem, image_to_byte, \ translate, PluginManager -from openlp.core.ui import HideMode, ScreenList, Location +from openlp.core.ui import HideMode, ScreenList, AlertLocation log = logging.getLogger(__name__) @@ -241,10 +241,10 @@ class MainDisplay(QtGui.QGraphicsView): alert_height = int(height.toString()) shrinkItem.resize(self.width(), alert_height) shrinkItem.setVisible(True) - if location == Location.Middle: + if location == AlertLocation.Middle: shrinkItem.move(self.screen[u'size'].left(), (self.screen[u'size'].height() - alert_height) / 2) - elif location == Location.Bottom: + elif location == AlertLocation.Bottom: shrinkItem.move(self.screen[u'size'].left(), self.screen[u'size'].height() - alert_height) else: diff --git a/openlp/plugins/alerts/lib/alertstab.py b/openlp/plugins/alerts/lib/alertstab.py index 10bec702d..bd879fef3 100644 --- a/openlp/plugins/alerts/lib/alertstab.py +++ b/openlp/plugins/alerts/lib/alertstab.py @@ -28,7 +28,7 @@ from PyQt4 import QtCore, QtGui from openlp.core.lib import SettingsTab, translate, Receiver -from openlp.core.ui import Location +from openlp.core.ui import AlertLocation from openlp.core.lib.ui import UiStrings, create_valign_combo class AlertsTab(SettingsTab): @@ -160,7 +160,7 @@ class AlertsTab(SettingsTab): self.font_face = unicode(settings.value( u'font face', QtCore.QVariant(QtGui.QFont().family())).toString()) self.location = settings.value( - u'location', QtCore.QVariant(Location.Bottom)).toInt()[0] + u'location', QtCore.QVariant(AlertLocation.Bottom)).toInt()[0] settings.endGroup() self.fontSizeSpinBox.setValue(self.font_size) self.timeoutSpinBox.setValue(self.timeout)