diff --git a/openlp/core/lib/mediamanageritem.py b/openlp/core/lib/mediamanageritem.py
index a0b6806aa..9232390ce 100644
--- a/openlp/core/lib/mediamanageritem.py
+++ b/openlp/core/lib/mediamanageritem.py
@@ -86,13 +86,13 @@ class MediaManagerItem(QtGui.QWidget):
"""
log.info(u'Media Item loaded')
- def __init__(self, parent=None, icon=None, title=None, plugin=None):
+ def __init__(self, parent=None, plugin=None, icon=None, title=None):
"""
Constructor to create the media manager item.
"""
QtGui.QWidget.__init__(self)
self.parent = parent
- # TODO: plugin is not the parent, so add this to the calling plugins
+ #TODO: change parent to plugin
self.plugin = parent
self.settingsSection = self.plugin.name_lower
if isinstance(icon, QtGui.QIcon):
diff --git a/openlp/plugins/bibles/bibleplugin.py b/openlp/plugins/bibles/bibleplugin.py
index fda395b00..e5ace0ac6 100644
--- a/openlp/plugins/bibles/bibleplugin.py
+++ b/openlp/plugins/bibles/bibleplugin.py
@@ -62,7 +62,7 @@ class BiblePlugin(Plugin):
def getMediaManagerItem(self):
# Create the BibleManagerItem object.
- return BibleMediaItem(self, self.icon, self.name)
+ return BibleMediaItem(self, self, self.icon, self.name)
def addImportMenuItem(self, import_menu):
self.importBibleItem = QtGui.QAction(import_menu)
@@ -164,4 +164,4 @@ class BiblePlugin(Plugin):
self.strings[StringType.Service] = {
u'title': translate('BiblesPlugin', 'Service'),
u'tooltip': translate('BiblesPlugin', 'Add the selected Bible to the service')
- }
+ }
\ No newline at end of file
diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py
index f6764801b..c5790bfc0 100644
--- a/openlp/plugins/bibles/lib/mediaitem.py
+++ b/openlp/plugins/bibles/lib/mediaitem.py
@@ -53,10 +53,10 @@ class BibleMediaItem(MediaManagerItem):
"""
log.info(u'Bible Media Item loaded')
- def __init__(self, parent, icon, title):
+ def __init__(self, parent, plugin, icon, title):
self.IconPath = u'songs/song'
self.ListViewWithDnD_class = BibleListView
- MediaManagerItem.__init__(self, parent, icon, title)
+ MediaManagerItem.__init__(self, parent, self, icon, title)
# place to store the search results for both bibles
self.search_results = {}
self.dual_search_results = {}
@@ -702,4 +702,4 @@ class BibleMediaItem(MediaManagerItem):
if row:
row.setSelected(True)
self.search_results = {}
- self.dual_search_results = {}
+ self.dual_search_results = {}
\ No newline at end of file
diff --git a/openlp/plugins/custom/customplugin.py b/openlp/plugins/custom/customplugin.py
index 2e2e4b744..2b2b9702c 100644
--- a/openlp/plugins/custom/customplugin.py
+++ b/openlp/plugins/custom/customplugin.py
@@ -59,7 +59,7 @@ class CustomPlugin(Plugin):
def getMediaManagerItem(self):
# Create the CustomManagerItem object
- return CustomMediaItem(self, self.icon, self.name)
+ return CustomMediaItem(self, self, self.icon, self.name)
def about(self):
about_text = translate('CustomPlugin', 'Custom Plugin'
@@ -148,4 +148,4 @@ class CustomPlugin(Plugin):
self.strings[StringType.Service] = {
u'title': translate('CustomsPlugin', 'Service'),
u'tooltip': translate('CustomsPlugin', 'Add the selected Custom to the service')
- }
+ }
\ No newline at end of file
diff --git a/openlp/plugins/custom/lib/mediaitem.py b/openlp/plugins/custom/lib/mediaitem.py
index ab5039c34..43c321586 100644
--- a/openlp/plugins/custom/lib/mediaitem.py
+++ b/openlp/plugins/custom/lib/mediaitem.py
@@ -46,12 +46,12 @@ class CustomMediaItem(MediaManagerItem):
"""
log.info(u'Custom Media Item loaded')
- def __init__(self, parent, icon, title):
+ def __init__(self, parent, plugin, icon, title):
self.IconPath = u'custom/custom'
# this next is a class, not an instance of a class - it will
# be instanced by the base MediaManagerItem
self.ListViewWithDnD_class = CustomListView
- MediaManagerItem.__init__(self, parent, icon, title)
+ MediaManagerItem.__init__(self, parent, self, icon, title)
self.singleServiceItem = False
# Holds information about whether the edit is remotly triggered and
# which Custom is required.
@@ -181,4 +181,4 @@ class CustomMediaItem(MediaManagerItem):
else:
raw_footer.append(u'')
service_item.raw_footer = raw_footer
- return True
+ return True
\ No newline at end of file
diff --git a/openlp/plugins/images/imageplugin.py b/openlp/plugins/images/imageplugin.py
index 7cba1cc21..213cf0dcc 100644
--- a/openlp/plugins/images/imageplugin.py
+++ b/openlp/plugins/images/imageplugin.py
@@ -42,7 +42,7 @@ class ImagePlugin(Plugin):
def getMediaManagerItem(self):
# Create the MediaManagerItem object
- return ImageMediaItem(self, self.icon, self.name)
+ return ImageMediaItem(self, self, self.icon, self.name)
def about(self):
about_text = translate('ImagePlugin', 'Image Plugin'
@@ -105,4 +105,4 @@ class ImagePlugin(Plugin):
self.strings[StringType.Service] = {
u'title': translate('ImagePlugin', 'Service'),
u'tooltip': translate('ImagePlugin', 'Add the selected Image to the service')
- }
+ }
\ No newline at end of file
diff --git a/openlp/plugins/images/lib/mediaitem.py b/openlp/plugins/images/lib/mediaitem.py
index d6584acfe..5baf294bd 100644
--- a/openlp/plugins/images/lib/mediaitem.py
+++ b/openlp/plugins/images/lib/mediaitem.py
@@ -49,12 +49,12 @@ class ImageMediaItem(MediaManagerItem):
"""
log.info(u'Image Media Item loaded')
- def __init__(self, parent, icon, title):
+ def __init__(self, parent, plugin, icon, title):
self.IconPath = u'images/image'
# this next is a class, not an instance of a class - it will
# be instanced by the base MediaManagerItem
self.ListViewWithDnD_class = ImageListView
- MediaManagerItem.__init__(self, parent, icon, title)
+ MediaManagerItem.__init__(self, parent, self, icon, title)
def retranslateUi(self):
self.OnNewPrompt = translate('ImagePlugin.MediaItem',
@@ -190,4 +190,4 @@ class ImageMediaItem(MediaManagerItem):
self.resetButton.setVisible(True)
def onPreviewClick(self):
- MediaManagerItem.onPreviewClick(self)
+ MediaManagerItem.onPreviewClick(self)
\ No newline at end of file
diff --git a/openlp/plugins/media/lib/mediaitem.py b/openlp/plugins/media/lib/mediaitem.py
index c9a5df152..9f737ba48 100644
--- a/openlp/plugins/media/lib/mediaitem.py
+++ b/openlp/plugins/media/lib/mediaitem.py
@@ -46,7 +46,7 @@ class MediaMediaItem(MediaManagerItem):
"""
log.info(u'%s MediaMediaItem loaded', __name__)
- def __init__(self, parent, icon, title):
+ def __init__(self, parent, plugin, icon, title):
self.IconPath = u'images/image'
self.background = False
# this next is a class, not an instance of a class - it will
@@ -54,7 +54,7 @@ class MediaMediaItem(MediaManagerItem):
self.ListViewWithDnD_class = MediaListView
self.PreviewFunction = QtGui.QPixmap(
u':/media/media_video.png').toImage()
- MediaManagerItem.__init__(self, parent, icon, title)
+ MediaManagerItem.__init__(self, parent, self, icon, title)
self.singleServiceItem = False
self.serviceItemIconName = u':/media/media_video.png'
@@ -157,4 +157,4 @@ class MediaMediaItem(MediaManagerItem):
img = QtGui.QPixmap(u':/media/media_video.png').toImage()
item_name.setIcon(build_icon(img))
item_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(file))
- self.listView.addItem(item_name)
+ self.listView.addItem(item_name)
\ No newline at end of file
diff --git a/openlp/plugins/media/mediaplugin.py b/openlp/plugins/media/mediaplugin.py
index bb00bbd61..b0be2baed 100644
--- a/openlp/plugins/media/mediaplugin.py
+++ b/openlp/plugins/media/mediaplugin.py
@@ -70,7 +70,7 @@ class MediaPlugin(Plugin):
def getMediaManagerItem(self):
# Create the MediaManagerItem object
- return MediaMediaItem(self, self.icon, self.name)
+ return MediaMediaItem(self, self, self.icon, self.name)
def about(self):
about_text = translate('MediaPlugin', 'Media Plugin'
@@ -123,4 +123,4 @@ class MediaPlugin(Plugin):
self.strings[StringType.Service] = {
u'title': translate('MediaPlugin', 'Service'),
u'tooltip': translate('MediaPlugin', 'Add the selected Media to the service')
- }
+ }
\ No newline at end of file
diff --git a/openlp/plugins/presentations/lib/mediaitem.py b/openlp/plugins/presentations/lib/mediaitem.py
index 38cac6ff6..6a5769270 100644
--- a/openlp/plugins/presentations/lib/mediaitem.py
+++ b/openlp/plugins/presentations/lib/mediaitem.py
@@ -63,7 +63,7 @@ class PresentationMediaItem(MediaManagerItem):
# this next is a class, not an instance of a class - it will
# be instanced by the base MediaManagerItem
self.ListViewWithDnD_class = PresentationListView
- MediaManagerItem.__init__(self, parent, icon, title)
+ MediaManagerItem.__init__(self, parent, self, icon, title)
self.message_listener = MessageListener(self)
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'mediaitem_presentation_rebuild'), self.rebuild)
@@ -293,4 +293,4 @@ class PresentationMediaItem(MediaManagerItem):
if self.controllers[controller].enabled():
if filetype in self.controllers[controller].alsosupports:
return controller
- return None
+ return None
\ No newline at end of file
diff --git a/openlp/plugins/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py
index 8197d6ec4..145e6b855 100644
--- a/openlp/plugins/songs/lib/mediaitem.py
+++ b/openlp/plugins/songs/lib/mediaitem.py
@@ -48,10 +48,10 @@ class SongMediaItem(MediaManagerItem):
"""
log.info(u'Song Media Item loaded')
- def __init__(self, parent, icon, title):
+ def __init__(self, parent, plugin, icon, title):
self.IconPath = u'songs/song'
self.ListViewWithDnD_class = SongListView
- MediaManagerItem.__init__(self, parent, icon, title)
+ MediaManagerItem.__init__(self, parent, self, icon, title)
self.edit_song_form = EditSongForm(self, self.parent.manager)
self.singleServiceItem = False
#self.edit_song_form = EditSongForm(self.parent.manager, self)
@@ -368,4 +368,4 @@ class SongMediaItem(MediaManagerItem):
service_item.audit = [
song.title, author_audit, song.copyright, unicode(song.ccli_number)
]
- return True
+ return True
\ No newline at end of file
diff --git a/openlp/plugins/songs/songsplugin.py b/openlp/plugins/songs/songsplugin.py
index 3d564806f..ba9213b01 100644
--- a/openlp/plugins/songs/songsplugin.py
+++ b/openlp/plugins/songs/songsplugin.py
@@ -70,7 +70,7 @@ class SongsPlugin(Plugin):
Create the MediaManagerItem object, which is displaed in the
Media Manager.
"""
- return SongMediaItem(self, self.icon, self.name)
+ return SongMediaItem(self, self, self.icon, self.name)
def addImportMenuItem(self, import_menu):
"""
@@ -190,4 +190,4 @@ class SongsPlugin(Plugin):
self.strings[StringType.Service] = {
u'title': translate('SongsPlugin', 'Service'),
u'tooltip': translate('SongsPlugin', 'Add the selected Song to the service')
- }
+ }
\ No newline at end of file