← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~trb143/openlp/bugfixes1 into lp:openlp

 

Tim Bentley has proposed merging lp:~trb143/openlp/bugfixes1 into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  #637547 Editing a song in a loaded service file crashes
  https://bugs.launchpad.net/bugs/637547
  #637886 Replacing live video background with nothing live causes crash
  https://bugs.launchpad.net/bugs/637886
  #642778 enchant.DictNotFoundError: Dictionary for language 'ja_JP' could not be found
  https://bugs.launchpad.net/bugs/642778


Fix crash with replacement backgrounds
Do not display first slide till background painted
-- 
https://code.launchpad.net/~trb143/openlp/bugfixes1/+merge/36620
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/bugfixes1 into lp:openlp.
=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py	2010-09-22 18:50:55 +0000
+++ openlp/core/ui/maindisplay.py	2010-09-25 07:34:40 +0000
@@ -183,6 +183,9 @@
             The slide text to be displayed
         """
         log.debug(u'text')
+        # Wait for the webview to update before displayiong text.
+        while not self.loaded:
+            Receiver.send_message(u'openlp_process_events')
         self.frame.evaluateJavaScript(u'show_text("%s")' % \
             slide.replace(u'\\', u'\\\\').replace(u'\"', u'\\\"'))
         return self.preview()
@@ -234,8 +237,11 @@
         Display an image, as is.
         """
         if image:
-            js = u'show_image("data:image/png;base64,%s");' % \
-                image_to_byte(image)
+            if isinstance(image, QtGui.QImage):
+                js = u'show_image("data:image/png;base64,%s");' % \
+                    image_to_byte(image)
+            else:
+                js = u'show_image("data:image/png;base64,%s");' % image
         else:
             js = u'show_image("");'
         self.frame.evaluateJavaScript(js)
@@ -246,7 +252,7 @@
         Used after Image plugin has changed the background
         """
         log.debug(u'resetImage')
-        self.displayImage(self.serviceItem.bg_frame)
+        self.displayImage(self.serviceItem.bg_image_bytes)
 
     def resetVideo(self):
         """


Follow ups