forked from openlp/openlp
bugfixing
This commit is contained in:
parent
c53731d74b
commit
3bc527e4fc
@ -52,13 +52,14 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
The parent widget. Usually this will be the *Media Manager*
|
||||
itself. This needs to be a class descended from ``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*.
|
||||
|
||||
``title``
|
||||
The title visible on the item in the *Media Manager*.
|
||||
|
||||
**Member Variables**
|
||||
|
||||
When creating a descendant class from this class for your plugin,
|
||||
@ -86,14 +87,16 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
"""
|
||||
log.info(u'Media Item loaded')
|
||||
|
||||
def __init__(self, parent=None, plugin=None, icon=None, title=None):
|
||||
def __init__(self, parent=None, plugin=None, icon=None):
|
||||
"""
|
||||
Constructor to create the media manager item.
|
||||
"""
|
||||
QtGui.QWidget.__init__(self)
|
||||
self.parent = parent
|
||||
#TODO: change parent to plugin
|
||||
self.plugin = parent
|
||||
#TODO: plugin should not be the parent in future
|
||||
self.plugin = parent#plugin
|
||||
media_title_string = self.plugin.getString(StringType.MediaItem)
|
||||
self.title = media_title_string[u'title']
|
||||
self.settingsSection = self.plugin.name_lower
|
||||
if isinstance(icon, QtGui.QIcon):
|
||||
self.icon = icon
|
||||
@ -102,9 +105,6 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
else:
|
||||
self.icon = None
|
||||
if title:
|
||||
name_string = self.plugin.getString(StringType.Name)
|
||||
self.title = name_string[u'plural']
|
||||
self.toolbar = None
|
||||
self.remoteTriggered = None
|
||||
self.serviceItemIconName = None
|
||||
@ -276,12 +276,13 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
self.pageLayout.addWidget(self.listView)
|
||||
#define and add the context menu
|
||||
self.listView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
||||
name_string = self.plugin.getString(StringType.Name)
|
||||
if self.hasEditIcon:
|
||||
self.listView.addAction(
|
||||
context_menu_action(
|
||||
self.listView, u':/general/general_edit.png',
|
||||
unicode(translate('OpenLP.MediaManagerItem', '&Edit %s')) %
|
||||
self.plugin.name,
|
||||
name_string[u'singular'],
|
||||
self.onEditClick))
|
||||
self.listView.addAction(context_menu_separator(self.listView))
|
||||
if self.hasDeleteIcon:
|
||||
@ -290,14 +291,14 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
self.listView, u':/general/general_delete.png',
|
||||
unicode(translate('OpenLP.MediaManagerItem',
|
||||
'&Delete %s')) %
|
||||
self.plugin.name,
|
||||
name_string[u'singular'],
|
||||
self.onDeleteClick))
|
||||
self.listView.addAction(context_menu_separator(self.listView))
|
||||
self.listView.addAction(
|
||||
context_menu_action(
|
||||
self.listView, u':/general/general_preview.png',
|
||||
unicode(translate('OpenLP.MediaManagerItem', '&Preview %s')) %
|
||||
self.plugin.name,
|
||||
name_string[u'singular'],
|
||||
self.onPreviewClick))
|
||||
self.listView.addAction(
|
||||
context_menu_action(
|
||||
|
@ -52,6 +52,7 @@ class StringType(object):
|
||||
Preview = u'preview'
|
||||
Live = u'live'
|
||||
Service = u'service'
|
||||
MediaItem = u'media_item'
|
||||
|
||||
class Plugin(QtCore.QObject):
|
||||
"""
|
||||
@ -271,7 +272,7 @@ class Plugin(QtCore.QObject):
|
||||
if self.mediaItem:
|
||||
self.mediadock.remove_dock(self.mediaItem)
|
||||
if self.settings_tab:
|
||||
self.settingsForm.removeTab(self.name)
|
||||
self.settingsForm.removeTab(self.settings_tab)
|
||||
|
||||
def insertToolboxItem(self):
|
||||
"""
|
||||
|
@ -30,7 +30,7 @@ import os
|
||||
import sys
|
||||
import logging
|
||||
|
||||
from openlp.core.lib import Plugin, PluginStatus
|
||||
from openlp.core.lib import Plugin, StringType, PluginStatus
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@ -152,12 +152,13 @@ class PluginManager(object):
|
||||
for plugin in self.plugins:
|
||||
if plugin.status is not PluginStatus.Disabled:
|
||||
plugin.settings_tab = plugin.getSettingsTab()
|
||||
media_item_string = plugin.getString(StringType.MediaItem)
|
||||
if plugin.settings_tab:
|
||||
log.debug(u'Inserting settings tab item from %s' %
|
||||
plugin.name)
|
||||
settingsform.addTab(plugin.name, plugin.settings_tab)
|
||||
media_item_string[u'title'])
|
||||
settingsform.addTab(media_item_string[u'title'], plugin.settings_tab)
|
||||
else:
|
||||
log.debug(u'No tab settings in %s' % plugin.name)
|
||||
log.debug(u'No tab settings in %s' % media_item_string[u'title'])
|
||||
|
||||
def hook_import_menu(self, import_menu):
|
||||
"""
|
||||
|
@ -26,6 +26,8 @@
|
||||
|
||||
import logging
|
||||
|
||||
from openlp.core.lib import StringType
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
class MediaDockManager(object):
|
||||
@ -48,8 +50,9 @@ class MediaDockManager(object):
|
||||
``icon``
|
||||
An icon for this dock item
|
||||
"""
|
||||
log.info(u'Adding %s dock' % media_item.plugin.name)
|
||||
self.media_dock.addItem(media_item, icon, media_item.plugin.name)
|
||||
media_item_string = media_item.plugin.getString(StringType.MediaItem)
|
||||
log.info(u'Adding %s dock' % media_item_string)
|
||||
self.media_dock.addItem(media_item, icon, media_item_string[u'title'])
|
||||
|
||||
def insert_dock(self, media_item, icon, weight):
|
||||
"""
|
||||
@ -57,7 +60,8 @@ class MediaDockManager(object):
|
||||
This does not work as it gives a Segmentation error.
|
||||
For now add at end of stack if not present
|
||||
"""
|
||||
log.debug(u'Inserting %s dock' % media_item.plugin.name)
|
||||
media_item_string = media_item.plugin.getString(StringType.MediaItem)
|
||||
log.debug(u'Inserting %s dock' % media_item_string[u'title'])
|
||||
match = False
|
||||
for dock_index in range(0, self.media_dock.count()):
|
||||
if self.media_dock.widget(dock_index).settingsSection == \
|
||||
@ -65,7 +69,7 @@ class MediaDockManager(object):
|
||||
match = True
|
||||
break
|
||||
if not match:
|
||||
self.media_dock.addItem(media_item, icon, media_item.plugin.name)
|
||||
self.media_dock.addItem(media_item, icon, media_item_string[u'title'])
|
||||
|
||||
def remove_dock(self, media_item):
|
||||
"""
|
||||
@ -74,7 +78,8 @@ class MediaDockManager(object):
|
||||
``media_item``
|
||||
The item to add to the dock
|
||||
"""
|
||||
log.debug(u'remove %s dock' % media_item.plugin.name)
|
||||
media_item_string = media_item.plugin.getString(StringType.MediaItem)
|
||||
log.debug(u'remove %s dock' % media_item_string[u'title'])
|
||||
for dock_index in range(0, self.media_dock.count()):
|
||||
if self.media_dock.widget(dock_index):
|
||||
if self.media_dock.widget(dock_index).settingsSection == \
|
||||
|
@ -107,11 +107,11 @@ class PluginForm(QtGui.QDialog, Ui_PluginViewDialog):
|
||||
if self.pluginListWidget.currentItem() is None:
|
||||
self._clearDetails()
|
||||
return
|
||||
plugin_name_more = self.pluginListWidget.currentItem().text().split(u' ')[0]
|
||||
plugin_name_plural = self.pluginListWidget.currentItem().text().split(u' ')[0]
|
||||
self.activePlugin = None
|
||||
for plugin in self.parent.plugin_manager.plugins:
|
||||
name_string = plugin.getString(StringType.Name)
|
||||
if name_string[u'plural'] == plugin_name_more:
|
||||
if name_string[u'plural'] == plugin_name_plural:
|
||||
self.activePlugin = plugin
|
||||
break
|
||||
if self.activePlugin:
|
||||
|
@ -72,14 +72,14 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
|
||||
self.settingsTabWidget.insertTab(
|
||||
location + 14, tab, tab.tabTitleVisible)
|
||||
|
||||
def removeTab(self, name):
|
||||
def removeTab(self, tab):
|
||||
"""
|
||||
Remove a tab from the form
|
||||
"""
|
||||
log.debug(u'remove %s tab' % name)
|
||||
log.debug(u'remove %s tab' % tab.tabTitleVisible)
|
||||
for tabIndex in range(0, self.settingsTabWidget.count()):
|
||||
if self.settingsTabWidget.widget(tabIndex):
|
||||
if self.settingsTabWidget.widget(tabIndex).tabTitle == name:
|
||||
if self.settingsTabWidget.widget(tabIndex).tabTitleVisible == tab.tabTitleVisible:
|
||||
self.settingsTabWidget.removeTab(tabIndex)
|
||||
|
||||
def accept(self):
|
||||
|
@ -109,8 +109,12 @@ class AlertsPlugin(Plugin):
|
||||
self.name = u'Alerts'
|
||||
self.name_lower = u'alerts'
|
||||
self.strings = {}
|
||||
# for names in mediamanagerdock and pluginlist
|
||||
## Name PluginList ##
|
||||
self.strings[StringType.Name] = {
|
||||
u'singular': translate('AlertsPlugin', 'Alert'),
|
||||
u'plural': translate('AlertsPlugin', 'Alerts')
|
||||
}
|
||||
## Name for MediaDockManager, SettingsManager ##
|
||||
self.strings[StringType.MediaItem] = {
|
||||
u'title': translate('AlertsPlugin', 'Alerts')
|
||||
}
|
||||
|
@ -58,11 +58,12 @@ class BiblePlugin(Plugin):
|
||||
self.exportBibleItem.setVisible(False)
|
||||
|
||||
def getSettingsTab(self):
|
||||
return BiblesTab(self.name)
|
||||
media_item_string = self.getString(StringType.MediaItem)
|
||||
return BiblesTab(media_item_string[u'title'])
|
||||
|
||||
def getMediaManagerItem(self):
|
||||
# Create the BibleManagerItem object.
|
||||
return BibleMediaItem(self, self, self.icon, self.name)
|
||||
return BibleMediaItem(self, self, self.icon)
|
||||
|
||||
def addImportMenuItem(self, import_menu):
|
||||
self.importBibleItem = QtGui.QAction(import_menu)
|
||||
@ -124,11 +125,15 @@ class BiblePlugin(Plugin):
|
||||
self.name = u'Bibles'
|
||||
self.name_lower = u'Bibles'
|
||||
self.strings = {}
|
||||
# for names in mediamanagerdock and pluginlist
|
||||
## Name PluginList ##
|
||||
self.strings[StringType.Name] = {
|
||||
u'singular': translate('BiblesPlugin', 'Bible'),
|
||||
u'plural': translate('BiblesPlugin', 'Bibles')
|
||||
}
|
||||
## Name for MediaDockManager, SettingsManager ##
|
||||
self.strings[StringType.MediaItem] = {
|
||||
u'title': translate('BiblesPlugin', 'Bibles')
|
||||
}
|
||||
# Middle Header Bar
|
||||
## Import Button ##
|
||||
self.strings[StringType.Import] = {
|
||||
@ -164,4 +169,4 @@ class BiblePlugin(Plugin):
|
||||
self.strings[StringType.Service] = {
|
||||
u'title': translate('BiblesPlugin', 'Service'),
|
||||
u'tooltip': translate('BiblesPlugin', 'Add the selected Bible to the service')
|
||||
}
|
||||
}
|
||||
|
@ -53,10 +53,10 @@ class BibleMediaItem(MediaManagerItem):
|
||||
"""
|
||||
log.info(u'Bible Media Item loaded')
|
||||
|
||||
def __init__(self, parent, plugin, icon, title):
|
||||
def __init__(self, parent, plugin, icon):
|
||||
self.IconPath = u'songs/song'
|
||||
self.ListViewWithDnD_class = BibleListView
|
||||
MediaManagerItem.__init__(self, parent, self, icon, title)
|
||||
MediaManagerItem.__init__(self, parent, self, icon)
|
||||
# place to store the search results for both bibles
|
||||
self.search_results = {}
|
||||
self.dual_search_results = {}
|
||||
|
@ -55,11 +55,12 @@ class CustomPlugin(Plugin):
|
||||
self.icon = build_icon(self.icon_path)
|
||||
|
||||
def getSettingsTab(self):
|
||||
return CustomTab(self.name)
|
||||
media_item_string = self.getString(StringType.MediaItem)
|
||||
return CustomTab(media_item_string[u'title'])
|
||||
|
||||
def getMediaManagerItem(self):
|
||||
# Create the CustomManagerItem object
|
||||
return CustomMediaItem(self, self, self.icon, self.name)
|
||||
return CustomMediaItem(self, self, self.icon)
|
||||
|
||||
def about(self):
|
||||
about_text = translate('CustomPlugin', '<strong>Custom Plugin</strong>'
|
||||
@ -103,11 +104,15 @@ class CustomPlugin(Plugin):
|
||||
self.name = u'Custom'
|
||||
self.name_lower = u'custom'
|
||||
self.strings = {}
|
||||
# for names in mediamanagerdock and pluginlist
|
||||
## Name PluginList ##
|
||||
self.strings[StringType.Name] = {
|
||||
u'singular': translate('CustomsPlugin', 'Custom'),
|
||||
u'plural': translate('CustomsPlugin', 'Customs')
|
||||
}
|
||||
## Name for MediaDockManager, SettingsManager ##
|
||||
self.strings[StringType.MediaItem] = {
|
||||
u'title': translate('CustomsPlugin', 'Customs')
|
||||
}
|
||||
# Middle Header Bar
|
||||
## Import Button ##
|
||||
self.strings[StringType.Import] = {
|
||||
@ -148,4 +153,4 @@ class CustomPlugin(Plugin):
|
||||
self.strings[StringType.Service] = {
|
||||
u'title': translate('CustomsPlugin', 'Service'),
|
||||
u'tooltip': translate('CustomsPlugin', 'Add the selected Custom to the service')
|
||||
}
|
||||
}
|
||||
|
@ -46,12 +46,12 @@ class CustomMediaItem(MediaManagerItem):
|
||||
"""
|
||||
log.info(u'Custom Media Item loaded')
|
||||
|
||||
def __init__(self, parent, plugin, icon, title):
|
||||
def __init__(self, parent, plugin, icon):
|
||||
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, self, icon, title)
|
||||
MediaManagerItem.__init__(self, parent, self, icon)
|
||||
self.singleServiceItem = False
|
||||
# Holds information about whether the edit is remotly triggered and
|
||||
# which Custom is required.
|
||||
|
@ -42,7 +42,7 @@ class ImagePlugin(Plugin):
|
||||
|
||||
def getMediaManagerItem(self):
|
||||
# Create the MediaManagerItem object
|
||||
return ImageMediaItem(self, self, self.icon, self.name)
|
||||
return ImageMediaItem(self, self, self.icon)
|
||||
|
||||
def about(self):
|
||||
about_text = translate('ImagePlugin', '<strong>Image Plugin</strong>'
|
||||
@ -65,11 +65,15 @@ class ImagePlugin(Plugin):
|
||||
self.name = u'Images'
|
||||
self.name_lower = u'images'
|
||||
self.strings = {}
|
||||
# for names in mediamanagerdock and pluginlist
|
||||
## Name PluginList ##
|
||||
self.strings[StringType.Name] = {
|
||||
u'singular': translate('ImagePlugin', 'Image'),
|
||||
u'plural': translate('ImagePlugin', 'Images')
|
||||
}
|
||||
## Name for MediaDockManager, SettingsManager ##
|
||||
self.strings[StringType.MediaItem] = {
|
||||
u'title': translate('ImagePlugin', 'Images')
|
||||
}
|
||||
# Middle Header Bar
|
||||
## Load Button ##
|
||||
self.strings[StringType.Load] = {
|
||||
@ -105,4 +109,4 @@ class ImagePlugin(Plugin):
|
||||
self.strings[StringType.Service] = {
|
||||
u'title': translate('ImagePlugin', 'Service'),
|
||||
u'tooltip': translate('ImagePlugin', 'Add the selected Image to the service')
|
||||
}
|
||||
}
|
||||
|
@ -49,12 +49,12 @@ class ImageMediaItem(MediaManagerItem):
|
||||
"""
|
||||
log.info(u'Image Media Item loaded')
|
||||
|
||||
def __init__(self, parent, plugin, icon, title):
|
||||
def __init__(self, parent, plugin, icon):
|
||||
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, self, icon, title)
|
||||
MediaManagerItem.__init__(self, parent, self, icon)
|
||||
|
||||
def retranslateUi(self):
|
||||
self.OnNewPrompt = translate('ImagePlugin.MediaItem',
|
||||
|
@ -46,7 +46,7 @@ class MediaMediaItem(MediaManagerItem):
|
||||
"""
|
||||
log.info(u'%s MediaMediaItem loaded', __name__)
|
||||
|
||||
def __init__(self, parent, plugin, icon, title):
|
||||
def __init__(self, parent, plugin, icon):
|
||||
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, self, icon, title)
|
||||
MediaManagerItem.__init__(self, parent, self, icon)
|
||||
self.singleServiceItem = False
|
||||
self.serviceItemIconName = u':/media/media_video.png'
|
||||
|
||||
|
@ -70,7 +70,7 @@ class MediaPlugin(Plugin):
|
||||
|
||||
def getMediaManagerItem(self):
|
||||
# Create the MediaManagerItem object
|
||||
return MediaMediaItem(self, self, self.icon, self.name)
|
||||
return MediaMediaItem(self, self, self.icon)
|
||||
|
||||
def about(self):
|
||||
about_text = translate('MediaPlugin', '<strong>Media Plugin</strong>'
|
||||
@ -83,10 +83,14 @@ class MediaPlugin(Plugin):
|
||||
self.name = u'Media'
|
||||
self.name_lower = u'media'
|
||||
self.strings = {}
|
||||
# for names in mediamanagerdock and pluginlist
|
||||
## Name PluginList ##
|
||||
self.strings[StringType.Name] = {
|
||||
u'singular': translate('MediaPlugin', 'Media'),
|
||||
u'plural': translate('MediaPlugin', 'Medias')
|
||||
u'plural': translate('MediaPlugin', 'Media')
|
||||
}
|
||||
## Name for MediaDockManager, SettingsManager ##
|
||||
self.strings[StringType.MediaItem] = {
|
||||
u'title': translate('MediaPlugin', 'Media')
|
||||
}
|
||||
# Middle Header Bar
|
||||
## Load Button ##
|
||||
@ -123,4 +127,4 @@ class MediaPlugin(Plugin):
|
||||
self.strings[StringType.Service] = {
|
||||
u'title': translate('MediaPlugin', 'Service'),
|
||||
u'tooltip': translate('MediaPlugin', 'Add the selected Media to the service')
|
||||
}
|
||||
}
|
||||
|
@ -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, self, icon, title)
|
||||
MediaManagerItem.__init__(self, parent, self, icon)
|
||||
self.message_listener = MessageListener(self)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'mediaitem_presentation_rebuild'), self.rebuild)
|
||||
|
@ -60,7 +60,8 @@ class PresentationPlugin(Plugin):
|
||||
"""
|
||||
Create the settings Tab
|
||||
"""
|
||||
return PresentationTab(self.name, self.controllers)
|
||||
media_item_string = self.getString(StringType.MediaItem)
|
||||
return PresentationTab(media_item_string[u'title'], self.controllers)
|
||||
|
||||
def initialise(self):
|
||||
"""
|
||||
@ -151,11 +152,15 @@ class PresentationPlugin(Plugin):
|
||||
self.name = u'Presentations'
|
||||
self.name_lower = u'presentations'
|
||||
self.strings = {}
|
||||
# for names in mediamanagerdock and pluginlist
|
||||
## Name PluginList ##
|
||||
self.strings[StringType.Name] = {
|
||||
u'singular': translate('PresentationPlugin', 'Presentation'),
|
||||
u'plural': translate('PresentationPlugin', 'Presentations')
|
||||
}
|
||||
## Name for MediaDockManager, SettingsManager ##
|
||||
self.strings[StringType.MediaItem] = {
|
||||
u'title': translate('PresentationPlugin', 'Presentations')
|
||||
}
|
||||
# Middle Header Bar
|
||||
## Load Button ##
|
||||
self.strings[StringType.Load] = {
|
||||
|
@ -65,7 +65,8 @@ class RemotesPlugin(Plugin):
|
||||
"""
|
||||
Create the settings Tab
|
||||
"""
|
||||
return RemoteTab(self.name)
|
||||
media_item_string = self.getString(StringType.MediaItem)
|
||||
return RemoteTab(media_item_string[u'title'])
|
||||
|
||||
def about(self):
|
||||
"""
|
||||
@ -84,8 +85,12 @@ class RemotesPlugin(Plugin):
|
||||
self.name = u'Remotes'
|
||||
self.name_lower = u'remotes'
|
||||
self.strings = {}
|
||||
# for names in mediamanagerdock and pluginlist
|
||||
## Name PluginList ##
|
||||
self.strings[StringType.Name] = {
|
||||
u'singular': translate('RemotePlugin', 'Remote'),
|
||||
u'plural': translate('RemotePlugin', 'Remotes')
|
||||
}
|
||||
## Name for MediaDockManager, SettingsManager ##
|
||||
self.strings[StringType.MediaItem] = {
|
||||
u'title': translate('RemotePlugin', 'Remotes')
|
||||
}
|
||||
|
@ -48,10 +48,10 @@ class SongMediaItem(MediaManagerItem):
|
||||
"""
|
||||
log.info(u'Song Media Item loaded')
|
||||
|
||||
def __init__(self, parent, plugin, icon, title):
|
||||
def __init__(self, parent, plugin, icon):
|
||||
self.IconPath = u'songs/song'
|
||||
self.ListViewWithDnD_class = SongListView
|
||||
MediaManagerItem.__init__(self, parent, self, icon, title)
|
||||
MediaManagerItem.__init__(self, parent, self, icon)
|
||||
self.edit_song_form = EditSongForm(self, self.parent.manager)
|
||||
self.singleServiceItem = False
|
||||
#self.edit_song_form = EditSongForm(self.parent.manager, self)
|
||||
|
@ -57,7 +57,8 @@ class SongsPlugin(Plugin):
|
||||
self.icon = build_icon(self.icon_path)
|
||||
|
||||
def getSettingsTab(self):
|
||||
return SongsTab(self.name)
|
||||
media_item_string = self.getString(StringType.MediaItem)
|
||||
return SongsTab(media_item_string[u'title'])
|
||||
|
||||
def initialise(self):
|
||||
log.info(u'Songs Initialising')
|
||||
@ -70,7 +71,7 @@ class SongsPlugin(Plugin):
|
||||
Create the MediaManagerItem object, which is displaed in the
|
||||
Media Manager.
|
||||
"""
|
||||
return SongMediaItem(self, self, self.icon, self.name)
|
||||
return SongMediaItem(self, self, self.icon)
|
||||
|
||||
def addImportMenuItem(self, import_menu):
|
||||
"""
|
||||
@ -155,11 +156,15 @@ class SongsPlugin(Plugin):
|
||||
self.name = u'Songs'
|
||||
self.name_lower = u'songs'
|
||||
self.strings = {}
|
||||
# for names in mediamanagerdock and pluginlist
|
||||
## Name PluginList ##
|
||||
self.strings[StringType.Name] = {
|
||||
u'singular': translate('SongsPlugin', 'Song'),
|
||||
u'plural': translate('SongsPlugin', 'Songs')
|
||||
}
|
||||
## Name for MediaDockManager, SettingsManager ##
|
||||
self.strings[StringType.MediaItem] = {
|
||||
u'title': translate('SongsPlugin', 'Songs')
|
||||
}
|
||||
# Middle Header Bar
|
||||
## New Button ##
|
||||
self.strings[StringType.New] = {
|
||||
@ -190,4 +195,4 @@ class SongsPlugin(Plugin):
|
||||
self.strings[StringType.Service] = {
|
||||
u'title': translate('SongsPlugin', 'Service'),
|
||||
u'tooltip': translate('SongsPlugin', 'Add the selected Song to the service')
|
||||
}
|
||||
}
|
||||
|
@ -170,8 +170,12 @@ class SongUsagePlugin(Plugin):
|
||||
self.name = u'SongUsage'
|
||||
self.name_lower = u'songusage'
|
||||
self.strings = {}
|
||||
# for names in mediamanagerdock and pluginlist
|
||||
## Name PluginList ##
|
||||
self.strings[StringType.Name] = {
|
||||
u'singular': translate('SongUsagePlugin', 'SongUsage'),
|
||||
u'plural': translate('SongUsagePlugin', 'SongUsage')
|
||||
}
|
||||
## Name for MediaDockManager, SettingsManager ##
|
||||
self.strings[StringType.MediaItem] = {
|
||||
u'title': translate('SongUsagePlugin', 'SongUsage')
|
||||
}
|
||||
|
@ -934,7 +934,7 @@ Changes do not affect verses already in the service.</source>
|
||||
<message>
|
||||
<location filename="openlp/plugins/custom/customplugin.py" line="109"/>
|
||||
<source>Customs</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation type="unfinished">Sonderfolien</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="openlp/plugins/custom/customplugin.py" line="114"/>
|
||||
@ -1168,7 +1168,7 @@ Changes do not affect verses already in the service.</source>
|
||||
<message>
|
||||
<location filename="openlp/plugins/media/mediaplugin.py" line="89"/>
|
||||
<source>Medias</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation type="unfinished">Medien</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="openlp/plugins/media/mediaplugin.py" line="94"/>
|
||||
@ -2526,17 +2526,17 @@ You can download the latest version from http://openlp.org/.</source>
|
||||
<message>
|
||||
<location filename="openlp/core/ui/pluginform.py" line="137"/>
|
||||
<source>%s (Inactive)</source>
|
||||
<translation></translation>
|
||||
<translation>%s (Inaktiv)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="openlp/core/ui/pluginform.py" line="134"/>
|
||||
<source>%s (Active)</source>
|
||||
<translation></translation>
|
||||
<translation>%s (Aktiv)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="openlp/core/ui/pluginform.py" line="140"/>
|
||||
<source>%s (Disabled)</source>
|
||||
<translation></translation>
|
||||
<translation>%s (Deaktiviert)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
0
scripts/generate_resources.sh
Normal file → Executable file
0
scripts/generate_resources.sh
Normal file → Executable file
Loading…
Reference in New Issue
Block a user