← 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:
  OpenLP Core (openlp-core)

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

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/46416
Your team OpenLP Core is requested to review the proposed merge of lp:~googol-hush/openlp/images into lp:openlp.
=== 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-16 18:33:01 +0000
@@ -31,7 +31,7 @@
 
 from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon, \
     ItemCapabilities, SettingsManager, translate, check_item_selected, \
-    check_directory_exists
+    check_directory_exists, Receiver
 from openlp.core.ui import criticalErrorMessageBox
 from openlp.core.utils import AppLocation, delete_file, get_images_filter
 
@@ -187,12 +187,17 @@
             return False
 
     def onResetClick(self):
+        """
+        Called to reset the Live backgound with the image selected,
+        """
         self.resetAction.setVisible(False)
         self.parent.liveController.display.resetImage()
+        # Update the preview frame.
+        Receiver.send_message(u'maindisplay_active')
 
     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',
@@ -204,6 +209,8 @@
                 (path, name) = os.path.split(filename)
                 self.parent.liveController.display.directImage(name, filename)
                 self.resetAction.setVisible(True)
+                # Update the preview frame.
+                Receiver.send_message(u'maindisplay_active')
             else:
                 criticalErrorMessageBox(
                     translate('ImagePlugin.MediaItem', 'Live Background Error'),

=== 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-16 18:33:01 +0000
@@ -30,7 +30,7 @@
 from PyQt4 import QtCore, QtGui
 
 from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon, \
-    ItemCapabilities, SettingsManager, translate, check_item_selected
+    ItemCapabilities, SettingsManager, translate, check_item_selected, Receiver
 from openlp.core.ui import criticalErrorMessageBox
 
 log = logging.getLogger(__name__)
@@ -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,18 @@
         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()
+        # Update the preview frame.
+        Receiver.send_message(u'maindisplay_active')
 
     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.')):
@@ -105,6 +114,8 @@
                 (path, name) = os.path.split(filename)
                 self.parent.liveController.display.video(filename, 0, True)
                 self.resetAction.setVisible(True)
+                # Update the preview frame.
+                Receiver.send_message(u'maindisplay_active')
             else:
                 criticalErrorMessageBox(translate('MediaPlugin.MediaItem',
                     'Live Background Error'),


Follow ups