forked from openlp/openlp
CSV bible import progress bar tweaks
This commit is contained in:
parent
c3699b294f
commit
0831f73306
@ -134,7 +134,7 @@ class CSVBible(BibleDB):
|
|||||||
"""
|
"""
|
||||||
self.wizard.progressBar.setValue(0)
|
self.wizard.progressBar.setValue(0)
|
||||||
self.wizard.progressBar.setMinimum(0)
|
self.wizard.progressBar.setMinimum(0)
|
||||||
self.wizard.progressBar.setMaximum(65)
|
self.wizard.progressBar.setMaximum(66)
|
||||||
success = True
|
success = True
|
||||||
books_file = None
|
books_file = None
|
||||||
book_list = {}
|
book_list = {}
|
||||||
@ -162,6 +162,7 @@ class CSVBible(BibleDB):
|
|||||||
if self.stop_import_flag or not success:
|
if self.stop_import_flag or not success:
|
||||||
return False
|
return False
|
||||||
self.wizard.progressBar.setValue(0)
|
self.wizard.progressBar.setValue(0)
|
||||||
|
self.wizard.progressBar.setMaximum(67)
|
||||||
verse_file = None
|
verse_file = None
|
||||||
try:
|
try:
|
||||||
book_ptr = None
|
book_ptr = None
|
||||||
@ -180,6 +181,8 @@ class CSVBible(BibleDB):
|
|||||||
self.session.commit()
|
self.session.commit()
|
||||||
self.create_verse(book.id, line[1], line[2],
|
self.create_verse(book.id, line[1], line[2],
|
||||||
unicode(line[3], details['encoding']))
|
unicode(line[3], details['encoding']))
|
||||||
|
self.wizard.incrementProgressBar(translate('BibleDB.Wizard',
|
||||||
|
'Importing verses... done.'))
|
||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
self.session.commit()
|
self.session.commit()
|
||||||
except IOError:
|
except IOError:
|
||||||
|
Loading…
Reference in New Issue
Block a user