SongBeamer fixes

Correct Song Tab error

bzr-revno: 1169
This commit is contained in:
rimach 2010-12-27 08:28:33 +00:00 committed by Tim Bentley
commit ec062c2640
2 changed files with 6 additions and 2 deletions

View File

@ -90,6 +90,7 @@ class SongBeamerImport(SongImport):
len(self.import_source))
for file in self.import_source:
# TODO: check that it is a valid SongBeamer file
self.set_defaults()
self.current_verse = u''
self.current_verse_type = u'V'
read_verses = False
@ -105,6 +106,8 @@ class SongBeamerImport(SongImport):
infile.close()
else:
return False
self.title = self.file_name.split('.sng')[0]
read_verses = False
for line in self.songData:
# Just make sure that the line is of the type 'Unicode'.
line = unicode(line).strip()
@ -129,7 +132,8 @@ class SongBeamerImport(SongImport):
if self.current_verse:
self.replace_html_tags()
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...' %
(translate('SongsPlugin.SongBeamerImport', 'Importing'),
self.file_name))

View File

@ -72,7 +72,7 @@ class SongsTab(SettingsTab):
QtCore.QObject.connect(self.SongUpdateOnEditCheckBox,
QtCore.SIGNAL(u'stateChanged(int)'),
self.onSongUpdateOnEditCheckBoxChanged)
QtCore.QObject.connect(self.SongBarActiveCheckBox,
QtCore.QObject.connect(self.SongAddFromServiceCheckBox,
QtCore.SIGNAL(u'stateChanged(int)'),
self.onSongAddFromServiceCheckBoxChanged)