String fixes

This commit is contained in:
Tim Bentley 2010-08-28 16:49:51 +01:00
parent 764c3d42c9
commit 5ba4de64ca
5 changed files with 24 additions and 15 deletions

View File

@ -229,7 +229,7 @@ def context_menu_separator(base):
def image_to_byte(image):
"""
Resize an image to fit on the current screen for the web and retuns
Resize an image to fit on the current screen for the web and returns
it as a byte stream.
``image``
@ -253,12 +253,16 @@ def resize_image(image, width, height, background=QtCore.Qt.black):
``image``
The image to resize.
``width``
The new image width.
``height``
The new image height.
``background``
The background colour defaults to black.
"""
preview = QtGui.QImage(image)
if not preview.isNull():

View File

@ -58,6 +58,9 @@ class DisplayWidget(QtGui.QGraphicsView):
self.setStyleSheet(u'border: none;')
def keyPressEvent(self, event):
"""
Handle key events from display screen
"""
# Key events only needed for live
if not self.live:
return
@ -104,6 +107,9 @@ class MainDisplay(DisplayWidget):
QtCore.SIGNAL(u'maindisplay_show'), self.showDisplay)
def setup(self):
"""
Set up and build the output screen
"""
log.debug(u'Setup live = %s for %s ' % (self.isLive,
self.screens.monitor_number))
self.screen = self.screens.current
@ -332,6 +338,9 @@ class MainDisplay(DisplayWidget):
self.footer(serviceItem.foot_text)
def footer(self, text):
"""
Display the Footer
"""
log.debug(u'footer')
js = "show_footer('" + \
text.replace("\\", "\\\\").replace("\'", "\\\'") + "')"

View File

@ -346,7 +346,6 @@ class ThemeManager(QtGui.QWidget):
log.debug(u'Load themes from dir')
self.themelist = []
self.themeListWidget.clear()
#root, dirs, files = os.walk(self.path)
dirList = os.listdir(self.path)
for name in dirList:
if name.endswith(u'.png'):
@ -731,8 +730,6 @@ class ThemeManager(QtGui.QWidget):
theme.display_slideTransition = theme.display_slideTransition
theme.font_footer_color = theme.font_footer_color.strip()
theme.font_footer_height = int(theme.font_footer_height.strip())
# theme.font_footer_indentation = \
# int(theme.font_footer_indentation.strip())
theme.font_footer_italics = str_to_bool(theme.font_footer_italics)
theme.font_footer_name = theme.font_footer_name.strip()
#theme.font_footer_override
@ -745,7 +742,6 @@ class ThemeManager(QtGui.QWidget):
theme.font_main_color = theme.font_main_color.strip()
theme.font_main_height = int(theme.font_main_height.strip())
theme.font_main_italics = str_to_bool(theme.font_main_italics)
# theme.font_main_indentation = int(theme.font_main_indentation)
theme.font_main_name = theme.font_main_name.strip()
#theme.font_main_override
theme.font_main_proportion = int(theme.font_main_proportion.strip())

View File

@ -83,7 +83,7 @@ class AlertsPlugin(Plugin):
self.liveController.alertTab = self.alertsTab
def finalise(self):
log.info(u'Alerts Finaliseing')
log.info(u'Alerts Finalising')
Plugin.finalise(self)
self.toolsAlertItem.setVisible(False)