Allow leading space in song title

bzr-revno: 1500
This commit is contained in:
Tim Bentley 2011-04-29 08:42:42 +01:00
commit 45d90db949
3 changed files with 7 additions and 5 deletions

View File

@ -850,4 +850,4 @@ class BibleMediaItem(MediaManagerItem):
self.settings.layout_style)
QtCore.QSettings().setValue(
self.settingsSection + u'/verse layout style',
QtCore.QVariant(self.settings.layout_style))
QtCore.QVariant(self.settings.layout_style))

View File

@ -576,11 +576,13 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
if verse_index is not None:
order.append(VerseType.Tags[verse_index] + u'1')
else:
order.append(u'') # it matches no verses anyway
# it matches no verses anyway
order.append(u'')
else:
verse_index = VerseType.from_translated_tag(item[0])
if verse_index is None:
order.append(u'') # same as above
# it matches no verses anyway
order.append(u'')
else:
verse_tag = VerseType.Tags[verse_index]
verse_num = item[1:].lower()
@ -779,4 +781,4 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
self.song.verse_order)
except:
log.exception(u'Problem processing song Lyrics \n%s',
sxml.dump_xml())
sxml.dump_xml())

View File

@ -257,7 +257,7 @@ def clean_song(manager, song):
``song``
The song object.
"""
song.title = song.title.strip() if song.title else u''
song.title = song.title.rstrip() if song.title else u''
if song.alternate_title is None:
song.alternate_title = u''
song.alternate_title = song.alternate_title.strip()