forked from openlp/openlp
Head900
This commit is contained in:
commit
56e4e38b99
|
@ -22,7 +22,10 @@
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
The :mod:`renderer` module enables OpenLP to take the input from plugins and
|
||||||
|
format it for the output display.
|
||||||
|
"""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from PyQt4 import QtGui, QtCore
|
from PyQt4 import QtGui, QtCore
|
||||||
|
|
|
@ -168,7 +168,7 @@ class Theme(object):
|
||||||
theme_strings.append(u'_%s_' % (getattr(self, key)))
|
theme_strings.append(u'_%s_' % (getattr(self, key)))
|
||||||
return u''.join(theme_strings)
|
return u''.join(theme_strings)
|
||||||
|
|
||||||
def _set_from_XML(self, xml):
|
def _set_from_xml(self, xml):
|
||||||
"""
|
"""
|
||||||
Set theme class attributes with data from XML
|
Set theme class attributes with data from XML
|
||||||
|
|
||||||
|
|
|
@ -662,7 +662,7 @@ class ServiceManager(QtGui.QWidget):
|
||||||
name = filename.split(os.path.sep)
|
name = filename.split(os.path.sep)
|
||||||
if filename:
|
if filename:
|
||||||
SettingsManager.set_last_dir(self.parent.serviceSettingsSection,
|
SettingsManager.set_last_dir(self.parent.serviceSettingsSection,
|
||||||
os.path.split(filename)[0])
|
name[0])
|
||||||
zip = None
|
zip = None
|
||||||
file_to = None
|
file_to = None
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -22,7 +22,10 @@
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
The :mod:`languagemanager` module provides all the translation settings and
|
||||||
|
language file loading for OpenLP.
|
||||||
|
"""
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
@ -42,50 +45,74 @@ class LanguageManager(object):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_translator(language):
|
def get_translator(language):
|
||||||
|
"""
|
||||||
|
Set up a translator to use in this instance of OpenLP
|
||||||
|
|
||||||
|
``language``
|
||||||
|
The language to load into the translator
|
||||||
|
"""
|
||||||
if LanguageManager.AutoLanguage:
|
if LanguageManager.AutoLanguage:
|
||||||
language = QtCore.QLocale.system().name()
|
language = QtCore.QLocale.system().name()
|
||||||
lang_Path = AppLocation.get_directory(AppLocation.AppDir)
|
lang_Path = AppLocation.get_directory(AppLocation.AppDir)
|
||||||
lang_Path = os.path.join(lang_Path, u'resources', u'i18n')
|
lang_Path = os.path.join(lang_Path, u'resources', u'i18n')
|
||||||
appTranslator = QtCore.QTranslator()
|
app_translator = QtCore.QTranslator()
|
||||||
if appTranslator.load("openlp_" + language, lang_Path):
|
if app_translator.load("openlp_" + language, lang_Path):
|
||||||
return appTranslator
|
return app_translator
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def find_qm_files():
|
def find_qm_files():
|
||||||
|
"""
|
||||||
|
Find all available language files in this OpenLP install
|
||||||
|
"""
|
||||||
trans_dir = AppLocation.get_directory(AppLocation.AppDir)
|
trans_dir = AppLocation.get_directory(AppLocation.AppDir)
|
||||||
trans_dir = QtCore.QDir(os.path.join(trans_dir, u'resources', u'i18n'))
|
trans_dir = QtCore.QDir(os.path.join(trans_dir, u'resources', u'i18n'))
|
||||||
fileNames = trans_dir.entryList(QtCore.QStringList("*.qm"),
|
file_names = trans_dir.entryList(QtCore.QStringList("*.qm"),
|
||||||
QtCore.QDir.Files, QtCore.QDir.Name)
|
QtCore.QDir.Files, QtCore.QDir.Name)
|
||||||
for name in fileNames:
|
for name in file_names:
|
||||||
fileNames.replaceInStrings(name, trans_dir.filePath(name))
|
file_names.replaceInStrings(name, trans_dir.filePath(name))
|
||||||
return fileNames
|
return file_names
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def language_name(qmFile):
|
def language_name(qm_file):
|
||||||
|
"""
|
||||||
|
Load the language name from a language file
|
||||||
|
|
||||||
|
``qm_file``
|
||||||
|
The file to obtain the name from
|
||||||
|
"""
|
||||||
translator = QtCore.QTranslator()
|
translator = QtCore.QTranslator()
|
||||||
translator.load(qmFile)
|
translator.load(qm_file)
|
||||||
return translator.translate('MainWindow', 'English')
|
return translator.translate('MainWindow', 'English')
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_language():
|
def get_language():
|
||||||
|
"""
|
||||||
|
Retrieve a saved language to use from settings
|
||||||
|
"""
|
||||||
settings = QtCore.QSettings(u'OpenLP', u'OpenLP')
|
settings = QtCore.QSettings(u'OpenLP', u'OpenLP')
|
||||||
language = unicode(settings.value(
|
language = unicode(settings.value(
|
||||||
u'general/language', QtCore.QVariant(u'[en]')).toString())
|
u'general/language', QtCore.QVariant(u'[en]')).toString())
|
||||||
log.info(u'Language file: \'%s\' Loaded from conf file' % language)
|
log.info(u'Language file: \'%s\' Loaded from conf file' % language)
|
||||||
regEx = QtCore.QRegExp("^\[(.*)\]")
|
reg_ex = QtCore.QRegExp("^\[(.*)\]")
|
||||||
if regEx.exactMatch(language):
|
if reg_ex.exactMatch(language):
|
||||||
LanguageManager.AutoLanguage = True
|
LanguageManager.AutoLanguage = True
|
||||||
language = regEx.cap(1)
|
language = reg_ex.cap(1)
|
||||||
return language
|
return language
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def set_language(action):
|
def set_language(action):
|
||||||
actionName = u'%s' % action.objectName()
|
"""
|
||||||
qmList = LanguageManager.get_qm_list()
|
Set the language to translate OpenLP into
|
||||||
|
|
||||||
|
``action``
|
||||||
|
The language menu option
|
||||||
|
"""
|
||||||
|
action_name = u'%s' % action.objectName()
|
||||||
|
qm_list = LanguageManager.get_qm_list()
|
||||||
if LanguageManager.AutoLanguage:
|
if LanguageManager.AutoLanguage:
|
||||||
language = u'[%s]' % qmList[actionName]
|
language = u'[%s]' % qm_list[action_name]
|
||||||
else:
|
else:
|
||||||
language = u'%s' % qmList[actionName]
|
language = u'%s' % qm_list[action_name]
|
||||||
QtCore.QSettings().setValue(
|
QtCore.QSettings().setValue(
|
||||||
u'general/language', QtCore.QVariant(language))
|
u'general/language', QtCore.QVariant(language))
|
||||||
log.info(u'Language file: \'%s\' written to conf file' % language)
|
log.info(u'Language file: \'%s\' written to conf file' % language)
|
||||||
|
@ -96,17 +123,23 @@ class LanguageManager(object):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def init_qm_list():
|
def init_qm_list():
|
||||||
|
"""
|
||||||
|
Initialise the list of available translations
|
||||||
|
"""
|
||||||
LanguageManager.__qmList__ = {}
|
LanguageManager.__qmList__ = {}
|
||||||
qmFiles = LanguageManager.find_qm_files()
|
qm_files = LanguageManager.find_qm_files()
|
||||||
for i, qmf in enumerate(qmFiles):
|
for i, qmf in enumerate(qm_files):
|
||||||
regEx = QtCore.QRegExp("^.*openlp_(.*).qm")
|
reg_ex = QtCore.QRegExp("^.*openlp_(.*).qm")
|
||||||
if regEx.exactMatch(qmf):
|
if reg_ex.exactMatch(qmf):
|
||||||
langName = regEx.cap(1)
|
lang_name = reg_ex.cap(1)
|
||||||
LanguageManager.__qmList__[u'%#2i %s' % (i+1,
|
LanguageManager.__qmList__[u'%#2i %s' % (i+1,
|
||||||
LanguageManager.language_name(qmf))] = langName
|
LanguageManager.language_name(qmf))] = lang_name
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_qm_list():
|
def get_qm_list():
|
||||||
|
"""
|
||||||
|
Return the list of available translations
|
||||||
|
"""
|
||||||
if LanguageManager.__qmList__ is None:
|
if LanguageManager.__qmList__ is None:
|
||||||
LanguageManager.init_qm_list()
|
LanguageManager.init_qm_list()
|
||||||
return LanguageManager.__qmList__
|
return LanguageManager.__qmList__
|
||||||
|
|
|
@ -24,5 +24,5 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
"""
|
"""
|
||||||
The :mod:`alerts` module provides the Alerts plugin for producing impromptu
|
The :mod:`alerts` module provides the Alerts plugin for producing impromptu
|
||||||
on-screen announcements during a service
|
on-screen announcements during a service.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -41,7 +41,7 @@ class alertsPlugin(Plugin):
|
||||||
def __init__(self, plugin_helpers):
|
def __init__(self, plugin_helpers):
|
||||||
Plugin.__init__(self, u'Alerts', u'1.9.2', plugin_helpers)
|
Plugin.__init__(self, u'Alerts', u'1.9.2', plugin_helpers)
|
||||||
self.weight = -3
|
self.weight = -3
|
||||||
self.icon = build_icon(u':/media/media_image.png')
|
self.icon = build_icon(u':/plugins/plugin_alerts.png')
|
||||||
self.alertsmanager = AlertsManager(self)
|
self.alertsmanager = AlertsManager(self)
|
||||||
self.manager = Manager(u'alerts', init_schema)
|
self.manager = Manager(u'alerts', init_schema)
|
||||||
self.alertForm = AlertForm(self.manager, self)
|
self.alertForm = AlertForm(self.manager, self)
|
||||||
|
@ -65,7 +65,7 @@ class alertsPlugin(Plugin):
|
||||||
"""
|
"""
|
||||||
log.info(u'add tools menu')
|
log.info(u'add tools menu')
|
||||||
self.toolsAlertItem = QtGui.QAction(tools_menu)
|
self.toolsAlertItem = QtGui.QAction(tools_menu)
|
||||||
AlertIcon = build_icon(u':/tools/tools_alert.png')
|
AlertIcon = build_icon(u':/plugins/plugin_alerts.png')
|
||||||
self.toolsAlertItem.setIcon(AlertIcon)
|
self.toolsAlertItem.setIcon(AlertIcon)
|
||||||
self.toolsAlertItem.setObjectName(u'toolsAlertItem')
|
self.toolsAlertItem.setObjectName(u'toolsAlertItem')
|
||||||
self.toolsAlertItem.setText(
|
self.toolsAlertItem.setText(
|
||||||
|
@ -102,4 +102,4 @@ class alertsPlugin(Plugin):
|
||||||
about_text = translate('AlertsPlugin',
|
about_text = translate('AlertsPlugin',
|
||||||
'<b>Alerts Plugin</b><br>This plugin '
|
'<b>Alerts Plugin</b><br>This plugin '
|
||||||
'controls the displaying of alerts on the presentations screen')
|
'controls the displaying of alerts on the presentations screen')
|
||||||
return about_text
|
return about_text
|
||||||
|
|
|
@ -23,6 +23,6 @@
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
"""
|
"""
|
||||||
The :mod:`bibles' modules provides the Bible plugin to enable OpenLP to display
|
The :mod:`bibles' module provides the Bible plugin to enable OpenLP to display
|
||||||
scripture
|
scripture.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -22,3 +22,8 @@
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
The :mod:`custom` module provides the Custom plugin which allows custom,
|
||||||
|
themed, text based items to be displayed without having to misuse another item
|
||||||
|
type.
|
||||||
|
"""
|
||||||
|
|
|
@ -78,7 +78,7 @@ class CustomPlugin(Plugin):
|
||||||
return about_text
|
return about_text
|
||||||
|
|
||||||
def can_delete_theme(self, theme):
|
def can_delete_theme(self, theme):
|
||||||
filter_string = u'theme_name=%s' % theme
|
filter_string = u'theme_name=\'%s\'' % theme
|
||||||
if not self.custommanager.get_all_objects_filtered(CustomSlide,
|
if not self.custommanager.get_all_objects_filtered(CustomSlide,
|
||||||
filter_string):
|
filter_string):
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -136,11 +136,14 @@ class CustomMediaItem(MediaManagerItem):
|
||||||
if check_item_selected(self.ListView,
|
if check_item_selected(self.ListView,
|
||||||
translate('CustomPlugin.MediaItem',
|
translate('CustomPlugin.MediaItem',
|
||||||
'You must select an item to delete.')):
|
'You must select an item to delete.')):
|
||||||
item = self.ListView.currentItem()
|
row_list = [item.row() for item in self.ListView.selectedIndexes()]
|
||||||
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
row_list.sort(reverse=True)
|
||||||
self.parent.custommanager.delete_object(CustomSlide, item_id)
|
id_list = [(item.data(QtCore.Qt.UserRole)).toInt()[0]
|
||||||
row = self.ListView.row(item)
|
for item in self.ListView.selectedIndexes()]
|
||||||
self.ListView.takeItem(row)
|
for id in id_list:
|
||||||
|
self.parent.custommanager.delete_custom(id)
|
||||||
|
for row in row_list:
|
||||||
|
self.ListView.takeItem(row)
|
||||||
|
|
||||||
def generateSlideData(self, service_item, item=None):
|
def generateSlideData(self, service_item, item=None):
|
||||||
raw_slides = []
|
raw_slides = []
|
||||||
|
|
|
@ -22,3 +22,7 @@
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
The :mod:`images` module provides the Images plugin. The Images plugin
|
||||||
|
provides the facility to display images from OpenLP.
|
||||||
|
"""
|
||||||
|
|
|
@ -119,9 +119,10 @@ class ImageMediaItem(MediaManagerItem):
|
||||||
"""
|
"""
|
||||||
if check_item_selected(self.ListView, translate('ImagePlugin.MediaItem',
|
if check_item_selected(self.ListView, translate('ImagePlugin.MediaItem',
|
||||||
'You must select an item to delete.')):
|
'You must select an item to delete.')):
|
||||||
items = self.ListView.selectedIndexes()
|
row_list = [item.row() for item in self.ListView.selectedIndexes()]
|
||||||
for item in items:
|
row_list.sort(reverse=True)
|
||||||
text = self.ListView.item(item.row())
|
for row in row_list:
|
||||||
|
text = self.ListView.item(row)
|
||||||
if text:
|
if text:
|
||||||
try:
|
try:
|
||||||
os.remove(os.path.join(self.servicePath,
|
os.remove(os.path.join(self.servicePath,
|
||||||
|
@ -129,9 +130,9 @@ class ImageMediaItem(MediaManagerItem):
|
||||||
except OSError:
|
except OSError:
|
||||||
#if not present do not worry
|
#if not present do not worry
|
||||||
pass
|
pass
|
||||||
self.ListView.takeItem(item.row())
|
self.ListView.takeItem(row)
|
||||||
SettingsManager.set_list(self.settingsSection,
|
SettingsManager.set_list(self.settingsSection,
|
||||||
self.settingsSection, self.getFileList())
|
self.settingsSection, self.getFileList())
|
||||||
|
|
||||||
def loadList(self, list):
|
def loadList(self, list):
|
||||||
for file in list:
|
for file in list:
|
||||||
|
|
|
@ -22,3 +22,9 @@
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
The :mod:`media` module provides the Media plugin which allows OpenLP to
|
||||||
|
display videos. The media supported depends not only on the Python support
|
||||||
|
but also extensively on the codecs installed on the underlying operating system
|
||||||
|
being picked up and usable by Python.
|
||||||
|
"""
|
||||||
|
|
|
@ -143,9 +143,10 @@ class MediaMediaItem(MediaManagerItem):
|
||||||
"""
|
"""
|
||||||
if check_item_selected(self.ListView, translate('MediaPlugin.MediaItem',
|
if check_item_selected(self.ListView, translate('MediaPlugin.MediaItem',
|
||||||
'You must select an item to delete.')):
|
'You must select an item to delete.')):
|
||||||
item = self.ListView.currentItem()
|
row_list = [item.row() for item in self.ListView.selectedIndexes()]
|
||||||
row = self.ListView.row(item)
|
row_list.sort(reverse=True)
|
||||||
self.ListView.takeItem(row)
|
for row in row_list:
|
||||||
|
self.ListView.takeItem(row)
|
||||||
SettingsManager.set_list(self.settingsSection,
|
SettingsManager.set_list(self.settingsSection,
|
||||||
self.settingsSection, self.getFileList())
|
self.settingsSection, self.getFileList())
|
||||||
|
|
||||||
|
|
|
@ -22,3 +22,7 @@
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
The :mod:`presentations` module provides the Presentations plugin which allows
|
||||||
|
OpenLP to show presentations from most popular presentation packages.
|
||||||
|
"""
|
||||||
|
|
|
@ -180,18 +180,22 @@ class PresentationMediaItem(MediaManagerItem):
|
||||||
if check_item_selected(self.ListView,
|
if check_item_selected(self.ListView,
|
||||||
translate('PresentationPlugin.MediaItem',
|
translate('PresentationPlugin.MediaItem',
|
||||||
'You must select an item to delete.')):
|
'You must select an item to delete.')):
|
||||||
item = self.ListView.currentItem()
|
items = self.ListView.selectedIndexes()
|
||||||
row = self.ListView.row(item)
|
row_list = [item.row() for item in items]
|
||||||
self.ListView.takeItem(row)
|
row_list.sort(reverse=True)
|
||||||
|
for item in items:
|
||||||
|
filepath = unicode(item.data(
|
||||||
|
QtCore.Qt.UserRole).toString())
|
||||||
|
#not sure of this has errors
|
||||||
|
#John please can you look at .
|
||||||
|
for cidx in self.controllers:
|
||||||
|
doc = self.controllers[cidx].add_doc(filepath)
|
||||||
|
doc.presentation_deleted()
|
||||||
|
doc.close_presentation()
|
||||||
|
for row in row_list:
|
||||||
|
self.ListView.takeItem(row)
|
||||||
SettingsManager.set_list(self.settingsSection,
|
SettingsManager.set_list(self.settingsSection,
|
||||||
self.settingsSection, self.getFileList())
|
self.settingsSection, self.getFileList())
|
||||||
filepath = unicode(item.data(QtCore.Qt.UserRole).toString())
|
|
||||||
#not sure of this has errors
|
|
||||||
#John please can you look at .
|
|
||||||
for cidx in self.controllers:
|
|
||||||
doc = self.controllers[cidx].add_doc(filepath)
|
|
||||||
doc.presentation_deleted()
|
|
||||||
doc.close_presentation()
|
|
||||||
|
|
||||||
def generateSlideData(self, service_item, item=None):
|
def generateSlideData(self, service_item, item=None):
|
||||||
items = self.ListView.selectedIndexes()
|
items = self.ListView.selectedIndexes()
|
||||||
|
|
|
@ -22,3 +22,7 @@
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
The :mod:`remotes` plugin allows OpenLP to be controlled from another machine
|
||||||
|
over a network connection.
|
||||||
|
"""
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from openlp.core.lib import Plugin, translate
|
from openlp.core.lib import Plugin, 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__)
|
||||||
|
@ -38,6 +38,7 @@ class RemotesPlugin(Plugin):
|
||||||
remotes constructor
|
remotes constructor
|
||||||
"""
|
"""
|
||||||
Plugin.__init__(self, u'Remotes', u'1.9.2', plugin_helpers)
|
Plugin.__init__(self, u'Remotes', u'1.9.2', plugin_helpers)
|
||||||
|
self.icon = build_icon(u':/plugins/plugin_remote.png')
|
||||||
self.weight = -1
|
self.weight = -1
|
||||||
self.server = None
|
self.server = None
|
||||||
|
|
||||||
|
@ -74,4 +75,4 @@ class RemotesPlugin(Plugin):
|
||||||
'provides the ability to send messages to a running version of '
|
'provides the ability to send messages to a running version of '
|
||||||
'openlp on a different computer via a web browser or other app<br>'
|
'openlp on a different computer via a web browser or other app<br>'
|
||||||
'The Primary use for this would be to send alerts from a creche')
|
'The Primary use for this would be to send alerts from a creche')
|
||||||
return about_text
|
return about_text
|
||||||
|
|
|
@ -22,3 +22,7 @@
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
The :mod:`songs` module provides the Songs plugin. The Songs plugin provides
|
||||||
|
the main lyric projection function of OpenLP.
|
||||||
|
"""
|
||||||
|
|
|
@ -199,7 +199,7 @@ class SongsPlugin(Plugin):
|
||||||
return about_text
|
return about_text
|
||||||
|
|
||||||
def can_delete_theme(self, theme):
|
def can_delete_theme(self, theme):
|
||||||
filter_string = u'theme_name=%s' % theme
|
filter_string = u'theme_name=\'%s\'' % theme
|
||||||
if not self.manager.get_all_objects_filtered(Song, filter_string):
|
if not self.manager.get_all_objects_filtered(Song, filter_string):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
|
@ -22,3 +22,8 @@
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
The :mod:`songusage` module contains the Song Usage plugin. The Song Usage
|
||||||
|
plugin provides auditing capabilities for reporting the songs you are using to
|
||||||
|
copyright license organisations.
|
||||||
|
"""
|
||||||
|
|
|
@ -42,7 +42,7 @@ class SongUsageDetailForm(QtGui.QDialog, Ui_SongUsageDetailDialog):
|
||||||
|
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
"""
|
"""
|
||||||
Constructor
|
Initialise the form
|
||||||
"""
|
"""
|
||||||
QtGui.QDialog.__init__(self, None)
|
QtGui.QDialog.__init__(self, None)
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
|
|
|
@ -22,7 +22,9 @@
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
The :mod:`manager` module provides song usage specific database query code
|
||||||
|
"""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from sqlalchemy.exceptions import InvalidRequestError
|
from sqlalchemy.exceptions import InvalidRequestError
|
||||||
|
|
|
@ -42,7 +42,7 @@ class SongUsagePlugin(Plugin):
|
||||||
def __init__(self, plugin_helpers):
|
def __init__(self, plugin_helpers):
|
||||||
Plugin.__init__(self, u'SongUsage', u'1.9.2', plugin_helpers)
|
Plugin.__init__(self, u'SongUsage', u'1.9.2', plugin_helpers)
|
||||||
self.weight = -4
|
self.weight = -4
|
||||||
self.icon = build_icon(u':/media/media_image.png')
|
self.icon = build_icon(u':/plugins/plugin_songusage.png')
|
||||||
self.songusagemanager = None
|
self.songusagemanager = None
|
||||||
self.songusageActive = False
|
self.songusageActive = False
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ class SongUsagePlugin(Plugin):
|
||||||
translate('SongUsagePlugin', 'Generate report on Song Usage'))
|
translate('SongUsagePlugin', 'Generate report on Song Usage'))
|
||||||
self.SongUsageReport.setObjectName(u'SongUsageReport')
|
self.SongUsageReport.setObjectName(u'SongUsageReport')
|
||||||
#SongUsage activation
|
#SongUsage activation
|
||||||
SongUsageIcon = build_icon(u':/tools/tools_alert.png')
|
SongUsageIcon = build_icon(u':/plugins/plugin_songusage.png')
|
||||||
self.SongUsageStatus = QtGui.QAction(tools_menu)
|
self.SongUsageStatus = QtGui.QAction(tools_menu)
|
||||||
self.SongUsageStatus.setIcon(SongUsageIcon)
|
self.SongUsageStatus.setIcon(SongUsageIcon)
|
||||||
self.SongUsageStatus.setCheckable(True)
|
self.SongUsageStatus.setCheckable(True)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="songs" >
|
<qresource prefix="songs">
|
||||||
<file>topic_edit.png</file>
|
<file>topic_edit.png</file>
|
||||||
<file>author_add.png</file>
|
<file>author_add.png</file>
|
||||||
<file>author_delete.png</file>
|
<file>author_delete.png</file>
|
||||||
|
@ -17,7 +17,12 @@
|
||||||
<file>song_topic_edit.png</file>
|
<file>song_topic_edit.png</file>
|
||||||
<file>song_book_edit.png</file>
|
<file>song_book_edit.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="general" >
|
<qresource prefix="plugins">
|
||||||
|
<file>plugin_alerts.png</file>
|
||||||
|
<file>plugin_remote.png</file>
|
||||||
|
<file>plugin_songusage.png</file>
|
||||||
|
</qresource>
|
||||||
|
<qresource prefix="general">
|
||||||
<file>general_preview.png</file>
|
<file>general_preview.png</file>
|
||||||
<file>general_live.png</file>
|
<file>general_live.png</file>
|
||||||
<file>general_add.png</file>
|
<file>general_add.png</file>
|
||||||
|
@ -29,7 +34,7 @@
|
||||||
<file>general_open.png</file>
|
<file>general_open.png</file>
|
||||||
<file>general_save.png</file>
|
<file>general_save.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="slides" >
|
<qresource prefix="slides">
|
||||||
<file>slide_close.png</file>
|
<file>slide_close.png</file>
|
||||||
<file>slide_first.png</file>
|
<file>slide_first.png</file>
|
||||||
<file>slide_last.png</file>
|
<file>slide_last.png</file>
|
||||||
|
@ -42,7 +47,7 @@
|
||||||
<file>media_playback_stop.png</file>
|
<file>media_playback_stop.png</file>
|
||||||
<file>media_playback_pause.png</file>
|
<file>media_playback_pause.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="icon" >
|
<qresource prefix="icon">
|
||||||
<file>openlp-logo-16x16.png</file>
|
<file>openlp-logo-16x16.png</file>
|
||||||
<file>openlp-logo-32x32.png</file>
|
<file>openlp-logo-32x32.png</file>
|
||||||
<file>openlp-logo-48x48.png</file>
|
<file>openlp-logo-48x48.png</file>
|
||||||
|
@ -50,27 +55,27 @@
|
||||||
<file>openlp-logo-128x128.png</file>
|
<file>openlp-logo-128x128.png</file>
|
||||||
<file>openlp-logo-256x256.png</file>
|
<file>openlp-logo-256x256.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="graphics" >
|
<qresource prefix="graphics">
|
||||||
<file>openlp-about-logo.png</file>
|
<file>openlp-about-logo.png</file>
|
||||||
<file>openlp-splash-screen.png</file>
|
<file>openlp-splash-screen.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="imports" >
|
<qresource prefix="imports">
|
||||||
<file>import_selectall.png</file>
|
<file>import_selectall.png</file>
|
||||||
<file>import_move_to_list.png</file>
|
<file>import_move_to_list.png</file>
|
||||||
<file>import_remove.png</file>
|
<file>import_remove.png</file>
|
||||||
<file>import_load.png</file>
|
<file>import_load.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="exports" >
|
<qresource prefix="exports">
|
||||||
<file>export_selectall.png</file>
|
<file>export_selectall.png</file>
|
||||||
<file>export_remove.png</file>
|
<file>export_remove.png</file>
|
||||||
<file>export_load.png</file>
|
<file>export_load.png</file>
|
||||||
<file>export_move_to_list.png</file>
|
<file>export_move_to_list.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="wizards" >
|
<qresource prefix="wizards">
|
||||||
<file>wizard_importsong.bmp</file>
|
<file>wizard_importsong.bmp</file>
|
||||||
<file>wizard_importbible.bmp</file>
|
<file>wizard_importbible.bmp</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="services" >
|
<qresource prefix="services">
|
||||||
<file>service_notes.png</file>
|
<file>service_notes.png</file>
|
||||||
<file>service_item_notes.png</file>
|
<file>service_item_notes.png</file>
|
||||||
<file>service_bottom.png</file>
|
<file>service_bottom.png</file>
|
||||||
|
@ -78,7 +83,7 @@
|
||||||
<file>service_top.png</file>
|
<file>service_top.png</file>
|
||||||
<file>service_up.png</file>
|
<file>service_up.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="system" >
|
<qresource prefix="system">
|
||||||
<file>system_close.png</file>
|
<file>system_close.png</file>
|
||||||
<file>system_about.png</file>
|
<file>system_about.png</file>
|
||||||
<file>system_help_contents.png</file>
|
<file>system_help_contents.png</file>
|
||||||
|
@ -89,7 +94,7 @@
|
||||||
<file>system_exit.png</file>
|
<file>system_exit.png</file>
|
||||||
<file>system_settings.png</file>
|
<file>system_settings.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="media" >
|
<qresource prefix="media">
|
||||||
<file>media_custom.png</file>
|
<file>media_custom.png</file>
|
||||||
<file>media_presentation.png</file>
|
<file>media_presentation.png</file>
|
||||||
<file>media_image.png</file>
|
<file>media_image.png</file>
|
||||||
|
@ -100,16 +105,16 @@
|
||||||
<file>media_stop.png</file>
|
<file>media_stop.png</file>
|
||||||
<file>image_clapperboard.png</file>
|
<file>image_clapperboard.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="messagebox" >
|
<qresource prefix="messagebox">
|
||||||
<file>messagebox_critical.png</file>
|
<file>messagebox_critical.png</file>
|
||||||
<file>messagebox_info.png</file>
|
<file>messagebox_info.png</file>
|
||||||
<file>messagebox_warning.png</file>
|
<file>messagebox_warning.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="tools" >
|
<qresource prefix="tools">
|
||||||
<file>tools_add.png</file>
|
<file>tools_add.png</file>
|
||||||
<file>tools_alert.png</file>
|
<file>tools_alert.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="themes" >
|
<qresource prefix="themes">
|
||||||
<file>theme_delete.png</file>
|
<file>theme_delete.png</file>
|
||||||
<file>theme_new.png</file>
|
<file>theme_new.png</file>
|
||||||
<file>theme_edit.png</file>
|
<file>theme_edit.png</file>
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 762 B |
Binary file not shown.
After Width: | Height: | Size: 830 B |
Binary file not shown.
After Width: | Height: | Size: 946 B |
Binary file not shown.
Before Width: | Height: | Size: 719 B After Width: | Height: | Size: 516 B |
Loading…
Reference in New Issue