From 6d98d4b1258e084ea16296eabca641ed773097ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20K=C3=B6hler?= Date: Mon, 12 Mar 2012 06:48:14 +0100 Subject: [PATCH 01/42] add possibility to change bible meta data and the possibility to change the preferred bible language per bible - including first steps to edit the book names of the bible --- openlp/plugins/bibles/forms/__init__.py | 3 +- .../plugins/bibles/forms/editbibledialog.py | 171 ++++++++++++++++++ openlp/plugins/bibles/forms/editbibleform.py | 151 ++++++++++++++++ openlp/plugins/bibles/lib/db.py | 33 ++++ openlp/plugins/bibles/lib/manager.py | 52 +++++- openlp/plugins/bibles/lib/mediaitem.py | 37 +++- 6 files changed, 435 insertions(+), 12 deletions(-) create mode 100644 openlp/plugins/bibles/forms/editbibledialog.py create mode 100644 openlp/plugins/bibles/forms/editbibleform.py diff --git a/openlp/plugins/bibles/forms/__init__.py b/openlp/plugins/bibles/forms/__init__.py index 89bfbfff3..86f28592d 100644 --- a/openlp/plugins/bibles/forms/__init__.py +++ b/openlp/plugins/bibles/forms/__init__.py @@ -55,6 +55,7 @@ from booknameform import BookNameForm from languageform import LanguageForm from bibleimportform import BibleImportForm from bibleupgradeform import BibleUpgradeForm +from editbibleform import EditBibleForm __all__ = [u'BookNameForm', u'LanguageForm', u'BibleImportForm', - u'BibleUpgradeForm'] + u'BibleUpgradeForm', u'EditBibleForm'] diff --git a/openlp/plugins/bibles/forms/editbibledialog.py b/openlp/plugins/bibles/forms/editbibledialog.py new file mode 100644 index 000000000..ce64e90c9 --- /dev/null +++ b/openlp/plugins/bibles/forms/editbibledialog.py @@ -0,0 +1,171 @@ +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 + +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2012 Raoul Snyman # +# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan # +# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, # +# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias # +# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, # +# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### + +from PyQt4 import QtCore, QtGui + +from openlp.core.lib import build_icon, translate +from openlp.core.lib.ui import UiStrings, create_accept_reject_button_box +from openlp.plugins.bibles.lib import LanguageSelection, BibleStrings +from openlp.plugins.bibles.lib.db import BiblesResourcesDB + + +class Ui_EditBibleDialog(object): + def setupUi(self, editBibleDialog): + editBibleDialog.setObjectName(u'editBibleDialog') + editBibleDialog.resize(650, 400) + editBibleDialog.setWindowIcon( + build_icon(u':/icon/openlp-logo-16x16.png')) + editBibleDialog.setModal(True) + self.dialogLayout = QtGui.QVBoxLayout(editBibleDialog) + self.dialogLayout.setSpacing(8) + self.dialogLayout.setContentsMargins(8, 8, 8, 8) + self.dialogLayout.setObjectName(u'dialogLayout') + self.bibleTabWidget = QtGui.QTabWidget(editBibleDialog) + self.bibleTabWidget.setObjectName(u'BibleTabWidget') + # Meta tab + self.metaTab = QtGui.QWidget() + self.metaTab.setObjectName(u'metaTab') + self.metaTabLayout = QtGui.QFormLayout(self.metaTab) + self.metaTabLayout.setObjectName(u'metaTabLayout') + self.versionNameLabel = QtGui.QLabel(self.metaTab) + self.versionNameLabel.setObjectName(u'versionNameLabel') + self.metaTabLayout.setWidget(0, QtGui.QFormLayout.LabelRole, + self.versionNameLabel) + self.versionNameEdit = QtGui.QLineEdit(self.metaTab) + self.versionNameEdit.setObjectName(u'versionNameEdit') + self.versionNameLabel.setBuddy(self.versionNameEdit) + self.metaTabLayout.setWidget(0, QtGui.QFormLayout.FieldRole, + self.versionNameEdit) + self.copyrightLabel = QtGui.QLabel(self.metaTab) + self.copyrightLabel.setObjectName(u'copyrightLabel') + self.metaTabLayout.setWidget(1, QtGui.QFormLayout.LabelRole, + self.copyrightLabel) + self.copyrightEdit = QtGui.QLineEdit(self.metaTab) + self.copyrightEdit.setObjectName(u'copyrightEdit') + self.copyrightLabel.setBuddy(self.copyrightEdit) + self.metaTabLayout.setWidget(1, QtGui.QFormLayout.FieldRole, + self.copyrightEdit) + self.permissionsLabel = QtGui.QLabel(self.metaTab) + self.permissionsLabel.setObjectName(u'permissionsLabel') + self.metaTabLayout.setWidget(2, QtGui.QFormLayout.LabelRole, + self.permissionsLabel) + self.permissionsEdit = QtGui.QLineEdit(self.metaTab) + self.permissionsEdit.setObjectName(u'permissionsEdit') + self.permissionsLabel.setBuddy(self.permissionsEdit) + self.metaTabLayout.setWidget(2, QtGui.QFormLayout.FieldRole, + self.permissionsEdit) + self.languageSelectionLabel = QtGui.QLabel(self.metaTab) + self.languageSelectionLabel.setObjectName(u'languageSelectionLabel') + self.metaTabLayout.setWidget(3, QtGui.QFormLayout.LabelRole, + self.languageSelectionLabel) + self.languageSelectionComboBox = QtGui.QComboBox(self.metaTab) + self.languageSelectionComboBox.setObjectName( + u'languageSelectionComboBox') + self.languageSelectionComboBox.addItems([u'', u'', u'', u'']) + self.metaTabLayout.setWidget(3, QtGui.QFormLayout.FieldRole, + self.languageSelectionComboBox) + self.bibleTabWidget.addTab(self.metaTab, u'') + # Book name tab + self.bookNameTab = QtGui.QWidget() + self.bookNameTab.setObjectName(u'bookNameTab') + self.bookNameTabLayout = QtGui.QHBoxLayout(self.bookNameTab) + self.bookNameTabLayout.setObjectName(u'bookNameTabLayout') + self.scrollArea = QtGui.QScrollArea(self.bookNameTab) + self.scrollArea.setWidgetResizable(True) + self.scrollArea.setObjectName(u'scrollArea') + self.scrollArea.setHorizontalScrollBarPolicy( + QtCore.Qt.ScrollBarAlwaysOff) + self.bookNameGroupBox = QtGui.QWidget(self.scrollArea) + self.bookNameGroupBox.setObjectName(u'bookNameGroupBox') + self.bookNameGroupBoxLayout = QtGui.QFormLayout(self.bookNameGroupBox) + self.bookNameGroupBoxLayout.setObjectName(u'bookNameGroupBoxLayout') + self.bookNameLabel = {} + self.bookNameEdit= {} + x = 0 + for book in BiblesResourcesDB.get_books(): + self.bookNameLabel[book[u'abbreviation']] = QtGui.QLabel( + self.bookNameGroupBox) + self.bookNameLabel[book[u'abbreviation']].setObjectName( + u'bookNameLabel[%s]' % book[u'abbreviation']) + self.bookNameGroupBoxLayout.setWidget(x, + QtGui.QFormLayout.LabelRole, + self.bookNameLabel[book[u'abbreviation']]) + self.bookNameEdit[book[u'abbreviation']] = QtGui.QLineEdit( + self.bookNameGroupBox) + self.bookNameEdit[book[u'abbreviation']].setObjectName( + u'bookNameEdit[%s]' % book[u'abbreviation']) + self.bookNameGroupBoxLayout.setWidget(x, + QtGui.QFormLayout.FieldRole, + self.bookNameEdit[book[u'abbreviation']]) + x = x+1 + self.scrollArea.setWidget(self.bookNameGroupBox) + self.bookNameTabLayout.addWidget(self.scrollArea) + self.bibleTabWidget.addTab(self.bookNameTab, u'') + # Last few bits + self.dialogLayout.addWidget(self.bibleTabWidget) + self.buttonBox = create_accept_reject_button_box(editBibleDialog) + self.dialogLayout.addWidget(self.buttonBox) + self.retranslateUi(editBibleDialog) + QtCore.QMetaObject.connectSlotsByName(editBibleDialog) + + + def retranslateUi(self, editBibleDialog): + self.booknames = BibleStrings().Booknames + editBibleDialog.setWindowTitle( + translate('BiblesPlugin.EditBibleForm', 'Song Editor')) + self.bibleTabWidget.setTabText( + self.bibleTabWidget.indexOf(self.metaTab), + translate('SongsPlugin.EditBibleForm', 'License Details')) + self.versionNameLabel.setText( + translate('BiblesPlugin.EditBibleForm', 'Version name:')) + self.copyrightLabel.setText( + translate('BiblesPlugin.EditBibleForm', 'Copyright:')) + self.permissionsLabel.setText( + translate('BiblesPlugin.EditBibleForm', 'Permissions:')) + self.bibleTabWidget.setTabText( + self.bibleTabWidget.indexOf(self.bookNameTab), + translate('SongsPlugin.EditBibleForm', 'Custom Book Names')) + self.languageSelectionLabel.setText( + translate('BiblesPlugin.EditBibleForm', 'Bookname language:')) + self.languageSelectionComboBox.setItemText(0, + translate('BiblesPlugin.EditBibleForm', 'General Settings')) + self.languageSelectionComboBox.setItemText(LanguageSelection.Bible+1, + translate('BiblesPlugin.EditBibleForm', 'Bible language')) + self.languageSelectionComboBox.setItemText( + LanguageSelection.Application+1, + translate('BiblesPlugin.EditBibleForm', 'Application language')) + self.languageSelectionComboBox.setItemText(LanguageSelection.English+1, + translate('BiblesPlugin.EditBibleForm', 'English')) + self.languageSelectionComboBox.setToolTip( + translate('BiblesPlugin.EditBibleForm', 'Multiple options:\n ' + 'General Settings - the option choosen in settings section\n' + 'Bible language - the language in which the bible book names ' + 'was imported\n Application language - the language you have ' + 'choosen for Openlp\n English - use always English booknames')) + for book in BiblesResourcesDB.get_books(): + self.bookNameLabel[book[u'abbreviation']].setText( + u'%s:' % unicode(self.booknames[book[u'abbreviation']])) diff --git a/openlp/plugins/bibles/forms/editbibleform.py b/openlp/plugins/bibles/forms/editbibleform.py new file mode 100644 index 000000000..27ec0e3a6 --- /dev/null +++ b/openlp/plugins/bibles/forms/editbibleform.py @@ -0,0 +1,151 @@ +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 + +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2012 Raoul Snyman # +# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan # +# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, # +# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias # +# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, # +# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### + +import logging + +from PyQt4 import QtCore, QtGui + +from openlp.core.lib import PluginStatus, Receiver, MediaType, translate, \ + create_separated_list +from openlp.core.lib.ui import UiStrings, critical_error_message_box +from openlp.core.utils import AppLocation +from editbibledialog import Ui_EditBibleDialog +from openlp.plugins.bibles.lib.db import BibleDB, BibleMeta, BiblesResourcesDB + +log = logging.getLogger(__name__) + +class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): + """ + Class to manage the editing of a bible + """ + log.info(u'%s EditBibleForm loaded', __name__) + + def __init__(self, mediaitem, parent, manager): + """ + Constructor + """ + QtGui.QDialog.__init__(self, parent) + self.mediaitem = mediaitem + + # can this be automated? + self.width = 400 + self.setupUi(self) + self.manager = manager + + def loadBible(self, bible): + """ + Loads a bible. + + ``bible`` + The name of the bible. + """ + log.debug(u'Load Bible') + self.bible = bible + self.versionNameEdit.setText( + self.manager.get_meta_data(self.bible, u'Version').value) + self.copyrightEdit.setText( + self.manager.get_meta_data(self.bible, u'Copyright').value) + self.permissionsEdit.setText( + self.manager.get_meta_data(self.bible, u'Permissions').value) + self.bookname_language = self.manager.get_meta_data( + self.bible, u'Bookname language') + if self.bookname_language: + self.languageSelectionComboBox.setCurrentIndex( + int(self.bookname_language.value)+1) + self.books = {} + for book in BiblesResourcesDB.get_books(): + self.books[book[u'abbreviation']] = self.manager.get_book_by_id( + self.bible, book[u'id']) + if self.books[book[u'abbreviation']]: + self.bookNameEdit[book[u'abbreviation']].setText( + self.books[book[u'abbreviation']].custom_name) + else: + self.bookNameGroupBoxLayout.removeWidget( + self.bookNameLabel[book[u'abbreviation']]) + self.bookNameLabel[book[u'abbreviation']].setParent(None) + self.bookNameGroupBoxLayout.removeWidget( + self.bookNameEdit[book[u'abbreviation']]) + self.bookNameEdit[book[u'abbreviation']].setParent(None) + + def reject(self): + """ + Exit Dialog and do not save + """ + log.debug (u'BibleEditForm.reject') + self.bible = None + QtGui.QDialog.reject(self) + + def accept(self): + """ + Exit Dialog and save data + """ + log.debug(u'BibleEditForm.accept') + self.version = unicode(self.versionNameEdit.text()) + self.copyright = unicode(self.copyrightEdit.text()) + self.permissions = unicode(self.permissionsEdit.text()) + self.bookname_language = \ + self.languageSelectionComboBox.currentIndex()-1 + if self.validateInput(): + self.manager.update_meta_data(self.bible, self.version, + self.copyright, self.permissions, self.bookname_language) + for abbr, book in self.books.iteritems(): + if book: + custom_name = unicode(self.bookNameEdit[abbr].text()) + if book.custom_name != custom_name: + book.custom_name = custom_name + self.manager.update_book(self.bible, book) + self.bible = None + QtGui.QDialog.accept(self) + + def validateInput(self): + """ + Validate the Input before saving. + """ + if not self.version: + critical_error_message_box(UiStrings().EmptyField, + translate('BiblesPlugin.BibleEditForm', + 'You need to specify a version name for your Bible.')) + self.versionNameEdit.setFocus() + return False + elif not self.copyright: + critical_error_message_box(UiStrings().EmptyField, + translate('BiblesPlugin.BibleEditForm', + 'You need to set a copyright for your Bible. ' + 'Bibles in the Public Domain need to be marked as such.')) + self.copyrightEdit.setFocus() + return False + elif self.manager.exists(self.version) and \ + self.manager.get_meta_data(self.bible, u'Version').value != \ + self.version: + critical_error_message_box( + translate('BiblesPlugin.BibleEditForm', 'Bible Exists'), + translate('BiblesPlugin.BibleEditForm', + 'This Bible already exists. Please import ' + 'a different Bible or first delete the existing one.')) + self.versionNameEdit.setFocus() + return False + return True diff --git a/openlp/plugins/bibles/lib/db.py b/openlp/plugins/bibles/lib/db.py index b419bebc0..e7b30c01a 100644 --- a/openlp/plugins/bibles/lib/db.py +++ b/openlp/plugins/bibles/lib/db.py @@ -81,6 +81,7 @@ def init_schema(url): Column(u'book_reference_id', types.Integer, index=True), Column(u'testament_reference_id', types.Integer), Column(u'name', types.Unicode(50), index=True), + #Column(u'custom_name', types.Unicode(50), index=True), ) verse_table = Table(u'verse', metadata, Column(u'id', types.Integer, primary_key=True, index=True), @@ -205,6 +206,18 @@ class BibleDB(QtCore.QObject, Manager): self.save_object(book) return book + def update_book(self, book): + """ + Update a book in the database. + + ``book`` + The book object + """ + log.debug(u'BibleDB.update_book("%s")', book.name) + if self.save_object(book): + return True + return False + def delete_book(self, db_book): """ Delete a book from the database. @@ -286,6 +299,26 @@ class BibleDB(QtCore.QObject, Manager): log.debug(u'BibleDB.save_meta("%s/%s")', key, value) self.save_object(BibleMeta.populate(key=key, value=value)) + def update_meta(self, key, value): + """ + Utility method to update BibleMeta objects in a Bible database. + + ``key`` + The key for this instance. + + ``value`` + The value for this instance. + """ + if not isinstance(value, unicode): + value = unicode(value) + log.debug(u'BibleDB.update_meta("%s/%s")', key, value) + meta = self.get_object(BibleMeta, key) + if meta: + meta.value = value + self.save_object(meta) + else: + self.save_object(BibleMeta.populate(key=key, value=value)) + def get_book(self, book): """ Return a book object from the database. diff --git a/openlp/plugins/bibles/lib/manager.py b/openlp/plugins/bibles/lib/manager.py index c9f564b2c..46cfae6b8 100644 --- a/openlp/plugins/bibles/lib/manager.py +++ b/openlp/plugins/bibles/lib/manager.py @@ -31,7 +31,8 @@ import os from PyQt4 import QtCore from openlp.core.lib import Receiver, SettingsManager, translate -from openlp.core.lib.ui import critical_error_message_box +from openlp.core.lib.ui import critical_error_message_box, \ + create_accept_reject_button_box from openlp.core.utils import AppLocation, delete_file from openlp.plugins.bibles.lib import parse_reference, \ get_reference_separator, LanguageSelection @@ -141,13 +142,14 @@ class BibleManager(object): BibleDB class. """ log.debug(u'Reload bibles') - files = SettingsManager.get_files(self.settingsSection, self.suffix) - if u'alternative_book_names.sqlite' in files: - files.remove(u'alternative_book_names.sqlite') - log.debug(u'Bible Files %s', files) + self.files = SettingsManager.get_files(self.settingsSection, + self.suffix) + if u'alternative_book_names.sqlite' in self.files: + self.files.remove(u'alternative_book_names.sqlite') + log.debug(u'Bible Files %s', self.files) self.db_cache = {} self.old_bible_databases = [] - for filename in files: + for filename in self.files: bible = BibleDB(self.parent, path=self.path, file=filename) name = bible.get_name() # Remove corrupted files. @@ -204,6 +206,22 @@ class BibleManager(object): self.db_cache[name] = importer return importer + def delete_bible(self, name): + """ + Delete a bible completly. + + ``name`` + The name of the bible. + """ + for filename in self.files: + bible = BibleDB(self.parent, path=self.path, file=filename) + # Remove the bible files + if name == bible.get_name(): + bible.session.close() + if delete_file(os.path.join(self.path, filename)): + return True + return False + def get_bibles(self): """ Returns a dict with all available Bibles. @@ -400,18 +418,38 @@ class BibleManager(object): """ Saves the bibles meta data. """ - log.debug(u'save_meta data %s,%s, %s,%s', + log.debug(u'save_meta data %s, %s, %s, %s', bible, version, copyright, permissions) self.db_cache[bible].create_meta(u'Version', version) self.db_cache[bible].create_meta(u'Copyright', copyright) self.db_cache[bible].create_meta(u'Permissions', permissions) + def update_meta_data(self, bible, version, copyright, permissions, + bookname_language): + """ + Saves the bibles meta data. + """ + log.debug(u'update_meta data %s, %s, %s, %s', + bible, version, copyright, permissions) + self.db_cache[bible].update_meta(u'Version', version) + self.db_cache[bible].update_meta(u'Copyright', copyright) + self.db_cache[bible].update_meta(u'Permissions', permissions) + self.db_cache[bible].update_meta(u'Bookname language', + bookname_language) + def get_meta_data(self, bible, key): """ Returns the meta data for a given key. """ log.debug(u'get_meta %s,%s', bible, key) return self.db_cache[bible].get_object(BibleMeta, key) + + def update_book(self, bible, book): + """ + Update a book of the bible. + """ + log.debug(u'BibleManager.update_book("%s", "%s")', bible, book.name) + self.db_cache[bible].update_book(book) def exists(self, name): """ diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py index 976ff6106..980d8d94d 100644 --- a/openlp/plugins/bibles/lib/mediaitem.py +++ b/openlp/plugins/bibles/lib/mediaitem.py @@ -36,9 +36,10 @@ from openlp.core.lib.searchedit import SearchEdit from openlp.core.lib.ui import UiStrings, add_widget_completer, \ media_item_combo_box, critical_error_message_box, \ find_and_set_in_combo_box, build_icon -from openlp.plugins.bibles.forms import BibleImportForm +from openlp.plugins.bibles.forms import BibleImportForm, EditBibleForm from openlp.plugins.bibles.lib import LayoutStyle, DisplayStyle, \ - VerseReferenceList, get_reference_separator, LanguageSelection, BibleStrings + VerseReferenceList, get_reference_separator, LanguageSelection, \ + BibleStrings from openlp.plugins.bibles.lib.db import BiblesResourcesDB log = logging.getLogger(__name__) @@ -109,8 +110,8 @@ class BibleMediaItem(MediaManagerItem): MediaManagerItem.requiredIcons(self) self.hasImportIcon = True self.hasNewIcon = False - self.hasEditIcon = False - self.hasDeleteIcon = False + self.hasEditIcon = True + self.hasDeleteIcon = True self.addToServiceItem = False def addSearchTab(self, prefix, name): @@ -532,6 +533,34 @@ class BibleMediaItem(MediaManagerItem): if self.import_wizard.exec_(): self.reloadBibles() + def onEditClick(self): + if self.quickTab.isVisible(): + bible = unicode(self.quickVersionComboBox.currentText()) + elif self.advancedTab.isVisible(): + bible = unicode(self.advancedVersionComboBox.currentText()) + if bible != u'': + self.editBibleForm = EditBibleForm(self, self.plugin.formparent, + self.plugin.manager) + self.editBibleForm.loadBible(bible) + if self.editBibleForm.exec_(): + self.reloadBibles() + + def onDeleteClick(self): + if self.quickTab.isVisible(): + bible = unicode(self.quickVersionComboBox.currentText()) + elif self.advancedTab.isVisible(): + bible = unicode(self.advancedVersionComboBox.currentText()) + if bible != u'': + if QtGui.QMessageBox.question(self, UiStrings().ConfirmDelete, + unicode(translate('BiblesPlugin.MediaItem', + 'Are you sure you want to delete "%s"?')) % bible, + QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Yes | + QtGui.QMessageBox.No), + QtGui.QMessageBox.Yes) == QtGui.QMessageBox.No: + return + self.plugin.manager.delete_bible(bible) + self.reloadBibles() + def onSearchTabBarCurrentChanged(self, index): if index == 0: self.advancedTab.setVisible(False) From 12458c0d31ec3c246d1475e6ba495113fb37a2d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20K=C3=B6hler?= Date: Wed, 21 Mar 2012 21:57:07 +0100 Subject: [PATCH 02/42] add possibility to switch book names for each bible --- .../plugins/bibles/forms/bibleupgradeform.py | 6 +- .../plugins/bibles/forms/editbibledialog.py | 15 ++- openlp/plugins/bibles/forms/editbibleform.py | 113 ++++++++++++++---- openlp/plugins/bibles/lib/db.py | 23 +--- openlp/plugins/bibles/lib/http.py | 12 +- openlp/plugins/bibles/lib/manager.py | 22 +--- openlp/plugins/bibles/lib/mediaitem.py | 19 +-- openlp/plugins/bibles/lib/osis.py | 2 +- 8 files changed, 132 insertions(+), 80 deletions(-) diff --git a/openlp/plugins/bibles/forms/bibleupgradeform.py b/openlp/plugins/bibles/forms/bibleupgradeform.py index 7c7f14979..b7ba01711 100644 --- a/openlp/plugins/bibles/forms/bibleupgradeform.py +++ b/openlp/plugins/bibles/forms/bibleupgradeform.py @@ -415,7 +415,7 @@ class BibleUpgradeForm(OpenLPWizard): meta_data[meta[u'key']] = meta[u'value'] if not meta[u'key'] == u'Version' and not meta[u'key'] == \ u'dbversion': - self.newbibles[number].create_meta(meta[u'key'], + self.newbibles[number].save_meta(meta[u'key'], meta[u'value']) if meta[u'key'] == u'download source': webbible = True @@ -455,7 +455,7 @@ class BibleUpgradeForm(OpenLPWizard): meta_data[u'download source'].lower()) if bible and bible[u'language_id']: language_id = bible[u'language_id'] - self.newbibles[number].create_meta(u'language_id', + self.newbibles[number].save_meta(u'language_id', language_id) else: language_id = self.newbibles[number].get_language(name) @@ -574,7 +574,7 @@ class BibleUpgradeForm(OpenLPWizard): self.progressBar.maximum() - self.progressBar.value()) else: self.success[number] = True - self.newbibles[number].create_meta(u'Version', name) + self.newbibles[number].save_meta(u'Version', name) self.incrementProgressBar(unicode(translate( 'BiblesPlugin.UpgradeWizardForm', 'Upgrading Bible %s of %s: "%s"\n' diff --git a/openlp/plugins/bibles/forms/editbibledialog.py b/openlp/plugins/bibles/forms/editbibledialog.py index ce64e90c9..c2596ddab 100644 --- a/openlp/plugins/bibles/forms/editbibledialog.py +++ b/openlp/plugins/bibles/forms/editbibledialog.py @@ -92,8 +92,11 @@ class Ui_EditBibleDialog(object): # Book name tab self.bookNameTab = QtGui.QWidget() self.bookNameTab.setObjectName(u'bookNameTab') - self.bookNameTabLayout = QtGui.QHBoxLayout(self.bookNameTab) + self.bookNameTabLayout = QtGui.QVBoxLayout(self.bookNameTab) self.bookNameTabLayout.setObjectName(u'bookNameTabLayout') + self.bookNameNotice = QtGui.QLabel(self.bookNameTab) + self.bookNameNotice.setObjectName(u'bookNameNotice') + self.bookNameTabLayout.addWidget(self.bookNameNotice) self.scrollArea = QtGui.QScrollArea(self.bookNameTab) self.scrollArea.setWidgetResizable(True) self.scrollArea.setObjectName(u'scrollArea') @@ -124,6 +127,9 @@ class Ui_EditBibleDialog(object): x = x+1 self.scrollArea.setWidget(self.bookNameGroupBox) self.bookNameTabLayout.addWidget(self.scrollArea) + self.spacer = QtGui.QSpacerItem(20, 5, QtGui.QSizePolicy.Minimum, + QtGui.QSizePolicy.Expanding) + self.bookNameTabLayout.addItem(self.spacer) self.bibleTabWidget.addTab(self.bookNameTab, u'') # Last few bits self.dialogLayout.addWidget(self.bibleTabWidget) @@ -131,7 +137,6 @@ class Ui_EditBibleDialog(object): self.dialogLayout.addWidget(self.buttonBox) self.retranslateUi(editBibleDialog) QtCore.QMetaObject.connectSlotsByName(editBibleDialog) - def retranslateUi(self, editBibleDialog): self.booknames = BibleStrings().Booknames @@ -163,9 +168,9 @@ class Ui_EditBibleDialog(object): self.languageSelectionComboBox.setToolTip( translate('BiblesPlugin.EditBibleForm', 'Multiple options:\n ' 'General Settings - the option choosen in settings section\n' - 'Bible language - the language in which the bible book names ' - 'was imported\n Application language - the language you have ' - 'choosen for Openlp\n English - use always English booknames')) + 'Bible language - the language in which the Bible book names ' + 'were imported\n Application language - the language you have ' + 'chosen for OpenLP\n English - always use English book names')) for book in BiblesResourcesDB.get_books(): self.bookNameLabel[book[u'abbreviation']].setText( u'%s:' % unicode(self.booknames[book[u'abbreviation']])) diff --git a/openlp/plugins/bibles/forms/editbibleform.py b/openlp/plugins/bibles/forms/editbibleform.py index 27ec0e3a6..2af4f5726 100644 --- a/openlp/plugins/bibles/forms/editbibleform.py +++ b/openlp/plugins/bibles/forms/editbibleform.py @@ -34,6 +34,7 @@ from openlp.core.lib import PluginStatus, Receiver, MediaType, translate, \ from openlp.core.lib.ui import UiStrings, critical_error_message_box from openlp.core.utils import AppLocation from editbibledialog import Ui_EditBibleDialog +from openlp.plugins.bibles.lib import BibleStrings from openlp.plugins.bibles.lib.db import BibleDB, BibleMeta, BiblesResourcesDB log = logging.getLogger(__name__) @@ -50,7 +51,8 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): """ QtGui.QDialog.__init__(self, parent) self.mediaitem = mediaitem - + self.validate_error = [] + self.booknames = BibleStrings().Booknames # can this be automated? self.width = 400 self.setupUi(self) @@ -77,19 +79,31 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): self.languageSelectionComboBox.setCurrentIndex( int(self.bookname_language.value)+1) self.books = {} - for book in BiblesResourcesDB.get_books(): - self.books[book[u'abbreviation']] = self.manager.get_book_by_id( - self.bible, book[u'id']) - if self.books[book[u'abbreviation']]: - self.bookNameEdit[book[u'abbreviation']].setText( - self.books[book[u'abbreviation']].custom_name) - else: - self.bookNameGroupBoxLayout.removeWidget( - self.bookNameLabel[book[u'abbreviation']]) - self.bookNameLabel[book[u'abbreviation']].setParent(None) - self.bookNameGroupBoxLayout.removeWidget( - self.bookNameEdit[book[u'abbreviation']]) - self.bookNameEdit[book[u'abbreviation']].setParent(None) + self.webbible = self.manager.get_meta_data(self.bible, u'download source') + if self.webbible: + self.bookNameNotice.setText(translate('BiblesPlugin.EditBibleForm', + 'This is a webbible.\nIt is not possible to customize the Book ' + 'Names.')) + self.bookNameTabLayout.removeWidget(self.scrollArea) + self.scrollArea.setParent(None) + else: + self.bookNameNotice.setText(translate('BiblesPlugin.EditBibleForm', + 'You could customize the Book Names of this Bible.\nTo use ' + 'the Book Names below, you have to choose the option "Bible ' + 'language" in general settings or explicit for this Bible.')) + for book in BiblesResourcesDB.get_books(): + self.books[book[u'abbreviation']] = self.manager.get_book_by_id( + self.bible, book[u'id']) + if self.books[book[u'abbreviation']] and not self.webbible: + self.bookNameEdit[book[u'abbreviation']].setText( + self.books[book[u'abbreviation']].name) + else: + self.bookNameGroupBoxLayout.removeWidget( + self.bookNameLabel[book[u'abbreviation']]) + self.bookNameLabel[book[u'abbreviation']].setParent(None) + self.bookNameGroupBoxLayout.removeWidget( + self.bookNameEdit[book[u'abbreviation']]) + self.bookNameEdit[book[u'abbreviation']].setParent(None) def reject(self): """ @@ -104,26 +118,40 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): Exit Dialog and save data """ log.debug(u'BibleEditForm.accept') + save = True self.version = unicode(self.versionNameEdit.text()) self.copyright = unicode(self.copyrightEdit.text()) self.permissions = unicode(self.permissionsEdit.text()) self.bookname_language = \ self.languageSelectionComboBox.currentIndex()-1 - if self.validateInput(): - self.manager.update_meta_data(self.bible, self.version, - self.copyright, self.permissions, self.bookname_language) + if not self.validateMeta(): + save = False + if not self.webbible and save: + custom_names = {} + for error in self.validate_error: + self.changeBackgroundColor(error, 'white') for abbr, book in self.books.iteritems(): if book: - custom_name = unicode(self.bookNameEdit[abbr].text()) - if book.custom_name != custom_name: - book.custom_name = custom_name - self.manager.update_book(self.bible, book) + custom_names[abbr] = unicode(self.bookNameEdit[abbr].text()) + if book.name != custom_names[abbr]: + if not self.validateBook(custom_names[abbr], abbr): + save = False + break + if save: + self.manager.save_meta_data(self.bible, self.version, + self.copyright, self.permissions, self.bookname_language) + if not self.webbible: + for abbr, book in self.books.iteritems(): + if book: + if book.name != custom_names[abbr]: + book.name = custom_names[abbr] + self.manager.update_book(self.bible, book) self.bible = None QtGui.QDialog.accept(self) - def validateInput(self): + def validateMeta(self): """ - Validate the Input before saving. + Validate the Meta before saving. """ if not self.version: critical_error_message_box(UiStrings().EmptyField, @@ -149,3 +177,42 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): self.versionNameEdit.setFocus() return False return True + + def validateBook(self, new_bookname, abbreviation): + """ + Validate a book. + """ + if not new_bookname: + self.changeBackgroundColor(self.bookNameEdit[abbreviation], 'red') + self.validate_error = [self.bookNameEdit[abbreviation]] + self.bookNameEdit[abbreviation].setFocus() + critical_error_message_box(UiStrings().EmptyField, + unicode(translate('BiblesPlugin.BibleEditForm', + 'You need to specify a book name for "%s".')) % + self.booknames[abbreviation]) + return False + for abbr, book in self.books.iteritems(): + if book: + if book.name == new_bookname: + self.changeBackgroundColor(self.bookNameEdit[abbreviation], + 'red') + self.bookNameEdit[abbreviation].setFocus() + self.changeBackgroundColor(self.bookNameEdit[abbr], 'red') + self.validate_error = [self.bookNameEdit[abbr], + self.bookNameEdit[abbreviation]] + critical_error_message_box( + translate('BiblesPlugin.BibleEditForm', + 'Book Name Exists Twice'), + unicode(translate('BiblesPlugin.BibleEditForm', + 'The Book Name "%s" exists twice. Please change one.')) + % new_bookname) + return False + return True + + def changeBackgroundColor(self, lineedit, color): + """ + Change the Background Color of the given LineEdit + """ + pal = QtGui.QPalette(lineedit.palette()) + pal.setColor(QtGui.QPalette.Base,QtGui.QColor(color)) + lineedit.setPalette(pal) diff --git a/openlp/plugins/bibles/lib/db.py b/openlp/plugins/bibles/lib/db.py index cd7c194cb..b6f3a2df8 100644 --- a/openlp/plugins/bibles/lib/db.py +++ b/openlp/plugins/bibles/lib/db.py @@ -183,7 +183,7 @@ class BibleDB(QtCore.QObject, Manager): The actual Qt wizard form. """ self.wizard = wizard - self.create_meta(u'dbversion', u'2') + self.save_meta(u'dbversion', u'2') return self.name def create_book(self, name, bk_ref_id, testament=1): @@ -284,9 +284,9 @@ class BibleDB(QtCore.QObject, Manager): self.session.add(verse) return verse - def create_meta(self, key, value): + def save_meta(self, key, value): """ - Utility method to save BibleMeta objects in a Bible database. + Utility method to save or update BibleMeta objects in a Bible database. ``key`` The key for this instance. @@ -297,21 +297,6 @@ class BibleDB(QtCore.QObject, Manager): if not isinstance(value, unicode): value = unicode(value) log.debug(u'BibleDB.save_meta("%s/%s")', key, value) - self.save_object(BibleMeta.populate(key=key, value=value)) - - def update_meta(self, key, value): - """ - Utility method to update BibleMeta objects in a Bible database. - - ``key`` - The key for this instance. - - ``value`` - The value for this instance. - """ - if not isinstance(value, unicode): - value = unicode(value) - log.debug(u'BibleDB.update_meta("%s/%s")', key, value) meta = self.get_object(BibleMeta, key) if meta: meta.value = value @@ -507,7 +492,7 @@ class BibleDB(QtCore.QObject, Manager): return False language = BiblesResourcesDB.get_language(language) language_id = language[u'id'] - self.create_meta(u'language_id', language_id) + self.save_meta(u'language_id', language_id) return language_id def is_old_database(self): diff --git a/openlp/plugins/bibles/lib/http.py b/openlp/plugins/bibles/lib/http.py index 72ffed487..630772bf3 100644 --- a/openlp/plugins/bibles/lib/http.py +++ b/openlp/plugins/bibles/lib/http.py @@ -401,16 +401,16 @@ class HTTPBible(BibleDB): self.wizard.incrementProgressBar(unicode(translate( 'BiblesPlugin.HTTPBible', 'Registering Bible and loading books...'))) - self.create_meta(u'download source', self.download_source) - self.create_meta(u'download name', self.download_name) + self.save_meta(u'download source', self.download_source) + self.save_meta(u'download name', self.download_name) if self.proxy_server: - self.create_meta(u'proxy server', self.proxy_server) + self.save_meta(u'proxy server', self.proxy_server) if self.proxy_username: # Store the proxy userid. - self.create_meta(u'proxy username', self.proxy_username) + self.save_meta(u'proxy username', self.proxy_username) if self.proxy_password: # Store the proxy password. - self.create_meta(u'proxy password', self.proxy_password) + self.save_meta(u'proxy password', self.proxy_password) if self.download_source.lower() == u'crosswalk': handler = CWExtract(self.proxy_server) elif self.download_source.lower() == u'biblegateway': @@ -429,7 +429,7 @@ class HTTPBible(BibleDB): self.download_source.lower()) if bible[u'language_id']: language_id = bible[u'language_id'] - self.create_meta(u'language_id', language_id) + self.save_meta(u'language_id', language_id) else: language_id = self.get_language(bible_name) if not language_id: diff --git a/openlp/plugins/bibles/lib/manager.py b/openlp/plugins/bibles/lib/manager.py index 46cfae6b8..fb4c606d0 100644 --- a/openlp/plugins/bibles/lib/manager.py +++ b/openlp/plugins/bibles/lib/manager.py @@ -414,27 +414,17 @@ class BibleManager(object): }) return None - def save_meta_data(self, bible, version, copyright, permissions): + def save_meta_data(self, bible, version, copyright, permissions, + bookname_language): """ Saves the bibles meta data. """ log.debug(u'save_meta data %s, %s, %s, %s', bible, version, copyright, permissions) - self.db_cache[bible].create_meta(u'Version', version) - self.db_cache[bible].create_meta(u'Copyright', copyright) - self.db_cache[bible].create_meta(u'Permissions', permissions) - - def update_meta_data(self, bible, version, copyright, permissions, - bookname_language): - """ - Saves the bibles meta data. - """ - log.debug(u'update_meta data %s, %s, %s, %s', - bible, version, copyright, permissions) - self.db_cache[bible].update_meta(u'Version', version) - self.db_cache[bible].update_meta(u'Copyright', copyright) - self.db_cache[bible].update_meta(u'Permissions', permissions) - self.db_cache[bible].update_meta(u'Bookname language', + self.db_cache[bible].save_meta(u'Version', version) + self.db_cache[bible].save_meta(u'Copyright', copyright) + self.db_cache[bible].save_meta(u'Permissions', permissions) + self.db_cache[bible].save_meta(u'Bookname language', bookname_language) def get_meta_data(self, bible, key): diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py index 980d8d94d..728bc3931 100644 --- a/openlp/plugins/bibles/lib/mediaitem.py +++ b/openlp/plugins/bibles/lib/mediaitem.py @@ -349,10 +349,6 @@ class BibleMediaItem(MediaManagerItem): log.debug(u'bible manager initialise') self.plugin.manager.media = self self.loadBibles() - bible = QtCore.QSettings().value( - self.settingsSection + u'/quick bible', QtCore.QVariant( - self.quickVersionComboBox.currentText())).toString() - find_and_set_in_combo_box(self.quickVersionComboBox, bible) self.quickSearchEdit.setSearchTypes([ (BibleSearch.Reference, u':/bibles/bibles_search_reference.png', translate('BiblesPlugin.MediaItem', 'Scripture Reference')), @@ -392,6 +388,10 @@ class BibleMediaItem(MediaManagerItem): self.initialiseAdvancedBible(unicode(bible)) elif len(bibles): self.initialiseAdvancedBible(bibles[0]) + bible = QtCore.QSettings().value( + self.settingsSection + u'/quick bible', QtCore.QVariant( + self.quickVersionComboBox.currentText())).toString() + find_and_set_in_combo_box(self.quickVersionComboBox, bible) def reloadBibles(self, process=False): log.debug(u'Reloading Bibles') @@ -426,9 +426,14 @@ class BibleMediaItem(MediaManagerItem): book_data = book_data_temp self.advancedBookComboBox.clear() first = True - language_selection = QtCore.QSettings().value( - self.settingsSection + u'/bookname language', - QtCore.QVariant(0)).toInt()[0] + language_selection = self.plugin.manager.get_meta_data( + bible, u'Bookname language') + if language_selection: + language_selection = int(language_selection.value) + if not language_selection or language_selection == -1: + language_selection = QtCore.QSettings().value( + self.settingsSection + u'/bookname language', + QtCore.QVariant(0)).toInt()[0] booknames = BibleStrings().Booknames for book in book_data: row = self.advancedBookComboBox.count() diff --git a/openlp/plugins/bibles/lib/osis.py b/openlp/plugins/bibles/lib/osis.py index 4afee912d..b9420d5cd 100644 --- a/openlp/plugins/bibles/lib/osis.py +++ b/openlp/plugins/bibles/lib/osis.py @@ -123,7 +123,7 @@ class OSISBible(BibleDB): language_match.group(1)) if language: language_id = language[u'id'] - self.create_meta(u'language_id', language_id) + self.save_meta(u'language_id', language_id) continue match = self.verse_regex.search(file_record) if match: From 0e34ed3a948fd9363a50e178d4cb609c77f404ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20K=C3=B6hler?= Date: Wed, 21 Mar 2012 22:00:44 +0100 Subject: [PATCH 03/42] fixes --- openlp/plugins/bibles/forms/editbibleform.py | 3 ++- openlp/plugins/bibles/lib/db.py | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openlp/plugins/bibles/forms/editbibleform.py b/openlp/plugins/bibles/forms/editbibleform.py index 2af4f5726..07bf7bbbd 100644 --- a/openlp/plugins/bibles/forms/editbibleform.py +++ b/openlp/plugins/bibles/forms/editbibleform.py @@ -79,7 +79,8 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): self.languageSelectionComboBox.setCurrentIndex( int(self.bookname_language.value)+1) self.books = {} - self.webbible = self.manager.get_meta_data(self.bible, u'download source') + self.webbible = self.manager.get_meta_data(self.bible, + u'download source') if self.webbible: self.bookNameNotice.setText(translate('BiblesPlugin.EditBibleForm', 'This is a webbible.\nIt is not possible to customize the Book ' diff --git a/openlp/plugins/bibles/lib/db.py b/openlp/plugins/bibles/lib/db.py index b6f3a2df8..2f9ce0cb8 100644 --- a/openlp/plugins/bibles/lib/db.py +++ b/openlp/plugins/bibles/lib/db.py @@ -81,7 +81,6 @@ def init_schema(url): Column(u'book_reference_id', types.Integer, index=True), Column(u'testament_reference_id', types.Integer), Column(u'name', types.Unicode(50), index=True), - #Column(u'custom_name', types.Unicode(50), index=True), ) verse_table = Table(u'verse', metadata, Column(u'id', types.Integer, primary_key=True, index=True), From b68300bdc66f39d9f217270c020d8ce8e7b04719 Mon Sep 17 00:00:00 2001 From: Philip Ridout Date: Sat, 24 Mar 2012 16:41:29 +0000 Subject: [PATCH 04/42] New importer for DreamBeam song files. One small fix to SongShowPlus importer --- openlp/core/ui/wizard.py | 1 + openlp/plugins/songs/forms/songimportform.py | 45 +++++- openlp/plugins/songs/lib/dreambeamimport.py | 146 ++++++++++++++++++ openlp/plugins/songs/lib/importer.py | 23 +-- .../plugins/songs/lib/songshowplusimport.py | 4 +- 5 files changed, 207 insertions(+), 12 deletions(-) create mode 100644 openlp/plugins/songs/lib/dreambeamimport.py diff --git a/openlp/core/ui/wizard.py b/openlp/core/ui/wizard.py index 91aa42e43..004494b9a 100644 --- a/openlp/core/ui/wizard.py +++ b/openlp/core/ui/wizard.py @@ -46,6 +46,7 @@ class WizardStrings(object): # the writers translating their own product name. CCLI = u'CCLI/SongSelect' CSV = u'CSV' + DB = u'DreamBeam' EW = u'EasyWorship' ES = u'EasySlides' FP = u'Foilpresenter' diff --git a/openlp/plugins/songs/forms/songimportform.py b/openlp/plugins/songs/forms/songimportform.py index db4d9bf56..3323f5cbb 100644 --- a/openlp/plugins/songs/forms/songimportform.py +++ b/openlp/plugins/songs/forms/songimportform.py @@ -129,6 +129,12 @@ class SongImportForm(OpenLPWizard): QtCore.QObject.connect(self.ccliRemoveButton, QtCore.SIGNAL(u'clicked()'), self.onCCLIRemoveButtonClicked) + QtCore.QObject.connect(self.dreamBeamAddButton, + QtCore.SIGNAL(u'clicked()'), + self.onDreamBeamAddButtonClicked) + QtCore.QObject.connect(self.dreamBeamRemoveButton, + QtCore.SIGNAL(u'clicked()'), + self.onDreamBeamRemoveButtonClicked) QtCore.QObject.connect(self.songsOfFellowshipAddButton, QtCore.SIGNAL(u'clicked()'), self.onSongsOfFellowshipAddButtonClicked) @@ -201,6 +207,8 @@ class SongImportForm(OpenLPWizard): self.addFileSelectItem(u'generic', None, True) # CCLI File import self.addFileSelectItem(u'ccli') + # DreamBeam + self.addFileSelectItem(u'dreamBeam') # EasySlides self.addFileSelectItem(u'easySlides', single_select=True) # EasyWorship @@ -247,6 +255,8 @@ class SongImportForm(OpenLPWizard): translate('SongsPlugin.ImportWizardForm', 'Generic Document/Presentation')) self.formatComboBox.setItemText(SongFormat.CCLI, WizardStrings.CCLI) + self.formatComboBox.setItemText( + SongFormat.DreamBeam, WizardStrings.DB) self.formatComboBox.setItemText( SongFormat.EasySlides, WizardStrings.ES) self.formatComboBox.setItemText( @@ -291,6 +301,10 @@ class SongImportForm(OpenLPWizard): translate('SongsPlugin.ImportWizardForm', 'Add Files...')) self.ccliRemoveButton.setText( translate('SongsPlugin.ImportWizardForm', 'Remove File(s)')) + self.dreamBeamAddButton.setText( + translate('SongsPlugin.ImportWizardForm', 'Add Files...')) + self.dreamBeamRemoveButton.setText( + translate('SongsPlugin.ImportWizardForm', 'Remove File(s)')) self.songsOfFellowshipAddButton.setText( translate('SongsPlugin.ImportWizardForm', 'Add Files...')) self.songsOfFellowshipRemoveButton.setText( @@ -397,6 +411,12 @@ class SongImportForm(OpenLPWizard): WizardStrings.YouSpecifyFile % WizardStrings.CCLI) self.ccliAddButton.setFocus() return False + elif source_format == SongFormat.DreamBeam: + if self.dreamBeamFileListWidget.count() == 0: + critical_error_message_box(UiStrings().NFSp, + WizardStrings.YouSpecifyFile % WizardStrings.DB) + self.dreamBeamAddButton.setFocus() + return False elif source_format == SongFormat.SongsOfFellowship: if self.songsOfFellowshipFileListWidget.count() == 0: critical_error_message_box(UiStrings().NFSp, @@ -433,7 +453,7 @@ class SongImportForm(OpenLPWizard): if self.songShowPlusFileListWidget.count() == 0: critical_error_message_box(UiStrings().NFSp, WizardStrings.YouSpecifyFile % WizardStrings.SSP) - self.wordsOfWorshipAddButton.setFocus() + self.songShowPlusAddButton.setFocus() return False elif source_format == SongFormat.FoilPresenter: if self.foilPresenterFileListWidget.count() == 0: @@ -562,6 +582,22 @@ class SongImportForm(OpenLPWizard): """ self.removeSelectedItems(self.ccliFileListWidget) + def onDreamBeamAddButtonClicked(self): + """ + Get DreamBeam song database files + """ + self.getFiles(WizardStrings.OpenTypeFile % WizardStrings.DB, + self.dreamBeamFileListWidget, u'%s (*.xml)' + % translate('SongsPlugin.ImportWizardForm', + 'DreamBeam Song Files') + ) + + def onDreamBeamRemoveButtonClicked(self): + """ + Remove selected DreamBeam files from the import list + """ + self.removeSelectedItems(self.dreamBeamFileListWidget) + def onSongsOfFellowshipAddButtonClicked(self): """ Get Songs of Fellowship song database files @@ -671,6 +707,7 @@ class SongImportForm(OpenLPWizard): self.openSongFileListWidget.clear() self.wordsOfWorshipFileListWidget.clear() self.ccliFileListWidget.clear() + self.dreamBeamFileListWidget.clear() self.songsOfFellowshipFileListWidget.clear() self.genericFileListWidget.clear() self.easySlidesFilenameEdit.setText(u'') @@ -732,6 +769,12 @@ class SongImportForm(OpenLPWizard): importer = self.plugin.importSongs(SongFormat.CCLI, filenames=self.getListOfFiles(self.ccliFileListWidget) ) + elif source_format == SongFormat.DreamBeam: + # Import DreamBeam songs + importer = self.plugin.importSongs(SongFormat.DreamBeam, + filenames=self.getListOfFiles( + self.dreamBeamFileListWidget) + ) elif source_format == SongFormat.SongsOfFellowship: # Import a Songs of Fellowship RTF file importer = self.plugin.importSongs(SongFormat.SongsOfFellowship, diff --git a/openlp/plugins/songs/lib/dreambeamimport.py b/openlp/plugins/songs/lib/dreambeamimport.py new file mode 100644 index 000000000..1b7d5c4bd --- /dev/null +++ b/openlp/plugins/songs/lib/dreambeamimport.py @@ -0,0 +1,146 @@ +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 + +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2012 Raoul Snyman # +# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan # +# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, # +# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias # +# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, # +# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### +""" +The :mod:`dreambeamimport` module provides the functionality for importing +DreamBeam songs into the OpenLP database. +""" +import os, sys +import logging + +from lxml import etree, objectify + +from openlp.core.lib import translate +from openlp.plugins.songs.lib.songimport import SongImport +from openlp.plugins.songs.lib.ui import SongStrings + + + + +log = logging.getLogger(__name__) + +class DreamBeamImport(SongImport): + """ + The :class:`DreamBeamImport` class provides the ability to import song files from + DreamBeam. + + An example of DreamBeam xml mark-up: + + + + false + 0.80 + Amazing Grace + John Newton + + + + F + G + false + false + + Amazing Grace, how sweet the sound, + That saved a wretch like me. + I once was lost but now am found, + Was blind, but now, I see. + T’was Grace that taught my heart to fear. + And Grace, my fears relieved. + How precious did that Grace appear… + the hour I first believed. + + + + + + false + + + Valid extensions for a DreamBeam song file are: + + * .xml + """ + + def __init__(self, manager, **kwargs): + """ + Initialise the Words of Worship importer. + """ + SongImport.__init__(self, manager, **kwargs) + + def doImport(self): + """ + Receive a single file or a list of files to import. + """ + if isinstance(self.importSource, list): + self.importWizard.progressBar.setMaximum(len(self.importSource)) + for file in self.importSource: + if self.stopImportFlag: + return + self.setDefaults() + parser = etree.XMLParser(remove_blank_text=True) + try: + parsed_file = etree.parse(open(file, u'r'), parser) + except etree.XMLSyntaxError: + log.exception(u'XML syntax error in file %s' % file) + self.logError(file, SongStrings.XMLSyntaxError) + continue + xml = unicode(etree.tostring(parsed_file)) + song_xml = objectify.fromstring(xml) + print song_xml.tag + if song_xml.tag != u'DreamSong': + self.logError(file, unicode( + translate('SongsPlugin.DreamBeamImport', + ('Invalid DreamBeam song file. Missing ' + 'DreamSong tag.')))) + continue + if hasattr(song_xml, u'Title'): + self.title = unicode(song_xml.Title.text) + if hasattr(song_xml, u'Author'): + # Dreambeam does not have a copyright field, instead it + # some times uses the author feild + self.addCopyright(unicode(song_xml.Author.text)) + self.parseAuthor(unicode(song_xml.Author.text)) + if hasattr(song_xml, u'SongLyrics'): + for lyrics_item in song_xml.SongLyrics.iterchildren(): + verse_type = lyrics_item.get(u'Type') + verse_number = lyrics_item.get(u'Number') + verse_text = unicode(lyrics_item.text) + self.addVerse(verse_text, + (u'%s%s' % (verse_type[:1], verse_number))) + if hasattr(song_xml, u'Collection'): + self.songBookName = unicode(song_xml.Collection.text) + if hasattr(song_xml, u'Number'): + self.songNumber = unicode(song_xml.Number.text) + if hasattr(song_xml, u'Sequence'): + for LyricsSequenceItem in song_xml.Sequence.iterchildren(): + self.verseOrderList.append( + "%s%s" % (LyricsSequenceItem.get(u'Type')[:1], + LyricsSequenceItem.get(u'Number'))) + if hasattr(song_xml, u'Notes'): + self.comments = unicode(song_xml.Notes.text) + if not self.finish(): + self.logError(file) diff --git a/openlp/plugins/songs/lib/importer.py b/openlp/plugins/songs/lib/importer.py index 867b28c91..ea13c5065 100644 --- a/openlp/plugins/songs/lib/importer.py +++ b/openlp/plugins/songs/lib/importer.py @@ -35,6 +35,7 @@ from olpimport import OpenLPSongImport from openlyricsimport import OpenLyricsImport from wowimport import WowImport from cclifileimport import CCLIFileImport +from dreambeamimport import DreamBeamImport from ewimport import EasyWorshipSongImport from songbeamerimport import SongBeamerImport from songshowplusimport import SongShowPlusImport @@ -73,15 +74,16 @@ class SongFormat(object): OpenLP1 = 2 Generic = 3 CCLI = 4 - EasySlides = 5 - EasyWorship = 6 - FoilPresenter = 7 - OpenSong = 8 - SongBeamer = 9 - SongShowPlus = 10 - SongsOfFellowship = 11 - WordsOfWorship = 12 - #CSV = 13 + DreamBeam = 5 + EasySlides = 6 + EasyWorship = 7 + FoilPresenter = 8 + OpenSong = 9 + SongBeamer = 10 + SongShowPlus = 11 + SongsOfFellowship = 12 + WordsOfWorship = 13 + #CSV = 14 @staticmethod def get_class(format): @@ -107,6 +109,8 @@ class SongFormat(object): return OooImport elif format == SongFormat.CCLI: return CCLIFileImport + elif format == SongFormat.DreamBeam: + return DreamBeamImport elif format == SongFormat.EasySlides: return EasySlidesImport elif format == SongFormat.EasyWorship: @@ -130,6 +134,7 @@ class SongFormat(object): SongFormat.OpenLP1, SongFormat.Generic, SongFormat.CCLI, + SongFormat.DreamBeam, SongFormat.EasySlides, SongFormat.EasyWorship, SongFormat.FoilPresenter, diff --git a/openlp/plugins/songs/lib/songshowplusimport.py b/openlp/plugins/songs/lib/songshowplusimport.py index aba2f6d05..d7317ff9f 100644 --- a/openlp/plugins/songs/lib/songshowplusimport.py +++ b/openlp/plugins/songs/lib/songshowplusimport.py @@ -25,8 +25,8 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### """ -The :mod:`wowimport` module provides the functionality for importing Words of -Worship songs into the OpenLP database. +The :mod:`songshowplusimport` module provides the functionality for importing +Song Show Plus songs into the OpenLP database. """ import os import logging From a75102a868f44f7fc781d6e9410111e29b63d366 Mon Sep 17 00:00:00 2001 From: Philip Ridout Date: Sat, 24 Mar 2012 18:20:19 +0000 Subject: [PATCH 05/42] Removed errant print statment --- openlp/plugins/songs/lib/dreambeamimport.py | 1 - 1 file changed, 1 deletion(-) diff --git a/openlp/plugins/songs/lib/dreambeamimport.py b/openlp/plugins/songs/lib/dreambeamimport.py index 1b7d5c4bd..b43b2cf8b 100644 --- a/openlp/plugins/songs/lib/dreambeamimport.py +++ b/openlp/plugins/songs/lib/dreambeamimport.py @@ -110,7 +110,6 @@ class DreamBeamImport(SongImport): continue xml = unicode(etree.tostring(parsed_file)) song_xml = objectify.fromstring(xml) - print song_xml.tag if song_xml.tag != u'DreamSong': self.logError(file, unicode( translate('SongsPlugin.DreamBeamImport', From 5925fb624ec48d16db7c132b67decc2bc249762b Mon Sep 17 00:00:00 2001 From: Philip Ridout Date: Sun, 25 Mar 2012 18:25:08 +0100 Subject: [PATCH 06/42] Changed Restructured text layout --- openlp/plugins/songs/lib/dreambeamimport.py | 64 ++++++++++----------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/openlp/plugins/songs/lib/dreambeamimport.py b/openlp/plugins/songs/lib/dreambeamimport.py index b43b2cf8b..ecd0d7c79 100644 --- a/openlp/plugins/songs/lib/dreambeamimport.py +++ b/openlp/plugins/songs/lib/dreambeamimport.py @@ -47,42 +47,42 @@ class DreamBeamImport(SongImport): The :class:`DreamBeamImport` class provides the ability to import song files from DreamBeam. - An example of DreamBeam xml mark-up: + An example of DreamBeam xml mark-up:: - - - false - 0.80 - Amazing Grace - John Newton - - - - F - G - false - false - - Amazing Grace, how sweet the sound, - That saved a wretch like me. - I once was lost but now am found, - Was blind, but now, I see. - T’was Grace that taught my heart to fear. - And Grace, my fears relieved. - How precious did that Grace appear… - the hour I first believed. - - - - - - false - + + + false + 0.80 + Amazing Grace + John Newton + + + + F + G + false + false + + Amazing Grace, how sweet the sound, + That saved a wretch like me. + I once was lost but now am found, + Was blind, but now, I see. + T’was Grace that taught my heart to fear. + And Grace, my fears relieved. + How precious did that Grace appear… + the hour I first believed. + + + + + + false + Valid extensions for a DreamBeam song file are: - * .xml + * \*.xml """ def __init__(self, manager, **kwargs): From 7260dee1d63eefaf9ab3014a6fca74886d9182a4 Mon Sep 17 00:00:00 2001 From: Philip Ridout Date: Tue, 27 Mar 2012 21:09:01 +0100 Subject: [PATCH 07/42] Made changes as to Jonathan's requests --- openlp/plugins/songs/lib/dreambeamimport.py | 11 ++++------- openlp/plugins/songs/lib/songshowplusimport.py | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/openlp/plugins/songs/lib/dreambeamimport.py b/openlp/plugins/songs/lib/dreambeamimport.py index ecd0d7c79..381beb033 100644 --- a/openlp/plugins/songs/lib/dreambeamimport.py +++ b/openlp/plugins/songs/lib/dreambeamimport.py @@ -31,15 +31,12 @@ DreamBeam songs into the OpenLP database. import os, sys import logging -from lxml import etree, objectify +from lxml import etree, objectify from openlp.core.lib import translate from openlp.plugins.songs.lib.songimport import SongImport from openlp.plugins.songs.lib.ui import SongStrings - - - log = logging.getLogger(__name__) class DreamBeamImport(SongImport): @@ -87,7 +84,7 @@ class DreamBeamImport(SongImport): def __init__(self, manager, **kwargs): """ - Initialise the Words of Worship importer. + Initialise the DreamBeam importer. """ SongImport.__init__(self, manager, **kwargs) @@ -119,8 +116,8 @@ class DreamBeamImport(SongImport): if hasattr(song_xml, u'Title'): self.title = unicode(song_xml.Title.text) if hasattr(song_xml, u'Author'): - # Dreambeam does not have a copyright field, instead it - # some times uses the author feild + # DreamBeam does not have a copyright field, instead it + # some times uses the author field self.addCopyright(unicode(song_xml.Author.text)) self.parseAuthor(unicode(song_xml.Author.text)) if hasattr(song_xml, u'SongLyrics'): diff --git a/openlp/plugins/songs/lib/songshowplusimport.py b/openlp/plugins/songs/lib/songshowplusimport.py index d7317ff9f..8d2af5514 100644 --- a/openlp/plugins/songs/lib/songshowplusimport.py +++ b/openlp/plugins/songs/lib/songshowplusimport.py @@ -26,7 +26,7 @@ ############################################################################### """ The :mod:`songshowplusimport` module provides the functionality for importing -Song Show Plus songs into the OpenLP database. +SongShow Plus songs into the OpenLP database. """ import os import logging From e6af8d8bef5b2efcb35a05803eeaa2d9026eb34f Mon Sep 17 00:00:00 2001 From: Philip Ridout Date: Thu, 29 Mar 2012 19:37:05 +0100 Subject: [PATCH 08/42] Remove constructor as per Raouls comment. --- openlp/plugins/songs/lib/dreambeamimport.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/openlp/plugins/songs/lib/dreambeamimport.py b/openlp/plugins/songs/lib/dreambeamimport.py index 381beb033..569f0006a 100644 --- a/openlp/plugins/songs/lib/dreambeamimport.py +++ b/openlp/plugins/songs/lib/dreambeamimport.py @@ -81,13 +81,7 @@ class DreamBeamImport(SongImport): * \*.xml """ - - def __init__(self, manager, **kwargs): - """ - Initialise the DreamBeam importer. - """ - SongImport.__init__(self, manager, **kwargs) - + def doImport(self): """ Receive a single file or a list of files to import. From 4ce95e9d5630c2d69a7fb40f2fbdd08292b3dd82 Mon Sep 17 00:00:00 2001 From: Philip Ridout Date: Fri, 30 Mar 2012 22:52:50 +0100 Subject: [PATCH 09/42] Made changes as per Andreas comments. --- openlp/plugins/songs/lib/dreambeamimport.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openlp/plugins/songs/lib/dreambeamimport.py b/openlp/plugins/songs/lib/dreambeamimport.py index 569f0006a..68868baa1 100644 --- a/openlp/plugins/songs/lib/dreambeamimport.py +++ b/openlp/plugins/songs/lib/dreambeamimport.py @@ -28,7 +28,8 @@ The :mod:`dreambeamimport` module provides the functionality for importing DreamBeam songs into the OpenLP database. """ -import os, sys +import os +import sys import logging from lxml import etree, objectify @@ -111,7 +112,7 @@ class DreamBeamImport(SongImport): self.title = unicode(song_xml.Title.text) if hasattr(song_xml, u'Author'): # DreamBeam does not have a copyright field, instead it - # some times uses the author field + # sometimes uses the author field self.addCopyright(unicode(song_xml.Author.text)) self.parseAuthor(unicode(song_xml.Author.text)) if hasattr(song_xml, u'SongLyrics'): From 800510f2f8e92ef212e042a7cc2225b8d8b6b833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20K=C3=B6hler?= Date: Tue, 3 Apr 2012 20:42:21 +0200 Subject: [PATCH 10/42] some fixes - improve error handling with duplicate book names --- .../plugins/bibles/forms/editbibledialog.py | 10 ++-- openlp/plugins/bibles/forms/editbibleform.py | 48 +++++++++++++------ openlp/plugins/bibles/lib/manager.py | 12 +++-- openlp/plugins/bibles/lib/mediaitem.py | 13 +++-- 4 files changed, 56 insertions(+), 27 deletions(-) diff --git a/openlp/plugins/bibles/forms/editbibledialog.py b/openlp/plugins/bibles/forms/editbibledialog.py index c2596ddab..e73af55a1 100644 --- a/openlp/plugins/bibles/forms/editbibledialog.py +++ b/openlp/plugins/bibles/forms/editbibledialog.py @@ -28,7 +28,7 @@ from PyQt4 import QtCore, QtGui from openlp.core.lib import build_icon, translate -from openlp.core.lib.ui import UiStrings, create_accept_reject_button_box +from openlp.core.lib.ui import create_accept_reject_button_box from openlp.plugins.bibles.lib import LanguageSelection, BibleStrings from openlp.plugins.bibles.lib.db import BiblesResourcesDB @@ -36,7 +36,7 @@ from openlp.plugins.bibles.lib.db import BiblesResourcesDB class Ui_EditBibleDialog(object): def setupUi(self, editBibleDialog): editBibleDialog.setObjectName(u'editBibleDialog') - editBibleDialog.resize(650, 400) + editBibleDialog.resize(600, 400) editBibleDialog.setWindowIcon( build_icon(u':/icon/openlp-logo-16x16.png')) editBibleDialog.setModal(True) @@ -166,11 +166,11 @@ class Ui_EditBibleDialog(object): self.languageSelectionComboBox.setItemText(LanguageSelection.English+1, translate('BiblesPlugin.EditBibleForm', 'English')) self.languageSelectionComboBox.setToolTip( - translate('BiblesPlugin.EditBibleForm', 'Multiple options:\n ' + translate('BiblesPlugin.EditBibleForm', 'Multiple options:\n' 'General Settings - the option choosen in settings section\n' 'Bible language - the language in which the Bible book names ' - 'were imported\n Application language - the language you have ' - 'chosen for OpenLP\n English - always use English book names')) + 'were imported\nApplication language - the language you have ' + 'chosen for OpenLP\nEnglish - always use English book names')) for book in BiblesResourcesDB.get_books(): self.bookNameLabel[book[u'abbreviation']].setText( u'%s:' % unicode(self.booknames[book[u'abbreviation']])) diff --git a/openlp/plugins/bibles/forms/editbibleform.py b/openlp/plugins/bibles/forms/editbibleform.py index 07bf7bbbd..5ababcaa0 100644 --- a/openlp/plugins/bibles/forms/editbibleform.py +++ b/openlp/plugins/bibles/forms/editbibleform.py @@ -26,16 +26,15 @@ ############################################################################### import logging +import re -from PyQt4 import QtCore, QtGui +from PyQt4 import QtGui -from openlp.core.lib import PluginStatus, Receiver, MediaType, translate, \ - create_separated_list +from openlp.core.lib import Receiver, translate from openlp.core.lib.ui import UiStrings, critical_error_message_box -from openlp.core.utils import AppLocation from editbibledialog import Ui_EditBibleDialog from openlp.plugins.bibles.lib import BibleStrings -from openlp.plugins.bibles.lib.db import BibleDB, BibleMeta, BiblesResourcesDB +from openlp.plugins.bibles.lib.db import BiblesResourcesDB log = logging.getLogger(__name__) @@ -89,9 +88,8 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): self.scrollArea.setParent(None) else: self.bookNameNotice.setText(translate('BiblesPlugin.EditBibleForm', - 'You could customize the Book Names of this Bible.\nTo use ' - 'the Book Names below, you have to choose the option "Bible ' - 'language" in general settings or explicit for this Bible.')) + 'To use the customized Book Names, choose the option "Bible ' + 'language"\nin general settings or explicit for this Bible.')) for book in BiblesResourcesDB.get_books(): self.books[book[u'abbreviation']] = self.manager.get_book_by_id( self.bible, book[u'id']) @@ -125,12 +123,12 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): self.permissions = unicode(self.permissionsEdit.text()) self.bookname_language = \ self.languageSelectionComboBox.currentIndex()-1 + for error in self.validate_error: + self.changeBackgroundColor(error, 'white') if not self.validateMeta(): save = False if not self.webbible and save: custom_names = {} - for error in self.validate_error: - self.changeBackgroundColor(error, 'white') for abbr, book in self.books.iteritems(): if book: custom_names[abbr] = unicode(self.bookNameEdit[abbr].text()) @@ -139,6 +137,8 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): save = False break if save: + Receiver.send_message(u'openlp_process_events') + Receiver.send_message(u'cursor_busy') self.manager.save_meta_data(self.bible, self.version, self.copyright, self.permissions, self.bookname_language) if not self.webbible: @@ -148,6 +148,7 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): book.name = custom_names[abbr] self.manager.update_book(self.bible, book) self.bible = None + Receiver.send_message(u'cursor_normal') QtGui.QDialog.accept(self) def validateMeta(self): @@ -155,27 +156,33 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): Validate the Meta before saving. """ if not self.version: + self.changeBackgroundColor(self.versionNameEdit, 'red') + self.validate_error = [self.versionNameEdit] + self.versionNameEdit.setFocus() critical_error_message_box(UiStrings().EmptyField, translate('BiblesPlugin.BibleEditForm', 'You need to specify a version name for your Bible.')) - self.versionNameEdit.setFocus() return False elif not self.copyright: + self.changeBackgroundColor(self.copyrightEdit, 'red') + self.validate_error = [self.copyrightEdit] + self.copyrightEdit.setFocus() critical_error_message_box(UiStrings().EmptyField, translate('BiblesPlugin.BibleEditForm', 'You need to set a copyright for your Bible. ' 'Bibles in the Public Domain need to be marked as such.')) - self.copyrightEdit.setFocus() return False elif self.manager.exists(self.version) and \ self.manager.get_meta_data(self.bible, u'Version').value != \ self.version: + self.changeBackgroundColor(self.versionNameEdit, 'red') + self.validate_error = [self.versionNameEdit] + self.versionNameEdit.setFocus() critical_error_message_box( translate('BiblesPlugin.BibleEditForm', 'Bible Exists'), translate('BiblesPlugin.BibleEditForm', 'This Bible already exists. Please import ' 'a different Bible or first delete the existing one.')) - self.versionNameEdit.setFocus() return False return True @@ -183,6 +190,7 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): """ Validate a book. """ + book_regex = re.compile(u'[\d]*[^\d]+$') if not new_bookname: self.changeBackgroundColor(self.bookNameEdit[abbreviation], 'red') self.validate_error = [self.bookNameEdit[abbreviation]] @@ -192,9 +200,21 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): 'You need to specify a book name for "%s".')) % self.booknames[abbreviation]) return False + elif not book_regex.match(new_bookname): + self.changeBackgroundColor(self.bookNameEdit[abbreviation], 'red') + self.validate_error = [self.bookNameEdit[abbreviation]] + self.bookNameEdit[abbreviation].setFocus() + critical_error_message_box(UiStrings().EmptyField, + unicode(translate('BiblesPlugin.BibleEditForm', + 'The book name "%s" is not correct.\nDecimal digits only could ' + 'be used at the beginning and\nmust be followed by one or more ' + 'non-digit characters')) % new_bookname) + return False for abbr, book in self.books.iteritems(): if book: - if book.name == new_bookname: + if abbr == abbreviation: + continue + if unicode(self.bookNameEdit[abbr].text()) == new_bookname: self.changeBackgroundColor(self.bookNameEdit[abbreviation], 'red') self.bookNameEdit[abbreviation].setFocus() diff --git a/openlp/plugins/bibles/lib/manager.py b/openlp/plugins/bibles/lib/manager.py index fb4c606d0..4879e3434 100644 --- a/openlp/plugins/bibles/lib/manager.py +++ b/openlp/plugins/bibles/lib/manager.py @@ -327,9 +327,13 @@ class BibleManager(object): 'Import Wizard to install one or more Bibles.') }) return None - language_selection = QtCore.QSettings().value( - self.settingsSection + u'/bookname language', - QtCore.QVariant(0)).toInt()[0] + language_selection = self.get_meta_data(bible, u'Bookname language') + if language_selection: + language_selection = int(language_selection.value) + if language_selection == None or language_selection == -1: + language_selection = QtCore.QSettings().value( + self.settingsSection + u'/bookname language', + QtCore.QVariant(0)).toInt()[0] reflist = parse_reference(versetext, self.db_cache[bible], language_selection, book_ref_id) if reflist: @@ -415,7 +419,7 @@ class BibleManager(object): return None def save_meta_data(self, bible, version, copyright, permissions, - bookname_language): + bookname_language=-1): """ Saves the bibles meta data. """ diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py index 4611cb643..82416b832 100644 --- a/openlp/plugins/bibles/lib/mediaitem.py +++ b/openlp/plugins/bibles/lib/mediaitem.py @@ -433,7 +433,7 @@ class BibleMediaItem(MediaManagerItem): bible, u'Bookname language') if language_selection: language_selection = int(language_selection.value) - if not language_selection or language_selection == -1: + if language_selection == None or language_selection == -1: language_selection = QtCore.QSettings().value( self.settingsSection + u'/bookname language', QtCore.QVariant(0)).toInt()[0] @@ -508,9 +508,14 @@ class BibleMediaItem(MediaManagerItem): secondbook.book_reference_id: book_data_temp.append(book) book_data = book_data_temp - language_selection = QtCore.QSettings().value( - self.settingsSection + u'/bookname language', - QtCore.QVariant(0)).toInt()[0] + language_selection = self.plugin.manager.get_meta_data( + bible, u'Bookname language') + if language_selection: + language_selection = int(language_selection.value) + if language_selection == None or language_selection == -1: + language_selection = QtCore.QSettings().value( + self.settingsSection + u'/bookname language', + QtCore.QVariant(0)).toInt()[0] if language_selection == LanguageSelection.Bible: books = [book.name + u' ' for book in book_data] elif language_selection == LanguageSelection.Application: From 02e36ba6417e23c84dff5da9bcc9cb6ed81a35f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20K=C3=B6hler?= Date: Tue, 3 Apr 2012 21:23:26 +0200 Subject: [PATCH 11/42] bookname in list view and shown in footer now uses the choosen language --- openlp/plugins/bibles/lib/mediaitem.py | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py index 82416b832..072de9bf6 100644 --- a/openlp/plugins/bibles/lib/mediaitem.py +++ b/openlp/plugins/bibles/lib/mediaitem.py @@ -837,9 +837,28 @@ class BibleMediaItem(MediaManagerItem): second_permissions = self.plugin.manager.get_meta_data( second_bible, u'Permissions').value items = [] + language_selection = self.plugin.manager.get_meta_data( + bible, u'Bookname language') + if language_selection: + language_selection = int(language_selection.value) + if language_selection == None or language_selection == -1: + language_selection = QtCore.QSettings().value( + self.settingsSection + u'/bookname language', + QtCore.QVariant(0)).toInt()[0] for count, verse in enumerate(search_results): + if language_selection == LanguageSelection.Bible: + book = verse.book.name + elif language_selection == LanguageSelection.Application: + booknames = BibleStrings().Booknames + data = BiblesResourcesDB.get_book_by_id( + verse.book.book_reference_id) + book = unicode(booknames[data[u'abbreviation']]) + elif language_selection == LanguageSelection.English: + data = BiblesResourcesDB.get_book_by_id( + verse.book.book_reference_id) + book = data[u'name'] data = { - 'book': QtCore.QVariant(verse.book.name), + 'book': QtCore.QVariant(book), 'chapter': QtCore.QVariant(verse.chapter), 'verse': QtCore.QVariant(verse.verse), 'bible': QtCore.QVariant(bible), @@ -861,11 +880,11 @@ class BibleMediaItem(MediaManagerItem): log.exception(u'The second_search_results does not have as ' 'many verses as the search_results.') break - bible_text = u'%s %d%s%d (%s, %s)' % (verse.book.name, + bible_text = u'%s %d%s%d (%s, %s)' % (book, verse.chapter, verse_separator, verse.verse, version, second_version) else: - bible_text = u'%s %d%s%d (%s)' % (verse.book.name, + bible_text = u'%s %d%s%d (%s)' % (book, verse.chapter, verse_separator, verse.verse, version) bible_verse = QtGui.QListWidgetItem(bible_text) bible_verse.setData(QtCore.Qt.UserRole, QtCore.QVariant(data)) From 0b246275b26cf54b13598164a3853fb9fccd3ae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20K=C3=B6hler?= Date: Tue, 3 Apr 2012 21:51:20 +0200 Subject: [PATCH 12/42] adapt to run with HEAD r1934 --- openlp/plugins/bibles/forms/editbibledialog.py | 5 +++-- openlp/plugins/bibles/lib/manager.py | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/openlp/plugins/bibles/forms/editbibledialog.py b/openlp/plugins/bibles/forms/editbibledialog.py index e73af55a1..51e7a0ab7 100644 --- a/openlp/plugins/bibles/forms/editbibledialog.py +++ b/openlp/plugins/bibles/forms/editbibledialog.py @@ -28,7 +28,7 @@ from PyQt4 import QtCore, QtGui from openlp.core.lib import build_icon, translate -from openlp.core.lib.ui import create_accept_reject_button_box +from openlp.core.lib.ui import create_button_box from openlp.plugins.bibles.lib import LanguageSelection, BibleStrings from openlp.plugins.bibles.lib.db import BiblesResourcesDB @@ -133,7 +133,8 @@ class Ui_EditBibleDialog(object): self.bibleTabWidget.addTab(self.bookNameTab, u'') # Last few bits self.dialogLayout.addWidget(self.bibleTabWidget) - self.buttonBox = create_accept_reject_button_box(editBibleDialog) + self.buttonBox = create_button_box(editBibleDialog, u'buttonBox', + [u'cancel', u'save']) self.dialogLayout.addWidget(self.buttonBox) self.retranslateUi(editBibleDialog) QtCore.QMetaObject.connectSlotsByName(editBibleDialog) diff --git a/openlp/plugins/bibles/lib/manager.py b/openlp/plugins/bibles/lib/manager.py index 4879e3434..25ca8cd8e 100644 --- a/openlp/plugins/bibles/lib/manager.py +++ b/openlp/plugins/bibles/lib/manager.py @@ -31,8 +31,6 @@ import os from PyQt4 import QtCore from openlp.core.lib import Receiver, SettingsManager, translate -from openlp.core.lib.ui import critical_error_message_box, \ - create_accept_reject_button_box from openlp.core.utils import AppLocation, delete_file from openlp.plugins.bibles.lib import parse_reference, \ get_reference_separator, LanguageSelection From 5f88f49754bc709e0e8bed1fc029bf6acd46fd8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20K=C3=B6hler?= Date: Wed, 4 Apr 2012 21:34:14 +0200 Subject: [PATCH 13/42] some fixes --- .../plugins/bibles/forms/editbibledialog.py | 59 +++++++------------ openlp/plugins/bibles/forms/editbibleform.py | 33 +++++------ openlp/plugins/bibles/lib/__init__.py | 2 +- openlp/plugins/bibles/lib/db.py | 4 +- openlp/plugins/bibles/lib/manager.py | 2 +- openlp/plugins/bibles/lib/mediaitem.py | 19 +++--- 6 files changed, 50 insertions(+), 69 deletions(-) diff --git a/openlp/plugins/bibles/forms/editbibledialog.py b/openlp/plugins/bibles/forms/editbibledialog.py index 51e7a0ab7..febfa820d 100644 --- a/openlp/plugins/bibles/forms/editbibledialog.py +++ b/openlp/plugins/bibles/forms/editbibledialog.py @@ -53,40 +53,29 @@ class Ui_EditBibleDialog(object): self.metaTabLayout.setObjectName(u'metaTabLayout') self.versionNameLabel = QtGui.QLabel(self.metaTab) self.versionNameLabel.setObjectName(u'versionNameLabel') - self.metaTabLayout.setWidget(0, QtGui.QFormLayout.LabelRole, - self.versionNameLabel) self.versionNameEdit = QtGui.QLineEdit(self.metaTab) self.versionNameEdit.setObjectName(u'versionNameEdit') self.versionNameLabel.setBuddy(self.versionNameEdit) - self.metaTabLayout.setWidget(0, QtGui.QFormLayout.FieldRole, - self.versionNameEdit) + self.metaTabLayout.addRow(self.versionNameLabel, self.versionNameEdit) self.copyrightLabel = QtGui.QLabel(self.metaTab) self.copyrightLabel.setObjectName(u'copyrightLabel') - self.metaTabLayout.setWidget(1, QtGui.QFormLayout.LabelRole, - self.copyrightLabel) self.copyrightEdit = QtGui.QLineEdit(self.metaTab) self.copyrightEdit.setObjectName(u'copyrightEdit') self.copyrightLabel.setBuddy(self.copyrightEdit) - self.metaTabLayout.setWidget(1, QtGui.QFormLayout.FieldRole, - self.copyrightEdit) + self.metaTabLayout.addRow(self.copyrightLabel, self.copyrightEdit) self.permissionsLabel = QtGui.QLabel(self.metaTab) self.permissionsLabel.setObjectName(u'permissionsLabel') - self.metaTabLayout.setWidget(2, QtGui.QFormLayout.LabelRole, - self.permissionsLabel) self.permissionsEdit = QtGui.QLineEdit(self.metaTab) self.permissionsEdit.setObjectName(u'permissionsEdit') self.permissionsLabel.setBuddy(self.permissionsEdit) - self.metaTabLayout.setWidget(2, QtGui.QFormLayout.FieldRole, - self.permissionsEdit) + self.metaTabLayout.addRow(self.permissionsLabel, self.permissionsEdit) self.languageSelectionLabel = QtGui.QLabel(self.metaTab) self.languageSelectionLabel.setObjectName(u'languageSelectionLabel') - self.metaTabLayout.setWidget(3, QtGui.QFormLayout.LabelRole, - self.languageSelectionLabel) self.languageSelectionComboBox = QtGui.QComboBox(self.metaTab) self.languageSelectionComboBox.setObjectName( u'languageSelectionComboBox') self.languageSelectionComboBox.addItems([u'', u'', u'', u'']) - self.metaTabLayout.setWidget(3, QtGui.QFormLayout.FieldRole, + self.metaTabLayout.addRow(self.languageSelectionLabel, self.languageSelectionComboBox) self.bibleTabWidget.addTab(self.metaTab, u'') # Book name tab @@ -102,34 +91,29 @@ class Ui_EditBibleDialog(object): self.scrollArea.setObjectName(u'scrollArea') self.scrollArea.setHorizontalScrollBarPolicy( QtCore.Qt.ScrollBarAlwaysOff) - self.bookNameGroupBox = QtGui.QWidget(self.scrollArea) - self.bookNameGroupBox.setObjectName(u'bookNameGroupBox') - self.bookNameGroupBoxLayout = QtGui.QFormLayout(self.bookNameGroupBox) - self.bookNameGroupBoxLayout.setObjectName(u'bookNameGroupBoxLayout') + self.bookNameWidget = QtGui.QWidget(self.scrollArea) + self.bookNameWidget.setObjectName(u'bookNameWidget') + self.bookNameWidgetLayout = QtGui.QFormLayout(self.bookNameWidget) + self.bookNameWidgetLayout.setObjectName(u'bookNameWidgetLayout') self.bookNameLabel = {} self.bookNameEdit= {} x = 0 for book in BiblesResourcesDB.get_books(): self.bookNameLabel[book[u'abbreviation']] = QtGui.QLabel( - self.bookNameGroupBox) + self.bookNameWidget) self.bookNameLabel[book[u'abbreviation']].setObjectName( u'bookNameLabel[%s]' % book[u'abbreviation']) - self.bookNameGroupBoxLayout.setWidget(x, - QtGui.QFormLayout.LabelRole, - self.bookNameLabel[book[u'abbreviation']]) self.bookNameEdit[book[u'abbreviation']] = QtGui.QLineEdit( - self.bookNameGroupBox) + self.bookNameWidget) self.bookNameEdit[book[u'abbreviation']].setObjectName( u'bookNameEdit[%s]' % book[u'abbreviation']) - self.bookNameGroupBoxLayout.setWidget(x, - QtGui.QFormLayout.FieldRole, + self.bookNameWidgetLayout.addRow( + self.bookNameLabel[book[u'abbreviation']], self.bookNameEdit[book[u'abbreviation']]) - x = x+1 - self.scrollArea.setWidget(self.bookNameGroupBox) + x = x + 1 + self.scrollArea.setWidget(self.bookNameWidget) self.bookNameTabLayout.addWidget(self.scrollArea) - self.spacer = QtGui.QSpacerItem(20, 5, QtGui.QSizePolicy.Minimum, - QtGui.QSizePolicy.Expanding) - self.bookNameTabLayout.addItem(self.spacer) + self.bookNameTabLayout.addStretch() self.bibleTabWidget.addTab(self.bookNameTab, u'') # Last few bits self.dialogLayout.addWidget(self.bibleTabWidget) @@ -156,15 +140,16 @@ class Ui_EditBibleDialog(object): self.bibleTabWidget.indexOf(self.bookNameTab), translate('SongsPlugin.EditBibleForm', 'Custom Book Names')) self.languageSelectionLabel.setText( - translate('BiblesPlugin.EditBibleForm', 'Bookname language:')) + translate('BiblesPlugin.EditBibleForm', 'Book name language:')) self.languageSelectionComboBox.setItemText(0, translate('BiblesPlugin.EditBibleForm', 'General Settings')) - self.languageSelectionComboBox.setItemText(LanguageSelection.Bible+1, - translate('BiblesPlugin.EditBibleForm', 'Bible language')) + self.languageSelectionComboBox.setItemText(LanguageSelection.Bible + 1, + translate('BiblesPlugin.EditBibleForm', 'Bible Language')) self.languageSelectionComboBox.setItemText( - LanguageSelection.Application+1, - translate('BiblesPlugin.EditBibleForm', 'Application language')) - self.languageSelectionComboBox.setItemText(LanguageSelection.English+1, + LanguageSelection.Application + 1, + translate('BiblesPlugin.EditBibleForm', 'Application Language')) + self.languageSelectionComboBox.setItemText( + LanguageSelection.English + 1, translate('BiblesPlugin.EditBibleForm', 'English')) self.languageSelectionComboBox.setToolTip( translate('BiblesPlugin.EditBibleForm', 'Multiple options:\n' diff --git a/openlp/plugins/bibles/forms/editbibleform.py b/openlp/plugins/bibles/forms/editbibleform.py index 5ababcaa0..cb825db04 100644 --- a/openlp/plugins/bibles/forms/editbibleform.py +++ b/openlp/plugins/bibles/forms/editbibleform.py @@ -52,8 +52,6 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): self.mediaitem = mediaitem self.validate_error = [] self.booknames = BibleStrings().Booknames - # can this be automated? - self.width = 400 self.setupUi(self) self.manager = manager @@ -76,7 +74,7 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): self.bible, u'Bookname language') if self.bookname_language: self.languageSelectionComboBox.setCurrentIndex( - int(self.bookname_language.value)+1) + int(self.bookname_language.value) + 1) self.books = {} self.webbible = self.manager.get_meta_data(self.bible, u'download source') @@ -97,10 +95,10 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): self.bookNameEdit[book[u'abbreviation']].setText( self.books[book[u'abbreviation']].name) else: - self.bookNameGroupBoxLayout.removeWidget( + self.bookNameWidgetLayout.removeWidget( self.bookNameLabel[book[u'abbreviation']]) self.bookNameLabel[book[u'abbreviation']].setParent(None) - self.bookNameGroupBoxLayout.removeWidget( + self.bookNameWidgetLayout.removeWidget( self.bookNameEdit[book[u'abbreviation']]) self.bookNameEdit[book[u'abbreviation']].setParent(None) @@ -122,9 +120,9 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): self.copyright = unicode(self.copyrightEdit.text()) self.permissions = unicode(self.permissionsEdit.text()) self.bookname_language = \ - self.languageSelectionComboBox.currentIndex()-1 + self.languageSelectionComboBox.currentIndex() - 1 for error in self.validate_error: - self.changeBackgroundColor(error, 'white') + self.changeBackgroundColor(error) if not self.validateMeta(): save = False if not self.webbible and save: @@ -156,7 +154,7 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): Validate the Meta before saving. """ if not self.version: - self.changeBackgroundColor(self.versionNameEdit, 'red') + self.changeBackgroundColor(self.versionNameEdit, u'red') self.validate_error = [self.versionNameEdit] self.versionNameEdit.setFocus() critical_error_message_box(UiStrings().EmptyField, @@ -164,7 +162,7 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): 'You need to specify a version name for your Bible.')) return False elif not self.copyright: - self.changeBackgroundColor(self.copyrightEdit, 'red') + self.changeBackgroundColor(self.copyrightEdit, u'red') self.validate_error = [self.copyrightEdit] self.copyrightEdit.setFocus() critical_error_message_box(UiStrings().EmptyField, @@ -175,7 +173,7 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): elif self.manager.exists(self.version) and \ self.manager.get_meta_data(self.bible, u'Version').value != \ self.version: - self.changeBackgroundColor(self.versionNameEdit, 'red') + self.changeBackgroundColor(self.versionNameEdit, u'red') self.validate_error = [self.versionNameEdit] self.versionNameEdit.setFocus() critical_error_message_box( @@ -192,7 +190,7 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): """ book_regex = re.compile(u'[\d]*[^\d]+$') if not new_bookname: - self.changeBackgroundColor(self.bookNameEdit[abbreviation], 'red') + self.changeBackgroundColor(self.bookNameEdit[abbreviation], u'red') self.validate_error = [self.bookNameEdit[abbreviation]] self.bookNameEdit[abbreviation].setFocus() critical_error_message_box(UiStrings().EmptyField, @@ -201,7 +199,7 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): self.booknames[abbreviation]) return False elif not book_regex.match(new_bookname): - self.changeBackgroundColor(self.bookNameEdit[abbreviation], 'red') + self.changeBackgroundColor(self.bookNameEdit[abbreviation], u'red') self.validate_error = [self.bookNameEdit[abbreviation]] self.bookNameEdit[abbreviation].setFocus() critical_error_message_box(UiStrings().EmptyField, @@ -216,9 +214,9 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): continue if unicode(self.bookNameEdit[abbr].text()) == new_bookname: self.changeBackgroundColor(self.bookNameEdit[abbreviation], - 'red') + u'red') self.bookNameEdit[abbreviation].setFocus() - self.changeBackgroundColor(self.bookNameEdit[abbr], 'red') + self.changeBackgroundColor(self.bookNameEdit[abbr], u'red') self.validate_error = [self.bookNameEdit[abbr], self.bookNameEdit[abbreviation]] critical_error_message_box( @@ -230,10 +228,11 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): return False return True - def changeBackgroundColor(self, lineedit, color): + def changeBackgroundColor(self, lineedit, color=None): """ Change the Background Color of the given LineEdit """ - pal = QtGui.QPalette(lineedit.palette()) - pal.setColor(QtGui.QPalette.Base,QtGui.QColor(color)) + pal = QtGui.QPalette(self.palette()) + if color: + pal.setColor(QtGui.QPalette.Base, QtGui.QColor(color)) lineedit.setPalette(pal) diff --git a/openlp/plugins/bibles/lib/__init__.py b/openlp/plugins/bibles/lib/__init__.py index 8d51afdee..0b232959b 100644 --- a/openlp/plugins/bibles/lib/__init__.py +++ b/openlp/plugins/bibles/lib/__init__.py @@ -386,7 +386,7 @@ def parse_reference(reference, bible, language_selection, book_ref_id=False): if bible.get_book_by_book_ref_id(value[u'id']): book_ref_id = value[u'id'] break - elif bible.get_book_by_book_ref_id(book_ref_id): + elif not bible.get_book_by_book_ref_id(book_ref_id): book_ref_id = False ranges = match.group(u'ranges') range_list = get_reference_match(u'range_separator').split(ranges) diff --git a/openlp/plugins/bibles/lib/db.py b/openlp/plugins/bibles/lib/db.py index 704e0da4b..15f4147e3 100644 --- a/openlp/plugins/bibles/lib/db.py +++ b/openlp/plugins/bibles/lib/db.py @@ -213,9 +213,7 @@ class BibleDB(QtCore.QObject, Manager): The book object """ log.debug(u'BibleDB.update_book("%s")', book.name) - if self.save_object(book): - return True - return False + return self.save_object(book) def delete_book(self, db_book): """ diff --git a/openlp/plugins/bibles/lib/manager.py b/openlp/plugins/bibles/lib/manager.py index 25ca8cd8e..6dfa56fd2 100644 --- a/openlp/plugins/bibles/lib/manager.py +++ b/openlp/plugins/bibles/lib/manager.py @@ -328,7 +328,7 @@ class BibleManager(object): language_selection = self.get_meta_data(bible, u'Bookname language') if language_selection: language_selection = int(language_selection.value) - if language_selection == None or language_selection == -1: + if language_selection is None or language_selection == -1: language_selection = QtCore.QSettings().value( self.settingsSection + u'/bookname language', QtCore.QVariant(0)).toInt()[0] diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py index 5c38b5f4f..74a8b7304 100644 --- a/openlp/plugins/bibles/lib/mediaitem.py +++ b/openlp/plugins/bibles/lib/mediaitem.py @@ -435,7 +435,7 @@ class BibleMediaItem(MediaManagerItem): bible, u'Bookname language') if language_selection: language_selection = int(language_selection.value) - if language_selection == None or language_selection == -1: + if language_selection is None or language_selection == -1: language_selection = QtCore.QSettings().value( self.settingsSection + u'/bookname language', QtCore.QVariant(0)).toInt()[0] @@ -514,7 +514,7 @@ class BibleMediaItem(MediaManagerItem): bible, u'Bookname language') if language_selection: language_selection = int(language_selection.value) - if language_selection == None or language_selection == -1: + if language_selection is None or language_selection == -1: language_selection = QtCore.QSettings().value( self.settingsSection + u'/bookname language', QtCore.QVariant(0)).toInt()[0] @@ -554,7 +554,7 @@ class BibleMediaItem(MediaManagerItem): bible = unicode(self.quickVersionComboBox.currentText()) elif self.advancedTab.isVisible(): bible = unicode(self.advancedVersionComboBox.currentText()) - if bible != u'': + if bible: self.editBibleForm = EditBibleForm(self, self.plugin.formparent, self.plugin.manager) self.editBibleForm.loadBible(bible) @@ -566,7 +566,7 @@ class BibleMediaItem(MediaManagerItem): bible = unicode(self.quickVersionComboBox.currentText()) elif self.advancedTab.isVisible(): bible = unicode(self.advancedVersionComboBox.currentText()) - if bible != u'': + if bible: if QtGui.QMessageBox.question(self, UiStrings().ConfirmDelete, unicode(translate('BiblesPlugin.MediaItem', 'Are you sure you want to delete "%s"?')) % bible, @@ -843,7 +843,7 @@ class BibleMediaItem(MediaManagerItem): bible, u'Bookname language') if language_selection: language_selection = int(language_selection.value) - if language_selection == None or language_selection == -1: + if language_selection is None or language_selection == -1: language_selection = QtCore.QSettings().value( self.settingsSection + u'/bookname language', QtCore.QVariant(0)).toInt()[0] @@ -882,12 +882,11 @@ class BibleMediaItem(MediaManagerItem): log.exception(u'The second_search_results does not have as ' 'many verses as the search_results.') break - bible_text = u'%s %d%s%d (%s, %s)' % (book, - verse.chapter, verse_separator, verse.verse, version, - second_version) + bible_text = u'%s %d%s%d (%s, %s)' % (book, verse.chapter, + verse_separator, verse.verse, version, second_version) else: - bible_text = u'%s %d%s%d (%s)' % (book, - verse.chapter, verse_separator, verse.verse, version) + bible_text = u'%s %d%s%d (%s)' % (book, verse.chapter, + verse_separator, verse.verse, version) bible_verse = QtGui.QListWidgetItem(bible_text) bible_verse.setData(QtCore.Qt.UserRole, QtCore.QVariant(data)) items.append(bible_verse) From 06033df8adf32a72d0ef33173afa2bdf47ce47ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20K=C3=B6hler?= Date: Thu, 5 Apr 2012 20:31:15 +0200 Subject: [PATCH 14/42] adapt editbibleform - some fixes --- .../plugins/bibles/forms/editbibledialog.py | 76 ++++++++++++------- openlp/plugins/bibles/forms/editbibleform.py | 5 +- openlp/plugins/bibles/lib/biblestab.py | 7 +- 3 files changed, 53 insertions(+), 35 deletions(-) diff --git a/openlp/plugins/bibles/forms/editbibledialog.py b/openlp/plugins/bibles/forms/editbibledialog.py index febfa820d..c3db88e91 100644 --- a/openlp/plugins/bibles/forms/editbibledialog.py +++ b/openlp/plugins/bibles/forms/editbibledialog.py @@ -49,34 +49,52 @@ class Ui_EditBibleDialog(object): # Meta tab self.metaTab = QtGui.QWidget() self.metaTab.setObjectName(u'metaTab') - self.metaTabLayout = QtGui.QFormLayout(self.metaTab) + self.metaTabLayout = QtGui.QVBoxLayout(self.metaTab) self.metaTabLayout.setObjectName(u'metaTabLayout') - self.versionNameLabel = QtGui.QLabel(self.metaTab) + self.licenseDetailsGroupBox = QtGui.QGroupBox(self.metaTab) + self.licenseDetailsGroupBox.setObjectName(u'licenseDetailsGroupBox') + self.licenseDetailsLayout = QtGui.QFormLayout( + self.licenseDetailsGroupBox) + self.licenseDetailsLayout.setObjectName(u'licenseDetailsLayout') + self.versionNameLabel = QtGui.QLabel(self.licenseDetailsGroupBox) self.versionNameLabel.setObjectName(u'versionNameLabel') - self.versionNameEdit = QtGui.QLineEdit(self.metaTab) + self.versionNameEdit = QtGui.QLineEdit(self.licenseDetailsGroupBox) self.versionNameEdit.setObjectName(u'versionNameEdit') self.versionNameLabel.setBuddy(self.versionNameEdit) - self.metaTabLayout.addRow(self.versionNameLabel, self.versionNameEdit) - self.copyrightLabel = QtGui.QLabel(self.metaTab) + self.licenseDetailsLayout.addRow(self.versionNameLabel, + self.versionNameEdit) + self.copyrightLabel = QtGui.QLabel(self.licenseDetailsGroupBox) self.copyrightLabel.setObjectName(u'copyrightLabel') - self.copyrightEdit = QtGui.QLineEdit(self.metaTab) + self.copyrightEdit = QtGui.QLineEdit(self.licenseDetailsGroupBox) self.copyrightEdit.setObjectName(u'copyrightEdit') self.copyrightLabel.setBuddy(self.copyrightEdit) - self.metaTabLayout.addRow(self.copyrightLabel, self.copyrightEdit) - self.permissionsLabel = QtGui.QLabel(self.metaTab) + self.licenseDetailsLayout.addRow(self.copyrightLabel, + self.copyrightEdit) + self.permissionsLabel = QtGui.QLabel(self.licenseDetailsGroupBox) self.permissionsLabel.setObjectName(u'permissionsLabel') - self.permissionsEdit = QtGui.QLineEdit(self.metaTab) + self.permissionsEdit = QtGui.QLineEdit(self.licenseDetailsGroupBox) self.permissionsEdit.setObjectName(u'permissionsEdit') self.permissionsLabel.setBuddy(self.permissionsEdit) - self.metaTabLayout.addRow(self.permissionsLabel, self.permissionsEdit) - self.languageSelectionLabel = QtGui.QLabel(self.metaTab) + self.licenseDetailsLayout.addRow(self.permissionsLabel, + self.permissionsEdit) + self.metaTabLayout.addWidget(self.licenseDetailsGroupBox) + self.languageSelectionGroupBox = QtGui.QGroupBox(self.metaTab) + self.languageSelectionGroupBox.setObjectName( + u'languageSelectionGroupBox') + self.languageSelectionLayout = QtGui.QVBoxLayout( + self.languageSelectionGroupBox) + self.languageSelectionLabel = QtGui.QLabel( + self.languageSelectionGroupBox) self.languageSelectionLabel.setObjectName(u'languageSelectionLabel') - self.languageSelectionComboBox = QtGui.QComboBox(self.metaTab) + self.languageSelectionComboBox = QtGui.QComboBox( + self.languageSelectionGroupBox) self.languageSelectionComboBox.setObjectName( u'languageSelectionComboBox') self.languageSelectionComboBox.addItems([u'', u'', u'', u'']) - self.metaTabLayout.addRow(self.languageSelectionLabel, - self.languageSelectionComboBox) + self.languageSelectionLayout.addWidget(self.languageSelectionLabel) + self.languageSelectionLayout.addWidget(self.languageSelectionComboBox) + self.metaTabLayout.addWidget(self.languageSelectionGroupBox) + self.metaTabLayout.addStretch() self.bibleTabWidget.addTab(self.metaTab, u'') # Book name tab self.bookNameTab = QtGui.QWidget() @@ -97,7 +115,6 @@ class Ui_EditBibleDialog(object): self.bookNameWidgetLayout.setObjectName(u'bookNameWidgetLayout') self.bookNameLabel = {} self.bookNameEdit= {} - x = 0 for book in BiblesResourcesDB.get_books(): self.bookNameLabel[book[u'abbreviation']] = QtGui.QLabel( self.bookNameWidget) @@ -110,7 +127,6 @@ class Ui_EditBibleDialog(object): self.bookNameWidgetLayout.addRow( self.bookNameLabel[book[u'abbreviation']], self.bookNameEdit[book[u'abbreviation']]) - x = x + 1 self.scrollArea.setWidget(self.bookNameWidget) self.bookNameTabLayout.addWidget(self.scrollArea) self.bookNameTabLayout.addStretch() @@ -126,23 +142,27 @@ class Ui_EditBibleDialog(object): def retranslateUi(self, editBibleDialog): self.booknames = BibleStrings().Booknames editBibleDialog.setWindowTitle( - translate('BiblesPlugin.EditBibleForm', 'Song Editor')) + translate('BiblesPlugin.EditBibleForm', 'Bible Editor')) + # Meta tab self.bibleTabWidget.setTabText( self.bibleTabWidget.indexOf(self.metaTab), - translate('SongsPlugin.EditBibleForm', 'License Details')) + translate('SongsPlugin.EditBibleForm', 'Meta Data')) + self.licenseDetailsGroupBox.setTitle( + translate('BiblesPlugin.EditBibleForm', 'License Details')) self.versionNameLabel.setText( translate('BiblesPlugin.EditBibleForm', 'Version name:')) self.copyrightLabel.setText( translate('BiblesPlugin.EditBibleForm', 'Copyright:')) self.permissionsLabel.setText( translate('BiblesPlugin.EditBibleForm', 'Permissions:')) - self.bibleTabWidget.setTabText( - self.bibleTabWidget.indexOf(self.bookNameTab), - translate('SongsPlugin.EditBibleForm', 'Custom Book Names')) + self.languageSelectionGroupBox.setTitle(translate( + 'BiblesPlugin.EditBibleForm', 'Default Bible Language')) self.languageSelectionLabel.setText( - translate('BiblesPlugin.EditBibleForm', 'Book name language:')) + translate('BiblesPlugin.EditBibleForm', + 'Book name language in search field, search results and on ' + 'display:')) self.languageSelectionComboBox.setItemText(0, - translate('BiblesPlugin.EditBibleForm', 'General Settings')) + translate('BiblesPlugin.EditBibleForm', 'Global Settings')) self.languageSelectionComboBox.setItemText(LanguageSelection.Bible + 1, translate('BiblesPlugin.EditBibleForm', 'Bible Language')) self.languageSelectionComboBox.setItemText( @@ -151,12 +171,10 @@ class Ui_EditBibleDialog(object): self.languageSelectionComboBox.setItemText( LanguageSelection.English + 1, translate('BiblesPlugin.EditBibleForm', 'English')) - self.languageSelectionComboBox.setToolTip( - translate('BiblesPlugin.EditBibleForm', 'Multiple options:\n' - 'General Settings - the option choosen in settings section\n' - 'Bible language - the language in which the Bible book names ' - 'were imported\nApplication language - the language you have ' - 'chosen for OpenLP\nEnglish - always use English book names')) + # Book name tab + self.bibleTabWidget.setTabText( + self.bibleTabWidget.indexOf(self.bookNameTab), + translate('SongsPlugin.EditBibleForm', 'Custom Book Names')) for book in BiblesResourcesDB.get_books(): self.bookNameLabel[book[u'abbreviation']].setText( u'%s:' % unicode(self.booknames[book[u'abbreviation']])) diff --git a/openlp/plugins/bibles/forms/editbibleform.py b/openlp/plugins/bibles/forms/editbibleform.py index cb825db04..4fc73e607 100644 --- a/openlp/plugins/bibles/forms/editbibleform.py +++ b/openlp/plugins/bibles/forms/editbibleform.py @@ -82,12 +82,11 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): self.bookNameNotice.setText(translate('BiblesPlugin.EditBibleForm', 'This is a webbible.\nIt is not possible to customize the Book ' 'Names.')) - self.bookNameTabLayout.removeWidget(self.scrollArea) - self.scrollArea.setParent(None) + self.scrollArea.hide() else: self.bookNameNotice.setText(translate('BiblesPlugin.EditBibleForm', 'To use the customized Book Names, choose the option "Bible ' - 'language"\nin general settings or explicit for this Bible.')) + 'language"\nin global settings or explicit for this Bible.')) for book in BiblesResourcesDB.get_books(): self.books[book[u'abbreviation']] = self.manager.get_book_by_id( self.bible, book[u'id']) diff --git a/openlp/plugins/bibles/lib/biblestab.py b/openlp/plugins/bibles/lib/biblestab.py index 353dc265d..751c23264 100644 --- a/openlp/plugins/bibles/lib/biblestab.py +++ b/openlp/plugins/bibles/lib/biblestab.py @@ -276,10 +276,11 @@ class BiblesTab(SettingsTab): 'end marks may be defined.\nThey have to be separated by a ' 'vertical bar "|".\nPlease clear this edit line to use the ' 'default value.')) - self.languageSelectionGroupBox.setTitle(translate('BiblesPlugin.BiblesTab', - 'Default Search Field Language')) + self.languageSelectionGroupBox.setTitle(translate( + 'BiblesPlugin.BiblesTab', 'Default Bible Language')) self.languageSelectionLabel.setText(translate('BiblesPlugin.BiblesTab', - 'Book name language in search field:')) + 'Book name language in search field,\nsearch results and on ' + 'display:')) self.languageSelectionComboBox.setItemText(LanguageSelection.Bible, translate('BiblesPlugin.BiblesTab', 'Bible language')) self.languageSelectionComboBox.setItemText( From e310c20cccde70ee87bd9b4fb5a9c439b6e55e82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20K=C3=B6hler?= Date: Fri, 6 Apr 2012 20:14:38 +0200 Subject: [PATCH 15/42] fixes --- .../plugins/bibles/forms/editbibledialog.py | 9 ++- openlp/plugins/bibles/forms/editbibleform.py | 81 ++++++------------- 2 files changed, 31 insertions(+), 59 deletions(-) diff --git a/openlp/plugins/bibles/forms/editbibledialog.py b/openlp/plugins/bibles/forms/editbibledialog.py index c3db88e91..83e8d39d6 100644 --- a/openlp/plugins/bibles/forms/editbibledialog.py +++ b/openlp/plugins/bibles/forms/editbibledialog.py @@ -36,7 +36,7 @@ from openlp.plugins.bibles.lib.db import BiblesResourcesDB class Ui_EditBibleDialog(object): def setupUi(self, editBibleDialog): editBibleDialog.setObjectName(u'editBibleDialog') - editBibleDialog.resize(600, 400) + editBibleDialog.resize(520, 400) editBibleDialog.setWindowIcon( build_icon(u':/icon/openlp-logo-16x16.png')) editBibleDialog.setModal(True) @@ -103,6 +103,7 @@ class Ui_EditBibleDialog(object): self.bookNameTabLayout.setObjectName(u'bookNameTabLayout') self.bookNameNotice = QtGui.QLabel(self.bookNameTab) self.bookNameNotice.setObjectName(u'bookNameNotice') + self.bookNameNotice.setWordWrap(True) self.bookNameTabLayout.addWidget(self.bookNameNotice) self.scrollArea = QtGui.QScrollArea(self.bookNameTab) self.scrollArea.setWidgetResizable(True) @@ -162,12 +163,12 @@ class Ui_EditBibleDialog(object): 'Book name language in search field, search results and on ' 'display:')) self.languageSelectionComboBox.setItemText(0, - translate('BiblesPlugin.EditBibleForm', 'Global Settings')) + translate('BiblesPlugin.EditBibleForm', 'Global settings')) self.languageSelectionComboBox.setItemText(LanguageSelection.Bible + 1, - translate('BiblesPlugin.EditBibleForm', 'Bible Language')) + translate('BiblesPlugin.EditBibleForm', 'Bible language')) self.languageSelectionComboBox.setItemText( LanguageSelection.Application + 1, - translate('BiblesPlugin.EditBibleForm', 'Application Language')) + translate('BiblesPlugin.EditBibleForm', 'Application language')) self.languageSelectionComboBox.setItemText( LanguageSelection.English + 1, translate('BiblesPlugin.EditBibleForm', 'English')) diff --git a/openlp/plugins/bibles/forms/editbibleform.py b/openlp/plugins/bibles/forms/editbibleform.py index 4fc73e607..9300fa079 100644 --- a/openlp/plugins/bibles/forms/editbibleform.py +++ b/openlp/plugins/bibles/forms/editbibleform.py @@ -50,7 +50,6 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): """ QtGui.QDialog.__init__(self, parent) self.mediaitem = mediaitem - self.validate_error = [] self.booknames = BibleStrings().Booknames self.setupUi(self) self.manager = manager @@ -80,13 +79,14 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): u'download source') if self.webbible: self.bookNameNotice.setText(translate('BiblesPlugin.EditBibleForm', - 'This is a webbible.\nIt is not possible to customize the Book ' - 'Names.')) + 'This is a Web Download Bible.\nIt is not possible to ' + 'customize the Book Names.')) self.scrollArea.hide() else: self.bookNameNotice.setText(translate('BiblesPlugin.EditBibleForm', - 'To use the customized Book Names, choose the option "Bible ' - 'language"\nin global settings or explicit for this Bible.')) + 'To use the customized book names, "Bible language" must be ' + 'selected on the Meta Data tab or, if "Global settings" is ' + 'selected, on the Bible page in Configure OpenLP.')) for book in BiblesResourcesDB.get_books(): self.books[book[u'abbreviation']] = self.manager.get_book_by_id( self.bible, book[u'id']) @@ -114,55 +114,46 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): Exit Dialog and save data """ log.debug(u'BibleEditForm.accept') - save = True self.version = unicode(self.versionNameEdit.text()) self.copyright = unicode(self.copyrightEdit.text()) self.permissions = unicode(self.permissionsEdit.text()) self.bookname_language = \ self.languageSelectionComboBox.currentIndex() - 1 - for error in self.validate_error: - self.changeBackgroundColor(error) if not self.validateMeta(): - save = False - if not self.webbible and save: + return + if not self.webbible: custom_names = {} for abbr, book in self.books.iteritems(): if book: custom_names[abbr] = unicode(self.bookNameEdit[abbr].text()) if book.name != custom_names[abbr]: if not self.validateBook(custom_names[abbr], abbr): - save = False - break - if save: - Receiver.send_message(u'openlp_process_events') - Receiver.send_message(u'cursor_busy') - self.manager.save_meta_data(self.bible, self.version, - self.copyright, self.permissions, self.bookname_language) - if not self.webbible: - for abbr, book in self.books.iteritems(): - if book: - if book.name != custom_names[abbr]: - book.name = custom_names[abbr] - self.manager.update_book(self.bible, book) - self.bible = None - Receiver.send_message(u'cursor_normal') - QtGui.QDialog.accept(self) + return + Receiver.send_message(u'openlp_process_events') + Receiver.send_message(u'cursor_busy') + self.manager.save_meta_data(self.bible, self.version, + self.copyright, self.permissions, self.bookname_language) + if not self.webbible: + for abbr, book in self.books.iteritems(): + if book: + if book.name != custom_names[abbr]: + book.name = custom_names[abbr] + self.manager.update_book(self.bible, book) + self.bible = None + Receiver.send_message(u'cursor_normal') + QtGui.QDialog.accept(self) def validateMeta(self): """ Validate the Meta before saving. """ if not self.version: - self.changeBackgroundColor(self.versionNameEdit, u'red') - self.validate_error = [self.versionNameEdit] self.versionNameEdit.setFocus() critical_error_message_box(UiStrings().EmptyField, translate('BiblesPlugin.BibleEditForm', 'You need to specify a version name for your Bible.')) return False elif not self.copyright: - self.changeBackgroundColor(self.copyrightEdit, u'red') - self.validate_error = [self.copyrightEdit] self.copyrightEdit.setFocus() critical_error_message_box(UiStrings().EmptyField, translate('BiblesPlugin.BibleEditForm', @@ -172,8 +163,6 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): elif self.manager.exists(self.version) and \ self.manager.get_meta_data(self.bible, u'Version').value != \ self.version: - self.changeBackgroundColor(self.versionNameEdit, u'red') - self.validate_error = [self.versionNameEdit] self.versionNameEdit.setFocus() critical_error_message_box( translate('BiblesPlugin.BibleEditForm', 'Bible Exists'), @@ -189,8 +178,6 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): """ book_regex = re.compile(u'[\d]*[^\d]+$') if not new_bookname: - self.changeBackgroundColor(self.bookNameEdit[abbreviation], u'red') - self.validate_error = [self.bookNameEdit[abbreviation]] self.bookNameEdit[abbreviation].setFocus() critical_error_message_box(UiStrings().EmptyField, unicode(translate('BiblesPlugin.BibleEditForm', @@ -198,40 +185,24 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): self.booknames[abbreviation]) return False elif not book_regex.match(new_bookname): - self.changeBackgroundColor(self.bookNameEdit[abbreviation], u'red') - self.validate_error = [self.bookNameEdit[abbreviation]] self.bookNameEdit[abbreviation].setFocus() critical_error_message_box(UiStrings().EmptyField, unicode(translate('BiblesPlugin.BibleEditForm', - 'The book name "%s" is not correct.\nDecimal digits only could ' - 'be used at the beginning and\nmust be followed by one or more ' - 'non-digit characters')) % new_bookname) + 'The book name "%s" is not correct.\nNumbers can only be used ' + 'at the beginning and must\nbe followed by one or more ' + 'non-numeric characters.')) % new_bookname) return False for abbr, book in self.books.iteritems(): if book: if abbr == abbreviation: continue if unicode(self.bookNameEdit[abbr].text()) == new_bookname: - self.changeBackgroundColor(self.bookNameEdit[abbreviation], - u'red') self.bookNameEdit[abbreviation].setFocus() - self.changeBackgroundColor(self.bookNameEdit[abbr], u'red') - self.validate_error = [self.bookNameEdit[abbr], - self.bookNameEdit[abbreviation]] critical_error_message_box( translate('BiblesPlugin.BibleEditForm', - 'Book Name Exists Twice'), + 'Duplicate Book Name'), unicode(translate('BiblesPlugin.BibleEditForm', - 'The Book Name "%s" exists twice. Please change one.')) + 'The Book Name "%s" has been entered more than once.')) % new_bookname) return False return True - - def changeBackgroundColor(self, lineedit, color=None): - """ - Change the Background Color of the given LineEdit - """ - pal = QtGui.QPalette(self.palette()) - if color: - pal.setColor(QtGui.QPalette.Base, QtGui.QColor(color)) - lineedit.setPalette(pal) From 9c11494364b1b5d4a6a41f11ff94bdc93e622cd7 Mon Sep 17 00:00:00 2001 From: Philip Ridout Date: Sat, 7 Apr 2012 17:41:03 +0100 Subject: [PATCH 16/42] Added support for ALL DreamBeam file formats. --- openlp/plugins/songs/lib/dreambeamimport.py | 72 ++++++++++++++------- 1 file changed, 47 insertions(+), 25 deletions(-) diff --git a/openlp/plugins/songs/lib/dreambeamimport.py b/openlp/plugins/songs/lib/dreambeamimport.py index 68868baa1..d5373cf39 100644 --- a/openlp/plugins/songs/lib/dreambeamimport.py +++ b/openlp/plugins/songs/lib/dreambeamimport.py @@ -108,30 +108,52 @@ class DreamBeamImport(SongImport): ('Invalid DreamBeam song file. Missing ' 'DreamSong tag.')))) continue - if hasattr(song_xml, u'Title'): - self.title = unicode(song_xml.Title.text) - if hasattr(song_xml, u'Author'): - # DreamBeam does not have a copyright field, instead it - # sometimes uses the author field - self.addCopyright(unicode(song_xml.Author.text)) - self.parseAuthor(unicode(song_xml.Author.text)) - if hasattr(song_xml, u'SongLyrics'): - for lyrics_item in song_xml.SongLyrics.iterchildren(): - verse_type = lyrics_item.get(u'Type') - verse_number = lyrics_item.get(u'Number') - verse_text = unicode(lyrics_item.text) - self.addVerse(verse_text, - (u'%s%s' % (verse_type[:1], verse_number))) - if hasattr(song_xml, u'Collection'): - self.songBookName = unicode(song_xml.Collection.text) - if hasattr(song_xml, u'Number'): - self.songNumber = unicode(song_xml.Number.text) - if hasattr(song_xml, u'Sequence'): - for LyricsSequenceItem in song_xml.Sequence.iterchildren(): - self.verseOrderList.append( - "%s%s" % (LyricsSequenceItem.get(u'Type')[:1], - LyricsSequenceItem.get(u'Number'))) - if hasattr(song_xml, u'Notes'): - self.comments = unicode(song_xml.Notes.text) + if hasattr(song_xml, u'Version'): + self.version = float(song_xml.Version.text) + # Version numbers found in DreamBeam Source /FileTypes/Song.cs + if self.version <= 0.49: + if hasattr(song_xml.Text0, u'Text'): + self.title = unicode(song_xml.Text0.Text.text) + if hasattr(song_xml.Text1, u'Text'): + self.lyrics = unicode(song_xml.Text1.Text.text) + for verse in self.lyrics.split(u'\n\n\n'): + self.addVerse(verse) + if hasattr(song_xml.Text2, u'Text'): + # DreamBeam does not have a copyright field, instead it + # sometimes uses the author field + self.addCopyright(unicode(song_xml.Text2.Text.text)) + self.parseAuthor(unicode(song_xml.Text2.Text.text)) + elif self.version >= 0.5: + if hasattr(song_xml, u'Title'): + self.title = unicode(song_xml.Title.text) + if hasattr(song_xml, u'Author'): + # DreamBeam does not have a copyright field, instead it + # sometimes uses the author field + self.addCopyright(unicode(song_xml.Author.text)) + self.parseAuthor(unicode(song_xml.Author.text)) + if hasattr(song_xml, u'SongLyrics'): + for lyrics_item in song_xml.SongLyrics.iterchildren(): + verse_type = lyrics_item.get(u'Type') + verse_number = lyrics_item.get(u'Number') + verse_text = unicode(lyrics_item.text) + self.addVerse(verse_text, + (u'%s%s' % (verse_type[:1], verse_number))) + if hasattr(song_xml, u'Collection'): + self.songBookName = unicode(song_xml.Collection.text) + if hasattr(song_xml, u'Number'): + self.songNumber = unicode(song_xml.Number.text) + if hasattr(song_xml, u'Sequence'): + for LyricsSequenceItem in ( + song_xml.Sequence.iterchildren()): + self.verseOrderList.append( + "%s%s" % (LyricsSequenceItem.get(u'Type')[:1], + LyricsSequenceItem.get(u'Number'))) + if hasattr(song_xml, u'Notes'): + self.comments = unicode(song_xml.Notes.text) + else: + log.exception(u'No valid version information.' + 'Invalid file %s' % file) + self.logError(file, SongStrings.XMLSyntaxError) + continue if not self.finish(): self.logError(file) From 20eab8b9178678bd24e1c99b9938146833e98ee7 Mon Sep 17 00:00:00 2001 From: Philip Ridout Date: Sat, 7 Apr 2012 20:47:41 +0100 Subject: [PATCH 17/42] Fixed case when there is no version information --- openlp/plugins/songs/lib/dreambeamimport.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/openlp/plugins/songs/lib/dreambeamimport.py b/openlp/plugins/songs/lib/dreambeamimport.py index d5373cf39..6d8e994c8 100644 --- a/openlp/plugins/songs/lib/dreambeamimport.py +++ b/openlp/plugins/songs/lib/dreambeamimport.py @@ -110,6 +110,13 @@ class DreamBeamImport(SongImport): continue if hasattr(song_xml, u'Version'): self.version = float(song_xml.Version.text) + else: + log.exception(u'No valid version information.' + 'Invalid file %s' % file) + self.logError(file, unicode( + translate('SongsPlugin.DreamBeamImport', + ('No valid version information.')))) + continue # Version numbers found in DreamBeam Source /FileTypes/Song.cs if self.version <= 0.49: if hasattr(song_xml.Text0, u'Text'): @@ -150,10 +157,5 @@ class DreamBeamImport(SongImport): LyricsSequenceItem.get(u'Number'))) if hasattr(song_xml, u'Notes'): self.comments = unicode(song_xml.Notes.text) - else: - log.exception(u'No valid version information.' - 'Invalid file %s' % file) - self.logError(file, SongStrings.XMLSyntaxError) - continue if not self.finish(): self.logError(file) From 04b4a34c683785816b1e4ee48020d476ac71975f Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Tue, 10 Apr 2012 20:38:25 +0100 Subject: [PATCH 18/42] Add service count for remotes --- openlp/core/ui/servicemanager.py | 4 ++++ openlp/plugins/remotes/lib/httpserver.py | 1 + 2 files changed, 5 insertions(+) diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index bc075c3e1..18261adcb 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -105,6 +105,7 @@ class ServiceManager(QtGui.QWidget): self.suffixes = [] self.dropPosition = 0 self.expandTabs = False + self.serviceId = 0 # is a new service and has not been saved self._modified = False self._fileName = u'' @@ -331,6 +332,8 @@ class ServiceManager(QtGui.QWidget): Setter for property "modified". Sets whether or not the current service has been modified. """ + if modified: + self.serviceId += 1 self._modified = modified serviceFile = self.shortFileName() or translate( 'OpenLP.ServiceManager', 'Untitled Service') @@ -439,6 +442,7 @@ class ServiceManager(QtGui.QWidget): self.serviceManagerList.clear() self.serviceItems = [] self.setFileName(u'') + self.serviceId += 1 self.setModified(False) QtCore.QSettings(). \ setValue(u'servicemanager/last file',QtCore.QVariant(u'')) diff --git a/openlp/plugins/remotes/lib/httpserver.py b/openlp/plugins/remotes/lib/httpserver.py index 383c7fa03..d8a5e95ce 100644 --- a/openlp/plugins/remotes/lib/httpserver.py +++ b/openlp/plugins/remotes/lib/httpserver.py @@ -396,6 +396,7 @@ class HttpConnection(object): Poll OpenLP to determine the current slide number and item name. """ result = { + u'service': self.parent.plugin.serviceManager.serviceId or 0, u'slide': self.parent.current_slide or 0, u'item': self.parent.current_item._uuid \ if self.parent.current_item else u'', From 5f16ddc73ce0102435ce5a34bd0841f944e55d29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20K=C3=B6hler?= Date: Wed, 11 Apr 2012 19:39:15 +0200 Subject: [PATCH 19/42] fixes --- openlp/plugins/bibles/forms/editbibledialog.py | 6 +++--- openlp/plugins/bibles/forms/editbibleform.py | 6 ++++-- openlp/plugins/bibles/lib/biblestab.py | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/openlp/plugins/bibles/forms/editbibledialog.py b/openlp/plugins/bibles/forms/editbibledialog.py index 83e8d39d6..0d59db62e 100644 --- a/openlp/plugins/bibles/forms/editbibledialog.py +++ b/openlp/plugins/bibles/forms/editbibledialog.py @@ -163,12 +163,12 @@ class Ui_EditBibleDialog(object): 'Book name language in search field, search results and on ' 'display:')) self.languageSelectionComboBox.setItemText(0, - translate('BiblesPlugin.EditBibleForm', 'Global settings')) + translate('BiblesPlugin.EditBibleForm', 'Global Settings')) self.languageSelectionComboBox.setItemText(LanguageSelection.Bible + 1, - translate('BiblesPlugin.EditBibleForm', 'Bible language')) + translate('BiblesPlugin.EditBibleForm', 'Bible Language')) self.languageSelectionComboBox.setItemText( LanguageSelection.Application + 1, - translate('BiblesPlugin.EditBibleForm', 'Application language')) + translate('BiblesPlugin.EditBibleForm', 'Application Language')) self.languageSelectionComboBox.setItemText( LanguageSelection.English + 1, translate('BiblesPlugin.EditBibleForm', 'English')) diff --git a/openlp/plugins/bibles/forms/editbibleform.py b/openlp/plugins/bibles/forms/editbibleform.py index 9300fa079..b4afa6295 100644 --- a/openlp/plugins/bibles/forms/editbibleform.py +++ b/openlp/plugins/bibles/forms/editbibleform.py @@ -94,12 +94,14 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): self.bookNameEdit[book[u'abbreviation']].setText( self.books[book[u'abbreviation']].name) else: + # It is nessecary to remove the Widget otherwise there still + # exists the vertical spacing in QFormLayout self.bookNameWidgetLayout.removeWidget( self.bookNameLabel[book[u'abbreviation']]) - self.bookNameLabel[book[u'abbreviation']].setParent(None) + self.bookNameLabel[book[u'abbreviation']].hide() self.bookNameWidgetLayout.removeWidget( self.bookNameEdit[book[u'abbreviation']]) - self.bookNameEdit[book[u'abbreviation']].setParent(None) + self.bookNameEdit[book[u'abbreviation']].hide() def reject(self): """ diff --git a/openlp/plugins/bibles/lib/biblestab.py b/openlp/plugins/bibles/lib/biblestab.py index 751c23264..b8ef7bdba 100644 --- a/openlp/plugins/bibles/lib/biblestab.py +++ b/openlp/plugins/bibles/lib/biblestab.py @@ -282,10 +282,10 @@ class BiblesTab(SettingsTab): 'Book name language in search field,\nsearch results and on ' 'display:')) self.languageSelectionComboBox.setItemText(LanguageSelection.Bible, - translate('BiblesPlugin.BiblesTab', 'Bible language')) + translate('BiblesPlugin.BiblesTab', 'Bible Language')) self.languageSelectionComboBox.setItemText( LanguageSelection.Application, - translate('BiblesPlugin.BiblesTab', 'Application language')) + translate('BiblesPlugin.BiblesTab', 'Application Language')) self.languageSelectionComboBox.setItemText(LanguageSelection.English, translate('BiblesPlugin.BiblesTab', 'English')) From 620d858d68b7384b0b90f6efadf9965aeee4e755 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Thu, 12 Apr 2012 16:16:12 +0200 Subject: [PATCH 20/42] clean ups --- openlp/core/lib/__init__.py | 3 +-- openlp/core/lib/listwidgetwithdnd.py | 2 +- openlp/plugins/bibles/forms/bibleimportform.py | 1 - openlp/plugins/bibles/lib/osis.py | 1 - openlp/plugins/songs/forms/editsongdialog.py | 12 ++++++------ testing/run.py | 2 +- 6 files changed, 9 insertions(+), 12 deletions(-) diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index 4403ac8ec..8b01351cb 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -29,8 +29,7 @@ The :mod:`lib` module contains most of the components and libraries that make OpenLP work. """ import logging -import os.path -import types +import os from PyQt4 import QtCore, QtGui, Qt diff --git a/openlp/core/lib/listwidgetwithdnd.py b/openlp/core/lib/listwidgetwithdnd.py index 67fa45f74..9e9787914 100644 --- a/openlp/core/lib/listwidgetwithdnd.py +++ b/openlp/core/lib/listwidgetwithdnd.py @@ -27,7 +27,7 @@ """ Extend QListWidget to handle drag and drop functionality """ -import os.path +import os from PyQt4 import QtCore, QtGui diff --git a/openlp/plugins/bibles/forms/bibleimportform.py b/openlp/plugins/bibles/forms/bibleimportform.py index ee7b5a063..cc50fdf9b 100644 --- a/openlp/plugins/bibles/forms/bibleimportform.py +++ b/openlp/plugins/bibles/forms/bibleimportform.py @@ -29,7 +29,6 @@ The bible import functions for OpenLP """ import logging import os -import os.path import locale from PyQt4 import QtCore, QtGui diff --git a/openlp/plugins/bibles/lib/osis.py b/openlp/plugins/bibles/lib/osis.py index 4afee912d..1ce3df887 100644 --- a/openlp/plugins/bibles/lib/osis.py +++ b/openlp/plugins/bibles/lib/osis.py @@ -26,7 +26,6 @@ ############################################################################### import os -import os.path import logging import chardet import codecs diff --git a/openlp/plugins/songs/forms/editsongdialog.py b/openlp/plugins/songs/forms/editsongdialog.py index 2dbfdc3b5..6143da40d 100644 --- a/openlp/plugins/songs/forms/editsongdialog.py +++ b/openlp/plugins/songs/forms/editsongdialog.py @@ -376,17 +376,17 @@ class SingleColumnTableWidget(QtGui.QTableWidget): Class to for a single column table widget to use for the verse table widget. """ def __init__(self, parent): - """ - Constrctor - """ + """ + Constrctor + """ QtGui.QTableWidget.__init__(self, parent) self.horizontalHeader().setVisible(False) self.setColumnCount(1) def resizeEvent(self, event): - """ - Resize the first column together with the widget. - """ + """ + Resize the first column together with the widget. + """ QtGui.QTableWidget.resizeEvent(self, event) if self.columnCount(): self.setColumnWidth(0, event.size().width()) diff --git a/testing/run.py b/testing/run.py index 1f0f54858..b91d32e59 100755 --- a/testing/run.py +++ b/testing/run.py @@ -34,7 +34,7 @@ simply run this script:: """ -import os.path +import os import sys TESTS_PATH = os.path.dirname(os.path.abspath(__file__)) From 665c27c785bfa19d043afd6e6f15bd26cc809e7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20K=C3=B6hler?= Date: Thu, 12 Apr 2012 22:58:11 +0200 Subject: [PATCH 21/42] fixes --- openlp/plugins/bibles/forms/editbibleform.py | 37 ++++++++++---------- openlp/plugins/bibles/lib/manager.py | 35 ++++++++++++++---- openlp/plugins/bibles/lib/mediaitem.py | 28 +++------------ 3 files changed, 51 insertions(+), 49 deletions(-) diff --git a/openlp/plugins/bibles/forms/editbibleform.py b/openlp/plugins/bibles/forms/editbibleform.py index b4afa6295..aee42dbcc 100644 --- a/openlp/plugins/bibles/forms/editbibleform.py +++ b/openlp/plugins/bibles/forms/editbibleform.py @@ -69,11 +69,11 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): self.manager.get_meta_data(self.bible, u'Copyright').value) self.permissionsEdit.setText( self.manager.get_meta_data(self.bible, u'Permissions').value) - self.bookname_language = self.manager.get_meta_data( - self.bible, u'Bookname language') - if self.bookname_language: + bookname_language = self.manager.get_meta_data(self.bible, + u'Bookname language') + if bookname_language and bookname_language.value != u'None': self.languageSelectionComboBox.setCurrentIndex( - int(self.bookname_language.value) + 1) + int(bookname_language.value) + 1) self.books = {} self.webbible = self.manager.get_meta_data(self.bible, u'download source') @@ -107,7 +107,7 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): """ Exit Dialog and do not save """ - log.debug (u'BibleEditForm.reject') + log.debug(u'BibleEditForm.reject') self.bible = None QtGui.QDialog.reject(self) @@ -116,12 +116,13 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): Exit Dialog and save data """ log.debug(u'BibleEditForm.accept') - self.version = unicode(self.versionNameEdit.text()) - self.copyright = unicode(self.copyrightEdit.text()) - self.permissions = unicode(self.permissionsEdit.text()) - self.bookname_language = \ - self.languageSelectionComboBox.currentIndex() - 1 - if not self.validateMeta(): + version = unicode(self.versionNameEdit.text()) + copyright = unicode(self.copyrightEdit.text()) + permissions = unicode(self.permissionsEdit.text()) + bookname_language = self.languageSelectionComboBox.currentIndex() - 1 + if bookname_language == -1: + bookname_language = None + if not self.validateMeta(version, copyright): return if not self.webbible: custom_names = {} @@ -133,8 +134,8 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): return Receiver.send_message(u'openlp_process_events') Receiver.send_message(u'cursor_busy') - self.manager.save_meta_data(self.bible, self.version, - self.copyright, self.permissions, self.bookname_language) + self.manager.save_meta_data(self.bible, version, copyright, permissions, + bookname_language) if not self.webbible: for abbr, book in self.books.iteritems(): if book: @@ -145,26 +146,26 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog): Receiver.send_message(u'cursor_normal') QtGui.QDialog.accept(self) - def validateMeta(self): + def validateMeta(self, version, copyright): """ Validate the Meta before saving. """ - if not self.version: + if not version: self.versionNameEdit.setFocus() critical_error_message_box(UiStrings().EmptyField, translate('BiblesPlugin.BibleEditForm', 'You need to specify a version name for your Bible.')) return False - elif not self.copyright: + elif not copyright: self.copyrightEdit.setFocus() critical_error_message_box(UiStrings().EmptyField, translate('BiblesPlugin.BibleEditForm', 'You need to set a copyright for your Bible. ' 'Bibles in the Public Domain need to be marked as such.')) return False - elif self.manager.exists(self.version) and \ + elif self.manager.exists(version) and \ self.manager.get_meta_data(self.bible, u'Version').value != \ - self.version: + version: self.versionNameEdit.setFocus() critical_error_message_box( translate('BiblesPlugin.BibleEditForm', 'Bible Exists'), diff --git a/openlp/plugins/bibles/lib/manager.py b/openlp/plugins/bibles/lib/manager.py index 8edd80dfa..b0dd92e3c 100644 --- a/openlp/plugins/bibles/lib/manager.py +++ b/openlp/plugins/bibles/lib/manager.py @@ -140,14 +140,14 @@ class BibleManager(object): BibleDB class. """ log.debug(u'Reload bibles') - self.files = SettingsManager.get_files(self.settingsSection, + files = SettingsManager.get_files(self.settingsSection, self.suffix) - if u'alternative_book_names.sqlite' in self.files: - self.files.remove(u'alternative_book_names.sqlite') - log.debug(u'Bible Files %s', self.files) + if u'alternative_book_names.sqlite' in files: + files.remove(u'alternative_book_names.sqlite') + log.debug(u'Bible Files %s', files) self.db_cache = {} self.old_bible_databases = [] - for filename in self.files: + for filename in files: bible = BibleDB(self.parent, path=self.path, file=filename) name = bible.get_name() # Remove corrupted files. @@ -211,7 +211,12 @@ class BibleManager(object): ``name`` The name of the bible. """ - for filename in self.files: + log.debug(u'BibleManager.delete_bible("%s")', name) + files = SettingsManager.get_files(self.settingsSection, + self.suffix) + if u'alternative_book_names.sqlite' in files: + files.remove(u'alternative_book_names.sqlite') + for filename in files: bible = BibleDB(self.parent, path=self.path, file=filename) # Remove the bible files if name == bible.get_name(): @@ -364,6 +369,22 @@ class BibleManager(object): }) return None + def get_language_selection(self, bible): + """ + Returns the language selection of a bible. + + ``bible`` + Unicode. The Bible to get the language selection from. + """ + log.debug(u'BibleManager.get_language_selection("%s")', bible) + language_selection = self.get_meta_data(bible, u'Bookname language') + if language_selection and language_selection.value != u'None': + return int(language_selection.value) + if language_selection is None or language_selection.value == u'None': + return QtCore.QSettings().value( + self.settingsSection + u'/bookname language', + QtCore.QVariant(0)).toInt()[0] + def verse_search(self, bible, second_bible, text): """ Does a verse search for the given bible and text. @@ -417,7 +438,7 @@ class BibleManager(object): return None def save_meta_data(self, bible, version, copyright, permissions, - bookname_language=-1): + bookname_language=None): """ Saves the bibles meta data. """ diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py index ba77766ec..bca73fc70 100644 --- a/openlp/plugins/bibles/lib/mediaitem.py +++ b/openlp/plugins/bibles/lib/mediaitem.py @@ -432,14 +432,7 @@ class BibleMediaItem(MediaManagerItem): book_data = book_data_temp self.advancedBookComboBox.clear() first = True - language_selection = self.plugin.manager.get_meta_data( - bible, u'Bookname language') - if language_selection: - language_selection = int(language_selection.value) - if language_selection is None or language_selection == -1: - language_selection = QtCore.QSettings().value( - self.settingsSection + u'/bookname language', - QtCore.QVariant(0)).toInt()[0] + language_selection = self.plugin.manager.get_language_selection(bible) booknames = BibleStrings().Booknames for book in book_data: row = self.advancedBookComboBox.count() @@ -511,14 +504,8 @@ class BibleMediaItem(MediaManagerItem): secondbook.book_reference_id: book_data_temp.append(book) book_data = book_data_temp - language_selection = self.plugin.manager.get_meta_data( - bible, u'Bookname language') - if language_selection: - language_selection = int(language_selection.value) - if language_selection is None or language_selection == -1: - language_selection = QtCore.QSettings().value( - self.settingsSection + u'/bookname language', - QtCore.QVariant(0)).toInt()[0] + language_selection = self.plugin.manager.get_language_selection( + bible) if language_selection == LanguageSelection.Bible: books = [book.name + u' ' for book in book_data] elif language_selection == LanguageSelection.Application: @@ -834,14 +821,7 @@ class BibleMediaItem(MediaManagerItem): second_permissions = self.plugin.manager.get_meta_data( second_bible, u'Permissions').value items = [] - language_selection = self.plugin.manager.get_meta_data( - bible, u'Bookname language') - if language_selection: - language_selection = int(language_selection.value) - if language_selection is None or language_selection == -1: - language_selection = QtCore.QSettings().value( - self.settingsSection + u'/bookname language', - QtCore.QVariant(0)).toInt()[0] + language_selection = self.plugin.manager.get_language_selection(bible) for count, verse in enumerate(search_results): if language_selection == LanguageSelection.Bible: book = verse.book.name From 70d75b0f80d10944a356be72f6a9406eedbfa6a7 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Fri, 13 Apr 2012 22:08:05 +0200 Subject: [PATCH 22/42] Removed an unused import. Changed the "Split" button to say "Optional Split" instead. --- openlp/core/lib/ui.py | 2 +- openlp/plugins/songs/forms/editversedialog.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openlp/core/lib/ui.py b/openlp/core/lib/ui.py index 7f411f3dc..1117c01a0 100644 --- a/openlp/core/lib/ui.py +++ b/openlp/core/lib/ui.py @@ -124,7 +124,7 @@ class UiStrings(object): self.Settings = translate('OpenLP.Ui', 'Settings') self.SaveService = translate('OpenLP.Ui', 'Save Service') self.Service = translate('OpenLP.Ui', 'Service') - self.Split = translate('OpenLP.Ui', '&Split') + self.Split = translate('OpenLP.Ui', 'Optional &Split') self.SplitToolTip = translate('OpenLP.Ui', 'Split a slide into two ' 'only if it does not fit on the screen as one slide.') self.StartTimeCode = unicode(translate('OpenLP.Ui', 'Start %s')) diff --git a/openlp/plugins/songs/forms/editversedialog.py b/openlp/plugins/songs/forms/editversedialog.py index 062d81d7f..fb5698c88 100644 --- a/openlp/plugins/songs/forms/editversedialog.py +++ b/openlp/plugins/songs/forms/editversedialog.py @@ -25,7 +25,7 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -from PyQt4 import QtCore, QtGui +from PyQt4 import QtGui from openlp.core.lib import build_icon, translate, SpellTextEdit from openlp.core.lib.ui import create_button_box, UiStrings From be3da3368e04bd75925de71cfe5cfccc00e03a8e Mon Sep 17 00:00:00 2001 From: Philip Ridout Date: Fri, 13 Apr 2012 21:22:55 +0100 Subject: [PATCH 23/42] changed file version handeling. Added check for (c) symbol if not use it for the author --- openlp/plugins/songs/lib/dreambeamimport.py | 43 ++++++++++----------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/openlp/plugins/songs/lib/dreambeamimport.py b/openlp/plugins/songs/lib/dreambeamimport.py index 6d8e994c8..da649bba9 100644 --- a/openlp/plugins/songs/lib/dreambeamimport.py +++ b/openlp/plugins/songs/lib/dreambeamimport.py @@ -31,6 +31,7 @@ DreamBeam songs into the OpenLP database. import os import sys import logging +import types from lxml import etree, objectify @@ -111,33 +112,13 @@ class DreamBeamImport(SongImport): if hasattr(song_xml, u'Version'): self.version = float(song_xml.Version.text) else: - log.exception(u'No valid version information.' - 'Invalid file %s' % file) - self.logError(file, unicode( - translate('SongsPlugin.DreamBeamImport', - ('No valid version information.')))) - continue + self.version = 0 # Version numbers found in DreamBeam Source /FileTypes/Song.cs - if self.version <= 0.49: - if hasattr(song_xml.Text0, u'Text'): - self.title = unicode(song_xml.Text0.Text.text) - if hasattr(song_xml.Text1, u'Text'): - self.lyrics = unicode(song_xml.Text1.Text.text) - for verse in self.lyrics.split(u'\n\n\n'): - self.addVerse(verse) - if hasattr(song_xml.Text2, u'Text'): - # DreamBeam does not have a copyright field, instead it - # sometimes uses the author field - self.addCopyright(unicode(song_xml.Text2.Text.text)) - self.parseAuthor(unicode(song_xml.Text2.Text.text)) - elif self.version >= 0.5: + if self.version >= 0.5: if hasattr(song_xml, u'Title'): self.title = unicode(song_xml.Title.text) if hasattr(song_xml, u'Author'): - # DreamBeam does not have a copyright field, instead it - # sometimes uses the author field - self.addCopyright(unicode(song_xml.Author.text)) - self.parseAuthor(unicode(song_xml.Author.text)) + author_copyright = song_xml.Author.text if hasattr(song_xml, u'SongLyrics'): for lyrics_item in song_xml.SongLyrics.iterchildren(): verse_type = lyrics_item.get(u'Type') @@ -157,5 +138,21 @@ class DreamBeamImport(SongImport): LyricsSequenceItem.get(u'Number'))) if hasattr(song_xml, u'Notes'): self.comments = unicode(song_xml.Notes.text) + else: + if hasattr(song_xml.Text0, u'Text'): + self.title = unicode(song_xml.Text0.Text.text) + if hasattr(song_xml.Text1, u'Text'): + self.lyrics = unicode(song_xml.Text1.Text.text) + for verse in self.lyrics.split(u'\n\n\n'): + self.addVerse(verse) + if hasattr(song_xml.Text2, u'Text'): + author_copyright = song_xml.Text2.Text.text + if author_copyright: + author_copyright = unicode(author_copyright) + if author_copyright.find( + unicode(SongStrings.CopyrightSymbol)) >= 0: + self.addCopyright(author_copyright) + else: + self.parseAuthor(author_copyright) if not self.finish(): self.logError(file) From 3414763fff478a1711efe082cf6c36ff52028675 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Sun, 15 Apr 2012 12:16:01 +0200 Subject: [PATCH 24/42] fixed spelling --- openlp/plugins/songs/forms/editsongdialog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/plugins/songs/forms/editsongdialog.py b/openlp/plugins/songs/forms/editsongdialog.py index 6143da40d..42c011819 100644 --- a/openlp/plugins/songs/forms/editsongdialog.py +++ b/openlp/plugins/songs/forms/editsongdialog.py @@ -377,7 +377,7 @@ class SingleColumnTableWidget(QtGui.QTableWidget): """ def __init__(self, parent): """ - Constrctor + Constructor """ QtGui.QTableWidget.__init__(self, parent) self.horizontalHeader().setVisible(False) From aae1d3753bd44e1c03f8426a7f2319f3cb7f216c Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Mon, 16 Apr 2012 23:57:10 +0200 Subject: [PATCH 25/42] Updated jQuery. Updated jQuery Mobile. Fixed headers at the top. Fixed toolbars at the bottom. Removed top toolbars. Added navigation to the top of most screens. Added a "Add & Go to Service" button on the search result options dialog. Implemented Theme and Desktop blank types. Changed "back" button to say "Home" instead, and actually added the text. --- .../remotes/html/images/ajax-loader.gif | Bin 0 -> 7825 bytes .../remotes/html/images/ajax-loader.png | Bin 503 -> 340 bytes .../remotes/html/images/icons-18-black.png | Bin 2064 -> 1767 bytes .../remotes/html/images/icons-18-white.png | Bin 2200 -> 1806 bytes .../remotes/html/images/icons-36-black.png | Bin 3403 -> 3611 bytes .../remotes/html/images/icons-36-white.png | Bin 4020 -> 3648 bytes openlp/plugins/remotes/html/index.html | 89 +++-- openlp/plugins/remotes/html/jquery.js | 8 +- openlp/plugins/remotes/html/jquery.mobile.css | 4 +- openlp/plugins/remotes/html/jquery.mobile.js | 356 +++++++++--------- openlp/plugins/remotes/html/openlp.js | 53 ++- openlp/plugins/remotes/lib/httpserver.py | 6 +- 12 files changed, 281 insertions(+), 235 deletions(-) create mode 100644 openlp/plugins/remotes/html/images/ajax-loader.gif diff --git a/openlp/plugins/remotes/html/images/ajax-loader.gif b/openlp/plugins/remotes/html/images/ajax-loader.gif new file mode 100644 index 0000000000000000000000000000000000000000..fd1a189c21fed1c7ba00c4bb4fad407bd6d1e5f9 GIT binary patch literal 7825 zcmbuES5#ApyTy~7eo}yd8UkVpXkY*_Q9y_qiinOPDmsj9qNsz4jwlKWVnXkP4hk5G z^b(393euZ^(u<-X0-}Q58OQN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ft8G^`;5vEec_+sqcvt9M>!AK`_q(ri`Cmv6h2+RHY+0ui1$Kc( zEXkW&8V@}h#w@a{4x1XJ>a_3hmxxsJ9&hmR-n)$^@D6qt(!wKxf=Qv45i}|_DtO`hch+z*6DrXWIJ z+7&Fh8iw%*QCjv2$$EgXz`#~cXbDxrZ1Bz5u5S;vMlSwiRhg$`vL+TXVTzu=MQhL~IyDoU1xuUq3WmjC2Fwj*R)y00x~a3-!`?Y{rF-`U_eTa+1}8NllC z2wKW*VW|?FinaH&*H2$)c;cG!ok%X2+#L4G9PARZVB zNAN;V#Bk%V1WsIF3KQ@HJkyv_R{_~NT0x-z21mSCHdEV*?B8WdBbbZMeevRS z5@SuaWDeYeP zJU#!$?RGZ$Zc?k+#|O=etIbPhFYl*?sC_`2!?uYj+OZlr8pmSz`I|xsdpz9hChm#( zu*$t>CKkmG+y_se&03X4+v425296ZH4GgQ7LHcu_GAZf?EN zakuLZW#vHoP#4x?(e~(W=e>>SBV_p5fmg5JynXk6<+u5q@;fK6{QXfqTq-#+@=~r5 zlpUX98A%6@(#3MqWjwd-ay_rQPU^1urOS{&fpa#ia+GL2xq0((il>|MhRngFBs4&q zEAjLX*T(_RBQZv3{0Z+QeF%^PiD^7A1CV8Na)Gb{Zc%C}yQri>D<`wKiVcBvV1A7X zTo1Z8X`-zcIv8hL_uW%L>LKVxlJEUH!^7o9Gy$DE_!xpmxwJX{ln49_h7p`g{WLde zbcVg*@%ve}y<9A{g2@b%_FNSx(By4Tx24FP)!>IO;(L5L1!{zTu%WRSDH8{+1AjN) zo#8L$tdCiU>DcCGwUIe(nQjutQd` LHfkt@K(PD|Q{O_Y literal 0 HcmV?d00001 diff --git a/openlp/plugins/remotes/html/images/ajax-loader.png b/openlp/plugins/remotes/html/images/ajax-loader.png index 811a2cdd1b492c47faf85c1206ad6606521eb6e4..13b208dddd67f65dc5af0f6ed1a8c8227e458ed3 100644 GIT binary patch delta 325 zcmV-L0lNP81JnYL7=H)^0002A(0kGV00A3G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%Bh2T1fqd)8W7ZGO|V^4L>- zNBShoPHxelu^U<>Jot;BE+f+&w$GxhBhKZzN-GLsa_`n7siIonYgS)A^@#@A#raM> zQJ&YphX>aqon&ttU0e^S%|ZxmX0794HIqFltHvdQ!-VHXh6N4JRkqn0)rN3f$pyc| z0`7?C=`%mQ3Bq4*4m7S5$-LJcihp-x;@tsD9_CqsOv{Svm612AJMvl@2NEeRKksZ# zCXPOPe_U0Fh-{ZSVw2EvN=AXVzTHsC?&-bT%z9)e+r{p(EIk|Z+;-22>!;-R^VZ=8 m?52j%#WvFuTE?pwp$qUeOUIX~;K-`>3PIdUhoPPnK{^_Uy diff --git a/openlp/plugins/remotes/html/images/icons-36-black.png b/openlp/plugins/remotes/html/images/icons-36-black.png index 4c72adf1e81039a59ae8ab74cdeb6148c67acfbb..1a59d7c375d6611262a9ac86db23eb94570d7319 100644 GIT binary patch literal 3611 zcmYk9c{J4BAIHu1#h4k}&`?QZ--jkk*(PIOq7W6Pgt3mE#3ea=1ibMEV!vy(LvE(;eB5J1}65RV85 z0Ej)@wfhP#Gmy^TOz@g>b;n&Lm9ObYZdgS?g0Ef`793E(^K(2U#a*o>x~G) zPGk!PFYlJOw~TE&h0=^5<>xKGXZr@kOqE2Mj8MB$$ATv{K9QH6{fLeX#n>rITq9yr zZT`Q&ex_7_?Q3rEgcD58{zzKLUpIJ19ecq3%jO|1k^_G&zi<984Pc%UmQV{wNoWI z+^B#Jv;$lq0cJXA#suiF^HXTvm*mF^B%1XQm$m~*ZpMiRJC<oyc4QEr%cc1r5~?!E8Q5%-G%^e> znqkD+Sj;?1W5{yp*)Zho-)}4Is|rpLaO8Z>){OO|S8Ml->M!KXUnO;$Jzrm4$n7~y zoFT%LPq)%Bnk$~;P4;P`96gz)Y_0IuFxX+?i=F- z9S4=(rhI`D80+~ZQMKCA)PUwI8Pqr!azWlP{`{$s9f|T1cNApQZ3rTmyJc>|#EuH8 z_#0cHWn)E6{*CBo)l7}50$MC3c8X#-+ULtoTH7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q@Javt{qKzO{PAmj{nMZu&nkSn5iuY{85b~>75DH? zy-O2b;8t){hO(Tffgbo6kp%gb8eq=Y;2urhp|H1dU15;{mT$~aa zD2Wg%m5~&9^^J=?@x$OqjQk9Ec+rUgi{dy!kwv)a_0oz@XKyN3{K3D*huaZ@!Lk1R z?B}{X&!+n7q-C{^H8k)`6&MSMHi_{_hCI-03gK}SW*cWnlj)9(r3l*>17BtM;AAms zg8lqRVlsR4P#NDZCr1X(yU?sgJ25!XzdxQlD~t1da;UF<*RonC8%pzC&&8lTD5qFc zs^-iBT-PT!#2UFiwTKPkdRinzc&{-!E-;!JlT@KQsLsc)Hka^Fi^o>5mwQKE{-1IKu34 zlsOEN_xqJNSyB;E~yH9(s51704O>O*`435`#fTKt}Vp1{U`h zN!K({%}S0>{`q!%yiG9}Tu)b0%&t3BjEcv?qIEVzAhGRW@p)pwice;fbN1E{{!l+yGXx+*mVE^002ovPDHLkV1kWKj}-s_ diff --git a/openlp/plugins/remotes/html/images/icons-36-white.png b/openlp/plugins/remotes/html/images/icons-36-white.png index 84ea9fb31ae442d0c60523fbce08ec5f202b7d9c..5647bdc945d547080a673d35a42e8cfe5f2bfe3e 100644 GIT binary patch literal 3648 zcmY+Hc{J4BAIE26zLr6w7-M-DTM2`)SGHm7VHAlnqcU`!aom@$6~Ma8kXJ<=c=NWL8VcP=ROPg>sC?x!h1Me_S7 zO_6^LnK9RB?KFjOtRat{>Z_7mnQ}z4g9q{NFgln=630C`nt$MRpF`;x84DEIxn7UNU_ z6tT*gS-ldTlExL>hU)bG11B2YvhUhQ{qjshLpABhRI9D#W+8k*r*r_uQ{Zrz{4aV zlr@VmZ-646-rD`G^w%od=hofo=(z$;GT6o88_PLroV5hYPjMAS5nrDuz7Y%k^5NrM z9ZZYvxYDqN=?c}-DH;DdhFwRTxNR^ku{+%yRi)EhCZ3JSkcJg+_RPvDpL32?9R~|@ z*&Sc>Rb?fka$fIKPgucI2?VfZV}w(Gh;ua=Lx@gl;AGW!{4}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-Bw3hI7;+9t#?Yt7sAq-NQEac9b|+Sgk>wsujsQsP^qjQ8qq{x&vtG0P(xH98UwHE7IM^YYeF*HxDJ4rJ=Bd}*90>pQZPz>c7BcfM5zdP9 zAKphI?eint`$qail4n}{4h^7GotKdv^d#SNe<`@min)(r$HGjoOLweED5!@QO#|@s O16?#i8CL6~qyGU`IBHY? diff --git a/openlp/plugins/remotes/html/index.html b/openlp/plugins/remotes/html/index.html index fd1b37472..88a0584c9 100644 --- a/openlp/plugins/remotes/html/index.html +++ b/openlp/plugins/remotes/html/index.html @@ -39,7 +39,7 @@ "go_live": "${go_live}", "add_to_service": "${add_to_service}", "no_results": "${no_results}", - "back": "${back}" + "home": "${home}" } @@ -58,71 +58,79 @@
-
- ${back} +
+ ${home}

${service_manager}

${refresh} -
-
- -
-
-
- ${back} +
+ ${home}

${slide_controller}

${refresh} -
-
- -
-
- ${back} + ${home}

${alerts}

+
+ +
@@ -133,9 +141,17 @@