forked from openlp/openlp
SongBeamer fixes
Correct Song Tab error bzr-revno: 1169
This commit is contained in:
commit
ec062c2640
@ -90,6 +90,7 @@ class SongBeamerImport(SongImport):
|
|||||||
len(self.import_source))
|
len(self.import_source))
|
||||||
for file in self.import_source:
|
for file in self.import_source:
|
||||||
# TODO: check that it is a valid SongBeamer file
|
# TODO: check that it is a valid SongBeamer file
|
||||||
|
self.set_defaults()
|
||||||
self.current_verse = u''
|
self.current_verse = u''
|
||||||
self.current_verse_type = u'V'
|
self.current_verse_type = u'V'
|
||||||
read_verses = False
|
read_verses = False
|
||||||
@ -105,6 +106,8 @@ class SongBeamerImport(SongImport):
|
|||||||
infile.close()
|
infile.close()
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
self.title = self.file_name.split('.sng')[0]
|
||||||
|
read_verses = False
|
||||||
for line in self.songData:
|
for line in self.songData:
|
||||||
# Just make sure that the line is of the type 'Unicode'.
|
# Just make sure that the line is of the type 'Unicode'.
|
||||||
line = unicode(line).strip()
|
line = unicode(line).strip()
|
||||||
@ -129,7 +132,8 @@ class SongBeamerImport(SongImport):
|
|||||||
if self.current_verse:
|
if self.current_verse:
|
||||||
self.replace_html_tags()
|
self.replace_html_tags()
|
||||||
self.add_verse(self.current_verse, self.current_verse_type)
|
self.add_verse(self.current_verse, self.current_verse_type)
|
||||||
self.finish()
|
if self.check_complete():
|
||||||
|
self.finish()
|
||||||
self.import_wizard.incrementProgressBar(u'%s %s...' %
|
self.import_wizard.incrementProgressBar(u'%s %s...' %
|
||||||
(translate('SongsPlugin.SongBeamerImport', 'Importing'),
|
(translate('SongsPlugin.SongBeamerImport', 'Importing'),
|
||||||
self.file_name))
|
self.file_name))
|
||||||
|
@ -72,7 +72,7 @@ class SongsTab(SettingsTab):
|
|||||||
QtCore.QObject.connect(self.SongUpdateOnEditCheckBox,
|
QtCore.QObject.connect(self.SongUpdateOnEditCheckBox,
|
||||||
QtCore.SIGNAL(u'stateChanged(int)'),
|
QtCore.SIGNAL(u'stateChanged(int)'),
|
||||||
self.onSongUpdateOnEditCheckBoxChanged)
|
self.onSongUpdateOnEditCheckBoxChanged)
|
||||||
QtCore.QObject.connect(self.SongBarActiveCheckBox,
|
QtCore.QObject.connect(self.SongAddFromServiceCheckBox,
|
||||||
QtCore.SIGNAL(u'stateChanged(int)'),
|
QtCore.SIGNAL(u'stateChanged(int)'),
|
||||||
self.onSongAddFromServiceCheckBoxChanged)
|
self.onSongAddFromServiceCheckBoxChanged)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user