forked from openlp/openlp
bible
This commit is contained in:
parent
ff5513f630
commit
ae1124f8bd
@ -178,12 +178,14 @@ class BiblePlugin(Plugin):
|
|||||||
|
|
||||||
def uses_theme(self, theme):
|
def uses_theme(self, theme):
|
||||||
"""
|
"""
|
||||||
Called to find out if the bible plugin is currently using a theme. Returns ``True`` if the theme is being used,
|
Called to find out if the bible plugin is currently using a theme. Returns ``1`` if the theme is being used,
|
||||||
otherwise returns ``False``.
|
otherwise returns ``0``.
|
||||||
|
|
||||||
:param theme: The theme
|
:param theme: The theme
|
||||||
"""
|
"""
|
||||||
return str(self.settings_tab.bible_theme) == theme
|
if str(self.settings_tab.bible_theme) == theme:
|
||||||
|
return 1
|
||||||
|
return 0
|
||||||
|
|
||||||
def rename_theme(self, old_theme, new_theme):
|
def rename_theme(self, old_theme, new_theme):
|
||||||
"""
|
"""
|
||||||
|
@ -476,16 +476,6 @@ class BibleDB(QtCore.QObject, Manager, RegistryProperties):
|
|||||||
self.save_meta('language_id', language_id)
|
self.save_meta('language_id', language_id)
|
||||||
return language_id
|
return language_id
|
||||||
|
|
||||||
def is_old_database(self):
|
|
||||||
"""
|
|
||||||
Returns ``True`` if it is a bible database, which has been created prior to 1.9.6.
|
|
||||||
"""
|
|
||||||
try:
|
|
||||||
self.session.query(Book).all()
|
|
||||||
except:
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
def dump_bible(self):
|
def dump_bible(self):
|
||||||
"""
|
"""
|
||||||
Utility debugging method to dump the contents of a bible.
|
Utility debugging method to dump the contents of a bible.
|
||||||
|
@ -129,11 +129,6 @@ class BibleManager(RegistryProperties):
|
|||||||
bible.session.close()
|
bible.session.close()
|
||||||
delete_file(os.path.join(self.path, filename))
|
delete_file(os.path.join(self.path, filename))
|
||||||
continue
|
continue
|
||||||
# Find old database versions.
|
|
||||||
if bible.is_old_database():
|
|
||||||
self.old_bible_databases.append([filename, name])
|
|
||||||
bible.session.close()
|
|
||||||
continue
|
|
||||||
log.debug('Bible Name: "%s"', name)
|
log.debug('Bible Name: "%s"', name)
|
||||||
self.db_cache[name] = bible
|
self.db_cache[name] = bible
|
||||||
# Look to see if lazy load bible exists and get create getter.
|
# Look to see if lazy load bible exists and get create getter.
|
||||||
|
Loading…
Reference in New Issue
Block a user