openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #03104
[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)
Improve preview performance
Change font size from px to pt as per discussions
Change theme export suffix to "otz" .
--
https://code.launchpad.net/~trb143/openlp/renderer/+merge/34018
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/renderer into lp:openlp.
=== modified file 'openlp/core/lib/htmlbuilder.py'
--- openlp/core/lib/htmlbuilder.py 2010-08-28 23:52:10 +0000
+++ openlp/core/lib/htmlbuilder.py 2010-08-29 14:46:44 +0000
@@ -290,7 +290,7 @@
</html>
"""
-def build_html(item, screen, alert):
+def build_html(item, screen, alert, islive):
"""
Build the full web paged structure for display
@@ -312,7 +312,7 @@
build_alert(alert, width),
build_footer(item),
build_lyrics(item),
- u'true' if theme and theme.display_slideTransition \
+ u'true' if theme and theme.display_slideTransition and islive \
else u'false',
image)
return html
@@ -343,7 +343,7 @@
shadow = u'display: none;'
if theme:
lyricscommon = u'width: %spx; height: %spx; word-wrap: break-word; ' \
- u'font-family: %s; font-size: %spx; color: %s; line-height: %d%%;' \
+ u'font-family: %s; font-size: %spt; color: %s; line-height: %d%%;' \
% (item.main.width(), item.main.height(), theme.font_main_name,
theme.font_main_proportion, theme.font_main_color,
100 + int(theme.font_main_line_adjustment))
@@ -398,7 +398,7 @@
width: %spx;
height: %spx;
font-family: %s;
- font-size: %spx;
+ font-size: %spt;
color: %s;
text-align: %s;
"""
@@ -427,7 +427,7 @@
width: %s;
vertical-align: %s;
font-family: %s;
- font-size: %spx;
+ font-size: %spt;
color: %s;
background-color: %s;
"""
=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py 2010-08-28 15:49:51 +0000
+++ openlp/core/ui/maindisplay.py 2010-08-29 14:46:44 +0000
@@ -152,8 +152,8 @@
splash_image)
serviceItem = ServiceItem()
serviceItem.bg_frame = initialFrame
- self.webView.setHtml(build_html(serviceItem, self.screen, \
- self.parent.alertTab))
+ self.webView.setHtml(build_html(serviceItem, self.screen,
+ self.parent.alertTab, self.isLive))
self.initialFrame = True
self.show()
# To display or not to display?
@@ -297,13 +297,14 @@
Generates a preview of the image displayed.
"""
log.debug(u'preview for %s', self.isLive)
- # Wait for the fade to finish before geting the preview.
- # Important otherwise preview will have incorrect text if at all !
- if self.serviceItem.themedata and \
- self.serviceItem.themedata.display_slideTransition:
- while self.frame.evaluateJavaScript(u'show_text_complete()') \
- .toString() == u'false':
- Receiver.send_message(u'openlp_process_events')
+ if self.isLive:
+ # Wait for the fade to finish before geting the preview.
+ # Important otherwise preview will have incorrect text if at all !
+ if self.serviceItem.themedata and \
+ self.serviceItem.themedata.display_slideTransition:
+ while self.frame.evaluateJavaScript(u'show_text_complete()') \
+ .toString() == u'false':
+ Receiver.send_message(u'openlp_process_events')
# Wait for the webview to update before geting the preview.
# Important otherwise first preview will miss the background !
while not self.loaded:
@@ -332,7 +333,8 @@
self.loaded = False
self.initialFrame = False
self.serviceItem = serviceItem
- html = build_html(self.serviceItem, self.screen, self.parent.alertTab)
+ html = build_html(self.serviceItem, self.screen, self.parent.alertTab,\
+ self.isLive)
self.webView.setHtml(html)
if serviceItem.foot_text and serviceItem.foot_text:
self.footer(serviceItem.foot_text)
=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py 2010-08-28 15:49:51 +0000
+++ openlp/core/ui/thememanager.py 2010-08-29 14:46:44 +0000
@@ -295,7 +295,7 @@
path = unicode(path)
if path:
SettingsManager.set_last_dir(self.settingsSection, path, 1)
- themePath = os.path.join(path, theme + u'.thz')
+ themePath = os.path.join(path, theme + u'.otz')
zip = None
try:
zip = zipfile.ZipFile(themePath, u'w')
Follow ups