Finish wizard integration

This commit is contained in:
Jonathan Corwin 2010-09-05 16:16:48 +01:00
parent 3d550e383c
commit aa0f4f7af0
3 changed files with 10 additions and 4 deletions

View File

@ -82,6 +82,9 @@ class OooImport(SongImport):
self.process_doc()
self.close_ooo_file()
self.close_ooo()
self.import_wizard.importProgressBar.setMaximum(1)
self.import_wizard.incrementProgressBar(u'', 1)
return True
def stop_import(self):
self.abort = True

View File

@ -89,6 +89,9 @@ class SofImport(OooImport):
self.process_sof_file()
self.close_ooo_file()
self.close_ooo()
self.import_wizard.importProgressBar.setMaximum(1)
self.import_wizard.incrementProgressBar(u'', 1)
return True
def process_sof_file(self):
"""

View File

@ -129,13 +129,13 @@ class SongImport(QtCore.QObject):
def process_verse_text(self, text):
lines = text.split(u'\n')
if text.lower().find(COPYRIGHT_STRING) >= 0 \
or text.lower().find(COPYRIGHT_SYMBOL) >= 0:
if text.lower().find(self.copyright_string) >= 0 \
or text.lower().find(self.copyright_symbol) >= 0:
copyright_found = False
for line in lines:
if (copyright_found or
line.lower().find(COPYRIGHT_STRING) >= 0 or
line.lower().find(COPYRIGHT_SYMBOL) >= 0):
line.lower().find(self.copyright_string) >= 0 or
line.lower().find(self.copyright_symbol) >= 0):
copyright_found = True
self.add_copyright(line)
else: