openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #12111
[Merge] lp:~trb143/openlp/bug-ol1 into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/bug-ol1 into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~trb143/openlp/bug-ol1/+merge/76888
Fix up tag loading problem with tags not being rendered when loaded with service.
--
https://code.launchpad.net/~trb143/openlp/bug-ol1/+merge/76888
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/bug-ol1 into lp:openlp.
=== modified file 'openlp/core/lib/serviceitem.py'
--- openlp/core/lib/serviceitem.py 2011-09-21 17:23:04 +0000
+++ openlp/core/lib/serviceitem.py 2011-09-25 07:30:30 +0000
@@ -87,6 +87,7 @@
if plugin:
self.renderer = plugin.renderer
self.name = plugin.name
+ self.from_service = False if plugin else False
self.title = u''
self.shortname = u''
self.audit = u''
@@ -115,7 +116,6 @@
self.start_time = 0
self.end_time = 0
self.media_length = 0
- self.from_service = False
self.image_border = u'#000000'
self.background_audio = []
self._new_item()
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py 2011-09-23 22:14:23 +0000
+++ openlp/core/ui/servicemanager.py 2011-09-25 07:30:30 +0000
@@ -660,14 +660,17 @@
for item in items:
self.mainwindow.incrementProgressBar()
serviceItem = ServiceItem()
- serviceItem.from_service = True
serviceItem.renderer = self.mainwindow.renderer
serviceItem.set_from_service(item, self.servicePath)
self.validateItem(serviceItem)
- self.addServiceItem(serviceItem, repaint=False)
+ self.loadItem_uuid = 0
if serviceItem.is_capable(ItemCapabilities.OnLoadUpdate):
Receiver.send_message(u'%s_service_load' %
serviceItem.name.lower(), serviceItem)
+ # if the item has been processed
+ if serviceItem._uuid == self.loadItem_uuid:
+ serviceItem.edit_id = int(self.loadItem_editId)
+ self.addServiceItem(serviceItem, repaint=False)
delete_file(p_file)
self.setFileName(fileName)
self.mainwindow.addRecentFile(fileName)
@@ -1122,12 +1125,9 @@
def serviceItemUpdate(self, message):
"""
Triggered from plugins to update service items.
+ Save the values as they will be used as part of the service load
"""
- editId, uuid = message.split(u':')
- for item in self.serviceItems:
- if item[u'service_item']._uuid == uuid:
- item[u'service_item'].edit_id = int(editId)
- self.setModified()
+ self.loadItem_editId, self.loadItem_uuid = message.split(u':')
def replaceServiceItem(self, newItem):
"""
=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py 2011-09-24 15:18:48 +0000
+++ openlp/plugins/songs/lib/mediaitem.py 2011-09-25 07:30:30 +0000
@@ -510,7 +510,8 @@
# Add the audio file to the service item.
if len(song.media_files) > 0:
service_item.add_capability(ItemCapabilities.HasBackgroundAudio)
- service_item.background_audio = [m.file_name for m in song.media_files]
+ service_item.background_audio = \
+ [m.file_name for m in song.media_files]
return True
def serviceLoad(self, item):