forked from openlp/openlp
Bring up to date
This commit is contained in:
parent
1c66c7cd2c
commit
f717dc10d4
@ -59,16 +59,16 @@ class OooImport(SongImport):
|
||||
self.document = None
|
||||
self.process_started = False
|
||||
self.filenames = kwargs[u'filenames']
|
||||
self.import_wizard.importProgressBar.setMaximum(0)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'openlp_stop_song_import'), self.stop_import)
|
||||
QtCore.SIGNAL(u'song_stop_import'), self.stop_import)
|
||||
|
||||
def do_import(self):
|
||||
self.abort = False
|
||||
self.import_wizard.importProgressBar.setMaximum(0)
|
||||
self.start_ooo()
|
||||
for filename in self.filenames:
|
||||
if self.abort:
|
||||
self.import_wizard.incrementProgressBar(u'Import cancelled')
|
||||
self.import_wizard.incrementProgressBar(u'Import cancelled', 0)
|
||||
return
|
||||
filename = unicode(filename)
|
||||
if os.path.isfile(filename):
|
||||
@ -149,7 +149,8 @@ class OooImport(SongImport):
|
||||
self.document.supportsService("com.sun.star.text.TextDocument"):
|
||||
self.close_ooo_file()
|
||||
else:
|
||||
self.import_wizard.incrementProgressBar(u'Processing file ' + filepath)
|
||||
self.import_wizard.incrementProgressBar(
|
||||
u'Processing file ' + filepath, 0)
|
||||
except:
|
||||
pass
|
||||
return
|
||||
@ -177,7 +178,7 @@ class OooImport(SongImport):
|
||||
text = u''
|
||||
for slide_no in range(slides.getCount()):
|
||||
if self.abort:
|
||||
self.import_wizard.incrementProgressBar(u'Import cancelled')
|
||||
self.import_wizard.incrementProgressBar(u'Import cancelled', 0)
|
||||
return
|
||||
slide = slides.getByIndex(slide_no)
|
||||
slidetext = u''
|
||||
|
@ -80,7 +80,7 @@ class SofImport(OooImport):
|
||||
self.start_ooo()
|
||||
for filename in self.filenames:
|
||||
if self.abort:
|
||||
self.import_wizard.incrementProgressBar(u'Import cancelled')
|
||||
self.import_wizard.incrementProgressBar(u'Import cancelled', 0)
|
||||
return
|
||||
filename = unicode(filename)
|
||||
if os.path.isfile(filename):
|
||||
@ -99,7 +99,7 @@ class SofImport(OooImport):
|
||||
paragraphs = self.document.getText().createEnumeration()
|
||||
while paragraphs.hasMoreElements():
|
||||
if self.abort:
|
||||
self.import_wizard.incrementProgressBar(u'Import cancelled')
|
||||
self.import_wizard.incrementProgressBar(u'Import cancelled', 0)
|
||||
return
|
||||
paragraph = paragraphs.nextElement()
|
||||
if paragraph.supportsService("com.sun.star.text.Paragraph"):
|
||||
@ -255,7 +255,7 @@ class SofImport(OooImport):
|
||||
if title.endswith(u','):
|
||||
title = title[:-1]
|
||||
self.song.title = title
|
||||
self.import_wizard.incrementProgressBar(u'Processing song ' + title)
|
||||
self.import_wizard.incrementProgressBar(u'Processing song ' + title, 0)
|
||||
|
||||
def add_author(self, text):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user