diff --git a/openlp/core/lib/mediamanageritem.py b/openlp/core/lib/mediamanageritem.py index 2d563962e..3eae97238 100644 --- a/openlp/core/lib/mediamanageritem.py +++ b/openlp/core/lib/mediamanageritem.py @@ -514,7 +514,7 @@ class MediaManagerItem(QtGui.QWidget): self.parent.serviceManager.addServiceItem(service_item, replace=True) else: - #Turn off the remote edit update message indicator + # Turn off the remote edit update message indicator QtGui.QMessageBox.information(self, translate('OpenLP.MediaManagerItem', 'Invalid Service Item'), diff --git a/openlp/core/lib/serviceitem.py b/openlp/core/lib/serviceitem.py index ab57e4328..0cbc34de5 100644 --- a/openlp/core/lib/serviceitem.py +++ b/openlp/core/lib/serviceitem.py @@ -100,6 +100,7 @@ class ServiceItem(object): self.bg_image_bytes = None self.search_string = u'' self.data_string = u'' + self.edit_id = None self._new_item() def _new_item(self): diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index 255859abe..f294cedd4 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -308,7 +308,7 @@ class ServiceManager(QtGui.QWidget): self.maintainAction.setVisible(False) self.notesAction.setVisible(False) if serviceItem[u'service_item'].is_capable(ItemCapabilities.AllowsEdit)\ - and hasattr(serviceItem[u'service_item'], u'editId'): + and serviceItem[u'service_item'].edit_id: self.editAction.setVisible(True) if serviceItem[u'service_item']\ .is_capable(ItemCapabilities.AllowsMaintain): @@ -864,7 +864,7 @@ class ServiceManager(QtGui.QWidget): editId, uuid = message.split(u':') for item in self.serviceItems: if item[u'service_item']._uuid == uuid: - item[u'service_item'].editId = editId + item[u'service_item'].edit_id = editId def replaceServiceItem(self, newItem): """ @@ -873,7 +873,7 @@ class ServiceManager(QtGui.QWidget): """ newItem.render() for itemcount, item in enumerate(self.serviceItems): - if item[u'service_item'].editId == newItem.editId and \ + if item[u'service_item'].edit_id == newItem.edit_id and \ item[u'service_item'].name == newItem.name: newItem.merge(item[u'service_item']) item[u'service_item'] = newItem @@ -983,7 +983,7 @@ class ServiceManager(QtGui.QWidget): .is_capable(ItemCapabilities.AllowsEdit): Receiver.send_message(u'%s_edit' % self.serviceItems[item][u'service_item'].name.lower(), u'L:%s' % - self.serviceItems[item][u'service_item'].editId ) + self.serviceItems[item][u'service_item'].edit_id ) def findServiceItem(self): """ diff --git a/openlp/core/ui/slidecontroller.py b/openlp/core/ui/slidecontroller.py index 61fc78cd3..0afb0efaa 100644 --- a/openlp/core/ui/slidecontroller.py +++ b/openlp/core/ui/slidecontroller.py @@ -942,7 +942,7 @@ class SlideController(QtGui.QWidget): """ self.songEdit = True Receiver.send_message(u'%s_edit' % self.serviceItem.name.lower(), - u'P:%s' % self.serviceItem.editId) + u'P:%s' % self.serviceItem.edit_id) def onGoLive(self): """ diff --git a/openlp/plugins/custom/lib/mediaitem.py b/openlp/plugins/custom/lib/mediaitem.py index 9cdcb9ed7..8549e6449 100644 --- a/openlp/plugins/custom/lib/mediaitem.py +++ b/openlp/plugins/custom/lib/mediaitem.py @@ -165,7 +165,7 @@ class CustomMediaItem(MediaManagerItem): customSlide = self.parent.manager.get_object(CustomSlide, item_id) title = customSlide.title credit = customSlide.credits - service_item.editId = item_id + service_item.edit_id = item_id theme = customSlide.theme_name if theme: service_item.theme = theme diff --git a/openlp/plugins/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py index 63496affd..a4f78cf95 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -192,6 +192,7 @@ class SongMediaItem(MediaManagerItem): Handle the exit from the edit dialog and trigger remote updates of songs """ + log.debug(u'onSongListLoad') # Called to redisplay the song list screen edit from a search # or from the exit of the Song edit dialog. If remote editing is active # Trigger it and clean up so it will not update again. @@ -259,6 +260,7 @@ class SongMediaItem(MediaManagerItem): Receiver.send_message(u'songs_load_list') def onNewClick(self): + log.debug(u'onNewClick') self.edit_song_form.newSong() self.edit_song_form.exec_() @@ -266,6 +268,7 @@ class SongMediaItem(MediaManagerItem): self.song_maintenance_form.exec_() def onRemoteEditClear(self): + log.debug(u'onRemoteEditClear') self.remoteTriggered = None self.remoteSong = -1 @@ -275,6 +278,7 @@ class SongMediaItem(MediaManagerItem): the Song Id in the payload along with an indicator to say which type of display is required. """ + log.debug(u'onRemoteEdit %s' % songid) fields = songid.split(u':') valid = self.parent.manager.get_object(Song, fields[1]) if valid: @@ -287,6 +291,7 @@ class SongMediaItem(MediaManagerItem): """ Edit a song """ + log.debug(u'onEditClick') if check_item_selected(self.listView, translate('SongsPlugin.MediaItem', 'You must select an item to edit.')): @@ -324,6 +329,7 @@ class SongMediaItem(MediaManagerItem): self.onSearchTextButtonClick() def generateSlideData(self, service_item, item=None): + log.debug(u'generateSlideData (%s:%s)' % (service_item, item)) raw_footer = [] author_list = u'' author_audit = [] @@ -345,7 +351,7 @@ class SongMediaItem(MediaManagerItem): service_item.add_capability(ItemCapabilities.AddIfNewItem) song = self.parent.manager.get_object(Song, item_id) service_item.theme = song.theme_name - service_item.editId = item_id + service_item.edit_id = item_id if song.lyrics.startswith(u'