← Back to team overview

openlp-core team mailing list archive

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

 

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

Requested reviews:
  Raoul Snyman (raoul-snyman)
Related bugs:
  #693150 Custom Slide Display footer option
  https://bugs.launchpad.net/bugs/693150
  #693202 delete theme
  https://bugs.launchpad.net/bugs/693202
  #697405 Theme editor looses settings
  https://bugs.launchpad.net/bugs/697405

For more details, see:
https://code.launchpad.net/~trb143/openlp/bugs/+merge/45274

Fix image error text
Add Guard to video background.
Use new event method to display message
Add Fix for theme editor start up bug.
-- 
https://code.launchpad.net/~trb143/openlp/bugs/+merge/45274
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/ui/themeform.py'
--- openlp/core/ui/themeform.py	2011-01-02 22:24:14 +0000
+++ openlp/core/ui/themeform.py	2011-01-05 18:34:12 +0000
@@ -435,8 +435,10 @@
         """
         Background style Combo box has changed.
         """
-        self.theme.background_type = BackgroundType.to_string(index)
-        self.setBackgroundPageValues()
+        # do not allow updates when screen is building for the first time.
+        if self.updateThemeAllowed:
+            self.theme.background_type = BackgroundType.to_string(index)
+            self.setBackgroundPageValues()
 
     def onGradientComboBoxCurrentIndexChanged(self, index):
         """

=== modified file 'openlp/plugins/images/lib/mediaitem.py'
--- openlp/plugins/images/lib/mediaitem.py	2011-01-02 21:34:33 +0000
+++ openlp/plugins/images/lib/mediaitem.py	2011-01-05 18:34:12 +0000
@@ -31,7 +31,7 @@
 
 from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon, \
     context_menu_action, ItemCapabilities, SettingsManager, translate, \
-    check_item_selected
+    check_item_selected, Receiver
 from openlp.core.utils import AppLocation, get_images_filter
 
 log = logging.getLogger(__name__)
@@ -208,6 +208,9 @@
         self.parent.liveController.display.resetImage()
 
     def onReplaceClick(self):
+        """
+        Called to replace Live backgound with the video selected
+        """
         if check_item_selected(self.listView,
             translate('ImagePlugin.MediaItem',
             'You must select an image to replace the background with.')):
@@ -218,11 +221,12 @@
                 (path, name) = os.path.split(filename)
                 self.parent.liveController.display.directImage(name, filename)
             else:
-                QtGui.QMessageBox.critical(self,
-                    translate('ImagePlugin.MediaItem', 'Live Background Could '
-                    'Not Be Replaced'),
-                    unicode(translate('ImagePlugin.MediaItem',
-                    'The image %s no longer exists.')) % filename)
+                Receiver.send_message(u'openlp_error_message', {
+                    u'title':  translate('ImagePlugin.MediaItem',
+                    'Live Background Error'),
+                    u'message': unicode(translate('ImagePlugin.MediaItem',
+                    'There was a problem replacing your background, '
+                    'the image file %s no longer exists.')) % filename})
         self.resetButton.setVisible(True)
 
     def onPreviewClick(self):

=== modified file 'openlp/plugins/media/lib/mediaitem.py'
--- openlp/plugins/media/lib/mediaitem.py	2011-01-01 13:58:32 +0000
+++ openlp/plugins/media/lib/mediaitem.py	2011-01-05 18:34:12 +0000
@@ -31,7 +31,7 @@
 
 from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon, \
     ItemCapabilities, SettingsManager, translate, check_item_selected, \
-    context_menu_action
+    context_menu_action, Receiver
 
 log = logging.getLogger(__name__)
 
@@ -108,11 +108,20 @@
 
     def onReplaceClick(self):
         if check_item_selected(self.listView,
-            translate('ImagePlugin.MediaItem',
+            translate('MediaPlugin.MediaItem',
             'You must select a media file to replace the background with.')):
             item = self.listView.currentItem()
             filename = unicode(item.data(QtCore.Qt.UserRole).toString())
-            self.parent.liveController.display.video(filename, 0, True)
+            if os.path.exists(filename):
+                (path, name) = os.path.split(filename)
+                self.parent.liveController.display.video(filename, 0, True)
+            else:
+                Receiver.send_message(u'openlp_error_message', {
+                    u'title':  translate('MediaPlugin.MediaItem',
+                    'Live Background Error'),
+                    u'message': unicode(translate('MediaPlugin.MediaItem',
+                    'There was a problem replacing your background, '
+                    'the media file %s no longer exists.')) % filename})
         self.resetButton.setVisible(True)
 
     def generateSlideData(self, service_item, item=None, xmlVersion=False):

=== modified file 'openlp/plugins/media/mediaplugin.py'
--- openlp/plugins/media/mediaplugin.py	2010-12-31 19:22:41 +0000
+++ openlp/plugins/media/mediaplugin.py	2011-01-05 18:34:12 +0000
@@ -79,7 +79,7 @@
         return MediaTab(self.name)
 
     def getMediaManagerItem(self):
-        # Create the MediaManagerItem object
+        # Create the MediaManagerItem object.
         return MediaMediaItem(self, self, self.icon)
 
     def about(self):


Follow ups