openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #03191
[Merge] lp:~trb143/openlp/renderer into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/renderer into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Renderer bug fixes
--
https://code.launchpad.net/~trb143/openlp/renderer/+merge/34564
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/renderer into lp:openlp.
=== modified file 'openlp/core/lib/renderer.py'
--- openlp/core/lib/renderer.py 2010-08-21 19:17:56 +0000
+++ openlp/core/lib/renderer.py 2010-09-03 18:41:12 +0000
@@ -47,26 +47,13 @@
Initialise the renderer.
"""
self._rect = None
- self._debug = False
- self._display_shadow_size_footer = 0
- self._display_outline_size_footer = 0
self.theme_name = None
self._theme = None
self._bg_image_filename = None
self.frame = None
- self.frame_opaque = None
self.bg_frame = None
self.bg_image = None
- def set_debug(self, debug):
- """
- Set the debug mode of the renderer.
-
- ``debug``
- The debug mode.
- """
- self._debug = debug
-
def set_theme(self, theme):
"""
Set the theme to be used.
@@ -159,7 +146,7 @@
doc = QtGui.QTextDocument()
doc.setPageSize(QtCore.QSizeF(self._rect.width(), self._rect.height()))
df = doc.defaultFont()
- df.setPixelSize(self._theme.font_main_proportion)
+ df.setPointSize(self._theme.font_main_proportion)
df.setFamily(self._theme.font_main_name)
main_weight = 50
if self._theme.font_main_weight == u'Bold':
@@ -188,7 +175,7 @@
# Text too long so gone to next mage
if layout.pageCount() != 1:
formatted.append(shell % old_html_text)
- temp_text = line
+ temp_text = line + line_end
old_html_text = temp_text
formatted.append(shell % old_html_text)
log.debug(u'format_slide - End')
=== modified file 'openlp/core/lib/rendermanager.py'
--- openlp/core/lib/rendermanager.py 2010-08-28 23:52:10 +0000
+++ openlp/core/lib/rendermanager.py 2010-09-03 18:41:12 +0000
@@ -93,6 +93,7 @@
"""
self.global_theme = global_theme
self.theme_level = theme_level
+ self.themedata = None
def set_service_theme(self, service_theme):
"""
@@ -102,6 +103,7 @@
The service-level theme to be set.
"""
self.service_theme = service_theme
+ self.themedata = None
def set_override_theme(self, theme, overrideLevels=False):
"""
@@ -111,6 +113,10 @@
``theme``
The name of the song-level theme. None means the service
item wants to use the given value.
+
+ ``overrideLevels``
+ Used to force the theme data passed in to be used.
+
"""
log.debug(u'set override theme to %s', theme)
theme_level = self.theme_level
@@ -137,6 +143,7 @@
if self.theme != self.renderer.theme_name or self.themedata is None \
or overrideLevels:
log.debug(u'theme is now %s', self.theme)
+ # Force the theme to be the one passed in.
if overrideLevels:
self.themedata = theme
else:
=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py 2010-08-29 19:29:45 +0000
+++ openlp/core/ui/maindisplay.py 2010-09-03 18:41:12 +0000
@@ -319,9 +319,6 @@
# Make display show up if in single screen mode
if self.isLive:
self.setVisible(True)
- # save preview for debugging
- if log.isEnabledFor(logging.DEBUG):
- preview.save(u'temp.png', u'png')
return preview
def buildHtml(self, serviceItem):
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py 2010-08-26 05:01:29 +0000
+++ openlp/core/ui/servicemanager.py 2010-09-03 18:41:12 +0000
@@ -574,7 +574,7 @@
* An osd which is a pickle of the service items
* All image, presentation and video files needed to run the service.
"""
- log.debug(u'onSaveService')
+ log.debug(u'onSaveService %s' % quick)
if not quick or self.isNew:
filename = QtGui.QFileDialog.getSaveFileName(self,
translate('OpenLP.ServiceManager', 'Save Service'),
@@ -755,6 +755,7 @@
"""
Set the theme for the current service
"""
+ log.debug(u'onThemeComboBoxSelected')
self.service_theme = unicode(self.themeComboBox.currentText())
self.parent.RenderManager.set_service_theme(self.service_theme)
QtCore.QSettings().setValue(
@@ -767,6 +768,7 @@
The theme may have changed in the settings dialog so make
sure the theme combo box is in the correct state.
"""
+ log.debug(u'themeChange')
if self.parent.RenderManager.theme_level == ThemeLevel.Global:
self.toolbar.actions[u'ThemeLabel'].setVisible(False)
self.toolbar.actions[u'ThemeWidget'].setVisible(False)
@@ -779,6 +781,7 @@
Rebuild the service list as things have changed and a
repaint is the easiest way to do this.
"""
+ log.debug(u'regenerateServiceItems')
# force reset of renderer as theme data has changed
self.parent.RenderManager.themedata = None
if self.serviceItems:
@@ -800,6 +803,7 @@
``item``
Service Item to be added
"""
+ log.debug(u'addServiceItem')
sitem = self.findServiceItem()[0]
item.render()
if replace:
Follow ups