From 296adb59a08a5064e9ba51c64ea8a9264bc25811 Mon Sep 17 00:00:00 2001 From: Philip Ridout Date: Sat, 16 Mar 2019 10:20:46 +0000 Subject: [PATCH] Bible import issues --- openlp/core/ui/generaltab.py | 1 - openlp/plugins/bibles/forms/bibleimportform.py | 4 ++-- openlp/plugins/bibles/lib/db.py | 5 +++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openlp/core/ui/generaltab.py b/openlp/core/ui/generaltab.py index 0095f64d5..2a81820af 100644 --- a/openlp/core/ui/generaltab.py +++ b/openlp/core/ui/generaltab.py @@ -47,7 +47,6 @@ class GeneralTab(SettingsTab): """ Initialise the general settings tab """ - self.logo_file = ':/graphics/openlp-splash-screen.png' self.logo_background_color = '#ffffff' self.screens = ScreenList() self.icon_path = ':/icon/openlp-logo.svg' diff --git a/openlp/plugins/bibles/forms/bibleimportform.py b/openlp/plugins/bibles/forms/bibleimportform.py index a53e73558..4804863d6 100644 --- a/openlp/plugins/bibles/forms/bibleimportform.py +++ b/openlp/plugins/bibles/forms/bibleimportform.py @@ -463,14 +463,14 @@ class BibleImportForm(OpenLPWizard): UiStrings().NFSs, translate('BiblesPlugin.ImportWizardForm', 'You need to specify a file with books of the Bible to use in the ' 'import.')) - self.csv_books_edit.setFocus() + self.csv_books_path_edit.setFocus() return False elif not self.field('csv_versefile'): critical_error_message_box( UiStrings().NFSs, translate('BiblesPlugin.ImportWizardForm', 'You need to specify a file of Bible verses to ' 'import.')) - self.csv_verses_edit.setFocus() + self.csv_verses_pathedit.setFocus() return False elif self.field('source_format') == BibleFormat.OpenSong: if not self.field('opensong_file'): diff --git a/openlp/plugins/bibles/lib/db.py b/openlp/plugins/bibles/lib/db.py index 545bf27a8..6df2efab8 100644 --- a/openlp/plugins/bibles/lib/db.py +++ b/openlp/plugins/bibles/lib/db.py @@ -750,7 +750,7 @@ class BiblesResourcesDB(QtCore.QObject, Manager): ] -class AlternativeBookNamesDB(QtCore.QObject, Manager): +class AlternativeBookNamesDB(Manager): """ This class represents a database-bound alternative book names system. """ @@ -765,8 +765,9 @@ class AlternativeBookNamesDB(QtCore.QObject, Manager): """ if AlternativeBookNamesDB.cursor is None: file_path = AppLocation.get_directory(AppLocation.DataDir) / 'bibles' / 'alternative_book_names.sqlite' + exists = file_path.exists() AlternativeBookNamesDB.conn = sqlite3.connect(str(file_path)) - if not file_path.exists(): + if not exists: # create new DB, create table alternative_book_names AlternativeBookNamesDB.conn.execute( 'CREATE TABLE alternative_book_names(id INTEGER NOT NULL, '