forked from openlp/openlp
Bible import issues
This commit is contained in:
parent
e1d2c67f33
commit
296adb59a0
@ -47,7 +47,6 @@ class GeneralTab(SettingsTab):
|
|||||||
"""
|
"""
|
||||||
Initialise the general settings tab
|
Initialise the general settings tab
|
||||||
"""
|
"""
|
||||||
self.logo_file = ':/graphics/openlp-splash-screen.png'
|
|
||||||
self.logo_background_color = '#ffffff'
|
self.logo_background_color = '#ffffff'
|
||||||
self.screens = ScreenList()
|
self.screens = ScreenList()
|
||||||
self.icon_path = ':/icon/openlp-logo.svg'
|
self.icon_path = ':/icon/openlp-logo.svg'
|
||||||
|
@ -463,14 +463,14 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
UiStrings().NFSs, translate('BiblesPlugin.ImportWizardForm',
|
UiStrings().NFSs, translate('BiblesPlugin.ImportWizardForm',
|
||||||
'You need to specify a file with books of the Bible to use in the '
|
'You need to specify a file with books of the Bible to use in the '
|
||||||
'import.'))
|
'import.'))
|
||||||
self.csv_books_edit.setFocus()
|
self.csv_books_path_edit.setFocus()
|
||||||
return False
|
return False
|
||||||
elif not self.field('csv_versefile'):
|
elif not self.field('csv_versefile'):
|
||||||
critical_error_message_box(
|
critical_error_message_box(
|
||||||
UiStrings().NFSs,
|
UiStrings().NFSs,
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'You need to specify a file of Bible verses to '
|
translate('BiblesPlugin.ImportWizardForm', 'You need to specify a file of Bible verses to '
|
||||||
'import.'))
|
'import.'))
|
||||||
self.csv_verses_edit.setFocus()
|
self.csv_verses_pathedit.setFocus()
|
||||||
return False
|
return False
|
||||||
elif self.field('source_format') == BibleFormat.OpenSong:
|
elif self.field('source_format') == BibleFormat.OpenSong:
|
||||||
if not self.field('opensong_file'):
|
if not self.field('opensong_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.
|
This class represents a database-bound alternative book names system.
|
||||||
"""
|
"""
|
||||||
@ -765,8 +765,9 @@ class AlternativeBookNamesDB(QtCore.QObject, Manager):
|
|||||||
"""
|
"""
|
||||||
if AlternativeBookNamesDB.cursor is None:
|
if AlternativeBookNamesDB.cursor is None:
|
||||||
file_path = AppLocation.get_directory(AppLocation.DataDir) / 'bibles' / 'alternative_book_names.sqlite'
|
file_path = AppLocation.get_directory(AppLocation.DataDir) / 'bibles' / 'alternative_book_names.sqlite'
|
||||||
|
exists = file_path.exists()
|
||||||
AlternativeBookNamesDB.conn = sqlite3.connect(str(file_path))
|
AlternativeBookNamesDB.conn = sqlite3.connect(str(file_path))
|
||||||
if not file_path.exists():
|
if not exists:
|
||||||
# create new DB, create table alternative_book_names
|
# create new DB, create table alternative_book_names
|
||||||
AlternativeBookNamesDB.conn.execute(
|
AlternativeBookNamesDB.conn.execute(
|
||||||
'CREATE TABLE alternative_book_names(id INTEGER NOT NULL, '
|
'CREATE TABLE alternative_book_names(id INTEGER NOT NULL, '
|
||||||
|
Loading…
Reference in New Issue
Block a user