removed not needed icon parameter

This commit is contained in:
Andreas Preikschat 2013-03-07 14:14:31 +01:00
parent 7adb4bbdb5
commit 5f67e4f149
8 changed files with 16 additions and 19 deletions

View File

@ -59,9 +59,6 @@ class MediaManagerItem(QtGui.QWidget):
``plugin``
The plugin widget. Usually this will be the *Plugin* itself. This needs to be a class descended from ``Plugin``.
``icon``
Either a ``QIcon``, a resource path, or a file name. This is the icon which is displayed in the *Media Manager*.
**Member Variables**
When creating a descendant class from this class for your plugin, the following member variables should be set.
@ -81,7 +78,7 @@ class MediaManagerItem(QtGui.QWidget):
"""
log.info(u'Media Item loaded')
def __init__(self, parent=None, plugin=None, icon=None):
def __init__(self, parent=None, plugin=None):
"""
Constructor to create the media manager item.
"""
@ -93,9 +90,9 @@ class MediaManagerItem(QtGui.QWidget):
self.title = unicode(visible_title[u'title'])
Registry().register(self.plugin.name, self)
self.settingsSection = self.plugin.name
self.icon = None
if icon:
self.icon = build_icon(icon)
# self.icon = None
# if icon:
# self.icon = build_icon(icon)
self.toolbar = None
self.remoteTriggered = None
self.singleServiceItem = True

View File

@ -214,7 +214,7 @@ class Plugin(QtCore.QObject):
you need, and return it for integration into OpenLP.
"""
if self.mediaItemClass:
self.mediaItem = self.mediaItemClass(self.main_window.mediaDockManager.media_dock, self, self.icon)
self.mediaItem = self.mediaItemClass(self.main_window.mediaDockManager.media_dock, self)
def addImportMenuItem(self, importMenu):
"""

View File

@ -58,11 +58,11 @@ class BibleMediaItem(MediaManagerItem):
"""
log.info(u'Bible Media Item loaded')
def __init__(self, parent, plugin, icon):
def __init__(self, parent, plugin):
self.IconPath = u'songs/song'
self.lockIcon = build_icon(u':/bibles/bibles_search_lock.png')
self.unlockIcon = build_icon(u':/bibles/bibles_search_unlock.png')
MediaManagerItem.__init__(self, parent, plugin, icon)
MediaManagerItem.__init__(self, parent, plugin)
# Place to store the search results for both bibles.
self.settings = self.plugin.settingsTab
self.quickPreviewAllowed = True

View File

@ -54,9 +54,9 @@ class CustomMediaItem(MediaManagerItem):
"""
log.info(u'Custom Media Item loaded')
def __init__(self, parent, plugin, icon):
def __init__(self, parent, plugin):
self.IconPath = u'custom/custom'
MediaManagerItem.__init__(self, parent, plugin, icon)
MediaManagerItem.__init__(self, parent, plugin)
self.edit_custom_form = EditCustomForm(self, self.main_window, self.plugin.manager)
self.singleServiceItem = False
self.quickPreviewAllowed = True

View File

@ -45,9 +45,9 @@ class ImageMediaItem(MediaManagerItem):
"""
log.info(u'Image Media Item loaded')
def __init__(self, parent, plugin, icon):
def __init__(self, parent, plugin):
self.IconPath = u'images/image'
MediaManagerItem.__init__(self, parent, plugin, icon)
MediaManagerItem.__init__(self, parent, plugin)
self.quickPreviewAllowed = True
self.hasSearch = True
Registry().register_function(u'live_theme_changed', self.live_theme_changed)

View File

@ -53,11 +53,11 @@ class MediaMediaItem(MediaManagerItem):
"""
log.info(u'%s MediaMediaItem loaded', __name__)
def __init__(self, parent, plugin, icon):
def __init__(self, parent, plugin):
self.iconPath = u'images/image'
self.background = False
self.automatic = u''
MediaManagerItem.__init__(self, parent, plugin, icon)
MediaManagerItem.__init__(self, parent, plugin)
self.singleServiceItem = False
self.hasSearch = True
self.media_object = None

View File

@ -56,7 +56,7 @@ class PresentationMediaItem(MediaManagerItem):
self.controllers = controllers
self.IconPath = u'presentations/presentation'
self.Automatic = u''
MediaManagerItem.__init__(self, parent, plugin, icon)
MediaManagerItem.__init__(self, parent, plugin)
self.message_listener = MessageListener(self)
self.hasSearch = True
self.singleServiceItem = False

View File

@ -65,9 +65,9 @@ class SongMediaItem(MediaManagerItem):
"""
log.info(u'Song Media Item loaded')
def __init__(self, parent, plugin, icon):
def __init__(self, parent, plugin):
self.IconPath = u'songs/song'
MediaManagerItem.__init__(self, parent, plugin, icon)
MediaManagerItem.__init__(self, parent, plugin)
self.editSongForm = EditSongForm(self, self.main_window, self.plugin.manager)
self.openLyrics = OpenLyrics(self.plugin.manager)
self.singleServiceItem = False