forked from openlp/openlp
fix for the merge comments, add correct translations for settings window
This commit is contained in:
parent
ad6294ffcc
commit
399813e6aa
20
openlp.pyw
20
openlp.pyw
|
@ -164,16 +164,16 @@ def main():
|
||||||
# Set up command line options.
|
# Set up command line options.
|
||||||
usage = u'Usage: %prog [options] [qt-options]'
|
usage = u'Usage: %prog [options] [qt-options]'
|
||||||
parser = OptionParser(usage=usage)
|
parser = OptionParser(usage=usage)
|
||||||
parser.add_option('-e', '--no-error-form', dest='no_error_form',
|
parser.add_option(u'-e', u'--no-error-form', dest=u'no_error_form',
|
||||||
action='store_true', help='Disable the error notification form.')
|
action=u'store_true', help=u'Disable the error notification form.')
|
||||||
parser.add_option('-l', '--log-level', dest='loglevel',
|
parser.add_option(u'-l', u'--log-level', dest=u'loglevel',
|
||||||
default='warning', metavar='LEVEL', help='Set logging to LEVEL '
|
default=u'warning', metavar=u'LEVEL', help=u'Set logging to LEVEL '
|
||||||
'level. Valid values are "debug", "info", "warning".')
|
u'level. Valid values are "debug", "info", "warning".')
|
||||||
parser.add_option('-p', '--portable', dest='portable',
|
parser.add_option(u'-p', u'--portable', dest=u'portable',
|
||||||
action='store_true', help='Specify if this should be run as a '
|
action=u'store_true', help=u'Specify if this should be run as a '
|
||||||
'portable app, off a USB flash drive (not implemented).')
|
u'portable app, off a USB flash drive (not implemented).')
|
||||||
parser.add_option('-s', '--style', dest='style',
|
parser.add_option(u'-s', u'--style', dest=u'style',
|
||||||
help='Set the Qt4 style (passed directly to Qt4).')
|
help=u'Set the Qt4 style (passed directly to Qt4).')
|
||||||
# Set up logging
|
# Set up logging
|
||||||
log_path = AppLocation.get_directory(AppLocation.CacheDir)
|
log_path = AppLocation.get_directory(AppLocation.CacheDir)
|
||||||
if not os.path.exists(log_path):
|
if not os.path.exists(log_path):
|
||||||
|
|
|
@ -304,7 +304,7 @@ def expand_tags(text):
|
||||||
from spelltextedit import SpellTextEdit
|
from spelltextedit import SpellTextEdit
|
||||||
from eventreceiver import Receiver
|
from eventreceiver import Receiver
|
||||||
from settingsmanager import SettingsManager
|
from settingsmanager import SettingsManager
|
||||||
from plugin import PluginStatus, StringType, Plugin
|
from plugin import PluginStatus, StringContent, Plugin
|
||||||
from pluginmanager import PluginManager
|
from pluginmanager import PluginManager
|
||||||
from settingstab import SettingsTab
|
from settingstab import SettingsTab
|
||||||
from serviceitem import ServiceItem
|
from serviceitem import ServiceItem
|
||||||
|
@ -318,4 +318,4 @@ from theme import ThemeLevel, ThemeXML
|
||||||
from renderer import Renderer
|
from renderer import Renderer
|
||||||
from rendermanager import RenderManager
|
from rendermanager import RenderManager
|
||||||
from mediamanageritem import MediaManagerItem
|
from mediamanageritem import MediaManagerItem
|
||||||
from baselistwithdnd import BaseListWithDnD
|
from baselistwithdnd import BaseListWithDnD
|
|
@ -32,7 +32,7 @@ import os
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import context_menu_action, context_menu_separator, \
|
from openlp.core.lib import context_menu_action, context_menu_separator, \
|
||||||
SettingsManager, OpenLPToolbar, ServiceItem, StringType, build_icon, \
|
SettingsManager, OpenLPToolbar, ServiceItem, StringContent, build_icon, \
|
||||||
translate
|
translate
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
@ -95,9 +95,9 @@ class MediaManagerItem(QtGui.QWidget):
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
#TODO: plugin should not be the parent in future
|
#TODO: plugin should not be the parent in future
|
||||||
self.plugin = parent#plugin
|
self.plugin = parent#plugin
|
||||||
media_title_string = self.plugin.getString(StringType.MediaItem)
|
visible_title = self.plugin.getString(StringContent.VisibleName)
|
||||||
self.title = media_title_string[u'title']
|
self.title = visible_title[u'title']
|
||||||
self.settingsSection = self.plugin.name_lower
|
self.settingsSection = self.plugin.name.lower()
|
||||||
if isinstance(icon, QtGui.QIcon):
|
if isinstance(icon, QtGui.QIcon):
|
||||||
self.icon = icon
|
self.icon = icon
|
||||||
elif isinstance(icon, basestring):
|
elif isinstance(icon, basestring):
|
||||||
|
@ -204,35 +204,35 @@ class MediaManagerItem(QtGui.QWidget):
|
||||||
"""
|
"""
|
||||||
## Import Button ##
|
## Import Button ##
|
||||||
if self.hasImportIcon:
|
if self.hasImportIcon:
|
||||||
import_string = self.plugin.getString(StringType.Import)
|
import_string = self.plugin.getString(StringContent.Import)
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
import_string[u'title'],
|
import_string[u'title'],
|
||||||
import_string[u'tooltip'],
|
import_string[u'tooltip'],
|
||||||
u':/general/general_import.png', self.onImportClick)
|
u':/general/general_import.png', self.onImportClick)
|
||||||
## Load Button ##
|
## Load Button ##
|
||||||
if self.hasFileIcon:
|
if self.hasFileIcon:
|
||||||
load_string = self.plugin.getString(StringType.Load)
|
load_string = self.plugin.getString(StringContent.Load)
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
load_string[u'title'],
|
load_string[u'title'],
|
||||||
load_string[u'tooltip'],
|
load_string[u'tooltip'],
|
||||||
u':/general/general_open.png', self.onFileClick)
|
u':/general/general_open.png', self.onFileClick)
|
||||||
## New Button ##
|
## New Button ##
|
||||||
if self.hasNewIcon:
|
if self.hasNewIcon:
|
||||||
new_string = self.plugin.getString(StringType.New)
|
new_string = self.plugin.getString(StringContent.New)
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
new_string[u'title'],
|
new_string[u'title'],
|
||||||
new_string[u'tooltip'],
|
new_string[u'tooltip'],
|
||||||
u':/general/general_new.png', self.onNewClick)
|
u':/general/general_new.png', self.onNewClick)
|
||||||
## Edit Button ##
|
## Edit Button ##
|
||||||
if self.hasEditIcon:
|
if self.hasEditIcon:
|
||||||
edit_string = self.plugin.getString(StringType.Edit)
|
edit_string = self.plugin.getString(StringContent.Edit)
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
edit_string[u'title'],
|
edit_string[u'title'],
|
||||||
edit_string[u'tooltip'],
|
edit_string[u'tooltip'],
|
||||||
u':/general/general_edit.png', self.onEditClick)
|
u':/general/general_edit.png', self.onEditClick)
|
||||||
## Delete Button ##
|
## Delete Button ##
|
||||||
if self.hasDeleteIcon:
|
if self.hasDeleteIcon:
|
||||||
delete_string = self.plugin.getString(StringType.Delete)
|
delete_string = self.plugin.getString(StringContent.Delete)
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
delete_string[u'title'],
|
delete_string[u'title'],
|
||||||
delete_string[u'tooltip'],
|
delete_string[u'tooltip'],
|
||||||
|
@ -240,19 +240,19 @@ class MediaManagerItem(QtGui.QWidget):
|
||||||
## Separator Line ##
|
## Separator Line ##
|
||||||
self.addToolbarSeparator()
|
self.addToolbarSeparator()
|
||||||
## Preview ##
|
## Preview ##
|
||||||
preview_string = self.plugin.getString(StringType.Preview)
|
preview_string = self.plugin.getString(StringContent.Preview)
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
preview_string[u'title'],
|
preview_string[u'title'],
|
||||||
preview_string[u'tooltip'],
|
preview_string[u'tooltip'],
|
||||||
u':/general/general_preview.png', self.onPreviewClick)
|
u':/general/general_preview.png', self.onPreviewClick)
|
||||||
## Live Button ##
|
## Live Button ##
|
||||||
live_string = self.plugin.getString(StringType.Live)
|
live_string = self.plugin.getString(StringContent.Live)
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
live_string[u'title'],
|
live_string[u'title'],
|
||||||
live_string[u'tooltip'],
|
live_string[u'tooltip'],
|
||||||
u':/general/general_live.png', self.onLiveClick)
|
u':/general/general_live.png', self.onLiveClick)
|
||||||
## Add to service Button ##
|
## Add to service Button ##
|
||||||
service_string = self.plugin.getString(StringType.Service)
|
service_string = self.plugin.getString(StringContent.Service)
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
service_string[u'title'],
|
service_string[u'title'],
|
||||||
service_string[u'tooltip'],
|
service_string[u'tooltip'],
|
||||||
|
@ -276,7 +276,7 @@ class MediaManagerItem(QtGui.QWidget):
|
||||||
self.pageLayout.addWidget(self.listView)
|
self.pageLayout.addWidget(self.listView)
|
||||||
#define and add the context menu
|
#define and add the context menu
|
||||||
self.listView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
self.listView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
||||||
name_string = self.plugin.getString(StringType.Name)
|
name_string = self.plugin.getString(StringContent.Name)
|
||||||
if self.hasEditIcon:
|
if self.hasEditIcon:
|
||||||
self.listView.addAction(
|
self.listView.addAction(
|
||||||
context_menu_action(
|
context_menu_action(
|
||||||
|
@ -530,4 +530,4 @@ class MediaManagerItem(QtGui.QWidget):
|
||||||
if self.generateSlideData(service_item, item):
|
if self.generateSlideData(service_item, item):
|
||||||
return service_item
|
return service_item
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
|
@ -42,7 +42,7 @@ class PluginStatus(object):
|
||||||
Inactive = 0
|
Inactive = 0
|
||||||
Disabled = -1
|
Disabled = -1
|
||||||
|
|
||||||
class StringType(object):
|
class StringContent(object):
|
||||||
Name = u'name'
|
Name = u'name'
|
||||||
Import = u'import'
|
Import = u'import'
|
||||||
Load = u'load'
|
Load = u'load'
|
||||||
|
@ -52,7 +52,7 @@ class StringType(object):
|
||||||
Preview = u'preview'
|
Preview = u'preview'
|
||||||
Live = u'live'
|
Live = u'live'
|
||||||
Service = u'service'
|
Service = u'service'
|
||||||
MediaItem = u'media_item'
|
VisibleName = u'visible_name'
|
||||||
|
|
||||||
class Plugin(QtCore.QObject):
|
class Plugin(QtCore.QObject):
|
||||||
"""
|
"""
|
||||||
|
@ -128,11 +128,12 @@ class Plugin(QtCore.QObject):
|
||||||
Defaults to *None*. A list of helper objects.
|
Defaults to *None*. A list of helper objects.
|
||||||
"""
|
"""
|
||||||
QtCore.QObject.__init__(self)
|
QtCore.QObject.__init__(self)
|
||||||
self.setPluginStrings()
|
|
||||||
self.name = name
|
self.name = name
|
||||||
|
self.strings = {}
|
||||||
|
self.setPluginStrings()
|
||||||
if version:
|
if version:
|
||||||
self.version = version
|
self.version = version
|
||||||
self.settingsSection = self.name_lower
|
self.settingsSection = self.name.lower()
|
||||||
self.icon = None
|
self.icon = None
|
||||||
self.weight = 0
|
self.weight = 0
|
||||||
self.status = PluginStatus.Inactive
|
self.status = PluginStatus.Inactive
|
||||||
|
@ -314,6 +315,3 @@ class Plugin(QtCore.QObject):
|
||||||
"""
|
"""
|
||||||
Called to define all translatable texts of the plugin
|
Called to define all translatable texts of the plugin
|
||||||
"""
|
"""
|
||||||
self.name = u'Plugin'
|
|
||||||
self.name_lower = u'plugin'
|
|
||||||
self.strings = {}
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ import os
|
||||||
import sys
|
import sys
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from openlp.core.lib import Plugin, StringType, PluginStatus
|
from openlp.core.lib import Plugin, StringContent, PluginStatus
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -152,13 +152,13 @@ class PluginManager(object):
|
||||||
for plugin in self.plugins:
|
for plugin in self.plugins:
|
||||||
if plugin.status is not PluginStatus.Disabled:
|
if plugin.status is not PluginStatus.Disabled:
|
||||||
plugin.settings_tab = plugin.getSettingsTab()
|
plugin.settings_tab = plugin.getSettingsTab()
|
||||||
media_item_string = plugin.getString(StringType.MediaItem)
|
visible_title = plugin.getString(StringContent.VisibleName)
|
||||||
if plugin.settings_tab:
|
if plugin.settings_tab:
|
||||||
log.debug(u'Inserting settings tab item from %s' %
|
log.debug(u'Inserting settings tab item from %s' %
|
||||||
media_item_string[u'title'])
|
visible_title[u'title'])
|
||||||
settingsform.addTab(media_item_string[u'title'], plugin.settings_tab)
|
settingsform.addTab(visible_title[u'title'], plugin.settings_tab)
|
||||||
else:
|
else:
|
||||||
log.debug(u'No tab settings in %s' % media_item_string[u'title'])
|
log.debug(u'No tab settings in %s' % visible_title[u'title'])
|
||||||
|
|
||||||
def hook_import_menu(self, import_menu):
|
def hook_import_menu(self, import_menu):
|
||||||
"""
|
"""
|
||||||
|
@ -219,4 +219,4 @@ class PluginManager(object):
|
||||||
for plugin in self.plugins:
|
for plugin in self.plugins:
|
||||||
if plugin.isActive():
|
if plugin.isActive():
|
||||||
plugin.finalise()
|
plugin.finalise()
|
||||||
log.info(u'Finalisation Complete for %s ' % plugin.name)
|
log.info(u'Finalisation Complete for %s ' % plugin.name)
|
|
@ -31,17 +31,17 @@ class SettingsTab(QtGui.QWidget):
|
||||||
SettingsTab is a helper widget for plugins to define Tabs for the settings
|
SettingsTab is a helper widget for plugins to define Tabs for the settings
|
||||||
dialog.
|
dialog.
|
||||||
"""
|
"""
|
||||||
def __init__(self, title):
|
def __init__(self, title, visible_title=None):
|
||||||
"""
|
"""
|
||||||
Constructor to create the Settings tab item.
|
Constructor to create the Settings tab item.
|
||||||
|
|
||||||
``title``
|
``plugin``
|
||||||
The title of the tab, which is usually displayed on the tab.
|
The related plugin of the tab, which holds the content of the plugin.
|
||||||
"""
|
"""
|
||||||
QtGui.QWidget.__init__(self)
|
QtGui.QWidget.__init__(self)
|
||||||
self.tabTitle = title
|
self.tabTitle = title
|
||||||
self.tabTitleVisible = None
|
self.tabTitleVisible = visible_title
|
||||||
self.settingsSection = self.tabTitle
|
self.settingsSection = self.tabTitle.lower()
|
||||||
self.setupUi()
|
self.setupUi()
|
||||||
self.retranslateUi()
|
self.retranslateUi()
|
||||||
self.initialise()
|
self.initialise()
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from openlp.core.lib import StringType
|
from openlp.core.lib import StringContent
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -50,9 +50,9 @@ class MediaDockManager(object):
|
||||||
``icon``
|
``icon``
|
||||||
An icon for this dock item
|
An icon for this dock item
|
||||||
"""
|
"""
|
||||||
media_item_string = media_item.plugin.getString(StringType.MediaItem)
|
visible_title = media_item.plugin.getString(StringContent.VisibleName)
|
||||||
log.info(u'Adding %s dock' % media_item_string)
|
log.info(u'Adding %s dock' % visible_title)
|
||||||
self.media_dock.addItem(media_item, icon, media_item_string[u'title'])
|
self.media_dock.addItem(media_item, icon, visible_title[u'title'])
|
||||||
|
|
||||||
def insert_dock(self, media_item, icon, weight):
|
def insert_dock(self, media_item, icon, weight):
|
||||||
"""
|
"""
|
||||||
|
@ -60,16 +60,16 @@ class MediaDockManager(object):
|
||||||
This does not work as it gives a Segmentation error.
|
This does not work as it gives a Segmentation error.
|
||||||
For now add at end of stack if not present
|
For now add at end of stack if not present
|
||||||
"""
|
"""
|
||||||
media_item_string = media_item.plugin.getString(StringType.MediaItem)
|
visible_title = media_item.plugin.getString(StringContent.VisibleName)
|
||||||
log.debug(u'Inserting %s dock' % media_item_string[u'title'])
|
log.debug(u'Inserting %s dock' % visible_title[u'title'])
|
||||||
match = False
|
match = False
|
||||||
for dock_index in range(0, self.media_dock.count()):
|
for dock_index in range(0, self.media_dock.count()):
|
||||||
if self.media_dock.widget(dock_index).settingsSection == \
|
if self.media_dock.widget(dock_index).settingsSection == \
|
||||||
media_item.plugin.name_lower:
|
media_item.plugin.name.lower():
|
||||||
match = True
|
match = True
|
||||||
break
|
break
|
||||||
if not match:
|
if not match:
|
||||||
self.media_dock.addItem(media_item, icon, media_item_string[u'title'])
|
self.media_dock.addItem(media_item, icon, visible_title[u'title'])
|
||||||
|
|
||||||
def remove_dock(self, media_item):
|
def remove_dock(self, media_item):
|
||||||
"""
|
"""
|
||||||
|
@ -78,11 +78,11 @@ class MediaDockManager(object):
|
||||||
``media_item``
|
``media_item``
|
||||||
The item to add to the dock
|
The item to add to the dock
|
||||||
"""
|
"""
|
||||||
media_item_string = media_item.plugin.getString(StringType.MediaItem)
|
visible_title = media_item.plugin.getString(StringContent.VisibleName)
|
||||||
log.debug(u'remove %s dock' % media_item_string[u'title'])
|
log.debug(u'remove %s dock' % visible_title[u'title'])
|
||||||
for dock_index in range(0, self.media_dock.count()):
|
for dock_index in range(0, self.media_dock.count()):
|
||||||
if self.media_dock.widget(dock_index):
|
if self.media_dock.widget(dock_index):
|
||||||
if self.media_dock.widget(dock_index).settingsSection == \
|
if self.media_dock.widget(dock_index).settingsSection == \
|
||||||
media_item.plugin.name_lower:
|
media_item.plugin.name.lower():
|
||||||
self.media_dock.widget(dock_index).hide()
|
self.media_dock.widget(dock_index).hide()
|
||||||
self.media_dock.removeItem(dock_index)
|
self.media_dock.removeItem(dock_index)
|
|
@ -28,7 +28,7 @@ import logging
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import PluginStatus, StringType, translate
|
from openlp.core.lib import PluginStatus, StringContent, translate
|
||||||
from plugindialog import Ui_PluginViewDialog
|
from plugindialog import Ui_PluginViewDialog
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
@ -78,7 +78,7 @@ class PluginForm(QtGui.QDialog, Ui_PluginViewDialog):
|
||||||
elif plugin.status == PluginStatus.Disabled:
|
elif plugin.status == PluginStatus.Disabled:
|
||||||
status_text = unicode(
|
status_text = unicode(
|
||||||
translate('OpenLP.PluginForm', '%s (Disabled)'))
|
translate('OpenLP.PluginForm', '%s (Disabled)'))
|
||||||
name_string = plugin.getString(StringType.Name)
|
name_string = plugin.getString(StringContent.Name)
|
||||||
item.setText(status_text % name_string[u'plural'])
|
item.setText(status_text % name_string[u'plural'])
|
||||||
# If the plugin has an icon, set it!
|
# If the plugin has an icon, set it!
|
||||||
if plugin.icon:
|
if plugin.icon:
|
||||||
|
@ -110,7 +110,7 @@ class PluginForm(QtGui.QDialog, Ui_PluginViewDialog):
|
||||||
plugin_name_plural = self.pluginListWidget.currentItem().text().split(u' ')[0]
|
plugin_name_plural = self.pluginListWidget.currentItem().text().split(u' ')[0]
|
||||||
self.activePlugin = None
|
self.activePlugin = None
|
||||||
for plugin in self.parent.plugin_manager.plugins:
|
for plugin in self.parent.plugin_manager.plugins:
|
||||||
name_string = plugin.getString(StringType.Name)
|
name_string = plugin.getString(StringContent.Name)
|
||||||
if name_string[u'plural'] == plugin_name_plural:
|
if name_string[u'plural'] == plugin_name_plural:
|
||||||
self.activePlugin = plugin
|
self.activePlugin = plugin
|
||||||
break
|
break
|
||||||
|
@ -139,6 +139,6 @@ class PluginForm(QtGui.QDialog, Ui_PluginViewDialog):
|
||||||
elif self.activePlugin.status == PluginStatus.Disabled:
|
elif self.activePlugin.status == PluginStatus.Disabled:
|
||||||
status_text = unicode(
|
status_text = unicode(
|
||||||
translate('OpenLP.PluginForm', '%s (Disabled)'))
|
translate('OpenLP.PluginForm', '%s (Disabled)'))
|
||||||
name_string = self.activePlugin.getString(StringType.Name)
|
name_string = self.activePlugin.getString(StringContent.Name)
|
||||||
self.pluginListWidget.currentItem().setText(
|
self.pluginListWidget.currentItem().setText(
|
||||||
status_text % name_string[u'plural'])
|
status_text % name_string[u'plural'])
|
|
@ -28,7 +28,7 @@ import logging
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import Plugin, StringType, build_icon, translate
|
from openlp.core.lib import Plugin, StringContent, build_icon, translate
|
||||||
from openlp.core.lib.db import Manager
|
from openlp.core.lib.db import Manager
|
||||||
from openlp.plugins.alerts.lib import AlertsManager, AlertsTab
|
from openlp.plugins.alerts.lib import AlertsManager, AlertsTab
|
||||||
from openlp.plugins.alerts.lib.db import init_schema
|
from openlp.plugins.alerts.lib.db import init_schema
|
||||||
|
@ -106,15 +106,12 @@ class AlertsPlugin(Plugin):
|
||||||
"""
|
"""
|
||||||
Called to define all translatable texts of the plugin
|
Called to define all translatable texts of the plugin
|
||||||
"""
|
"""
|
||||||
self.name = u'Alerts'
|
|
||||||
self.name_lower = u'alerts'
|
|
||||||
self.strings = {}
|
|
||||||
## Name PluginList ##
|
## Name PluginList ##
|
||||||
self.strings[StringType.Name] = {
|
self.strings[StringContent.Name] = {
|
||||||
u'singular': translate('AlertsPlugin', 'Alert'),
|
u'singular': translate('AlertsPlugin', 'Alert'),
|
||||||
u'plural': translate('AlertsPlugin', 'Alerts')
|
u'plural': translate('AlertsPlugin', 'Alerts')
|
||||||
}
|
}
|
||||||
## Name for MediaDockManager, SettingsManager ##
|
## Name for MediaDockManager, SettingsManager ##
|
||||||
self.strings[StringType.MediaItem] = {
|
self.strings[StringContent.VisibleName] = {
|
||||||
u'title': translate('AlertsPlugin', 'Alerts')
|
u'title': translate('AlertsPlugin', 'Alerts')
|
||||||
}
|
}
|
|
@ -35,7 +35,7 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog):
|
||||||
"""
|
"""
|
||||||
Provide UI for the alert system
|
Provide UI for the alert system
|
||||||
"""
|
"""
|
||||||
def __init__(self, plugin):
|
def __init__(self, title, visible_title):
|
||||||
"""
|
"""
|
||||||
Initialise the alert form
|
Initialise the alert form
|
||||||
"""
|
"""
|
||||||
|
@ -155,4 +155,4 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog):
|
||||||
text = text.replace(u'<>', unicode(self.ParameterEdit.text()))
|
text = text.replace(u'<>', unicode(self.ParameterEdit.text()))
|
||||||
self.parent.alertsmanager.displayAlert(text)
|
self.parent.alertsmanager.displayAlert(text)
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
|
@ -32,14 +32,13 @@ class AlertsTab(SettingsTab):
|
||||||
"""
|
"""
|
||||||
AlertsTab is the alerts settings tab in the settings dialog.
|
AlertsTab is the alerts settings tab in the settings dialog.
|
||||||
"""
|
"""
|
||||||
def __init__(self, parent):
|
def __init__(self, parent, visible_title):
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.manager = parent.manager
|
self.manager = parent.manager
|
||||||
SettingsTab.__init__(self, parent.name)
|
SettingsTab.__init__(self, parent.name, visible_title)
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
self.setObjectName(u'AlertsTab')
|
self.setObjectName(u'AlertsTab')
|
||||||
self.tabTitleVisible = translate('AlertsPlugin.AlertsTab', 'Alerts')
|
|
||||||
self.AlertsLayout = QtGui.QHBoxLayout(self)
|
self.AlertsLayout = QtGui.QHBoxLayout(self)
|
||||||
self.AlertsLayout.setSpacing(8)
|
self.AlertsLayout.setSpacing(8)
|
||||||
self.AlertsLayout.setMargin(8)
|
self.AlertsLayout.setMargin(8)
|
||||||
|
@ -296,4 +295,3 @@ class AlertsTab(SettingsTab):
|
||||||
self.FontPreview.setFont(font)
|
self.FontPreview.setFont(font)
|
||||||
self.FontPreview.setStyleSheet(u'background-color: %s; color: %s' %
|
self.FontPreview.setStyleSheet(u'background-color: %s; color: %s' %
|
||||||
(self.bg_color, self.font_color))
|
(self.bg_color, self.font_color))
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ import logging
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import Plugin, StringType, build_icon, translate
|
from openlp.core.lib import Plugin, StringContent, build_icon, translate
|
||||||
from openlp.plugins.bibles.lib import BibleManager, BiblesTab, BibleMediaItem
|
from openlp.plugins.bibles.lib import BibleManager, BiblesTab, BibleMediaItem
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
@ -58,8 +58,8 @@ class BiblePlugin(Plugin):
|
||||||
self.exportBibleItem.setVisible(False)
|
self.exportBibleItem.setVisible(False)
|
||||||
|
|
||||||
def getSettingsTab(self):
|
def getSettingsTab(self):
|
||||||
media_item_string = self.getString(StringType.MediaItem)
|
visible_name = self.getString(StringContent.VisibleName)
|
||||||
return BiblesTab(media_item_string[u'title'])
|
return BiblesTab(self.name, visible_name[u'title'])
|
||||||
|
|
||||||
def getMediaManagerItem(self):
|
def getMediaManagerItem(self):
|
||||||
# Create the BibleManagerItem object.
|
# Create the BibleManagerItem object.
|
||||||
|
@ -122,51 +122,48 @@ class BiblePlugin(Plugin):
|
||||||
"""
|
"""
|
||||||
Called to define all translatable texts of the plugin
|
Called to define all translatable texts of the plugin
|
||||||
"""
|
"""
|
||||||
self.name = u'Bibles'
|
|
||||||
self.name_lower = u'Bibles'
|
|
||||||
self.strings = {}
|
|
||||||
## Name PluginList ##
|
## Name PluginList ##
|
||||||
self.strings[StringType.Name] = {
|
self.strings[StringContent.Name] = {
|
||||||
u'singular': translate('BiblesPlugin', 'Bible'),
|
u'singular': translate('BiblesPlugin', 'Bible'),
|
||||||
u'plural': translate('BiblesPlugin', 'Bibles')
|
u'plural': translate('BiblesPlugin', 'Bibles')
|
||||||
}
|
}
|
||||||
## Name for MediaDockManager, SettingsManager ##
|
## Name for MediaDockManager, SettingsManager ##
|
||||||
self.strings[StringType.MediaItem] = {
|
self.strings[StringContent.VisibleName] = {
|
||||||
u'title': translate('BiblesPlugin', 'Bibles')
|
u'title': translate('BiblesPlugin', 'Bibles')
|
||||||
}
|
}
|
||||||
# Middle Header Bar
|
# Middle Header Bar
|
||||||
## Import Button ##
|
## Import Button ##
|
||||||
self.strings[StringType.Import] = {
|
self.strings[StringContent.Import] = {
|
||||||
u'title': translate('BiblesPlugin', 'Import'),
|
u'title': translate('BiblesPlugin', 'Import'),
|
||||||
u'tooltip': translate('BiblesPlugin', 'Import a Bible')
|
u'tooltip': translate('BiblesPlugin', 'Import a Bible')
|
||||||
}
|
}
|
||||||
## New Button ##
|
## New Button ##
|
||||||
self.strings[StringType.New] = {
|
self.strings[StringContent.New] = {
|
||||||
u'title': translate('BiblesPlugin', 'Add'),
|
u'title': translate('BiblesPlugin', 'Add'),
|
||||||
u'tooltip': translate('BiblesPlugin', 'Add a new Bible')
|
u'tooltip': translate('BiblesPlugin', 'Add a new Bible')
|
||||||
}
|
}
|
||||||
## Edit Button ##
|
## Edit Button ##
|
||||||
self.strings[StringType.Edit] = {
|
self.strings[StringContent.Edit] = {
|
||||||
u'title': translate('BiblesPlugin', 'Edit'),
|
u'title': translate('BiblesPlugin', 'Edit'),
|
||||||
u'tooltip': translate('BiblesPlugin', 'Edit the selected Bible')
|
u'tooltip': translate('BiblesPlugin', 'Edit the selected Bible')
|
||||||
}
|
}
|
||||||
## Delete Button ##
|
## Delete Button ##
|
||||||
self.strings[StringType.Delete] = {
|
self.strings[StringContent.Delete] = {
|
||||||
u'title': translate('BiblesPlugin', 'Delete'),
|
u'title': translate('BiblesPlugin', 'Delete'),
|
||||||
u'tooltip': translate('BiblesPlugin', 'Delete the selected Bible')
|
u'tooltip': translate('BiblesPlugin', 'Delete the selected Bible')
|
||||||
}
|
}
|
||||||
## Preview ##
|
## Preview ##
|
||||||
self.strings[StringType.Preview] = {
|
self.strings[StringContent.Preview] = {
|
||||||
u'title': translate('BiblesPlugin', 'Preview'),
|
u'title': translate('BiblesPlugin', 'Preview'),
|
||||||
u'tooltip': translate('BiblesPlugin', 'Preview the selected Bible')
|
u'tooltip': translate('BiblesPlugin', 'Preview the selected Bible')
|
||||||
}
|
}
|
||||||
## Live Button ##
|
## Live Button ##
|
||||||
self.strings[StringType.Live] = {
|
self.strings[StringContent.Live] = {
|
||||||
u'title': translate('BiblesPlugin', 'Live'),
|
u'title': translate('BiblesPlugin', 'Live'),
|
||||||
u'tooltip': translate('BiblesPlugin', 'Send the selected Bible live')
|
u'tooltip': translate('BiblesPlugin', 'Send the selected Bible live')
|
||||||
}
|
}
|
||||||
## Add to service Button ##
|
## Add to service Button ##
|
||||||
self.strings[StringType.Service] = {
|
self.strings[StringContent.Service] = {
|
||||||
u'title': translate('BiblesPlugin', 'Service'),
|
u'title': translate('BiblesPlugin', 'Service'),
|
||||||
u'tooltip': translate('BiblesPlugin', 'Add the selected Bible to the service')
|
u'tooltip': translate('BiblesPlugin', 'Add the selected Bible to the service')
|
||||||
}
|
}
|
|
@ -38,15 +38,14 @@ class BiblesTab(SettingsTab):
|
||||||
"""
|
"""
|
||||||
log.info(u'Bible Tab loaded')
|
log.info(u'Bible Tab loaded')
|
||||||
|
|
||||||
def __init__(self, title):
|
def __init__(self, title, visible_title):
|
||||||
self.paragraph_style = True
|
self.paragraph_style = True
|
||||||
self.show_new_chapters = False
|
self.show_new_chapters = False
|
||||||
self.display_style = 0
|
self.display_style = 0
|
||||||
SettingsTab.__init__(self, title)
|
SettingsTab.__init__(self, title, visible_title)
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
self.setObjectName(u'BiblesTab')
|
self.setObjectName(u'BiblesTab')
|
||||||
self.tabTitleVisible = translate('BiblesPlugin.BiblesTab', 'Bibles')
|
|
||||||
self.BibleLayout = QtGui.QHBoxLayout(self)
|
self.BibleLayout = QtGui.QHBoxLayout(self)
|
||||||
self.BibleLayout.setSpacing(8)
|
self.BibleLayout.setSpacing(8)
|
||||||
self.BibleLayout.setMargin(8)
|
self.BibleLayout.setMargin(8)
|
||||||
|
|
|
@ -28,7 +28,7 @@ import logging
|
||||||
|
|
||||||
from forms import EditCustomForm
|
from forms import EditCustomForm
|
||||||
|
|
||||||
from openlp.core.lib import Plugin, StringType, build_icon, translate
|
from openlp.core.lib import Plugin, StringContent, build_icon, translate
|
||||||
from openlp.core.lib.db import Manager
|
from openlp.core.lib.db import Manager
|
||||||
from openlp.plugins.custom.lib import CustomMediaItem, CustomTab
|
from openlp.plugins.custom.lib import CustomMediaItem, CustomTab
|
||||||
from openlp.plugins.custom.lib.db import CustomSlide, init_schema
|
from openlp.plugins.custom.lib.db import CustomSlide, init_schema
|
||||||
|
@ -40,8 +40,8 @@ class CustomPlugin(Plugin):
|
||||||
This plugin enables the user to create, edit and display
|
This plugin enables the user to create, edit and display
|
||||||
custom slide shows. Custom shows are divided into slides.
|
custom slide shows. Custom shows are divided into slides.
|
||||||
Each show is able to have it's own theme.
|
Each show is able to have it's own theme.
|
||||||
Custom shows are designed to replace the use of Customs where
|
Custom shows are designed to replace the use of songs where
|
||||||
the Customs plugin has become restrictive. Examples could be
|
the songs plugin has become restrictive. Examples could be
|
||||||
Welcome slides, Bible Reading information, Orders of service.
|
Welcome slides, Bible Reading information, Orders of service.
|
||||||
"""
|
"""
|
||||||
log.info(u'Custom Plugin loaded')
|
log.info(u'Custom Plugin loaded')
|
||||||
|
@ -55,8 +55,8 @@ class CustomPlugin(Plugin):
|
||||||
self.icon = build_icon(self.icon_path)
|
self.icon = build_icon(self.icon_path)
|
||||||
|
|
||||||
def getSettingsTab(self):
|
def getSettingsTab(self):
|
||||||
media_item_string = self.getString(StringType.MediaItem)
|
visible_name = self.getString(StringContent.VisibleName)
|
||||||
return CustomTab(media_item_string[u'title'])
|
return CustomTab(self.name, visible_name[u'title'])
|
||||||
|
|
||||||
def getMediaManagerItem(self):
|
def getMediaManagerItem(self):
|
||||||
# Create the CustomManagerItem object
|
# Create the CustomManagerItem object
|
||||||
|
@ -66,7 +66,7 @@ class CustomPlugin(Plugin):
|
||||||
about_text = translate('CustomPlugin', '<strong>Custom Plugin</strong>'
|
about_text = translate('CustomPlugin', '<strong>Custom Plugin</strong>'
|
||||||
'<br />The custom plugin provides the ability to set up custom '
|
'<br />The custom plugin provides the ability to set up custom '
|
||||||
'text slides that can be displayed on the screen the same way '
|
'text slides that can be displayed on the screen the same way '
|
||||||
'Customs are. This plugin provides greater freedom over the Customs '
|
'songs are. This plugin provides greater freedom over the songs '
|
||||||
'plugin.')
|
'plugin.')
|
||||||
return about_text
|
return about_text
|
||||||
|
|
||||||
|
@ -97,60 +97,58 @@ class CustomPlugin(Plugin):
|
||||||
for custom in customsUsingTheme:
|
for custom in customsUsingTheme:
|
||||||
custom.theme_name = newTheme
|
custom.theme_name = newTheme
|
||||||
self.custommanager.save_object(custom)
|
self.custommanager.save_object(custom)
|
||||||
|
|
||||||
def setPluginStrings(self):
|
def setPluginStrings(self):
|
||||||
"""
|
"""
|
||||||
Called to define all translatable texts of the plugin
|
Called to define all translatable texts of the plugin
|
||||||
"""
|
"""
|
||||||
self.name = u'Custom'
|
|
||||||
self.name_lower = u'custom'
|
|
||||||
self.strings = {}
|
|
||||||
## Name PluginList ##
|
## Name PluginList ##
|
||||||
self.strings[StringType.Name] = {
|
self.strings[StringContent.Name] = {
|
||||||
u'singular': translate('CustomsPlugin', 'Custom'),
|
u'singular': translate('CustomsPlugin', 'Custom'),
|
||||||
u'plural': translate('CustomsPlugin', 'Customs')
|
u'plural': translate('CustomsPlugin', 'Customs')
|
||||||
}
|
}
|
||||||
## Name for MediaDockManager, SettingsManager ##
|
## Name for MediaDockManager, SettingsManager ##
|
||||||
self.strings[StringType.MediaItem] = {
|
self.strings[StringContent.VisibleName] = {
|
||||||
u'title': translate('CustomsPlugin', 'Customs')
|
u'title': translate('CustomsPlugin', 'Customs')
|
||||||
}
|
}
|
||||||
# Middle Header Bar
|
# Middle Header Bar
|
||||||
## Import Button ##
|
## Import Button ##
|
||||||
self.strings[StringType.Import] = {
|
self.strings[StringContent.Import] = {
|
||||||
u'title': translate('CustomsPlugin', 'Import'),
|
u'title': translate('CustomsPlugin', 'Import'),
|
||||||
u'tooltip': translate('CustomsPlugin', 'Import a Custom')
|
u'tooltip': translate('CustomsPlugin', 'Import a Custom')
|
||||||
}
|
}
|
||||||
## Load Button ##
|
## Load Button ##
|
||||||
self.strings[StringType.Load] = {
|
self.strings[StringContent.Load] = {
|
||||||
u'title': translate('CustomsPlugin', 'Load'),
|
u'title': translate('CustomsPlugin', 'Load'),
|
||||||
u'tooltip': translate('CustomsPlugin', 'Load a new Custom')
|
u'tooltip': translate('CustomsPlugin', 'Load a new Custom')
|
||||||
}
|
}
|
||||||
## New Button ##
|
## New Button ##
|
||||||
self.strings[StringType.New] = {
|
self.strings[StringContent.New] = {
|
||||||
u'title': translate('CustomsPlugin', 'Add'),
|
u'title': translate('CustomsPlugin', 'Add'),
|
||||||
u'tooltip': translate('CustomsPlugin', 'Add a new Custom')
|
u'tooltip': translate('CustomsPlugin', 'Add a new Custom')
|
||||||
}
|
}
|
||||||
## Edit Button ##
|
## Edit Button ##
|
||||||
self.strings[StringType.Edit] = {
|
self.strings[StringContent.Edit] = {
|
||||||
u'title': translate('CustomsPlugin', 'Edit'),
|
u'title': translate('CustomsPlugin', 'Edit'),
|
||||||
u'tooltip': translate('CustomsPlugin', 'Edit the selected Custom')
|
u'tooltip': translate('CustomsPlugin', 'Edit the selected Custom')
|
||||||
}
|
}
|
||||||
## Delete Button ##
|
## Delete Button ##
|
||||||
self.strings[StringType.Delete] = {
|
self.strings[StringContent.Delete] = {
|
||||||
u'title': translate('CustomsPlugin', 'Delete'),
|
u'title': translate('CustomsPlugin', 'Delete'),
|
||||||
u'tooltip': translate('CustomsPlugin', 'Delete the selected Custom')
|
u'tooltip': translate('CustomsPlugin', 'Delete the selected Custom')
|
||||||
}
|
}
|
||||||
## Preview ##
|
## Preview ##
|
||||||
self.strings[StringType.Preview] = {
|
self.strings[StringContent.Preview] = {
|
||||||
u'title': translate('CustomsPlugin', 'Preview'),
|
u'title': translate('CustomsPlugin', 'Preview'),
|
||||||
u'tooltip': translate('CustomsPlugin', 'Preview the selected Custom')
|
u'tooltip': translate('CustomsPlugin', 'Preview the selected Custom')
|
||||||
}
|
}
|
||||||
## Live Button ##
|
## Live Button ##
|
||||||
self.strings[StringType.Live] = {
|
self.strings[StringContent.Live] = {
|
||||||
u'title': translate('CustomsPlugin', 'Live'),
|
u'title': translate('CustomsPlugin', 'Live'),
|
||||||
u'tooltip': translate('CustomsPlugin', 'Send the selected Custom live')
|
u'tooltip': translate('CustomsPlugin', 'Send the selected Custom live')
|
||||||
}
|
}
|
||||||
## Add to service Button ##
|
## Add to service Button ##
|
||||||
self.strings[StringType.Service] = {
|
self.strings[StringContent.Service] = {
|
||||||
u'title': translate('CustomsPlugin', 'Service'),
|
u'title': translate('CustomsPlugin', 'Service'),
|
||||||
u'tooltip': translate('CustomsPlugin', 'Add the selected Custom to the service')
|
u'tooltip': translate('CustomsPlugin', 'Add the selected Custom to the service')
|
||||||
}
|
}
|
|
@ -32,12 +32,11 @@ class CustomTab(SettingsTab):
|
||||||
"""
|
"""
|
||||||
CustomTab is the Custom settings tab in the settings dialog.
|
CustomTab is the Custom settings tab in the settings dialog.
|
||||||
"""
|
"""
|
||||||
def __init__(self, title):
|
def __init__(self, title, visible_title):
|
||||||
SettingsTab.__init__(self, title)
|
SettingsTab.__init__(self, title, visible_title)
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
self.setObjectName(u'CustomTab')
|
self.setObjectName(u'CustomTab')
|
||||||
self.tabTitleVisible = translate('CustomPlugin.CustomTab', 'Custom')
|
|
||||||
self.customLayout = QtGui.QFormLayout(self)
|
self.customLayout = QtGui.QFormLayout(self)
|
||||||
self.customLayout.setSpacing(8)
|
self.customLayout.setSpacing(8)
|
||||||
self.customLayout.setMargin(8)
|
self.customLayout.setMargin(8)
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from openlp.core.lib import Plugin, StringType, build_icon, translate
|
from openlp.core.lib import Plugin, StringContent, build_icon, translate
|
||||||
from openlp.plugins.images.lib import ImageMediaItem
|
from openlp.plugins.images.lib import ImageMediaItem
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
@ -53,7 +53,7 @@ class ImagePlugin(Plugin):
|
||||||
'make use of OpenLP\'s "timed looping" feature to create a slide '
|
'make use of OpenLP\'s "timed looping" feature to create a slide '
|
||||||
'show that runs automatically. In addition to this, images from '
|
'show that runs automatically. In addition to this, images from '
|
||||||
'the plugin can be used to override the current theme\'s '
|
'the plugin can be used to override the current theme\'s '
|
||||||
'background, which renders text-based items like Images with the '
|
'background, which renders text-based items like songs with the '
|
||||||
'selected image as a background instead of the background '
|
'selected image as a background instead of the background '
|
||||||
'provided by the theme.')
|
'provided by the theme.')
|
||||||
return about_text
|
return about_text
|
||||||
|
@ -62,51 +62,48 @@ class ImagePlugin(Plugin):
|
||||||
"""
|
"""
|
||||||
Called to define all translatable texts of the plugin
|
Called to define all translatable texts of the plugin
|
||||||
"""
|
"""
|
||||||
self.name = u'Images'
|
|
||||||
self.name_lower = u'images'
|
|
||||||
self.strings = {}
|
|
||||||
## Name PluginList ##
|
## Name PluginList ##
|
||||||
self.strings[StringType.Name] = {
|
self.strings[StringContent.Name] = {
|
||||||
u'singular': translate('ImagePlugin', 'Image'),
|
u'singular': translate('ImagePlugin', 'Image'),
|
||||||
u'plural': translate('ImagePlugin', 'Images')
|
u'plural': translate('ImagePlugin', 'Images')
|
||||||
}
|
}
|
||||||
## Name for MediaDockManager, SettingsManager ##
|
## Name for MediaDockManager, SettingsManager ##
|
||||||
self.strings[StringType.MediaItem] = {
|
self.strings[StringContent.VisibleName] = {
|
||||||
u'title': translate('ImagePlugin', 'Images')
|
u'title': translate('ImagePlugin', 'Images')
|
||||||
}
|
}
|
||||||
# Middle Header Bar
|
# Middle Header Bar
|
||||||
## Load Button ##
|
## Load Button ##
|
||||||
self.strings[StringType.Load] = {
|
self.strings[StringContent.Load] = {
|
||||||
u'title': translate('ImagePlugin', 'Load'),
|
u'title': translate('ImagePlugin', 'Load'),
|
||||||
u'tooltip': translate('ImagePlugin', 'Load a new Image')
|
u'tooltip': translate('ImagePlugin', 'Load a new Image')
|
||||||
}
|
}
|
||||||
## New Button ##
|
## New Button ##
|
||||||
self.strings[StringType.New] = {
|
self.strings[StringContent.New] = {
|
||||||
u'title': translate('ImagePlugin', 'Add'),
|
u'title': translate('ImagePlugin', 'Add'),
|
||||||
u'tooltip': translate('ImagePlugin', 'Add a new Image')
|
u'tooltip': translate('ImagePlugin', 'Add a new Image')
|
||||||
}
|
}
|
||||||
## Edit Button ##
|
## Edit Button ##
|
||||||
self.strings[StringType.Edit] = {
|
self.strings[StringContent.Edit] = {
|
||||||
u'title': translate('ImagePlugin', 'Edit'),
|
u'title': translate('ImagePlugin', 'Edit'),
|
||||||
u'tooltip': translate('ImagePlugin', 'Edit the selected Image')
|
u'tooltip': translate('ImagePlugin', 'Edit the selected Image')
|
||||||
}
|
}
|
||||||
## Delete Button ##
|
## Delete Button ##
|
||||||
self.strings[StringType.Delete] = {
|
self.strings[StringContent.Delete] = {
|
||||||
u'title': translate('ImagePlugin', 'Delete'),
|
u'title': translate('ImagePlugin', 'Delete'),
|
||||||
u'tooltip': translate('ImagePlugin', 'Delete the selected Image')
|
u'tooltip': translate('ImagePlugin', 'Delete the selected Image')
|
||||||
}
|
}
|
||||||
## Preview ##
|
## Preview ##
|
||||||
self.strings[StringType.Preview] = {
|
self.strings[StringContent.Preview] = {
|
||||||
u'title': translate('ImagePlugin', 'Preview'),
|
u'title': translate('ImagePlugin', 'Preview'),
|
||||||
u'tooltip': translate('ImagePlugin', 'Preview the selected Image')
|
u'tooltip': translate('ImagePlugin', 'Preview the selected Image')
|
||||||
}
|
}
|
||||||
## Live Button ##
|
## Live Button ##
|
||||||
self.strings[StringType.Live] = {
|
self.strings[StringContent.Live] = {
|
||||||
u'title': translate('ImagePlugin', 'Live'),
|
u'title': translate('ImagePlugin', 'Live'),
|
||||||
u'tooltip': translate('ImagePlugin', 'Send the selected Image live')
|
u'tooltip': translate('ImagePlugin', 'Send the selected Image live')
|
||||||
}
|
}
|
||||||
## Add to service Button ##
|
## Add to service Button ##
|
||||||
self.strings[StringType.Service] = {
|
self.strings[StringContent.Service] = {
|
||||||
u'title': translate('ImagePlugin', 'Service'),
|
u'title': translate('ImagePlugin', 'Service'),
|
||||||
u'tooltip': translate('ImagePlugin', 'Add the selected Image to the service')
|
u'tooltip': translate('ImagePlugin', 'Add the selected Image to the service')
|
||||||
}
|
}
|
|
@ -28,7 +28,7 @@ import logging
|
||||||
|
|
||||||
from PyQt4.phonon import Phonon
|
from PyQt4.phonon import Phonon
|
||||||
|
|
||||||
from openlp.core.lib import Plugin, StringType, build_icon, translate
|
from openlp.core.lib import Plugin, StringContent, build_icon, translate
|
||||||
from openlp.plugins.media.lib import MediaMediaItem
|
from openlp.plugins.media.lib import MediaMediaItem
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
@ -76,55 +76,53 @@ class MediaPlugin(Plugin):
|
||||||
about_text = translate('MediaPlugin', '<strong>Media Plugin</strong>'
|
about_text = translate('MediaPlugin', '<strong>Media Plugin</strong>'
|
||||||
'<br />The media plugin provides playback of audio and video.')
|
'<br />The media plugin provides playback of audio and video.')
|
||||||
return about_text
|
return about_text
|
||||||
|
|
||||||
def setPluginStrings(self):
|
def setPluginStrings(self):
|
||||||
"""
|
"""
|
||||||
Called to define all translatable texts of the plugin
|
Called to define all translatable texts of the plugin
|
||||||
"""
|
"""
|
||||||
self.name = u'Media'
|
|
||||||
self.name_lower = u'media'
|
|
||||||
self.strings = {}
|
|
||||||
## Name PluginList ##
|
## Name PluginList ##
|
||||||
self.strings[StringType.Name] = {
|
self.strings[StringContent.Name] = {
|
||||||
u'singular': translate('MediaPlugin', 'Media'),
|
u'singular': translate('MediaPlugin', 'Media'),
|
||||||
u'plural': translate('MediaPlugin', 'Media')
|
u'plural': translate('MediaPlugin', 'Media')
|
||||||
}
|
}
|
||||||
## Name for MediaDockManager, SettingsManager ##
|
## Name for MediaDockManager, SettingsManager ##
|
||||||
self.strings[StringType.MediaItem] = {
|
self.strings[StringContent.VisibleName] = {
|
||||||
u'title': translate('MediaPlugin', 'Media')
|
u'title': translate('MediaPlugin', 'Media')
|
||||||
}
|
}
|
||||||
# Middle Header Bar
|
# Middle Header Bar
|
||||||
## Load Button ##
|
## Load Button ##
|
||||||
self.strings[StringType.Load] = {
|
self.strings[StringContent.Load] = {
|
||||||
u'title': translate('MediaPlugin', 'Load'),
|
u'title': translate('MediaPlugin', 'Load'),
|
||||||
u'tooltip': translate('MediaPlugin', 'Load a new Media')
|
u'tooltip': translate('MediaPlugin', 'Load a new Media')
|
||||||
}
|
}
|
||||||
## New Button ##
|
## New Button ##
|
||||||
self.strings[StringType.New] = {
|
self.strings[StringContent.New] = {
|
||||||
u'title': translate('MediaPlugin', 'Add'),
|
u'title': translate('MediaPlugin', 'Add'),
|
||||||
u'tooltip': translate('MediaPlugin', 'Add a new Media')
|
u'tooltip': translate('MediaPlugin', 'Add a new Media')
|
||||||
}
|
}
|
||||||
## Edit Button ##
|
## Edit Button ##
|
||||||
self.strings[StringType.Edit] = {
|
self.strings[StringContent.Edit] = {
|
||||||
u'title': translate('MediaPlugin', 'Edit'),
|
u'title': translate('MediaPlugin', 'Edit'),
|
||||||
u'tooltip': translate('MediaPlugin', 'Edit the selected Media')
|
u'tooltip': translate('MediaPlugin', 'Edit the selected Media')
|
||||||
}
|
}
|
||||||
## Delete Button ##
|
## Delete Button ##
|
||||||
self.strings[StringType.Delete] = {
|
self.strings[StringContent.Delete] = {
|
||||||
u'title': translate('MediaPlugin', 'Delete'),
|
u'title': translate('MediaPlugin', 'Delete'),
|
||||||
u'tooltip': translate('MediaPlugin', 'Delete the selected Media')
|
u'tooltip': translate('MediaPlugin', 'Delete the selected Media')
|
||||||
}
|
}
|
||||||
## Preview ##
|
## Preview ##
|
||||||
self.strings[StringType.Preview] = {
|
self.strings[StringContent.Preview] = {
|
||||||
u'title': translate('MediaPlugin', 'Preview'),
|
u'title': translate('MediaPlugin', 'Preview'),
|
||||||
u'tooltip': translate('MediaPlugin', 'Preview the selected Media')
|
u'tooltip': translate('MediaPlugin', 'Preview the selected Media')
|
||||||
}
|
}
|
||||||
## Live Button ##
|
## Live Button ##
|
||||||
self.strings[StringType.Live] = {
|
self.strings[StringContent.Live] = {
|
||||||
u'title': translate('MediaPlugin', 'Live'),
|
u'title': translate('MediaPlugin', 'Live'),
|
||||||
u'tooltip': translate('MediaPlugin', 'Send the selected Media live')
|
u'tooltip': translate('MediaPlugin', 'Send the selected Media live')
|
||||||
}
|
}
|
||||||
## Add to service Button ##
|
## Add to service Button ##
|
||||||
self.strings[StringType.Service] = {
|
self.strings[StringContent.Service] = {
|
||||||
u'title': translate('MediaPlugin', 'Service'),
|
u'title': translate('MediaPlugin', 'Service'),
|
||||||
u'tooltip': translate('MediaPlugin', 'Add the selected Media to the service')
|
u'tooltip': translate('MediaPlugin', 'Add the selected Media to the service')
|
||||||
}
|
}
|
|
@ -32,20 +32,18 @@ class PresentationTab(SettingsTab):
|
||||||
"""
|
"""
|
||||||
PresentationsTab is the Presentations settings tab in the settings dialog.
|
PresentationsTab is the Presentations settings tab in the settings dialog.
|
||||||
"""
|
"""
|
||||||
def __init__(self, title, controllers):
|
def __init__(self, title, visible_title, controllers):
|
||||||
"""
|
"""
|
||||||
Constructor
|
Constructor
|
||||||
"""
|
"""
|
||||||
self.controllers = controllers
|
self.controllers = controllers
|
||||||
SettingsTab.__init__(self, title)
|
SettingsTab.__init__(self, title, visible_title)
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
"""
|
"""
|
||||||
Create the controls for the settings tab
|
Create the controls for the settings tab
|
||||||
"""
|
"""
|
||||||
self.setObjectName(u'PresentationTab')
|
self.setObjectName(u'PresentationTab')
|
||||||
self.tabTitleVisible = translate('PresentationPlugin.PresentationTab',
|
|
||||||
'Presentations')
|
|
||||||
self.PresentationLayout = QtGui.QHBoxLayout(self)
|
self.PresentationLayout = QtGui.QHBoxLayout(self)
|
||||||
self.PresentationLayout.setSpacing(8)
|
self.PresentationLayout.setSpacing(8)
|
||||||
self.PresentationLayout.setMargin(8)
|
self.PresentationLayout.setMargin(8)
|
||||||
|
|
|
@ -30,7 +30,7 @@ presentations from a variety of document formats.
|
||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from openlp.core.lib import Plugin, StringType, build_icon, translate
|
from openlp.core.lib import Plugin, StringContent, build_icon, translate
|
||||||
from openlp.core.utils import AppLocation
|
from openlp.core.utils import AppLocation
|
||||||
from openlp.plugins.presentations.lib import PresentationController, \
|
from openlp.plugins.presentations.lib import PresentationController, \
|
||||||
PresentationMediaItem, PresentationTab
|
PresentationMediaItem, PresentationTab
|
||||||
|
@ -60,8 +60,8 @@ class PresentationPlugin(Plugin):
|
||||||
"""
|
"""
|
||||||
Create the settings Tab
|
Create the settings Tab
|
||||||
"""
|
"""
|
||||||
media_item_string = self.getString(StringType.MediaItem)
|
visible_name = self.getString(StringContent.VisibleName)
|
||||||
return PresentationTab(media_item_string[u'title'], self.controllers)
|
return PresentationTab(self.name, visible_name[u'title'], self.controllers)
|
||||||
|
|
||||||
def initialise(self):
|
def initialise(self):
|
||||||
"""
|
"""
|
||||||
|
@ -149,41 +149,38 @@ class PresentationPlugin(Plugin):
|
||||||
"""
|
"""
|
||||||
Called to define all translatable texts of the plugin
|
Called to define all translatable texts of the plugin
|
||||||
"""
|
"""
|
||||||
self.name = u'Presentations'
|
|
||||||
self.name_lower = u'presentations'
|
|
||||||
self.strings = {}
|
|
||||||
## Name PluginList ##
|
## Name PluginList ##
|
||||||
self.strings[StringType.Name] = {
|
self.strings[StringContent.Name] = {
|
||||||
u'singular': translate('PresentationPlugin', 'Presentation'),
|
u'singular': translate('PresentationPlugin', 'Presentation'),
|
||||||
u'plural': translate('PresentationPlugin', 'Presentations')
|
u'plural': translate('PresentationPlugin', 'Presentations')
|
||||||
}
|
}
|
||||||
## Name for MediaDockManager, SettingsManager ##
|
## Name for MediaDockManager, SettingsManager ##
|
||||||
self.strings[StringType.MediaItem] = {
|
self.strings[StringContent.VisibleName] = {
|
||||||
u'title': translate('PresentationPlugin', 'Presentations')
|
u'title': translate('PresentationPlugin', 'Presentations')
|
||||||
}
|
}
|
||||||
# Middle Header Bar
|
# Middle Header Bar
|
||||||
## Load Button ##
|
## Load Button ##
|
||||||
self.strings[StringType.Load] = {
|
self.strings[StringContent.Load] = {
|
||||||
u'title': translate('PresentationPlugin', 'Load'),
|
u'title': translate('PresentationPlugin', 'Load'),
|
||||||
u'tooltip': translate('PresentationPlugin', 'Load a new Presentation')
|
u'tooltip': translate('PresentationPlugin', 'Load a new Presentation')
|
||||||
}
|
}
|
||||||
## Delete Button ##
|
## Delete Button ##
|
||||||
self.strings[StringType.Delete] = {
|
self.strings[StringContent.Delete] = {
|
||||||
u'title': translate('PresentationPlugin', 'Delete'),
|
u'title': translate('PresentationPlugin', 'Delete'),
|
||||||
u'tooltip': translate('PresentationPlugin', 'Delete the selected Presentation')
|
u'tooltip': translate('PresentationPlugin', 'Delete the selected Presentation')
|
||||||
}
|
}
|
||||||
## Preview ##
|
## Preview ##
|
||||||
self.strings[StringType.Preview] = {
|
self.strings[StringContent.Preview] = {
|
||||||
u'title': translate('PresentationPlugin', 'Preview'),
|
u'title': translate('PresentationPlugin', 'Preview'),
|
||||||
u'tooltip': translate('PresentationPlugin', 'Preview the selected Presentation')
|
u'tooltip': translate('PresentationPlugin', 'Preview the selected Presentation')
|
||||||
}
|
}
|
||||||
## Live Button ##
|
## Live Button ##
|
||||||
self.strings[StringType.Live] = {
|
self.strings[StringContent.Live] = {
|
||||||
u'title': translate('PresentationPlugin', 'Live'),
|
u'title': translate('PresentationPlugin', 'Live'),
|
||||||
u'tooltip': translate('PresentationPlugin', 'Send the selected Presentation live')
|
u'tooltip': translate('PresentationPlugin', 'Send the selected Presentation live')
|
||||||
}
|
}
|
||||||
## Add to service Button ##
|
## Add to service Button ##
|
||||||
self.strings[StringType.Service] = {
|
self.strings[StringContent.Service] = {
|
||||||
u'title': translate('PresentationPlugin', 'Service'),
|
u'title': translate('PresentationPlugin', 'Service'),
|
||||||
u'tooltip': translate('PresentationPlugin', 'Add the selected Presentation to the service')
|
u'tooltip': translate('PresentationPlugin', 'Add the selected Presentation to the service')
|
||||||
}
|
}
|
|
@ -32,12 +32,11 @@ class RemoteTab(SettingsTab):
|
||||||
"""
|
"""
|
||||||
RemoteTab is the Remotes settings tab in the settings dialog.
|
RemoteTab is the Remotes settings tab in the settings dialog.
|
||||||
"""
|
"""
|
||||||
def __init__(self, title):
|
def __init__(self, title, visible_title):
|
||||||
SettingsTab.__init__(self, title)
|
SettingsTab.__init__(self, title, visible_title)
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
self.setObjectName(u'RemoteTab')
|
self.setObjectName(u'RemoteTab')
|
||||||
self.tabTitleVisible = translate('RemotePlugin.RemoteTab', 'Remotes')
|
|
||||||
self.remoteLayout = QtGui.QFormLayout(self)
|
self.remoteLayout = QtGui.QFormLayout(self)
|
||||||
self.remoteLayout.setSpacing(8)
|
self.remoteLayout.setSpacing(8)
|
||||||
self.remoteLayout.setMargin(8)
|
self.remoteLayout.setMargin(8)
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from openlp.core.lib import Plugin, StringType, translate, build_icon
|
from openlp.core.lib import Plugin, StringContent, translate, build_icon
|
||||||
from openlp.plugins.remotes.lib import RemoteTab, HttpServer
|
from openlp.plugins.remotes.lib import RemoteTab, HttpServer
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
@ -65,8 +65,8 @@ class RemotesPlugin(Plugin):
|
||||||
"""
|
"""
|
||||||
Create the settings Tab
|
Create the settings Tab
|
||||||
"""
|
"""
|
||||||
media_item_string = self.getString(StringType.MediaItem)
|
visible_name = self.getString(StringContent.VisibleName)
|
||||||
return RemoteTab(media_item_string[u'title'])
|
return RemoteTab(self.name, visible_name[u'title'])
|
||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
"""
|
"""
|
||||||
|
@ -82,15 +82,12 @@ class RemotesPlugin(Plugin):
|
||||||
"""
|
"""
|
||||||
Called to define all translatable texts of the plugin
|
Called to define all translatable texts of the plugin
|
||||||
"""
|
"""
|
||||||
self.name = u'Remotes'
|
|
||||||
self.name_lower = u'remotes'
|
|
||||||
self.strings = {}
|
|
||||||
## Name PluginList ##
|
## Name PluginList ##
|
||||||
self.strings[StringType.Name] = {
|
self.strings[StringContent.Name] = {
|
||||||
u'singular': translate('RemotePlugin', 'Remote'),
|
u'singular': translate('RemotePlugin', 'Remote'),
|
||||||
u'plural': translate('RemotePlugin', 'Remotes')
|
u'plural': translate('RemotePlugin', 'Remotes')
|
||||||
}
|
}
|
||||||
## Name for MediaDockManager, SettingsManager ##
|
## Name for MediaDockManager, SettingsManager ##
|
||||||
self.strings[StringType.MediaItem] = {
|
self.strings[StringContent.VisibleName] = {
|
||||||
u'title': translate('RemotePlugin', 'Remotes')
|
u'title': translate('RemotePlugin', 'Remotes')
|
||||||
}
|
}
|
|
@ -32,12 +32,11 @@ class SongsTab(SettingsTab):
|
||||||
"""
|
"""
|
||||||
SongsTab is the Songs settings tab in the settings dialog.
|
SongsTab is the Songs settings tab in the settings dialog.
|
||||||
"""
|
"""
|
||||||
def __init__(self, title):
|
def __init__(self, title, visible_title):
|
||||||
SettingsTab.__init__(self, title)
|
SettingsTab.__init__(self, title, visible_title)
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
self.setObjectName(u'SongsTab')
|
self.setObjectName(u'SongsTab')
|
||||||
self.tabTitleVisible = translate('SongsPlugin.SongsTab', 'Songs')
|
|
||||||
self.SongsLayout = QtGui.QFormLayout(self)
|
self.SongsLayout = QtGui.QFormLayout(self)
|
||||||
self.SongsLayout.setSpacing(8)
|
self.SongsLayout.setSpacing(8)
|
||||||
self.SongsLayout.setMargin(8)
|
self.SongsLayout.setMargin(8)
|
||||||
|
|
|
@ -28,7 +28,7 @@ import logging
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import Plugin, StringType, build_icon, translate
|
from openlp.core.lib import Plugin, StringContent, build_icon, translate
|
||||||
from openlp.core.lib.db import Manager
|
from openlp.core.lib.db import Manager
|
||||||
from openlp.plugins.songs.lib import SongMediaItem, SongsTab
|
from openlp.plugins.songs.lib import SongMediaItem, SongsTab
|
||||||
from openlp.plugins.songs.lib.db import init_schema, Song
|
from openlp.plugins.songs.lib.db import init_schema, Song
|
||||||
|
@ -57,8 +57,8 @@ class SongsPlugin(Plugin):
|
||||||
self.icon = build_icon(self.icon_path)
|
self.icon = build_icon(self.icon_path)
|
||||||
|
|
||||||
def getSettingsTab(self):
|
def getSettingsTab(self):
|
||||||
media_item_string = self.getString(StringType.MediaItem)
|
visible_name = self.getString(StringContent.VisibleName)
|
||||||
return SongsTab(media_item_string[u'title'])
|
return SongsTab(self.name, visible_name[u'title'])
|
||||||
|
|
||||||
def initialise(self):
|
def initialise(self):
|
||||||
log.info(u'Songs Initialising')
|
log.info(u'Songs Initialising')
|
||||||
|
@ -153,46 +153,43 @@ class SongsPlugin(Plugin):
|
||||||
"""
|
"""
|
||||||
Called to define all translatable texts of the plugin
|
Called to define all translatable texts of the plugin
|
||||||
"""
|
"""
|
||||||
self.name = u'Songs'
|
|
||||||
self.name_lower = u'songs'
|
|
||||||
self.strings = {}
|
|
||||||
## Name PluginList ##
|
## Name PluginList ##
|
||||||
self.strings[StringType.Name] = {
|
self.strings[StringContent.Name] = {
|
||||||
u'singular': translate('SongsPlugin', 'Song'),
|
u'singular': translate('SongsPlugin', 'Song'),
|
||||||
u'plural': translate('SongsPlugin', 'Songs')
|
u'plural': translate('SongsPlugin', 'Songs')
|
||||||
}
|
}
|
||||||
## Name for MediaDockManager, SettingsManager ##
|
## Name for MediaDockManager, SettingsManager ##
|
||||||
self.strings[StringType.MediaItem] = {
|
self.strings[StringContent.VisibleName] = {
|
||||||
u'title': translate('SongsPlugin', 'Songs')
|
u'title': translate('SongsPlugin', 'Songs')
|
||||||
}
|
}
|
||||||
# Middle Header Bar
|
# Middle Header Bar
|
||||||
## New Button ##
|
## New Button ##
|
||||||
self.strings[StringType.New] = {
|
self.strings[StringContent.New] = {
|
||||||
u'title': translate('SongsPlugin', 'Add'),
|
u'title': translate('SongsPlugin', 'Add'),
|
||||||
u'tooltip': translate('SongsPlugin', 'Add a new Song')
|
u'tooltip': translate('SongsPlugin', 'Add a new Song')
|
||||||
}
|
}
|
||||||
## Edit Button ##
|
## Edit Button ##
|
||||||
self.strings[StringType.Edit] = {
|
self.strings[StringContent.Edit] = {
|
||||||
u'title': translate('SongsPlugin', 'Edit'),
|
u'title': translate('SongsPlugin', 'Edit'),
|
||||||
u'tooltip': translate('SongsPlugin', 'Edit the selected Song')
|
u'tooltip': translate('SongsPlugin', 'Edit the selected Song')
|
||||||
}
|
}
|
||||||
## Delete Button ##
|
## Delete Button ##
|
||||||
self.strings[StringType.Delete] = {
|
self.strings[StringContent.Delete] = {
|
||||||
u'title': translate('SongsPlugin', 'Delete'),
|
u'title': translate('SongsPlugin', 'Delete'),
|
||||||
u'tooltip': translate('SongsPlugin', 'Delete the selected Song')
|
u'tooltip': translate('SongsPlugin', 'Delete the selected Song')
|
||||||
}
|
}
|
||||||
## Preview ##
|
## Preview ##
|
||||||
self.strings[StringType.Preview] = {
|
self.strings[StringContent.Preview] = {
|
||||||
u'title': translate('SongsPlugin', 'Preview'),
|
u'title': translate('SongsPlugin', 'Preview'),
|
||||||
u'tooltip': translate('SongsPlugin', 'Preview the selected Song')
|
u'tooltip': translate('SongsPlugin', 'Preview the selected Song')
|
||||||
}
|
}
|
||||||
## Live Button ##
|
## Live Button ##
|
||||||
self.strings[StringType.Live] = {
|
self.strings[StringContent.Live] = {
|
||||||
u'title': translate('SongsPlugin', 'Live'),
|
u'title': translate('SongsPlugin', 'Live'),
|
||||||
u'tooltip': translate('SongsPlugin', 'Send the selected Song live')
|
u'tooltip': translate('SongsPlugin', 'Send the selected Song live')
|
||||||
}
|
}
|
||||||
## Add to service Button ##
|
## Add to service Button ##
|
||||||
self.strings[StringType.Service] = {
|
self.strings[StringContent.Service] = {
|
||||||
u'title': translate('SongsPlugin', 'Service'),
|
u'title': translate('SongsPlugin', 'Service'),
|
||||||
u'tooltip': translate('SongsPlugin', 'Add the selected Song to the service')
|
u'tooltip': translate('SongsPlugin', 'Add the selected Song to the service')
|
||||||
}
|
}
|
|
@ -29,7 +29,7 @@ from datetime import datetime
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import Plugin, StringType, Receiver, build_icon, translate
|
from openlp.core.lib import Plugin, StringContent, Receiver, build_icon, translate
|
||||||
from openlp.core.lib.db import Manager
|
from openlp.core.lib.db import Manager
|
||||||
from openlp.plugins.songusage.forms import SongUsageDetailForm, \
|
from openlp.plugins.songusage.forms import SongUsageDetailForm, \
|
||||||
SongUsageDeleteForm
|
SongUsageDeleteForm
|
||||||
|
@ -167,15 +167,12 @@ class SongUsagePlugin(Plugin):
|
||||||
"""
|
"""
|
||||||
Called to define all translatable texts of the plugin
|
Called to define all translatable texts of the plugin
|
||||||
"""
|
"""
|
||||||
self.name = u'SongUsage'
|
|
||||||
self.name_lower = u'songusage'
|
|
||||||
self.strings = {}
|
|
||||||
## Name PluginList ##
|
## Name PluginList ##
|
||||||
self.strings[StringType.Name] = {
|
self.strings[StringContent.Name] = {
|
||||||
u'singular': translate('SongUsagePlugin', 'SongUsage'),
|
u'singular': translate('SongUsagePlugin', 'SongUsage'),
|
||||||
u'plural': translate('SongUsagePlugin', 'SongUsage')
|
u'plural': translate('SongUsagePlugin', 'SongUsage')
|
||||||
}
|
}
|
||||||
## Name for MediaDockManager, SettingsManager ##
|
## Name for MediaDockManager, SettingsManager ##
|
||||||
self.strings[StringType.MediaItem] = {
|
self.strings[StringContent.VisibleName] = {
|
||||||
u'title': translate('SongUsagePlugin', 'SongUsage')
|
u'title': translate('SongUsagePlugin', 'SongUsage')
|
||||||
}
|
}
|
Loading…
Reference in New Issue