openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #05593
[Merge] lp:~trb143/openlp/bugs into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/bugs into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
#693150 Custom Slide Display footer option
https://bugs.launchpad.net/bugs/693150
#693202 delete theme
https://bugs.launchpad.net/bugs/693202
#701353 Bibles do not show on the live screen when transitions are turned on in the theme
https://bugs.launchpad.net/bugs/701353
For more details, see:
https://code.launchpad.net/~trb143/openlp/bugs/+merge/46382
Fix Transitions in Bibles
Fix Blank at start Bible slide
Fix Blank display on restart so the correct blanking method is used.
--
https://code.launchpad.net/~trb143/openlp/bugs/+merge/46382
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/bugs into lp:openlp.
=== removed file 'demo_theme.xml'
--- demo_theme.xml 2010-09-14 18:18:47 +0000
+++ demo_theme.xml 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<Theme>
- <Name>openlp.org 2.0 Demo Theme</Name>
- <BackgroundType>2</BackgroundType>
- <BackgroundParameter1>./openlp/core/test/data_for_tests/treesbig.jpg</BackgroundParameter1>
- <BackgroundParameter2>clBlack</BackgroundParameter2>
- <BackgroundParameter3/>
- <FontName>Tahoma</FontName>
- <FontColor>clWhite</FontColor>
- <FontProportion>16</FontProportion>
- <Shadow>-1</Shadow>
- <ShadowColor>$00000001</ShadowColor>
- <Outline>-1</Outline>
- <OutlineColor>clRed</OutlineColor>
- <HorizontalAlign>2</HorizontalAlign>
- <VerticalAlign>2</VerticalAlign>
-</Theme>
=== modified file 'openlp/core/lib/__init__.py'
--- openlp/core/lib/__init__.py 2011-01-09 13:54:40 +0000
+++ openlp/core/lib/__init__.py 2011-01-15 12:07:56 +0000
@@ -293,6 +293,7 @@
Remove Tags from text for display
"""
text = text.replace(u'<br>', u'\n')
+ text = text.replace(u' ', u' ')
for tag in DisplayTags.get_html_tags():
text = text.replace(tag[u'start tag'], u'')
text = text.replace(tag[u'end tag'], u'')
=== modified file 'openlp/core/lib/htmlbuilder.py'
--- openlp/core/lib/htmlbuilder.py 2010-12-26 11:04:47 +0000
+++ openlp/core/lib/htmlbuilder.py 2011-01-15 12:07:56 +0000
@@ -641,4 +641,4 @@
align = u'top'
alert = style % (width, align, alertTab.font_face, alertTab.font_size,
alertTab.font_color, alertTab.bg_color)
- return alert
\ No newline at end of file
+ return alert
=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py 2011-01-12 19:54:02 +0000
+++ openlp/core/ui/slidecontroller.py 2011-01-15 12:07:56 +0000
@@ -687,8 +687,17 @@
Allow the main display to blank the main display at startup time
"""
log.debug(u'mainDisplaySetBackground live = %s' % self.isLive)
+ display_type = QtCore.QSettings().value(
+ self.parent.generalSettingsSection + u'/screen blank',
+ QtCore.QVariant(u'')).toString()
if not self.display.primary:
- self.onBlankDisplay(True)
+ # Order done to handle initial conversion
+ if display_type == u'themed':
+ self.onThemeDisplay(True)
+ elif display_type == u'hidden':
+ self.onHideDisplay(True)
+ else:
+ self.onBlankDisplay(True)
def onSlideBlank(self):
"""
@@ -712,13 +721,15 @@
self.ThemeScreen.setChecked(False)
if self.screens.display_count > 1:
self.DesktopScreen.setChecked(False)
- QtCore.QSettings().setValue(
- self.parent.generalSettingsSection + u'/screen blank',
- QtCore.QVariant(checked))
if checked:
Receiver.send_message(u'maindisplay_hide', HideMode.Blank)
+ QtCore.QSettings().setValue(
+ self.parent.generalSettingsSection + u'/screen blank',
+ QtCore.QVariant(u'blanked'))
else:
Receiver.send_message(u'maindisplay_show')
+ QtCore.QSettings().remove(
+ self.parent.generalSettingsSection + u'/screen blank')
self.blankPlugin(checked)
def onThemeDisplay(self, checked):
@@ -733,8 +744,13 @@
self.DesktopScreen.setChecked(False)
if checked:
Receiver.send_message(u'maindisplay_hide', HideMode.Theme)
+ QtCore.QSettings().setValue(
+ self.parent.generalSettingsSection + u'/screen blank',
+ QtCore.QVariant(u'themed'))
else:
Receiver.send_message(u'maindisplay_show')
+ QtCore.QSettings().remove(
+ self.parent.generalSettingsSection + u'/screen blank')
self.blankPlugin(checked)
def onHideDisplay(self, checked):
@@ -745,12 +761,19 @@
self.HideMenu.setDefaultAction(self.DesktopScreen)
self.BlankScreen.setChecked(False)
self.ThemeScreen.setChecked(False)
- if self.screens.display_count > 1:
- self.DesktopScreen.setChecked(checked)
+ # On valid if more than 1 display
+ if self.screens.display_count <= 1:
+ return
+ self.DesktopScreen.setChecked(checked)
if checked:
Receiver.send_message(u'maindisplay_hide', HideMode.Screen)
+ QtCore.QSettings().setValue(
+ self.parent.generalSettingsSection + u'/screen blank',
+ QtCore.QVariant(u'hidden'))
else:
Receiver.send_message(u'maindisplay_show')
+ QtCore.QSettings().remove(
+ self.parent.generalSettingsSection + u'/screen blank')
self.hidePlugin(checked)
def blankPlugin(self, blank):
@@ -1040,9 +1063,8 @@
if self.BlankScreen.isChecked:
self.BlankScreen.setChecked(False)
self.HideMenu.setDefaultAction(self.BlankScreen)
- QtCore.QSettings().setValue(
- self.parent.generalSettingsSection + u'/screen blank',
- QtCore.QVariant(False))
+ QtCore.QSettings().remove(
+ self.parent.generalSettingsSection + u'/screen blank')
if self.ThemeScreen.isChecked:
self.ThemeScreen.setChecked(False)
self.HideMenu.setDefaultAction(self.ThemeScreen)
=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py 2011-01-14 18:58:47 +0000
+++ openlp/core/ui/thememanager.py 2011-01-15 12:07:56 +0000
@@ -524,7 +524,7 @@
xml_data = file_is_unicode(xml_data)
if not xml_data:
break
- filexml = self.checkVersionAndConvert(xml_data)
+ filexml = self._checkVersionAndConvert(xml_data)
outfile = open(fullpath, u'w')
outfile.write(filexml.encode(u'utf-8'))
else:
@@ -554,22 +554,6 @@
if outfile:
outfile.close()
- def checkVersionAndConvert(self, xml_data):
- """
- Check if a theme is from OpenLP version 1
-
- ``xml_data``
- Theme XML to check the version of
- """
- log.debug(u'checkVersion1 ')
- theme = xml_data.encode(u'ascii', u'xmlcharrefreplace')
- tree = ElementTree(element=XML(theme)).getroot()
- # look for old version 1 tags
- if tree.find(u'BackgroundType') is None:
- return xml_data
- else:
- return self._migrateVersion122(xml_data)
-
def checkIfThemeExists(self, themeName):
"""
Check if theme already exists and displays error message
@@ -661,6 +645,22 @@
image = os.path.join(self.path, theme + u'.png')
return image
+ def _checkVersionAndConvert(self, xml_data):
+ """
+ Check if a theme is from OpenLP version 1
+
+ ``xml_data``
+ Theme XML to check the version of
+ """
+ log.debug(u'checkVersion1 ')
+ theme = xml_data.encode(u'ascii', u'xmlcharrefreplace')
+ tree = ElementTree(element=XML(theme)).getroot()
+ # look for old version 1 tags
+ if tree.find(u'BackgroundType') is None:
+ return xml_data
+ else:
+ return self._migrateVersion122(xml_data)
+
def _createThemeFromXml(self, themeXml, path):
"""
Return a theme object using information parsed from XML
=== modified file 'openlp/plugins/bibles/lib/mediaitem.py'
--- openlp/plugins/bibles/lib/mediaitem.py 2011-01-13 17:55:29 +0000
+++ openlp/plugins/bibles/lib/mediaitem.py 2011-01-15 12:07:56 +0000
@@ -716,21 +716,21 @@
second_copyright, second_permissions)
if footer not in raw_footer:
raw_footer.append(footer)
- bible_text = u'%s\u00a0%s\n\n%s\u00a0%s' % (verse_text, text,
+ bible_text = u'%s %s\n\n%s%s' % (verse_text, text,
verse_text, second_text)
- raw_slides.append(bible_text)
+ raw_slides.append(bible_text.rstrip())
bible_text = u''
# If we are 'Verse Per Slide' then create a new slide.
elif self.parent.settings_tab.layout_style == 0:
- bible_text = u'%s\u00a0%s' % (verse_text, text)
- raw_slides.append(bible_text)
+ bible_text = u'%s %s' % (verse_text, text)
+ raw_slides.append(bible_text.rstrip())
bible_text = u''
# If we are 'Verse Per Line' then force a new line.
elif self.parent.settings_tab.layout_style == 1:
- bible_text = u'%s %s\u00a0%s\n' % (bible_text, verse_text, text)
+ bible_text = u'%s %s %s\n' % (bible_text, verse_text, text)
# We have to be 'Continuous'.
else:
- bible_text = u'%s %s\u00a0%s\n' % (bible_text, verse_text, text)
+ bible_text = u'%s %s %s\n' % (bible_text, verse_text, text)
if not old_item:
start_item = item
elif self.checkTitle(item, old_item):
@@ -741,7 +741,7 @@
raw_title.append(self.formatTitle(start_item, item))
# If there are no more items we check whether we have to add bible_text.
if bible_text:
- raw_slides.append(bible_text)
+ raw_slides.append(bible_text.lstrip())
bible_text = u''
# Service Item: Capabilities
if self.parent.settings_tab.layout_style == 2 and not second_bible: