Bible import issues

This commit is contained in:
Philip Ridout 2019-03-16 10:20:46 +00:00
parent e1d2c67f33
commit 296adb59a0
3 changed files with 5 additions and 5 deletions

View File

@ -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'

View File

@ -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'):

View File

@ -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, '