forked from openlp/openlp
Verse tagging verses must be in format of vX
This commit is contained in:
parent
1b6ad5814b
commit
547074d29a
@ -401,14 +401,24 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
if self.AuthorsListView.count() == 0:
|
if self.AuthorsListView.count() == 0:
|
||||||
self.SongTabWidget.setCurrentIndex(2)
|
self.SongTabWidget.setCurrentIndex(2)
|
||||||
self.AuthorsListView.setFocus()
|
self.AuthorsListView.setFocus()
|
||||||
for verse in unicode(self.VerseOrderEdit.text()):
|
for verse in unicode(self.VerseOrderEdit.text()).split(u' '):
|
||||||
if verse.isdigit() or u' BCITPEO'.find(verse.upper()) > -1:
|
if len(verse) == 2:
|
||||||
pass
|
if verse[0:1] == u'v' and verse[1:].isdigit():
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
self.SongTabWidget.setCurrentIndex(0)
|
||||||
|
self.VerseOrderEdit.setFocus()
|
||||||
|
return False, \
|
||||||
|
self.trUtf8('Invalid verse entry - vX')
|
||||||
else:
|
else:
|
||||||
self.SongTabWidget.setCurrentIndex(0)
|
if u' BCITPEO'.find(verse.upper()) > -1:
|
||||||
self.VerseOrderEdit.setFocus()
|
pass
|
||||||
return False, \
|
else:
|
||||||
self.trUtf8('Invalid verse entry - values must be Numeric, I,B,C,T,P,E,O')
|
self.SongTabWidget.setCurrentIndex(0)
|
||||||
|
self.VerseOrderEdit.setFocus()
|
||||||
|
return False, \
|
||||||
|
self.trUtf8(\
|
||||||
|
'Invalid verse entry - values must be Numeric, I,B,C,T,P,E,O')
|
||||||
return True, u''
|
return True, u''
|
||||||
|
|
||||||
def onTitleEditItemLostFocus(self):
|
def onTitleEditItemLostFocus(self):
|
||||||
|
@ -297,11 +297,11 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
for verse in verseList:
|
for verse in verseList:
|
||||||
service_item.add_from_text(verse[1][:30], unicode(verse[1]))
|
service_item.add_from_text(verse[1][:30], unicode(verse[1]))
|
||||||
else:
|
else:
|
||||||
for order in service_item.verse_order:
|
for order in service_item.verse_order.split(u' '):
|
||||||
for verse in verseList:
|
for verse in verseList:
|
||||||
if verse[1]:
|
if verse[1]:
|
||||||
if verse[0][u'type'] == "Verse" and \
|
if verse[0][u'type'] == "Verse" and \
|
||||||
verse[0][u'label'][0] == order[0]:
|
verse[0][u'label'][0] == order[1:]:
|
||||||
verseTag = 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\
|
||||||
|
Loading…
Reference in New Issue
Block a user