This commit is contained in:
Tim Bentley 2010-06-05 14:28:34 +01:00
parent fbbcdc20da
commit 2143a24182
2 changed files with 6 additions and 8 deletions

View File

@ -97,8 +97,6 @@ class EditVerseForm(QtGui.QDialog, Ui_EditVerseDialog):
QtCore.SIGNAL(u'cursorPositionChanged()'), QtCore.SIGNAL(u'cursorPositionChanged()'),
self.onCursorPositionChanged self.onCursorPositionChanged
) )
# QtCore.QObject.connect(self.VerseListComboBox,
# QtCore.SIGNAL(u'activated(int)'), self.onVerseComboChanged)
self.verse_regex = re.compile(r'---\[([-\w]+):([\d]+)\]---') self.verse_regex = re.compile(r'---\[([-\w]+):([\d]+)\]---')
def insertVerse(self, title, num=1): def insertVerse(self, title, num=1):

View File

@ -324,10 +324,10 @@ class SongMediaItem(MediaManagerItem):
#no verse list or only 1 space (in error) #no verse list or only 1 space (in error)
if not song.verse_order or not song.verse_order.strip(): if not song.verse_order or not song.verse_order.strip():
for verse in verseList: for verse in verseList:
verse_tag = u'%s:%s' % ( verseTag = u'%s:%s' % (
verse[0][u'type'], verse[0][u'label']) verse[0][u'type'], verse[0][u'label'])
service_item.add_from_text(\ service_item.add_from_text(\
verse[1][:30], unicode(verse[1]), verse_tag) verse[1][:30], unicode(verse[1]), verseTag)
else: else:
#Loop through the verse list and expand the song accordingly. #Loop through the verse list and expand the song accordingly.
for order in song.verse_order.upper().split(u' '): for order in song.verse_order.upper().split(u' '):
@ -339,16 +339,16 @@ class SongMediaItem(MediaManagerItem):
or verse[0][u'type'] == "Chorus": or verse[0][u'type'] == "Chorus":
if verse[0][u'label'] == order[1:] and \ if verse[0][u'label'] == order[1:] and \
verse[0][u'type'][0] == order[0]: verse[0][u'type'][0] == order[0]:
verse_tag = u'%s:%s' % \ verseTag = u'%s:%s' % \
(verse[0][u'type'], verse[0][u'label']) (verse[0][u'type'], verse[0][u'label'])
service_item.add_from_text\ service_item.add_from_text\
(verse[1][:30], verse[1], verse_tag) (verse[1][:30], verse[1], verseTag)
else: else:
if verse[0][u'type'][0] == order[0]: if verse[0][u'type'][0] == order[0]:
verse_tag = u'%s:%s' % \ verseTag = u'%s:%s' % \
(verse[0][u'type'], verse[0][u'label']) (verse[0][u'type'], verse[0][u'label'])
service_item.add_from_text\ service_item.add_from_text\
(verse[1][:30], verse[1], verse_tag) (verse[1][:30], verse[1], verseTag)
else: else:
verses = song.lyrics.split(u'\n\n') verses = song.lyrics.split(u'\n\n')
for slide in verses: for slide in verses: