From 4f05a426272ad3c1bab95eeb0efff570dafa5da4 Mon Sep 17 00:00:00 2001 From: andreas Date: Mon, 28 Jun 2010 17:43:40 +0200 Subject: [PATCH 01/10] fixed bug #599066 --- openlp/plugins/images/lib/mediaitem.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/openlp/plugins/images/lib/mediaitem.py b/openlp/plugins/images/lib/mediaitem.py index 29985a9ed..fa3ba0eea 100644 --- a/openlp/plugins/images/lib/mediaitem.py +++ b/openlp/plugins/images/lib/mediaitem.py @@ -120,8 +120,12 @@ class ImageMediaItem(MediaManagerItem): if check_item_selected(self.ListView, translate('ImagePlugin.MediaItem', 'You must select an item to delete.')): items = self.ListView.selectedIndexes() + row_count = [] for item in items: - text = self.ListView.item(item.row()) + row_count.append(item.row()) + row_count.sort(reverse=True) + for item in row_count: + text = self.ListView.item(item) if text: try: os.remove(os.path.join(self.servicePath, @@ -129,7 +133,7 @@ class ImageMediaItem(MediaManagerItem): except OSError: #if not present do not worry pass - self.ListView.takeItem(item.row()) + self.ListView.takeItem(item) SettingsManager.set_list(self.settingsSection, self.settingsSection, self.getFileList()) From 5de4832ae7d047760bc07e6c918b2e23c3abaa6c Mon Sep 17 00:00:00 2001 From: andreas Date: Mon, 28 Jun 2010 18:23:59 +0200 Subject: [PATCH 02/10] changed the variable name --- openlp/plugins/images/lib/mediaitem.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openlp/plugins/images/lib/mediaitem.py b/openlp/plugins/images/lib/mediaitem.py index fa3ba0eea..5a8b1969e 100644 --- a/openlp/plugins/images/lib/mediaitem.py +++ b/openlp/plugins/images/lib/mediaitem.py @@ -120,11 +120,11 @@ class ImageMediaItem(MediaManagerItem): if check_item_selected(self.ListView, translate('ImagePlugin.MediaItem', 'You must select an item to delete.')): items = self.ListView.selectedIndexes() - row_count = [] + row_list = [] for item in items: - row_count.append(item.row()) - row_count.sort(reverse=True) - for item in row_count: + row_list.append(item.row()) + row_list.sort(reverse=True) + for item in row_list: text = self.ListView.item(item) if text: try: From eccd2999ee3f97343d84d864513febcc4094927e Mon Sep 17 00:00:00 2001 From: andreas Date: Mon, 28 Jun 2010 20:20:05 +0200 Subject: [PATCH 03/10] started fixing deletion bug in media manager (custom still to be done) --- openlp/plugins/images/lib/mediaitem.py | 11 +++----- openlp/plugins/media/lib/mediaitem.py | 11 ++++---- openlp/plugins/presentations/lib/mediaitem.py | 28 +++++++++++-------- 3 files changed, 26 insertions(+), 24 deletions(-) diff --git a/openlp/plugins/images/lib/mediaitem.py b/openlp/plugins/images/lib/mediaitem.py index 5a8b1969e..c08f530b0 100644 --- a/openlp/plugins/images/lib/mediaitem.py +++ b/openlp/plugins/images/lib/mediaitem.py @@ -119,13 +119,10 @@ class ImageMediaItem(MediaManagerItem): """ if check_item_selected(self.ListView, translate('ImagePlugin.MediaItem', 'You must select an item to delete.')): - items = self.ListView.selectedIndexes() - row_list = [] - for item in items: - row_list.append(item.row()) + row_list = [item.row() for item in self.ListView.selectedIndexes()] row_list.sort(reverse=True) - for item in row_list: - text = self.ListView.item(item) + for row in row_list: + text = self.ListView.item(row) if text: try: os.remove(os.path.join(self.servicePath, @@ -133,7 +130,7 @@ class ImageMediaItem(MediaManagerItem): except OSError: #if not present do not worry pass - self.ListView.takeItem(item) + self.ListView.takeItem(row) SettingsManager.set_list(self.settingsSection, self.settingsSection, self.getFileList()) diff --git a/openlp/plugins/media/lib/mediaitem.py b/openlp/plugins/media/lib/mediaitem.py index b6de22712..64882dd5a 100644 --- a/openlp/plugins/media/lib/mediaitem.py +++ b/openlp/plugins/media/lib/mediaitem.py @@ -143,11 +143,12 @@ class MediaMediaItem(MediaManagerItem): """ if check_item_selected(self.ListView, translate('MediaPlugin.MediaItem', 'You must select an item to delete.')): - item = self.ListView.currentItem() - row = self.ListView.row(item) - self.ListView.takeItem(row) - SettingsManager.set_list(self.settingsSection, - self.settingsSection, self.getFileList()) + row_list = [item.row() for item in self.ListView.selectedIndexes()] + row_list.sort(reverse=True) + for row in row_list: + self.ListView.takeItem(row) + SettingsManager.set_list(self.settingsSection, + self.settingsSection, self.getFileList()) def loadList(self, list): for file in list: diff --git a/openlp/plugins/presentations/lib/mediaitem.py b/openlp/plugins/presentations/lib/mediaitem.py index 384d28c4a..0651e429e 100644 --- a/openlp/plugins/presentations/lib/mediaitem.py +++ b/openlp/plugins/presentations/lib/mediaitem.py @@ -180,18 +180,22 @@ class PresentationMediaItem(MediaManagerItem): if check_item_selected(self.ListView, translate('PresentationPlugin.MediaItem', 'You must select an item to delete.')): - item = self.ListView.currentItem() - row = self.ListView.row(item) - self.ListView.takeItem(row) - SettingsManager.set_list(self.settingsSection, - 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() + items = self.ListView.selectedIndexes() + row_list = [item.row() for item in items] + 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, + self.settingsSection, self.getFileList()) def generateSlideData(self, service_item, item=None): items = self.ListView.selectedIndexes() From 51e07d66df9b232adca69c8f33847c6ce2816fca Mon Sep 17 00:00:00 2001 From: andreas Date: Mon, 28 Jun 2010 21:05:55 +0200 Subject: [PATCH 04/10] fixed deletion bug in media manager (custom, media, images, presentations) --- openlp/plugins/custom/lib/mediaitem.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/openlp/plugins/custom/lib/mediaitem.py b/openlp/plugins/custom/lib/mediaitem.py index a4fb54932..d7bd36d7b 100644 --- a/openlp/plugins/custom/lib/mediaitem.py +++ b/openlp/plugins/custom/lib/mediaitem.py @@ -134,11 +134,14 @@ class CustomMediaItem(MediaManagerItem): if check_item_selected(self.ListView, translate('CustomPlugin.MediaItem', 'You must select an item to delete.')): - item = self.ListView.currentItem() - item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0] - self.parent.custommanager.delete_custom(item_id) - row = self.ListView.row(item) - self.ListView.takeItem(row) + row_list = [item.row() for item in self.ListView.selectedIndexes()] + row_list.sort(reverse=True) + id_list = [(item.data(QtCore.Qt.UserRole)).toInt()[0] + for item in self.ListView.selectedIndexes()] + 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): raw_slides = [] From 68a934de716f2f672b7332c9c26f55204b53bd9a Mon Sep 17 00:00:00 2001 From: andreas Date: Mon, 28 Jun 2010 22:00:35 +0200 Subject: [PATCH 05/10] - small fixes --- openlp/plugins/custom/lib/mediaitem.py | 5 ----- openlp/plugins/images/lib/mediaitem.py | 4 ++-- openlp/plugins/media/lib/mediaitem.py | 4 ++-- openlp/plugins/presentations/lib/mediaitem.py | 4 ++-- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/openlp/plugins/custom/lib/mediaitem.py b/openlp/plugins/custom/lib/mediaitem.py index 1ff229e9d..f2ac04c1b 100644 --- a/openlp/plugins/custom/lib/mediaitem.py +++ b/openlp/plugins/custom/lib/mediaitem.py @@ -144,11 +144,6 @@ class CustomMediaItem(MediaManagerItem): self.parent.custommanager.delete_custom(id) for row in row_list: self.ListView.takeItem(row) - item = self.ListView.currentItem() - item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0] - self.parent.custommanager.delete_object(CustomSlide, item_id) - row = self.ListView.row(item) - self.ListView.takeItem(row) def generateSlideData(self, service_item, item=None): raw_slides = [] diff --git a/openlp/plugins/images/lib/mediaitem.py b/openlp/plugins/images/lib/mediaitem.py index c08f530b0..bcc3a84c4 100644 --- a/openlp/plugins/images/lib/mediaitem.py +++ b/openlp/plugins/images/lib/mediaitem.py @@ -131,8 +131,8 @@ class ImageMediaItem(MediaManagerItem): #if not present do not worry pass self.ListView.takeItem(row) - SettingsManager.set_list(self.settingsSection, - self.settingsSection, self.getFileList()) + SettingsManager.set_list(self.settingsSection, + self.settingsSection, self.getFileList()) def loadList(self, list): for file in list: diff --git a/openlp/plugins/media/lib/mediaitem.py b/openlp/plugins/media/lib/mediaitem.py index 64882dd5a..6cd7b175b 100644 --- a/openlp/plugins/media/lib/mediaitem.py +++ b/openlp/plugins/media/lib/mediaitem.py @@ -147,8 +147,8 @@ class MediaMediaItem(MediaManagerItem): row_list.sort(reverse=True) for row in row_list: self.ListView.takeItem(row) - SettingsManager.set_list(self.settingsSection, - self.settingsSection, self.getFileList()) + SettingsManager.set_list(self.settingsSection, + self.settingsSection, self.getFileList()) def loadList(self, list): for file in list: diff --git a/openlp/plugins/presentations/lib/mediaitem.py b/openlp/plugins/presentations/lib/mediaitem.py index 0651e429e..ee50dd556 100644 --- a/openlp/plugins/presentations/lib/mediaitem.py +++ b/openlp/plugins/presentations/lib/mediaitem.py @@ -194,8 +194,8 @@ class PresentationMediaItem(MediaManagerItem): doc.close_presentation() for row in row_list: self.ListView.takeItem(row) - SettingsManager.set_list(self.settingsSection, - self.settingsSection, self.getFileList()) + SettingsManager.set_list(self.settingsSection, + self.settingsSection, self.getFileList()) def generateSlideData(self, service_item, item=None): items = self.ListView.selectedIndexes() From 4a4da4ba2c0aa44fece27167341cf241d09a7b81 Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Tue, 29 Jun 2010 08:07:03 +0100 Subject: [PATCH 06/10] Naming and docstrings --- openlp/core/theme/theme.py | 2 +- openlp/core/utils/languagemanager.py | 79 ++++++++++++++++++++-------- 2 files changed, 57 insertions(+), 24 deletions(-) diff --git a/openlp/core/theme/theme.py b/openlp/core/theme/theme.py index 2ea13d01b..6cddbcb45 100644 --- a/openlp/core/theme/theme.py +++ b/openlp/core/theme/theme.py @@ -168,7 +168,7 @@ class Theme(object): theme_strings.append(u'_%s_' % (getattr(self, key))) 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 diff --git a/openlp/core/utils/languagemanager.py b/openlp/core/utils/languagemanager.py index e556e7e7c..c0315559f 100644 --- a/openlp/core/utils/languagemanager.py +++ b/openlp/core/utils/languagemanager.py @@ -22,7 +22,10 @@ # with this program; if not, write to the Free Software Foundation, Inc., 59 # # 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 os @@ -42,50 +45,74 @@ class LanguageManager(object): @staticmethod 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: language = QtCore.QLocale.system().name() lang_Path = AppLocation.get_directory(AppLocation.AppDir) lang_Path = os.path.join(lang_Path, u'resources', u'i18n') - appTranslator = QtCore.QTranslator() - if appTranslator.load("openlp_" + language, lang_Path): - return appTranslator + app_translator = QtCore.QTranslator() + if app_translator.load("openlp_" + language, lang_Path): + return app_translator @staticmethod def find_qm_files(): + """ + Find all available language files in this OpenLP install + """ trans_dir = AppLocation.get_directory(AppLocation.AppDir) 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) - for name in fileNames: - fileNames.replaceInStrings(name, trans_dir.filePath(name)) - return fileNames + for name in file_names: + file_names.replaceInStrings(name, trans_dir.filePath(name)) + return file_names @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.load(qmFile) + translator.load(qm_file) return translator.translate('MainWindow', 'English') @staticmethod def get_language(): + """ + Retrieve a saved language to use from settings + """ settings = QtCore.QSettings(u'OpenLP', u'OpenLP') language = unicode(settings.value( u'general/language', QtCore.QVariant(u'[en]')).toString()) log.info(u'Language file: \'%s\' Loaded from conf file' % language) - regEx = QtCore.QRegExp("^\[(.*)\]") - if regEx.exactMatch(language): + reg_ex = QtCore.QRegExp("^\[(.*)\]") + if reg_ex.exactMatch(language): LanguageManager.AutoLanguage = True - language = regEx.cap(1) + language = reg_ex.cap(1) return language @staticmethod 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: - language = u'[%s]' % qmList[actionName] + language = u'[%s]' % qm_list[action_name] else: - language = u'%s' % qmList[actionName] + language = u'%s' % qm_list[action_name] QtCore.QSettings().setValue( u'general/language', QtCore.QVariant(language)) log.info(u'Language file: \'%s\' written to conf file' % language) @@ -96,17 +123,23 @@ class LanguageManager(object): @staticmethod def init_qm_list(): + """ + Initialise the list of available translations + """ LanguageManager.__qmList__ = {} - qmFiles = LanguageManager.find_qm_files() - for i, qmf in enumerate(qmFiles): - regEx = QtCore.QRegExp("^.*openlp_(.*).qm") - if regEx.exactMatch(qmf): - langName = regEx.cap(1) + qm_files = LanguageManager.find_qm_files() + for i, qmf in enumerate(qm_files): + reg_ex = QtCore.QRegExp("^.*openlp_(.*).qm") + if reg_ex.exactMatch(qmf): + lang_name = reg_ex.cap(1) LanguageManager.__qmList__[u'%#2i %s' % (i+1, - LanguageManager.language_name(qmf))] = langName + LanguageManager.language_name(qmf))] = lang_name @staticmethod def get_qm_list(): + """ + Return the list of available translations + """ if LanguageManager.__qmList__ is None: LanguageManager.init_qm_list() return LanguageManager.__qmList__ From 0b8e4f2845d012b5c73e8131361ba3e97170aa99 Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Tue, 29 Jun 2010 11:02:23 +0100 Subject: [PATCH 07/10] Fix filter usage (Fixes theme deletion) --- openlp/plugins/custom/customplugin.py | 2 +- openlp/plugins/songs/songsplugin.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openlp/plugins/custom/customplugin.py b/openlp/plugins/custom/customplugin.py index 7f64aab52..362f8d64c 100644 --- a/openlp/plugins/custom/customplugin.py +++ b/openlp/plugins/custom/customplugin.py @@ -78,7 +78,7 @@ class CustomPlugin(Plugin): return about_text 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, filter_string): return True diff --git a/openlp/plugins/songs/songsplugin.py b/openlp/plugins/songs/songsplugin.py index d128bc6a2..c24352a91 100644 --- a/openlp/plugins/songs/songsplugin.py +++ b/openlp/plugins/songs/songsplugin.py @@ -199,7 +199,7 @@ class SongsPlugin(Plugin): return about_text 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): return True return False From d37b4d1e8db8d3d3a1be4ba2e77dd682401697d3 Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Tue, 29 Jun 2010 16:25:24 +0100 Subject: [PATCH 08/10] Plugin and other docstrings --- openlp/core/lib/renderer.py | 5 ++++- openlp/plugins/alerts/__init__.py | 2 +- openlp/plugins/bibles/__init__.py | 4 ++-- openlp/plugins/custom/__init__.py | 5 +++++ openlp/plugins/images/__init__.py | 4 ++++ openlp/plugins/media/__init__.py | 6 ++++++ openlp/plugins/presentations/__init__.py | 4 ++++ openlp/plugins/remotes/__init__.py | 4 ++++ openlp/plugins/songs/__init__.py | 4 ++++ openlp/plugins/songusage/__init__.py | 5 +++++ openlp/plugins/songusage/forms/songusagedetailform.py | 2 +- openlp/plugins/songusage/lib/manager.py | 4 +++- 12 files changed, 43 insertions(+), 6 deletions(-) diff --git a/openlp/core/lib/renderer.py b/openlp/core/lib/renderer.py index aa8c0a95a..c7f96528c 100644 --- a/openlp/core/lib/renderer.py +++ b/openlp/core/lib/renderer.py @@ -22,7 +22,10 @@ # with this program; if not, write to the Free Software Foundation, Inc., 59 # # 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 from PyQt4 import QtGui, QtCore diff --git a/openlp/plugins/alerts/__init__.py b/openlp/plugins/alerts/__init__.py index cb376ec38..76ca202dd 100644 --- a/openlp/plugins/alerts/__init__.py +++ b/openlp/plugins/alerts/__init__.py @@ -24,5 +24,5 @@ ############################################################################### """ The :mod:`alerts` module provides the Alerts plugin for producing impromptu -on-screen announcements during a service +on-screen announcements during a service. """ diff --git a/openlp/plugins/bibles/__init__.py b/openlp/plugins/bibles/__init__.py index ca5ff7508..2491c4142 100644 --- a/openlp/plugins/bibles/__init__.py +++ b/openlp/plugins/bibles/__init__.py @@ -23,6 +23,6 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### """ -The :mod:`bibles' modules provides the Bible plugin to enable OpenLP to display -scripture +The :mod:`bibles' module provides the Bible plugin to enable OpenLP to display +scripture. """ diff --git a/openlp/plugins/custom/__init__.py b/openlp/plugins/custom/__init__.py index 1a348a0df..2b9a101f1 100644 --- a/openlp/plugins/custom/__init__.py +++ b/openlp/plugins/custom/__init__.py @@ -22,3 +22,8 @@ # with this program; if not, write to the Free Software Foundation, Inc., 59 # # 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. +""" diff --git a/openlp/plugins/images/__init__.py b/openlp/plugins/images/__init__.py index 1a348a0df..58cfb69b5 100644 --- a/openlp/plugins/images/__init__.py +++ b/openlp/plugins/images/__init__.py @@ -22,3 +22,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., 59 # # 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. +""" diff --git a/openlp/plugins/media/__init__.py b/openlp/plugins/media/__init__.py index 1a348a0df..28ea0e960 100644 --- a/openlp/plugins/media/__init__.py +++ b/openlp/plugins/media/__init__.py @@ -22,3 +22,9 @@ # with this program; if not, write to the Free Software Foundation, Inc., 59 # # 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. +""" diff --git a/openlp/plugins/presentations/__init__.py b/openlp/plugins/presentations/__init__.py index 1a348a0df..b7f26b39b 100644 --- a/openlp/plugins/presentations/__init__.py +++ b/openlp/plugins/presentations/__init__.py @@ -22,3 +22,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., 59 # # 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. +""" diff --git a/openlp/plugins/remotes/__init__.py b/openlp/plugins/remotes/__init__.py index 1a348a0df..59b771c0d 100644 --- a/openlp/plugins/remotes/__init__.py +++ b/openlp/plugins/remotes/__init__.py @@ -22,3 +22,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., 59 # # 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. +""" diff --git a/openlp/plugins/songs/__init__.py b/openlp/plugins/songs/__init__.py index 1a348a0df..4cd5537eb 100644 --- a/openlp/plugins/songs/__init__.py +++ b/openlp/plugins/songs/__init__.py @@ -22,3 +22,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., 59 # # 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. +""" diff --git a/openlp/plugins/songusage/__init__.py b/openlp/plugins/songusage/__init__.py index 1a348a0df..adebb7c74 100644 --- a/openlp/plugins/songusage/__init__.py +++ b/openlp/plugins/songusage/__init__.py @@ -22,3 +22,8 @@ # with this program; if not, write to the Free Software Foundation, Inc., 59 # # 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. +""" diff --git a/openlp/plugins/songusage/forms/songusagedetailform.py b/openlp/plugins/songusage/forms/songusagedetailform.py index 3cbe46735..be1b8221c 100644 --- a/openlp/plugins/songusage/forms/songusagedetailform.py +++ b/openlp/plugins/songusage/forms/songusagedetailform.py @@ -42,7 +42,7 @@ class SongUsageDetailForm(QtGui.QDialog, Ui_SongUsageDetailDialog): def __init__(self, parent=None): """ - Constructor + Initialise the form """ QtGui.QDialog.__init__(self, None) self.parent = parent diff --git a/openlp/plugins/songusage/lib/manager.py b/openlp/plugins/songusage/lib/manager.py index 363f06fb8..2c34f3a54 100644 --- a/openlp/plugins/songusage/lib/manager.py +++ b/openlp/plugins/songusage/lib/manager.py @@ -22,7 +22,9 @@ # with this program; if not, write to the Free Software Foundation, Inc., 59 # # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### - +""" +The :mod:`manager` module provides song usage specific database query code +""" import logging from sqlalchemy.exceptions import InvalidRequestError From c0a924e3042e6eddf063c07424b76e70635efcef Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Tue, 29 Jun 2010 17:07:45 +0100 Subject: [PATCH 09/10] Fix service loading --- openlp/core/ui/servicemanager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index 284d9c7e4..1ee0d13a5 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -662,7 +662,7 @@ class ServiceManager(QtGui.QWidget): name = filename.split(os.path.sep) if filename: SettingsManager.set_last_dir(self.parent.serviceSettingsSection, - os.path.split(filename)[0]) + name[0]) zip = None file_to = None try: From 5c4a835dac0f8df18fe32dd40e639ef9135ae104 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Tue, 29 Jun 2010 23:23:56 +0200 Subject: [PATCH 10/10] Added decent images for remotes, alerts and song usage. --- openlp/plugins/alerts/alertsplugin.py | 6 ++-- openlp/plugins/remotes/remoteplugin.py | 5 +-- openlp/plugins/songusage/songusageplugin.py | 4 +-- resources/images/openlp-2.qrc | 33 +++++++++++--------- resources/images/plugin_alerts.png | Bin 0 -> 762 bytes resources/images/plugin_remote.png | Bin 0 -> 830 bytes resources/images/plugin_songusage.png | Bin 0 -> 946 bytes resources/images/song_maintenance.png | Bin 719 -> 516 bytes scripts/generate_resources.sh | 0 9 files changed, 27 insertions(+), 21 deletions(-) create mode 100644 resources/images/plugin_alerts.png create mode 100644 resources/images/plugin_remote.png create mode 100644 resources/images/plugin_songusage.png mode change 100644 => 100755 scripts/generate_resources.sh diff --git a/openlp/plugins/alerts/alertsplugin.py b/openlp/plugins/alerts/alertsplugin.py index b442edc5b..46d4e8cb7 100644 --- a/openlp/plugins/alerts/alertsplugin.py +++ b/openlp/plugins/alerts/alertsplugin.py @@ -41,7 +41,7 @@ class alertsPlugin(Plugin): def __init__(self, plugin_helpers): Plugin.__init__(self, u'Alerts', u'1.9.2', plugin_helpers) 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.manager = Manager(u'alerts', init_schema) self.alertForm = AlertForm(self.manager, self) @@ -65,7 +65,7 @@ class alertsPlugin(Plugin): """ log.info(u'add 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.setObjectName(u'toolsAlertItem') self.toolsAlertItem.setText( @@ -102,4 +102,4 @@ class alertsPlugin(Plugin): about_text = translate('AlertsPlugin', 'Alerts Plugin
This plugin ' 'controls the displaying of alerts on the presentations screen') - return about_text \ No newline at end of file + return about_text diff --git a/openlp/plugins/remotes/remoteplugin.py b/openlp/plugins/remotes/remoteplugin.py index 7004207e4..fad7ecbe8 100644 --- a/openlp/plugins/remotes/remoteplugin.py +++ b/openlp/plugins/remotes/remoteplugin.py @@ -25,7 +25,7 @@ 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 log = logging.getLogger(__name__) @@ -38,6 +38,7 @@ class RemotesPlugin(Plugin): remotes constructor """ Plugin.__init__(self, u'Remotes', u'1.9.2', plugin_helpers) + self.icon = build_icon(u':/plugins/plugin_remote.png') self.weight = -1 self.server = None @@ -74,4 +75,4 @@ class RemotesPlugin(Plugin): 'provides the ability to send messages to a running version of ' 'openlp on a different computer via a web browser or other app
' 'The Primary use for this would be to send alerts from a creche') - return about_text \ No newline at end of file + return about_text diff --git a/openlp/plugins/songusage/songusageplugin.py b/openlp/plugins/songusage/songusageplugin.py index 06687acfe..a9994902a 100644 --- a/openlp/plugins/songusage/songusageplugin.py +++ b/openlp/plugins/songusage/songusageplugin.py @@ -42,7 +42,7 @@ class SongUsagePlugin(Plugin): def __init__(self, plugin_helpers): Plugin.__init__(self, u'SongUsage', u'1.9.2', plugin_helpers) 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.songusageActive = False @@ -76,7 +76,7 @@ class SongUsagePlugin(Plugin): translate('SongUsagePlugin', 'Generate report on Song Usage')) self.SongUsageReport.setObjectName(u'SongUsageReport') #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.setIcon(SongUsageIcon) self.SongUsageStatus.setCheckable(True) diff --git a/resources/images/openlp-2.qrc b/resources/images/openlp-2.qrc index 49309b8d5..ba382e0fd 100644 --- a/resources/images/openlp-2.qrc +++ b/resources/images/openlp-2.qrc @@ -1,5 +1,5 @@ - + topic_edit.png author_add.png author_delete.png @@ -17,7 +17,12 @@ song_topic_edit.png song_book_edit.png - + + plugin_alerts.png + plugin_remote.png + plugin_songusage.png + + general_preview.png general_live.png general_add.png @@ -29,7 +34,7 @@ general_open.png general_save.png - + slide_close.png slide_first.png slide_last.png @@ -42,7 +47,7 @@ media_playback_stop.png media_playback_pause.png - + openlp-logo-16x16.png openlp-logo-32x32.png openlp-logo-48x48.png @@ -50,27 +55,27 @@ openlp-logo-128x128.png openlp-logo-256x256.png - + openlp-about-logo.png openlp-splash-screen.png - + import_selectall.png import_move_to_list.png import_remove.png import_load.png - + export_selectall.png export_remove.png export_load.png export_move_to_list.png - + wizard_importsong.bmp wizard_importbible.bmp - + service_notes.png service_item_notes.png service_bottom.png @@ -78,7 +83,7 @@ service_top.png service_up.png - + system_close.png system_about.png system_help_contents.png @@ -89,7 +94,7 @@ system_exit.png system_settings.png - + media_custom.png media_presentation.png media_image.png @@ -100,16 +105,16 @@ media_stop.png image_clapperboard.png - + messagebox_critical.png messagebox_info.png messagebox_warning.png - + tools_add.png tools_alert.png - + theme_delete.png theme_new.png theme_edit.png diff --git a/resources/images/plugin_alerts.png b/resources/images/plugin_alerts.png new file mode 100644 index 0000000000000000000000000000000000000000..331aa268725a4edff3fa6cab7dfaf5af24708c2c GIT binary patch literal 762 zcmVz8xpUII{8&=iH{wnUDxx6o*XQpr9@S zFA7f~5wyArj)7engn2gzstbkiqQW4^o2U%CF~JzoO$Y@oEjOFGxwX#D=9!*z-Y(o0 zQwbk<`S`x?dETGrWkiIXV2m*U4FEj(r*8lvv=^C(b_IaeKp-$7%W^`Nt(9kFmQEb*nE7Psy^?IqR ztBayjPKwQXiHJy&qz3@_5)S~tZnyVDm%lIP5+5is35raDTrL;6T(06>jn7at{N)#b z6NTa?0O;-Qt@Qi-eRcKC_36+(fN|S~@H}|_-^lXUJE&`DvkeRkTqt;90$|BxGRLp` z`_FAAgHTsr1Ed20I-3=AHY>#hx%don>+f;v=GF56+8JZu1VM0DR8;s+oj!Xq`ROt= zB~%pnI#Td;q)OJLXMdu$eUO)BITH*9=a|Ri@x7aV`>56uZi>(Ll#p-S-98`QF5Pu? z_YC6M`lSYE%SBUFRn<|4v#}`^ewD>Op@g67c8A+32*R;4RaJ9_VQ3cj;Fel`NG<2K z4it!wpY0ZJYUYhH+a;BVtcGD|0MIfrGV&yqO2ufONT<`uv9Yli0FE#K41f(l8-N-B s|?9jsO4v literal 0 HcmV?d00001 diff --git a/resources/images/plugin_remote.png b/resources/images/plugin_remote.png new file mode 100644 index 0000000000000000000000000000000000000000..d70f0f6decbbe811a9e6df6116068284ecdbadb2 GIT binary patch literal 830 zcmV-E1Ht@>P)K~#9!rIUL|Q&Akpe|HbN+nh>dIi}`H)TEdBk4oepJ^ZI3 zRM4OKNQan0fA*I`|MdX%`d}G>&_a4)QV51ksBJhOn=>CQak$Mb^KP=;x$eBX_jIq} z(z3ria5(4p{r%3D59fCdh7f}N49Q+%U8h462d)$_I4j~1hcJHpU=3@8XwYvx! zyXTUl9P_Y9ld3DoRAO0&WFVwHWE5uIVf58Q5mIUVp1!^~`j3IGZBivqm6>mzSLdWD zlECT=3I`dU0y~oFFsxYhVadjs)v^a~ofe9YL+vF^9*$Tdfh`bJcTC-Q@!5wamcpotu)pTTEi&|H zh1OOis_C-5x4S6RXY`_K!d@ZhzX>o*D-CL(zhBm&`0B9I6|XPD1;0K!vL>KgF6NphH%H-(&BCgGCAqWK^dvn338!*RYv z-tyV*Mc{zQnXG)xkOY z3qgPL)!dEj4E*rUHgDB5oMZ1+=6XLl)_lur8*h4>P6u}Vg=bAggFx7VD}ku8zCz=M zJ;uu~E1r1|wZYeVc0QzCv!-)Ow!Jr*ObkH~Az}Z&x$p1%3#G4>BVCt-PXGV_07*qo IM6N<$f?XSWF#rGn literal 0 HcmV?d00001 diff --git a/resources/images/plugin_songusage.png b/resources/images/plugin_songusage.png new file mode 100644 index 0000000000000000000000000000000000000000..bf110aa6dff6cbe89fe174c5e1af42facfd1194d GIT binary patch literal 946 zcmV;j15NyiP)Z zy6Lv7N=dgY`2`^L53r~dDz)8rfhs{mg>0)tRxDcDlEmWx9>DRH@nt^GOwU*aMR}z& zGmCTH@0{m+!#R$F_r-CX2w;q2CK8Fb8~ZadwW~s z0PqwO|0mC_tgJjrCX=)2bUHpcIT=+h&3&P&>UR?p6C;|Yy%GUDd`ene zT)ZpGvcMQ~JAf#P5Cj1n&!f?C@b=n5V*CSXcz8ImzP^5s4wLfvyy6<@)6>%`vmD`A zyT->61@$&iG5P=;GI9_O$e0-)g3l|1y1Ku%w)S#$b#-=YYfIw+Tx2qt2smEn+? zi9aa>GE2<_@L?)TAHO|fv3@24W2tYJDGN0M6*ln`aSsUZV<5%A4Ew&xyEq# z`WnTn9wpm|$K#{XXw(x31RMZ^b)ng8{yQXCwnrBE{F^SuS`I!8`w$=VqGnjQsCUsY zOmw;?0)D?p9ENJOnmrf+80huYrQS$Jy|8SK=!?*sCQ6kayt0FbGd`qZ3Pyt>T5Sfu z-#=6?m#udVF8BBMk3&Q|M2ktsgLp6*fG7YbdI#B)Ci2B=^jII9%|P6wN~L1mGH^j2 z92^uxs?gr{kbBjFR_Q_wN^s!{ltpXCd9??<-b1NW5~|fI69rzly~?3b=xgoG`PMHl z8kinY;0%myjQ9nNha_~(K1u|#)#-qpK66xWk^A|l@BbP=yaCzmwC(7yhmWZWv2bu& zX`@_cIIFrWctq}qP!$J1?i5+4l97MSw!XPFa6z7(mYPhOy7T*S9qB|6$thYT57@R1 zSFKiy{c&`pXR^i;D2C8}1$^N@vq5d-pTkl^zs}z}fzScS% z>PW{r(MThm=vYTO)aKFC`yiyYcW;!1zdRlg3<4 ztl5=$QW!wFB!4JlnqrM}eosXTTtyJ3Jj#GRO|@za*QLP*AtjU)89WQ5*n;*Sb4Z7KEYjr!A>1robFOsq=|46%N{= z+Bh1t3lDShTydy&0zcT^1Pf0{UR5;6x zlU+#DaTJDM-P%UkY-CKckux@^Eh@yhX-x+~(T(B4+!kRMqJKhJUDQ>n7|X1S8niV< zLTW-J?8BNd4P0|uV30;%OqjAJmJLIlbN1i-|GLR5W!roIyyw7qP8KqV!SG0?R4Q9( zLLXaRURsJoA~v^sw9{nlUP%k9Yt=_)W~O5_O_PN`3&ixqn9%ApALWX&vP_2K>a`Z* z{O?~R9$zJ1?|)bfz!?BL0Av9`b{d`uKruTz3yPw^j5Z=LXoiO zfP&gTd+3sR|e+B_;LlcV4hK+u`x~F){H8f`38*a&x)7z*Jz}^4wzFvLJ6y zUiR>aOJAWVuhi7l!t3+n=wS)gs5LN{41_{I{?=c-WLR8W?Aru4H8skJ}+@P zog|q|5ZAD4wfb!JcU4uTjmP8N2A~4K+63$M9m0_j*QD8OBIOn3#53k0{rwg{fC>P+ z{$FM5w10QBowPfwkt;2i2|u4tjHbuLG3fXVK$y;z?AG>M*PmJXs5;Gg!sT*FLt_JZ z?R+&~P>?TAYueq;J2%ZeCZf}6i9{kHHRo!G)jklH$x1aFwxu+U&*wKqSC&B~k|YPlY}l5vfW>A95z7)DKOqN)!#gGp`(W?T(3|@Jl9~Jpb8hZuGeCDo oqtX1YU%tJtSsf1ntRlnw1491o=%O}YqW}N^07*qoM6N<$g1%xuXaE2J diff --git a/scripts/generate_resources.sh b/scripts/generate_resources.sh old mode 100644 new mode 100755