← Back to team overview

openlp-core team mailing list archive

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

 

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

Requested reviews:
  OpenLP Core (openlp-core)


Fix problem with DnD where the service item is also Live and the cache was being destroyed. (595781)
Fix bible footers being overridden when added to. (595172) 
-- 
https://code.launchpad.net/~trb143/openlp/working/+merge/27906
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/working into lp:openlp.
=== modified file 'openlp/core/lib/serviceitem.py'
--- openlp/core/lib/serviceitem.py	2010-06-12 20:22:58 +0000
+++ openlp/core/lib/serviceitem.py	2010-06-18 06:05:41 +0000
@@ -173,7 +173,7 @@
             self.render_manager.set_override_theme(self.theme)
         format = self._display_frames[row][u'text'].split(u'\n')
         #if screen blank then do not display footer
-        if self.cache[row] is not None:
+        if len(self.cache) > 0 and self.cache[row] is not None:
             frame = self.cache[row]
         else:
             if format[0]:

=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py	2010-06-15 15:22:26 +0000
+++ openlp/core/ui/slidecontroller.py	2010-06-18 06:05:41 +0000
@@ -536,7 +536,7 @@
         self.PreviewListWidget.setCursor(QtCore.Qt.PointingHandCursor)
         before = time.time()
         #Clear the old serviceItem cache to release memory
-        if self.serviceItem:
+        if self.serviceItem and self.serviceItem is not serviceItem:
             self.serviceItem.cache = []
         self.serviceItem = serviceItem
         self.PreviewListWidget.clear()

=== modified file 'openlp/plugins/bibles/lib/mediaitem.py'
--- openlp/plugins/bibles/lib/mediaitem.py	2010-06-17 01:56:05 +0000
+++ openlp/plugins/bibles/lib/mediaitem.py	2010-06-18 06:05:41 +0000
@@ -146,7 +146,7 @@
         self.QuickMessage = QtGui.QLabel(self.QuickTab)
         self.QuickMessage.setObjectName(u'QuickMessage')
         self.QuickLayout.addWidget(self.QuickMessage, 6, 0, 1, 3)
-        self.SearchTabWidget.addTab(self.QuickTab, 
+        self.SearchTabWidget.addTab(self.QuickTab,
             translate(u'BiblesPlugin.MediaItem', u'Quick'))
         QuickSpacerItem = QtGui.QSpacerItem(20, 35, QtGui.QSizePolicy.Minimum,
             QtGui.QSizePolicy.Expanding)
@@ -231,7 +231,7 @@
         self.AdvancedMessage = QtGui.QLabel(self.AdvancedTab)
         self.AdvancedMessage.setObjectName(u'AdvancedMessage')
         self.AdvancedLayout.addWidget(self.AdvancedMessage, 8, 0, 1, 3)
-        self.SearchTabWidget.addTab(self.AdvancedTab, 
+        self.SearchTabWidget.addTab(self.AdvancedTab,
             translate(u'BiblesPlugin.MediaItem', u'Advanced'))
         # Add the search tab widget to the page layout
         self.PageLayout.addWidget(self.SearchTabWidget)
@@ -386,7 +386,7 @@
     def onNoBookFound(self):
         QtGui.QMessageBox.critical(self,
             translate(u'BiblesPlugin.MediaItem', u'No Book Found'),
-            translate(u'BiblesPlugin.MediaItem', 
+            translate(u'BiblesPlugin.MediaItem',
                 u'No matching book could be found in this Bible.'),
             QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
             QtGui.QMessageBox.Ok
@@ -494,7 +494,7 @@
             if bible2_version:
                 bible2_version = bible2_version.value
             else:
-                bible2_version = u''            
+                bible2_version = u''
             if bible2_copyright:
                 bible2_copyright = bible2_copyright.value
             else:
@@ -557,7 +557,7 @@
                 service_item.title = u'%s %s' % (book, verse_text)
             elif service_item.title.find(
                 translate(u'BiblesPlugin.MediaItem', u'etc')) == -1:
-                service_item.title = u'%s, %s' % (service_item.title, 
+                service_item.title = u'%s, %s' % (service_item.title,
                        translate(u'BiblesPlugin.MediaItem', u'etc'))
         if len(self.parent.settings_tab.bible_theme) == 0:
             service_item.theme = None
@@ -568,7 +568,11 @@
             raw_slides.append(bible_text)
         for slide in raw_slides:
             service_item.add_from_text(slide[:30], slide)
-        service_item.raw_footer = raw_footer
+        if service_item.raw_footer:
+            for foot in raw_footer:
+                service_item.raw_footer.append(foot)
+        else:
+            service_item.raw_footer = raw_footer
         return True
 
     def formatVerse(self, old_chapter, chapter, verse, opening, closing):


Follow ups