From 0c93d6b032e0e7888c5935cdcf1eb89d98e80adb Mon Sep 17 00:00:00 2001 From: Olli Suutari Date: Thu, 15 Sep 2016 01:20:33 +0300 Subject: [PATCH 01/15] - Created a working "Full license" field for Bible editor. Problem: If metadata does not already have full_license field = traceback. --- openlp/plugins/bibles/forms/editbibledialog.py | 9 +++++++++ openlp/plugins/bibles/forms/editbibleform.py | 4 +++- openlp/plugins/bibles/lib/manager.py | 10 +++++----- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/openlp/plugins/bibles/forms/editbibledialog.py b/openlp/plugins/bibles/forms/editbibledialog.py index f1e833637..58769014c 100644 --- a/openlp/plugins/bibles/forms/editbibledialog.py +++ b/openlp/plugins/bibles/forms/editbibledialog.py @@ -68,6 +68,14 @@ class Ui_EditBibleDialog(object): self.permissions_edit.setObjectName('permissions_edit') self.permissions_label.setBuddy(self.permissions_edit) self.license_details_layout.addRow(self.permissions_label, self.permissions_edit) + # QTextEdit + self.full_license_label = QtWidgets.QLabel(self.license_details_group_box) + self.full_license_label.setObjectName('full_license_label') + self.full_license_edit = QtWidgets.QPlainTextEdit(self.license_details_group_box) + self.full_license_edit.setObjectName('full_license_edit') + self.full_license_label.setBuddy(self.full_license_edit) + self.license_details_layout.addRow(self.full_license_label, self.full_license_edit) + self.meta_tab_layout.addWidget(self.license_details_group_box) self.language_selection_group_box = QtWidgets.QGroupBox(self.meta_tab) self.language_selection_group_box.setObjectName('language_selection_group_box') @@ -132,6 +140,7 @@ class Ui_EditBibleDialog(object): self.version_name_label.setText(translate('BiblesPlugin.EditBibleForm', 'Version name:')) self.copyright_label.setText(translate('BiblesPlugin.EditBibleForm', 'Copyright:')) self.permissions_label.setText(translate('BiblesPlugin.EditBibleForm', 'Permissions:')) + self.full_license_label.setText(translate('BiblesPlugin.EditBibleForm', 'Full license:')) self.language_selection_group_box.setTitle(translate('BiblesPlugin.EditBibleForm', 'Default Bible Language')) self.language_selection_label.setText( translate('BiblesPlugin.EditBibleForm', 'Book name language in search field, search results and ' diff --git a/openlp/plugins/bibles/forms/editbibleform.py b/openlp/plugins/bibles/forms/editbibleform.py index c6afbabb6..b3947c43a 100644 --- a/openlp/plugins/bibles/forms/editbibleform.py +++ b/openlp/plugins/bibles/forms/editbibleform.py @@ -64,6 +64,7 @@ class EditBibleForm(QtWidgets.QDialog, Ui_EditBibleDialog, RegistryProperties): self.version_name_edit.setText(self.manager.get_meta_data(self.bible, 'name').value) self.copyright_edit.setText(self.manager.get_meta_data(self.bible, 'copyright').value) self.permissions_edit.setText(self.manager.get_meta_data(self.bible, 'permissions').value) + self.full_license_edit.setPlainText(self.manager.get_meta_data(self.bible, 'full_license').value) book_name_language = self.manager.get_meta_data(self.bible, 'book_name_language') if book_name_language and book_name_language.value != 'None': self.language_selection_combo_box.setCurrentIndex(int(book_name_language.value) + 1) @@ -107,6 +108,7 @@ class EditBibleForm(QtWidgets.QDialog, Ui_EditBibleDialog, RegistryProperties): version = self.version_name_edit.text() copyright = self.copyright_edit.text() permissions = self.permissions_edit.text() + full_license = self.full_license_edit.toPlainText() book_name_language = self.language_selection_combo_box.currentIndex() - 1 if book_name_language == -1: book_name_language = None @@ -121,7 +123,7 @@ class EditBibleForm(QtWidgets.QDialog, Ui_EditBibleDialog, RegistryProperties): if not self.validate_book(custom_names[abbr], abbr): return self.application.set_busy_cursor() - self.manager.save_meta_data(self.bible, version, copyright, permissions, book_name_language) + self.manager.save_meta_data(self.bible, version, copyright, permissions, full_license, book_name_language) if not self.web_bible: for abbr, book in self.books.items(): if book: diff --git a/openlp/plugins/bibles/lib/manager.py b/openlp/plugins/bibles/lib/manager.py index d2286bed2..40eecf19f 100644 --- a/openlp/plugins/bibles/lib/manager.py +++ b/openlp/plugins/bibles/lib/manager.py @@ -376,17 +376,17 @@ class BibleManager(RegistryProperties): else: return None - def save_meta_data(self, bible, version, copyright, permissions, book_name_language=None): + def save_meta_data(self, bible, version, copyright, permissions, full_license, book_name_language=None): """ Saves the bibles meta data. """ - log.debug('save_meta data {bible}, {version}, {copyright}, {perms}'.format(bible=bible, - version=version, - copyright=copyright, - perms=permissions)) + log.debug('save_meta data {bible}, {version}, {copyright},' + ' {perms}, {full_license}'.format(bible=bible, version=version, copyright=copyright, + perms=permissions, full_license=full_license)) self.db_cache[bible].save_meta('name', version) self.db_cache[bible].save_meta('copyright', copyright) self.db_cache[bible].save_meta('permissions', permissions) + self.db_cache[bible].save_meta('full_license', full_license) self.db_cache[bible].save_meta('book_name_language', book_name_language) def get_meta_data(self, bible, key): From 7ba2bb6d82cedf86af7e5b67713da0c49c605ef7 Mon Sep 17 00:00:00 2001 From: Olli Suutari Date: Thu, 15 Sep 2016 02:53:04 +0300 Subject: [PATCH 02/15] - Fixed the missing field traceback - Created the field for import (This does not work, why?) --- .../plugins/bibles/forms/bibleimportform.py | 14 +++++++++++++- .../plugins/bibles/forms/editbibledialog.py | 2 -- openlp/plugins/bibles/forms/editbibleform.py | 19 ++++++++++++++----- 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/openlp/plugins/bibles/forms/bibleimportform.py b/openlp/plugins/bibles/forms/bibleimportform.py index 3d02228ca..b24bc6992 100644 --- a/openlp/plugins/bibles/forms/bibleimportform.py +++ b/openlp/plugins/bibles/forms/bibleimportform.py @@ -378,6 +378,12 @@ class BibleImportForm(OpenLPWizard): self.permissions_edit = QtWidgets.QLineEdit(self.license_details_page) self.permissions_edit.setObjectName('PermissionsEdit') self.license_details_layout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.permissions_edit) + self.full_license_label = QtWidgets.QLabel(self.license_details_page) + self.full_license_label.setObjectName('FullLicenseLabel') + self.license_details_layout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.full_license_label) + self.full_license_edit = QtWidgets.QPlainTextEdit(self.license_details_page) + self.full_license_edit.setObjectName('FullLicenseEdit') + self.license_details_layout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.full_license_edit) self.addPage(self.license_details_page) def retranslateUi(self): @@ -448,6 +454,7 @@ class BibleImportForm(OpenLPWizard): self.version_name_label.setText(translate('BiblesPlugin.ImportWizardForm', 'Version name:')) self.copyright_label.setText(translate('BiblesPlugin.ImportWizardForm', 'Copyright:')) self.permissions_label.setText(translate('BiblesPlugin.ImportWizardForm', 'Permissions:')) + self.full_license_label.setText(translate('BiblesPlugin.ImportWizardForm', 'Full license:')) self.progress_page.setTitle(WizardStrings.Importing) self.progress_page.setSubTitle(translate('BiblesPlugin.ImportWizardForm', 'Please wait while your Bible is imported.')) @@ -471,6 +478,7 @@ class BibleImportForm(OpenLPWizard): elif self.currentPage() == self.select_page: self.version_name_edit.clear() self.permissions_edit.clear() + self.full_license_edit.clear() self.copyright_edit.clear() if self.field('source_format') == BibleFormat.OSIS: if not self.field('osis_location'): @@ -715,6 +723,7 @@ class BibleImportForm(OpenLPWizard): self.license_details_page.registerField('license_version', self.version_name_edit) self.license_details_page.registerField('license_copyright', self.copyright_edit) self.license_details_page.registerField('license_permissions', self.permissions_edit) + self.license_details_page.registerField('license_full_license', self.full_license_edit) def set_defaults(self): """ @@ -741,6 +750,7 @@ class BibleImportForm(OpenLPWizard): self.setField('license_version', self.version_name_edit.text()) self.setField('license_copyright', self.copyright_edit.text()) self.setField('license_permissions', self.permissions_edit.text()) + self.setField('license_full_license', self.full_license_edit.toPlainText()) self.on_web_source_combo_box_index_changed(WebDownload.Crosswalk) settings.endGroup() @@ -764,6 +774,7 @@ class BibleImportForm(OpenLPWizard): license_version = self.field('license_version') license_copyright = self.field('license_copyright') license_permissions = self.field('license_permissions') + license_full_license = self.field('license_full_license') importer = None if bible_type == BibleFormat.OSIS: # Import an OSIS bible. @@ -810,7 +821,8 @@ class BibleImportForm(OpenLPWizard): sword_key=self.sword_zipbible_combo_box.itemData( self.sword_zipbible_combo_box.currentIndex())) if importer.do_import(license_version): - self.manager.save_meta_data(license_version, license_version, license_copyright, license_permissions) + self.manager.save_meta_data(license_version, license_version, + license_copyright, license_permissions, license_full_license) self.manager.reload_bibles() if bible_type == BibleFormat.WebDownload: self.progress_label.setText( diff --git a/openlp/plugins/bibles/forms/editbibledialog.py b/openlp/plugins/bibles/forms/editbibledialog.py index 58769014c..f326f2af0 100644 --- a/openlp/plugins/bibles/forms/editbibledialog.py +++ b/openlp/plugins/bibles/forms/editbibledialog.py @@ -68,14 +68,12 @@ class Ui_EditBibleDialog(object): self.permissions_edit.setObjectName('permissions_edit') self.permissions_label.setBuddy(self.permissions_edit) self.license_details_layout.addRow(self.permissions_label, self.permissions_edit) - # QTextEdit self.full_license_label = QtWidgets.QLabel(self.license_details_group_box) self.full_license_label.setObjectName('full_license_label') self.full_license_edit = QtWidgets.QPlainTextEdit(self.license_details_group_box) self.full_license_edit.setObjectName('full_license_edit') self.full_license_label.setBuddy(self.full_license_edit) self.license_details_layout.addRow(self.full_license_label, self.full_license_edit) - self.meta_tab_layout.addWidget(self.license_details_group_box) self.language_selection_group_box = QtWidgets.QGroupBox(self.meta_tab) self.language_selection_group_box.setObjectName('language_selection_group_box') diff --git a/openlp/plugins/bibles/forms/editbibleform.py b/openlp/plugins/bibles/forms/editbibleform.py index b3947c43a..58b764371 100644 --- a/openlp/plugins/bibles/forms/editbibleform.py +++ b/openlp/plugins/bibles/forms/editbibleform.py @@ -61,11 +61,20 @@ class EditBibleForm(QtWidgets.QDialog, Ui_EditBibleDialog, RegistryProperties): """ log.debug('Load Bible') self.bible = bible - self.version_name_edit.setText(self.manager.get_meta_data(self.bible, 'name').value) - self.copyright_edit.setText(self.manager.get_meta_data(self.bible, 'copyright').value) - self.permissions_edit.setText(self.manager.get_meta_data(self.bible, 'permissions').value) - self.full_license_edit.setPlainText(self.manager.get_meta_data(self.bible, 'full_license').value) - book_name_language = self.manager.get_meta_data(self.bible, 'book_name_language') + """ + Try loading the metadata, if the field does not exist in the metadata, continue executing the code, + missing fields will be created on "self.accept" (save). Also set "book_name_language", + there would otherwise be a traceback for reference before assignment. + """ + try: + self.version_name_edit.setText(self.manager.get_meta_data(self.bible, 'name').value) + self.copyright_edit.setText(self.manager.get_meta_data(self.bible, 'copyright').value) + self.permissions_edit.setText(self.manager.get_meta_data(self.bible, 'permissions').value) + self.full_license_edit.setPlainText(self.manager.get_meta_data(self.bible, 'full_license').value) + book_name_language = self.manager.get_meta_data(self.bible, 'book_name_language') + except AttributeError: + book_name_language = self.manager.get_meta_data(self.bible, 'book_name_language') + pass if book_name_language and book_name_language.value != 'None': self.language_selection_combo_box.setCurrentIndex(int(book_name_language.value) + 1) self.books = {} From 25631152ad84d83275aeb18efa58a6c6ead34a57 Mon Sep 17 00:00:00 2001 From: Olli Suutari Date: Thu, 15 Sep 2016 03:22:36 +0300 Subject: [PATCH 03/15] The import saves the value if we use QLineEdit instead of QPlainTextEdit... But why? --- openlp/plugins/bibles/forms/bibleimportform.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openlp/plugins/bibles/forms/bibleimportform.py b/openlp/plugins/bibles/forms/bibleimportform.py index b24bc6992..df1df1bb5 100644 --- a/openlp/plugins/bibles/forms/bibleimportform.py +++ b/openlp/plugins/bibles/forms/bibleimportform.py @@ -381,7 +381,7 @@ class BibleImportForm(OpenLPWizard): self.full_license_label = QtWidgets.QLabel(self.license_details_page) self.full_license_label.setObjectName('FullLicenseLabel') self.license_details_layout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.full_license_label) - self.full_license_edit = QtWidgets.QPlainTextEdit(self.license_details_page) + self.full_license_edit = QtWidgets.QLineEdit(self.license_details_page) self.full_license_edit.setObjectName('FullLicenseEdit') self.license_details_layout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.full_license_edit) self.addPage(self.license_details_page) @@ -750,7 +750,7 @@ class BibleImportForm(OpenLPWizard): self.setField('license_version', self.version_name_edit.text()) self.setField('license_copyright', self.copyright_edit.text()) self.setField('license_permissions', self.permissions_edit.text()) - self.setField('license_full_license', self.full_license_edit.toPlainText()) + self.setField('license_full_license', self.full_license_edit.text()) self.on_web_source_combo_box_index_changed(WebDownload.Crosswalk) settings.endGroup() From a6f043ff206d7a9a476560d87dcc694f299af2ad Mon Sep 17 00:00:00 2001 From: Olli Suutari Date: Thu, 15 Sep 2016 21:32:25 +0300 Subject: [PATCH 04/15] - Wishlish fix: Make the song-footer text "Written by" optional --- openlp/plugins/songs/lib/mediaitem.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openlp/plugins/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py index b89858019..87dadaae3 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -646,7 +646,10 @@ class SongMediaItem(MediaManagerItem): item.raw_footer = [] item.raw_footer.append(song.title) if authors_none: - item.raw_footer.append("{text}: {authors}".format(text=translate('OpenLP.Ui', 'Written by'), + if Settings().value('core/auto unblank'): + item.raw_footer.append("{authors}".format(authors=create_separated_list(authors_none))) + else: + item.raw_footer.append("{text}: {authors}".format(text=translate('OpenLP.Ui', 'Written by'), authors=create_separated_list(authors_none))) if authors_words_music: item.raw_footer.append("{text}: {authors}".format(text=AuthorType.Types[AuthorType.WordsAndMusic], From 093f379b6aa2f392a1cc0feef1f2343a350a1c49 Mon Sep 17 00:00:00 2001 From: Olli Suutari Date: Thu, 15 Sep 2016 22:03:17 +0300 Subject: [PATCH 05/15] - Added a new setting for controlling visibility of the "Written by:" (By default disabled) --- openlp/plugins/songs/lib/mediaitem.py | 8 +++++--- openlp/plugins/songs/lib/songstab.py | 12 ++++++++++++ openlp/plugins/songs/songsplugin.py | 1 + 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/openlp/plugins/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py index 87dadaae3..070018e73 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -126,6 +126,7 @@ class SongMediaItem(MediaManagerItem): self.update_service_on_edit = Settings().value(self.settings_section + '/update service on edit') self.add_song_from_service = Settings().value(self.settings_section + '/add song from service') self.display_songbook = Settings().value(self.settings_section + '/display songbook') + self.display_written_by_text = Settings().value(self.settings_section + '/display written by') self.display_copyright_symbol = Settings().value(self.settings_section + '/display copyright symbol') def retranslateUi(self): @@ -646,11 +647,12 @@ class SongMediaItem(MediaManagerItem): item.raw_footer = [] item.raw_footer.append(song.title) if authors_none: - if Settings().value('core/auto unblank'): - item.raw_footer.append("{authors}".format(authors=create_separated_list(authors_none))) - else: + if Settings().value('songs/display written by'): item.raw_footer.append("{text}: {authors}".format(text=translate('OpenLP.Ui', 'Written by'), authors=create_separated_list(authors_none))) + else: + item.raw_footer.append("{authors}".format(authors=create_separated_list(authors_none))) + if authors_words_music: item.raw_footer.append("{text}: {authors}".format(text=AuthorType.Types[AuthorType.WordsAndMusic], authors=create_separated_list(authors_words_music))) diff --git a/openlp/plugins/songs/lib/songstab.py b/openlp/plugins/songs/lib/songstab.py index 5f1419fda..5b2f073f0 100644 --- a/openlp/plugins/songs/lib/songstab.py +++ b/openlp/plugins/songs/lib/songstab.py @@ -53,6 +53,9 @@ class SongsTab(SettingsTab): self.display_songbook_check_box = QtWidgets.QCheckBox(self.mode_group_box) self.display_songbook_check_box.setObjectName('songbook_check_box') self.mode_layout.addWidget(self.display_songbook_check_box) + self.display_written_by_check_box = QtWidgets.QCheckBox(self.mode_group_box) + self.display_written_by_check_box.setObjectName('written_by_check_box') + self.mode_layout.addWidget(self.display_written_by_check_box) self.display_copyright_check_box = QtWidgets.QCheckBox(self.mode_group_box) self.display_copyright_check_box.setObjectName('copyright_check_box') self.mode_layout.addWidget(self.display_copyright_check_box) @@ -63,6 +66,7 @@ class SongsTab(SettingsTab): self.update_on_edit_check_box.stateChanged.connect(self.on_update_on_edit_check_box_changed) self.add_from_service_check_box.stateChanged.connect(self.on_add_from_service_check_box_changed) self.display_songbook_check_box.stateChanged.connect(self.on_songbook_check_box_changed) + self.display_written_by_check_box.stateChanged.connect(self.on_written_by_check_box_changed) self.display_copyright_check_box.stateChanged.connect(self.on_copyright_check_box_changed) def retranslateUi(self): @@ -73,6 +77,8 @@ class SongsTab(SettingsTab): self.add_from_service_check_box.setText(translate('SongsPlugin.SongsTab', 'Import missing songs from Service files')) self.display_songbook_check_box.setText(translate('SongsPlugin.SongsTab', 'Display songbook in footer')) + self.display_written_by_check_box.setText(translate( + 'SongsPlugin.SongsTab', 'Show "Written by:" in footer for unspecified authors')) self.display_copyright_check_box.setText(translate('SongsPlugin.SongsTab', 'Display "{symbol}" symbol before copyright ' 'info').format(symbol=SongStrings.CopyrightSymbol)) @@ -92,6 +98,9 @@ class SongsTab(SettingsTab): def on_songbook_check_box_changed(self, check_state): self.display_songbook = (check_state == QtCore.Qt.Checked) + def on_written_by_check_box_changed(self, check_state): + self.display_written_by = (check_state == QtCore.Qt.Checked) + def on_copyright_check_box_changed(self, check_state): self.display_copyright_symbol = (check_state == QtCore.Qt.Checked) @@ -102,11 +111,13 @@ class SongsTab(SettingsTab): self.update_edit = settings.value('update service on edit') self.update_load = settings.value('add song from service') self.display_songbook = settings.value('display songbook') + self.display_written_by = settings.value('display written by') self.display_copyright_symbol = settings.value('display copyright symbol') self.tool_bar_active_check_box.setChecked(self.tool_bar) self.update_on_edit_check_box.setChecked(self.update_edit) self.add_from_service_check_box.setChecked(self.update_load) self.display_songbook_check_box.setChecked(self.display_songbook) + self.display_written_by_check_box.setChecked(self.display_written_by) self.display_copyright_check_box.setChecked(self.display_copyright_symbol) settings.endGroup() @@ -117,6 +128,7 @@ class SongsTab(SettingsTab): settings.setValue('update service on edit', self.update_edit) settings.setValue('add song from service', self.update_load) settings.setValue('display songbook', self.display_songbook) + settings.setValue('display written by', self.display_written_by) settings.setValue('display copyright symbol', self.display_copyright_symbol) settings.endGroup() if self.tab_visited: diff --git a/openlp/plugins/songs/songsplugin.py b/openlp/plugins/songs/songsplugin.py index b2218f701..91f07814c 100644 --- a/openlp/plugins/songs/songsplugin.py +++ b/openlp/plugins/songs/songsplugin.py @@ -59,6 +59,7 @@ __default_settings__ = { 'songs/add song from service': True, 'songs/display songbar': True, 'songs/display songbook': False, + 'songs/display written by': False, 'songs/display copyright symbol': False, 'songs/last directory import': '', 'songs/last directory export': '', From 289deb46949d5e7ca912b2423179f345a5f6c98b Mon Sep 17 00:00:00 2001 From: Olli Suutari Date: Thu, 15 Sep 2016 22:06:01 +0300 Subject: [PATCH 06/15] Changed the settings title from: "Songs mode" to "Song related settings" --- openlp/plugins/songs/lib/songstab.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/plugins/songs/lib/songstab.py b/openlp/plugins/songs/lib/songstab.py index 5b2f073f0..6038e5e9e 100644 --- a/openlp/plugins/songs/lib/songstab.py +++ b/openlp/plugins/songs/lib/songstab.py @@ -70,7 +70,7 @@ class SongsTab(SettingsTab): self.display_copyright_check_box.stateChanged.connect(self.on_copyright_check_box_changed) def retranslateUi(self): - self.mode_group_box.setTitle(translate('SongsPlugin.SongsTab', 'Songs Mode')) + self.mode_group_box.setTitle(translate('SongsPlugin.SongsTab', 'Song related settings')) self.tool_bar_active_check_box.setText(translate('SongsPlugin.SongsTab', 'Enable "Go to verse" button in Live panel')) self.update_on_edit_check_box.setText(translate('SongsPlugin.SongsTab', 'Update service from song edit')) From 1838fca41ef25172e1e52196d63cc1f591225cde Mon Sep 17 00:00:00 2001 From: Olli Suutari Date: Fri, 16 Sep 2016 22:47:29 +0300 Subject: [PATCH 07/15] - Commit for merging trunk < Has some unfinished ui strings in Bible edit form. --- openlp/plugins/bibles/forms/editbibleform.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openlp/plugins/bibles/forms/editbibleform.py b/openlp/plugins/bibles/forms/editbibleform.py index 58b764371..16b1b38f4 100644 --- a/openlp/plugins/bibles/forms/editbibleform.py +++ b/openlp/plugins/bibles/forms/editbibleform.py @@ -68,9 +68,13 @@ class EditBibleForm(QtWidgets.QDialog, Ui_EditBibleDialog, RegistryProperties): """ try: self.version_name_edit.setText(self.manager.get_meta_data(self.bible, 'name').value) + self.version_name_edit.setPlaceholderText('Required, this will be displayed in footer.') self.copyright_edit.setText(self.manager.get_meta_data(self.bible, 'copyright').value) + self.copyright_edit.setPlaceholderText('Required, this will be displayed in footer.') self.permissions_edit.setText(self.manager.get_meta_data(self.bible, 'permissions').value) + self.permissions_edit.setPlaceholderText('Optional, this will be displayed in footer.') self.full_license_edit.setPlainText(self.manager.get_meta_data(self.bible, 'full_license').value) + self.full_license_edit.setPlaceholderText('Optional, this won\'t be displayed in footer.') book_name_language = self.manager.get_meta_data(self.bible, 'book_name_language') except AttributeError: book_name_language = self.manager.get_meta_data(self.bible, 'book_name_language') From 173e7c78eab0eae96bf931caa4ea26f643114ebc Mon Sep 17 00:00:00 2001 From: Olli Suutari Date: Fri, 16 Sep 2016 23:48:56 +0300 Subject: [PATCH 08/15] - Fixed the multiline text input for Bible importer --- openlp/plugins/bibles/forms/bibleimportform.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openlp/plugins/bibles/forms/bibleimportform.py b/openlp/plugins/bibles/forms/bibleimportform.py index 6cc701ff0..dd60b264a 100644 --- a/openlp/plugins/bibles/forms/bibleimportform.py +++ b/openlp/plugins/bibles/forms/bibleimportform.py @@ -383,7 +383,7 @@ class BibleImportForm(OpenLPWizard): self.full_license_label = QtWidgets.QLabel(self.license_details_page) self.full_license_label.setObjectName('FullLicenseLabel') self.license_details_layout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.full_license_label) - self.full_license_edit = QtWidgets.QLineEdit(self.license_details_page) + self.full_license_edit = QtWidgets.QPlainTextEdit(self.license_details_page) self.full_license_edit.setObjectName('FullLicenseEdit') self.license_details_layout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.full_license_edit) self.addPage(self.license_details_page) @@ -725,7 +725,7 @@ class BibleImportForm(OpenLPWizard): self.license_details_page.registerField('license_version', self.version_name_edit) self.license_details_page.registerField('license_copyright', self.copyright_edit) self.license_details_page.registerField('license_permissions', self.permissions_edit) - self.license_details_page.registerField('license_full_license', self.full_license_edit) + self.license_details_page.registerField("license_full_license", self.full_license_edit, "plainText") def set_defaults(self): """ @@ -752,7 +752,7 @@ class BibleImportForm(OpenLPWizard): self.setField('license_version', self.version_name_edit.text()) self.setField('license_copyright', self.copyright_edit.text()) self.setField('license_permissions', self.permissions_edit.text()) - self.setField('license_full_license', self.full_license_edit.text()) + self.setField('license_full_license', self.full_license_edit.toPlainText()) self.on_web_source_combo_box_index_changed(WebDownload.Crosswalk) settings.endGroup() From 2edf579ec346a9b6d9cb515c352f2400565f4ce5 Mon Sep 17 00:00:00 2001 From: Olli Suutari Date: Sat, 17 Sep 2016 01:24:27 +0300 Subject: [PATCH 09/15] - Added the placeholder texts to uistrings - Added placeholder texts for Bible importer & Edit. --- openlp/core/common/uistrings.py | 17 ++++++++++------- openlp/plugins/bibles/forms/bibleimportform.py | 4 ++++ openlp/plugins/bibles/forms/editbibleform.py | 8 ++++---- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/openlp/core/common/uistrings.py b/openlp/core/common/uistrings.py index 3c8477864..25df5ac75 100644 --- a/openlp/core/common/uistrings.py +++ b/openlp/core/common/uistrings.py @@ -59,6 +59,13 @@ class UiStrings(object): self.Automatic = translate('OpenLP.Ui', 'Automatic') self.BackgroundColor = translate('OpenLP.Ui', 'Background Color') self.BackgroundColorColon = translate('OpenLP.Ui', 'Background color:') + self.BibleShortSearchTitle = translate('OpenLP.Ui', 'Search is Empty or too Short') + self.BibleShortSearch = translate('OpenLP.Ui', 'The search you have entered is empty or shorter ' + 'than 3 characters long.

Please try again with ' + 'a longer search.') + self.BibleNoBiblesTitle = translate('OpenLP.Ui', 'No Bibles Available') + self.BibleNoBibles = translate('OpenLP.Ui', 'There are no Bibles currently installed.

' + 'Please use the Import Wizard to install one or more Bibles.') self.Bottom = translate('OpenLP.Ui', 'Bottom') self.Browse = translate('OpenLP.Ui', 'Browse...') self.Cancel = translate('OpenLP.Ui', 'Cancel') @@ -117,6 +124,8 @@ class UiStrings(object): self.OLPV2x = "{name} {version}".format(name=self.OLP, version="2.4") self.OpenLPStart = translate('OpenLP.Ui', 'OpenLP is already running. Do you wish to continue?') self.OpenService = translate('OpenLP.Ui', 'Open service.') + self.OptionalShowInFooter = translate('OpenLP.Ui', 'Optional, this will be displayed in footer.') + self.OptionalHideInFooter = translate('OpenLP.Ui', 'Optional, this won\'t be displayed in footer.') self.PlaySlidesInLoop = translate('OpenLP.Ui', 'Play Slides in Loop') self.PlaySlidesToEnd = translate('OpenLP.Ui', 'Play Slides to End') self.Preview = translate('OpenLP.Ui', 'Preview') @@ -130,6 +139,7 @@ class UiStrings(object): 'player is disabled.') self.ResetBG = translate('OpenLP.Ui', 'Reset Background') self.ResetLiveBG = translate('OpenLP.Ui', 'Reset live background.') + self.RequiredShowInFooter = translate('OpenLP.Ui', 'Required, this will be displayed in footer.') self.Seconds = translate('OpenLP.Ui', 's', 'The abbreviated unit for seconds') self.SaveAndPreview = translate('OpenLP.Ui', 'Save && Preview') self.Search = translate('OpenLP.Ui', 'Search') @@ -157,13 +167,6 @@ class UiStrings(object): self.View = translate('OpenLP.Ui', 'View') self.ViewMode = translate('OpenLP.Ui', 'View Mode') self.Video = translate('OpenLP.Ui', 'Video') - self.BibleShortSearchTitle = translate('OpenLP.Ui', 'Search is Empty or too Short') - self.BibleShortSearch = translate('OpenLP.Ui', 'The search you have entered is empty or shorter ' - 'than 3 characters long.

Please try again with ' - 'a longer search.') - self.BibleNoBiblesTitle = translate('OpenLP.Ui', 'No Bibles Available') - self.BibleNoBibles = translate('OpenLP.Ui', 'There are no Bibles currently installed.

' - 'Please use the Import Wizard to install one or more Bibles.') book_chapter = translate('OpenLP.Ui', 'Book Chapter') chapter = translate('OpenLP.Ui', 'Chapter') verse = translate('OpenLP.Ui', 'Verse') diff --git a/openlp/plugins/bibles/forms/bibleimportform.py b/openlp/plugins/bibles/forms/bibleimportform.py index dd60b264a..dc794b58f 100644 --- a/openlp/plugins/bibles/forms/bibleimportform.py +++ b/openlp/plugins/bibles/forms/bibleimportform.py @@ -750,9 +750,13 @@ class BibleImportForm(OpenLPWizard): self.setField('proxy_username', settings.value('proxy username')) self.setField('proxy_password', settings.value('proxy password')) self.setField('license_version', self.version_name_edit.text()) + self.version_name_edit.setPlaceholderText(UiStrings().RequiredShowInFooter) self.setField('license_copyright', self.copyright_edit.text()) + self.copyright_edit.setPlaceholderText(UiStrings().RequiredShowInFooter) self.setField('license_permissions', self.permissions_edit.text()) + self.permissions_edit.setPlaceholderText(UiStrings().OptionalShowInFooter) self.setField('license_full_license', self.full_license_edit.toPlainText()) + self.full_license_edit.setPlaceholderText(UiStrings().OptionalHideInFooter) self.on_web_source_combo_box_index_changed(WebDownload.Crosswalk) settings.endGroup() diff --git a/openlp/plugins/bibles/forms/editbibleform.py b/openlp/plugins/bibles/forms/editbibleform.py index 16b1b38f4..fb11bf36a 100644 --- a/openlp/plugins/bibles/forms/editbibleform.py +++ b/openlp/plugins/bibles/forms/editbibleform.py @@ -68,13 +68,13 @@ class EditBibleForm(QtWidgets.QDialog, Ui_EditBibleDialog, RegistryProperties): """ try: self.version_name_edit.setText(self.manager.get_meta_data(self.bible, 'name').value) - self.version_name_edit.setPlaceholderText('Required, this will be displayed in footer.') + self.version_name_edit.setPlaceholderText(UiStrings().RequiredShowInFooter) self.copyright_edit.setText(self.manager.get_meta_data(self.bible, 'copyright').value) - self.copyright_edit.setPlaceholderText('Required, this will be displayed in footer.') + self.copyright_edit.setPlaceholderText(UiStrings().RequiredShowInFooter) self.permissions_edit.setText(self.manager.get_meta_data(self.bible, 'permissions').value) - self.permissions_edit.setPlaceholderText('Optional, this will be displayed in footer.') + self.permissions_edit.setPlaceholderText(UiStrings().OptionalShowInFooter) self.full_license_edit.setPlainText(self.manager.get_meta_data(self.bible, 'full_license').value) - self.full_license_edit.setPlaceholderText('Optional, this won\'t be displayed in footer.') + self.full_license_edit.setPlaceholderText(UiStrings().OptionalHideInFooter) book_name_language = self.manager.get_meta_data(self.bible, 'book_name_language') except AttributeError: book_name_language = self.manager.get_meta_data(self.bible, 'book_name_language') From 9222ccdcc5c35cc0bb5f9c84ba999492adfe37af Mon Sep 17 00:00:00 2001 From: Olli Suutari Date: Sat, 17 Sep 2016 01:32:12 +0300 Subject: [PATCH 10/15] - pep8 --- openlp/plugins/songs/lib/mediaitem.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openlp/plugins/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py index 070018e73..3c728aadf 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -647,9 +647,10 @@ class SongMediaItem(MediaManagerItem): item.raw_footer = [] item.raw_footer.append(song.title) if authors_none: + # If the setting for showing "Written by:" is enabled, show it before unspecified authors. if Settings().value('songs/display written by'): item.raw_footer.append("{text}: {authors}".format(text=translate('OpenLP.Ui', 'Written by'), - authors=create_separated_list(authors_none))) + authors=create_separated_list(authors_none))) else: item.raw_footer.append("{authors}".format(authors=create_separated_list(authors_none))) From 2f8a5ba9066b9b9eca81a9e788db07faa69ff605 Mon Sep 17 00:00:00 2001 From: Olli Suutari Date: Sun, 18 Sep 2016 23:15:33 +0300 Subject: [PATCH 11/15] - Fixed the test --- openlp/plugins/songs/lib/mediaitem.py | 1 - .../functional/openlp_plugins/songs/test_mediaitem.py | 11 +++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/openlp/plugins/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py index 3c728aadf..4e048c6bb 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -653,7 +653,6 @@ class SongMediaItem(MediaManagerItem): authors=create_separated_list(authors_none))) else: item.raw_footer.append("{authors}".format(authors=create_separated_list(authors_none))) - if authors_words_music: item.raw_footer.append("{text}: {authors}".format(text=AuthorType.Types[AuthorType.WordsAndMusic], authors=create_separated_list(authors_words_music))) diff --git a/tests/functional/openlp_plugins/songs/test_mediaitem.py b/tests/functional/openlp_plugins/songs/test_mediaitem.py index 969c27ba1..89fc1ded6 100644 --- a/tests/functional/openlp_plugins/songs/test_mediaitem.py +++ b/tests/functional/openlp_plugins/songs/test_mediaitem.py @@ -295,11 +295,18 @@ class TestMediaItem(TestCase, TestMixin): mock_qlist_widget.setData.assert_called_once_with(MockedUserRole, mock_song.id) self.media_item.list_view.addItem.assert_called_once_with(mock_qlist_widget) - def test_build_song_footer_one_author(self): + @patch(u'openlp.plugins.songs.lib.mediaitem.Settings') + def test_build_song_footer_one_author_show_written_by(self, MockedSettings): """ Test build songs footer with basic song and one author """ - # GIVEN: A Song and a Service Item + # GIVEN: A Song and a Service Item, mocked settings: True for 'songs/display written by' + # and False for 'core/ccli number' (ccli will cause traceback if true) + + mocked_settings = MagicMock() + mocked_settings.value.side_effect = [True, False] + MockedSettings.return_value = mocked_settings + mock_song = MagicMock() mock_song.title = 'My Song' mock_song.authors_songs = [] From f45ee8ac174e84d7713581e62efb8c90cfaab5ca Mon Sep 17 00:00:00 2001 From: Olli Suutari Date: Sun, 4 Dec 2016 01:19:08 +0200 Subject: [PATCH 12/15] - Turned the one try statement into multiple so the existing data could be loaded if some fields were missing. --- openlp/plugins/bibles/forms/editbibleform.py | 30 +++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/openlp/plugins/bibles/forms/editbibleform.py b/openlp/plugins/bibles/forms/editbibleform.py index fb11bf36a..90efd035e 100644 --- a/openlp/plugins/bibles/forms/editbibleform.py +++ b/openlp/plugins/bibles/forms/editbibleform.py @@ -61,24 +61,32 @@ class EditBibleForm(QtWidgets.QDialog, Ui_EditBibleDialog, RegistryProperties): """ log.debug('Load Bible') self.bible = bible + book_name_language = self.manager.get_meta_data(self.bible, 'book_name_language') """ Try loading the metadata, if the field does not exist in the metadata, continue executing the code, - missing fields will be created on "self.accept" (save). Also set "book_name_language", - there would otherwise be a traceback for reference before assignment. + missing fields will be created on "self.accept" (save). """ try: self.version_name_edit.setText(self.manager.get_meta_data(self.bible, 'name').value) - self.version_name_edit.setPlaceholderText(UiStrings().RequiredShowInFooter) - self.copyright_edit.setText(self.manager.get_meta_data(self.bible, 'copyright').value) - self.copyright_edit.setPlaceholderText(UiStrings().RequiredShowInFooter) - self.permissions_edit.setText(self.manager.get_meta_data(self.bible, 'permissions').value) - self.permissions_edit.setPlaceholderText(UiStrings().OptionalShowInFooter) - self.full_license_edit.setPlainText(self.manager.get_meta_data(self.bible, 'full_license').value) - self.full_license_edit.setPlaceholderText(UiStrings().OptionalHideInFooter) - book_name_language = self.manager.get_meta_data(self.bible, 'book_name_language') except AttributeError: - book_name_language = self.manager.get_meta_data(self.bible, 'book_name_language') pass + try: + self.copyright_edit.setText(self.manager.get_meta_data(self.bible, 'copyright').value) + except AttributeError: + pass + try: + self.permissions_edit.setText(self.manager.get_meta_data(self.bible, 'permissions').value) + except AttributeError: + pass + try: + self.full_license_edit.setPlainText(self.manager.get_meta_data(self.bible, 'full_license').value) + except AttributeError: + pass + # Set placeholder texts for the fields. + self.version_name_edit.setPlaceholderText(UiStrings().RequiredShowInFooter) + self.copyright_edit.setPlaceholderText(UiStrings().RequiredShowInFooter) + self.permissions_edit.setPlaceholderText(UiStrings().OptionalShowInFooter) + self.full_license_edit.setPlaceholderText(UiStrings().OptionalHideInFooter) if book_name_language and book_name_language.value != 'None': self.language_selection_combo_box.setCurrentIndex(int(book_name_language.value) + 1) self.books = {} From 01029c8d652fd1d1f494a19513a8ab3f957a5791 Mon Sep 17 00:00:00 2001 From: Olli Suutari Date: Sun, 4 Dec 2016 05:08:56 +0200 Subject: [PATCH 13/15] - Added a test for checking hidden "Written by" text. --- openlp/plugins/bibles/lib/mediaitem.py | 2 +- .../openlp_plugins/songs/test_mediaitem.py | 33 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py index 9a04e5360..ddd2608ff 100644 --- a/openlp/plugins/bibles/lib/mediaitem.py +++ b/openlp/plugins/bibles/lib/mediaitem.py @@ -654,7 +654,7 @@ class BibleMediaItem(MediaManagerItem): self.application.process_events() bible = self.advancedVersionComboBox.currentText() second_bible = self.advancedSecondComboBox.currentText() - book = self.advanced_book_combo_box.currentText() + book = self.advanced_book_combo_box.currentTextå() book_ref_id = self.advanced_book_combo_box.itemData(int(self.advanced_book_combo_box.currentIndex())) chapter_from = self.advanced_from_chapter.currentText() chapter_to = self.advanced_to_chapter.currentText() diff --git a/tests/functional/openlp_plugins/songs/test_mediaitem.py b/tests/functional/openlp_plugins/songs/test_mediaitem.py index 89fc1ded6..f45b0a186 100644 --- a/tests/functional/openlp_plugins/songs/test_mediaitem.py +++ b/tests/functional/openlp_plugins/songs/test_mediaitem.py @@ -327,6 +327,39 @@ class TestMediaItem(TestCase, TestMixin): self.assertEqual(author_list, ['my author'], 'The author list should be returned correctly with one author') + @patch(u'openlp.plugins.songs.lib.mediaitem.Settings') + def test_build_song_footer_one_author_hide_written_by(self, MockedSettings): + """ + Test build songs footer with basic song and one author + """ + # GIVEN: A Song and a Service Item, mocked settings: False for 'songs/display written by' + # and False for 'core/ccli number' (ccli will cause traceback if true) + + mocked_settings = MagicMock() + mocked_settings.value.side_effect = [False, False] + MockedSettings.return_value = mocked_settings + + mock_song = MagicMock() + mock_song.title = 'My Song' + mock_song.authors_songs = [] + mock_author = MagicMock() + mock_author.display_name = 'my author' + mock_author_song = MagicMock() + mock_author_song.author = mock_author + mock_song.authors_songs.append(mock_author_song) + mock_song.copyright = 'My copyright' + service_item = ServiceItem(None) + + # WHEN: I generate the Footer with default settings + author_list = self.media_item.generate_footer(service_item, mock_song) + + # THEN: I get the following Array returned + self.assertEqual(service_item.raw_footer, ['My Song', 'my author', 'My copyright'], + 'The array should be returned correctly with a song, one author and copyright,' + 'text Written by should not be part of the text.') + self.assertEqual(author_list, ['my author'], + 'The author list should be returned correctly with one author') + def test_build_song_footer_two_authors(self): """ Test build songs footer with basic song and two authors From 8ae1c1f2765c50e2aec48ac43642647d4d950a27 Mon Sep 17 00:00:00 2001 From: Olli Suutari Date: Sun, 4 Dec 2016 05:21:56 +0200 Subject: [PATCH 14/15] =?UTF-8?q?-=20Removed=201=20"=C3=A5"=20that=20had?= =?UTF-8?q?=20slipped=20in=20to=20the=20code.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openlp/plugins/bibles/lib/mediaitem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py index ddd2608ff..9a04e5360 100644 --- a/openlp/plugins/bibles/lib/mediaitem.py +++ b/openlp/plugins/bibles/lib/mediaitem.py @@ -654,7 +654,7 @@ class BibleMediaItem(MediaManagerItem): self.application.process_events() bible = self.advancedVersionComboBox.currentText() second_bible = self.advancedSecondComboBox.currentText() - book = self.advanced_book_combo_box.currentTextå() + book = self.advanced_book_combo_box.currentText() book_ref_id = self.advanced_book_combo_box.itemData(int(self.advanced_book_combo_box.currentIndex())) chapter_from = self.advanced_from_chapter.currentText() chapter_to = self.advanced_to_chapter.currentText() From 8eb35e3591475c444e0dd9f601ac173c191803e1 Mon Sep 17 00:00:00 2001 From: Olli Suutari Date: Sun, 18 Dec 2016 08:06:10 +0200 Subject: [PATCH 15/15] - Changed one pair of " to ' - Changed the code for checking Bible meta exists - Changed the default value for the new setting to "True" --- .../plugins/bibles/forms/bibleimportform.py | 2 +- openlp/plugins/bibles/forms/editbibleform.py | 28 ++++++++----------- openlp/plugins/songs/songsplugin.py | 2 +- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/openlp/plugins/bibles/forms/bibleimportform.py b/openlp/plugins/bibles/forms/bibleimportform.py index dc794b58f..c41c53634 100644 --- a/openlp/plugins/bibles/forms/bibleimportform.py +++ b/openlp/plugins/bibles/forms/bibleimportform.py @@ -725,7 +725,7 @@ class BibleImportForm(OpenLPWizard): self.license_details_page.registerField('license_version', self.version_name_edit) self.license_details_page.registerField('license_copyright', self.copyright_edit) self.license_details_page.registerField('license_permissions', self.permissions_edit) - self.license_details_page.registerField("license_full_license", self.full_license_edit, "plainText") + self.license_details_page.registerField("license_full_license", self.full_license_edit, 'plainText') def set_defaults(self): """ diff --git a/openlp/plugins/bibles/forms/editbibleform.py b/openlp/plugins/bibles/forms/editbibleform.py index 90efd035e..1b15f9d48 100644 --- a/openlp/plugins/bibles/forms/editbibleform.py +++ b/openlp/plugins/bibles/forms/editbibleform.py @@ -66,22 +66,18 @@ class EditBibleForm(QtWidgets.QDialog, Ui_EditBibleDialog, RegistryProperties): Try loading the metadata, if the field does not exist in the metadata, continue executing the code, missing fields will be created on "self.accept" (save). """ - try: - self.version_name_edit.setText(self.manager.get_meta_data(self.bible, 'name').value) - except AttributeError: - pass - try: - self.copyright_edit.setText(self.manager.get_meta_data(self.bible, 'copyright').value) - except AttributeError: - pass - try: - self.permissions_edit.setText(self.manager.get_meta_data(self.bible, 'permissions').value) - except AttributeError: - pass - try: - self.full_license_edit.setPlainText(self.manager.get_meta_data(self.bible, 'full_license').value) - except AttributeError: - pass + meta = self.manager.get_meta_data(self.bible, 'name') + copyright = self.manager.get_meta_data(self.bible, 'copyright') + permission = self.manager.get_meta_data(self.bible, 'permissions') + full_license = self.manager.get_meta_data(self.bible, 'full_license') + if meta: + self.version_name_edit.setText(meta.value) + if copyright: + self.copyright_edit.setText(copyright.value) + if permission: + self.permissions_edit.setText(permission.value) + if full_license: + self.full_license_edit.setPlainText(full_license.value) # Set placeholder texts for the fields. self.version_name_edit.setPlaceholderText(UiStrings().RequiredShowInFooter) self.copyright_edit.setPlaceholderText(UiStrings().RequiredShowInFooter) diff --git a/openlp/plugins/songs/songsplugin.py b/openlp/plugins/songs/songsplugin.py index c76befeea..ddc918689 100644 --- a/openlp/plugins/songs/songsplugin.py +++ b/openlp/plugins/songs/songsplugin.py @@ -60,7 +60,7 @@ __default_settings__ = { 'songs/add song from service': True, 'songs/display songbar': True, 'songs/display songbook': False, - 'songs/display written by': False, + 'songs/display written by': True, 'songs/display copyright symbol': False, 'songs/last directory import': '', 'songs/last directory export': '',