forked from openlp/openlp
String fixes
This commit is contained in:
parent
764c3d42c9
commit
5ba4de64ca
@ -229,7 +229,7 @@ def context_menu_separator(base):
|
|||||||
|
|
||||||
def image_to_byte(image):
|
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.
|
it as a byte stream.
|
||||||
|
|
||||||
``image``
|
``image``
|
||||||
@ -253,12 +253,16 @@ def resize_image(image, width, height, background=QtCore.Qt.black):
|
|||||||
|
|
||||||
``image``
|
``image``
|
||||||
The image to resize.
|
The image to resize.
|
||||||
|
|
||||||
``width``
|
``width``
|
||||||
The new image width.
|
The new image width.
|
||||||
|
|
||||||
``height``
|
``height``
|
||||||
The new image height.
|
The new image height.
|
||||||
|
|
||||||
``background``
|
``background``
|
||||||
The background colour defaults to black.
|
The background colour defaults to black.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
preview = QtGui.QImage(image)
|
preview = QtGui.QImage(image)
|
||||||
if not preview.isNull():
|
if not preview.isNull():
|
||||||
|
@ -58,6 +58,9 @@ class DisplayWidget(QtGui.QGraphicsView):
|
|||||||
self.setStyleSheet(u'border: none;')
|
self.setStyleSheet(u'border: none;')
|
||||||
|
|
||||||
def keyPressEvent(self, event):
|
def keyPressEvent(self, event):
|
||||||
|
"""
|
||||||
|
Handle key events from display screen
|
||||||
|
"""
|
||||||
# Key events only needed for live
|
# Key events only needed for live
|
||||||
if not self.live:
|
if not self.live:
|
||||||
return
|
return
|
||||||
@ -104,6 +107,9 @@ class MainDisplay(DisplayWidget):
|
|||||||
QtCore.SIGNAL(u'maindisplay_show'), self.showDisplay)
|
QtCore.SIGNAL(u'maindisplay_show'), self.showDisplay)
|
||||||
|
|
||||||
def setup(self):
|
def setup(self):
|
||||||
|
"""
|
||||||
|
Set up and build the output screen
|
||||||
|
"""
|
||||||
log.debug(u'Setup live = %s for %s ' % (self.isLive,
|
log.debug(u'Setup live = %s for %s ' % (self.isLive,
|
||||||
self.screens.monitor_number))
|
self.screens.monitor_number))
|
||||||
self.screen = self.screens.current
|
self.screen = self.screens.current
|
||||||
@ -332,6 +338,9 @@ class MainDisplay(DisplayWidget):
|
|||||||
self.footer(serviceItem.foot_text)
|
self.footer(serviceItem.foot_text)
|
||||||
|
|
||||||
def footer(self, text):
|
def footer(self, text):
|
||||||
|
"""
|
||||||
|
Display the Footer
|
||||||
|
"""
|
||||||
log.debug(u'footer')
|
log.debug(u'footer')
|
||||||
js = "show_footer('" + \
|
js = "show_footer('" + \
|
||||||
text.replace("\\", "\\\\").replace("\'", "\\\'") + "')"
|
text.replace("\\", "\\\\").replace("\'", "\\\'") + "')"
|
||||||
|
@ -346,7 +346,6 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
log.debug(u'Load themes from dir')
|
log.debug(u'Load themes from dir')
|
||||||
self.themelist = []
|
self.themelist = []
|
||||||
self.themeListWidget.clear()
|
self.themeListWidget.clear()
|
||||||
#root, dirs, files = os.walk(self.path)
|
|
||||||
dirList = os.listdir(self.path)
|
dirList = os.listdir(self.path)
|
||||||
for name in dirList:
|
for name in dirList:
|
||||||
if name.endswith(u'.png'):
|
if name.endswith(u'.png'):
|
||||||
@ -731,8 +730,6 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
theme.display_slideTransition = theme.display_slideTransition
|
theme.display_slideTransition = theme.display_slideTransition
|
||||||
theme.font_footer_color = theme.font_footer_color.strip()
|
theme.font_footer_color = theme.font_footer_color.strip()
|
||||||
theme.font_footer_height = int(theme.font_footer_height.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_italics = str_to_bool(theme.font_footer_italics)
|
||||||
theme.font_footer_name = theme.font_footer_name.strip()
|
theme.font_footer_name = theme.font_footer_name.strip()
|
||||||
#theme.font_footer_override
|
#theme.font_footer_override
|
||||||
@ -745,7 +742,6 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
theme.font_main_color = theme.font_main_color.strip()
|
theme.font_main_color = theme.font_main_color.strip()
|
||||||
theme.font_main_height = int(theme.font_main_height.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_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_name = theme.font_main_name.strip()
|
||||||
#theme.font_main_override
|
#theme.font_main_override
|
||||||
theme.font_main_proportion = int(theme.font_main_proportion.strip())
|
theme.font_main_proportion = int(theme.font_main_proportion.strip())
|
||||||
|
@ -83,7 +83,7 @@ class AlertsPlugin(Plugin):
|
|||||||
self.liveController.alertTab = self.alertsTab
|
self.liveController.alertTab = self.alertsTab
|
||||||
|
|
||||||
def finalise(self):
|
def finalise(self):
|
||||||
log.info(u'Alerts Finaliseing')
|
log.info(u'Alerts Finalising')
|
||||||
Plugin.finalise(self)
|
Plugin.finalise(self)
|
||||||
self.toolsAlertItem.setVisible(False)
|
self.toolsAlertItem.setVisible(False)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user