← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~googol-hush/openlp/images into lp:openlp

 

Andreas Preikschat has proposed merging lp:~googol-hush/openlp/images into lp:openlp.

Requested reviews:
  Tim Bentley (trb143)

For more details, see:
https://code.launchpad.net/~googol-hush/openlp/images/+merge/46490

Update the little preview fame, when replacing the live background. In trunk the frame is only updated on a slidechange, but not when we are setting/resetting a new live background.
-- 
https://code.launchpad.net/~googol-hush/openlp/images/+merge/46490
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py	2011-01-14 18:58:47 +0000
+++ openlp/core/ui/maindisplay.py	2011-01-17 15:48:11 +0000
@@ -94,6 +94,7 @@
         else:
             event.ignore()
 
+
 class MainDisplay(DisplayWidget):
     """
     This is the display screen.
@@ -270,6 +271,8 @@
         else:
             js = u'show_image("");'
         self.frame.evaluateJavaScript(js)
+        # Update the preview frame.
+        Receiver.send_message(u'maindisplay_active')
 
     def resetImage(self):
         """
@@ -278,6 +281,8 @@
         """
         log.debug(u'resetImage')
         self.displayImage(self.serviceItem.bg_image_bytes)
+        # Update the preview frame.
+        Receiver.send_message(u'maindisplay_active')
 
     def resetVideo(self):
         """
@@ -292,6 +297,8 @@
             self.phononActive = False
         else:
             self.frame.evaluateJavaScript(u'show_video("close");')
+        # Update the preview frame.
+        Receiver.send_message(u'maindisplay_active')
 
     def videoPlay(self):
         """
@@ -359,6 +366,8 @@
             self.webView.setVisible(False)
             self.videoWidget.setVisible(True)
             self.audio.setVolume(vol)
+        # Update the preview frame.
+        Receiver.send_message(u'maindisplay_active')
         return self.preview()
 
     def isLoaded(self):
@@ -475,6 +484,7 @@
         # Trigger actions when display is active again
         Receiver.send_message(u'maindisplay_active')
 
+
 class AudioPlayer(QtCore.QObject):
     """
     This Class will play audio only allowing components to work with a

=== modified file 'openlp/plugins/images/lib/mediaitem.py'
--- openlp/plugins/images/lib/mediaitem.py	2011-01-15 20:06:25 +0000
+++ openlp/plugins/images/lib/mediaitem.py	2011-01-17 15:48:11 +0000
@@ -187,12 +187,15 @@
             return False
 
     def onResetClick(self):
+        """
+        Called to reset the Live backgound with the image selected,
+        """
         self.resetAction.setVisible(False)
         self.parent.liveController.display.resetImage()
 
     def onReplaceClick(self):
         """
-        Called to replace Live backgound with the video selected
+        Called to replace Live backgound with the image selected.
         """
         if check_item_selected(self.listView,
             translate('ImagePlugin.MediaItem',

=== modified file 'openlp/plugins/media/lib/mediaitem.py'
--- openlp/plugins/media/lib/mediaitem.py	2011-01-15 19:24:50 +0000
+++ openlp/plugins/media/lib/mediaitem.py	2011-01-17 15:48:11 +0000
@@ -40,6 +40,7 @@
         self.PluginName = u'Media'
         BaseListWithDnD.__init__(self, parent)
 
+
 class MediaMediaItem(MediaManagerItem):
     """
     This is the custom media manager item for Media Slides.
@@ -92,10 +93,16 @@
         self.resetAction.setVisible(False)
 
     def onResetClick(self):
+        """
+        Called to reset the Live backgound with the media selected,
+        """
         self.resetAction.setVisible(False)
         self.parent.liveController.display.resetVideo()
 
     def onReplaceClick(self):
+        """
+        Called to replace Live backgound with the media selected.
+        """
         if check_item_selected(self.listView,
             translate('MediaPlugin.MediaItem',
             'You must select a media file to replace the background with.')):


Follow ups