forked from openlp/openlp
Merge from trunk
This commit is contained in:
commit
8187eaad65
@ -444,7 +444,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
tag = None
|
tag = None
|
||||||
#If verse handle verse number else tag only
|
#If verse handle verse number else tag only
|
||||||
if bits[0] == self.trUtf8('Verse'):
|
if bits[0] == self.trUtf8('Verse'):
|
||||||
tag = u'%s%s' % (bits[0][0], bits[1][0] )
|
tag = u'%s%s' % (bits[0][0], bits[1][0:] )
|
||||||
else:
|
else:
|
||||||
tag = bits[0]
|
tag = bits[0]
|
||||||
try:
|
try:
|
||||||
|
@ -68,7 +68,7 @@ class PresentationMediaItem(MediaManagerItem):
|
|||||||
if self.controllers[controller].enabled:
|
if self.controllers[controller].enabled:
|
||||||
for type in self.controllers[controller].supports:
|
for type in self.controllers[controller].supports:
|
||||||
if fileType.find(type) == -1:
|
if fileType.find(type) == -1:
|
||||||
fileType += type + u' '
|
fileType += u'*%s ' % type
|
||||||
self.OnNewFileMasks = self.trUtf8('Presentations (%s)' % fileType)
|
self.OnNewFileMasks = self.trUtf8('Presentations (%s)' % fileType)
|
||||||
|
|
||||||
def requiredIcons(self):
|
def requiredIcons(self):
|
||||||
|
@ -316,13 +316,13 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
|
|
||||||
def onVerseAddButtonClicked(self):
|
def onVerseAddButtonClicked(self):
|
||||||
self.verse_form.setVerse(u'', self.VerseListWidget.count() + 1, True)
|
self.verse_form.setVerse(u'', self.VerseListWidget.count() + 1, True)
|
||||||
self.verse_form.exec_()
|
if self.verse_form.exec_():
|
||||||
afterText, verse, subVerse = self.verse_form.getVerse()
|
afterText, verse, subVerse = self.verse_form.getVerse()
|
||||||
data = u'%s:%s' %(verse, subVerse)
|
data = u'%s:%s' %(verse, subVerse)
|
||||||
item = QtGui.QListWidgetItem(afterText)
|
item = QtGui.QListWidgetItem(afterText)
|
||||||
item.setData(QtCore.Qt.UserRole, QtCore.QVariant(data))
|
item.setData(QtCore.Qt.UserRole, QtCore.QVariant(data))
|
||||||
item.setText(afterText)
|
item.setText(afterText)
|
||||||
self.VerseListWidget.addItem(item)
|
self.VerseListWidget.addItem(item)
|
||||||
|
|
||||||
def onVerseEditButtonClicked(self):
|
def onVerseEditButtonClicked(self):
|
||||||
item = self.VerseListWidget.currentItem()
|
item = self.VerseListWidget.currentItem()
|
||||||
@ -331,25 +331,25 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
verseId = unicode((item.data(QtCore.Qt.UserRole)).toString())
|
verseId = unicode((item.data(QtCore.Qt.UserRole)).toString())
|
||||||
self.verse_form.setVerse(tempText, \
|
self.verse_form.setVerse(tempText, \
|
||||||
self.VerseListWidget.count(), True, verseId)
|
self.VerseListWidget.count(), True, verseId)
|
||||||
self.verse_form.exec_()
|
if self.verse_form.exec_():
|
||||||
afterText, verse, subVerse = self.verse_form.getVerse()
|
afterText, verse, subVerse = self.verse_form.getVerse()
|
||||||
data = u'%s:%s' %(verse, subVerse)
|
data = u'%s:%s' %(verse, subVerse)
|
||||||
item.setData(QtCore.Qt.UserRole, QtCore.QVariant(data))
|
item.setData(QtCore.Qt.UserRole, QtCore.QVariant(data))
|
||||||
item.setText(afterText)
|
item.setText(afterText)
|
||||||
#number of lines has change so repaint the list moving the data
|
#number of lines has change so repaint the list moving the data
|
||||||
if len(tempText.split(u'\n')) != len(afterText.split(u'\n')):
|
if len(tempText.split(u'\n')) != len(afterText.split(u'\n')):
|
||||||
tempList = {}
|
tempList = {}
|
||||||
tempId = {}
|
tempId = {}
|
||||||
for row in range(0, self.VerseListWidget.count()):
|
for row in range(0, self.VerseListWidget.count()):
|
||||||
tempList[row] = self.VerseListWidget.item(row).text()
|
tempList[row] = self.VerseListWidget.item(row).text()
|
||||||
tempId[row] = self.VerseListWidget.item(row).\
|
tempId[row] = self.VerseListWidget.item(row).\
|
||||||
data(QtCore.Qt.UserRole)
|
data(QtCore.Qt.UserRole)
|
||||||
self.VerseListWidget.clear()
|
self.VerseListWidget.clear()
|
||||||
for row in range (0, len(tempList)):
|
for row in range (0, len(tempList)):
|
||||||
item = QtGui.QListWidgetItem(tempList[row])
|
item = QtGui.QListWidgetItem(tempList[row])
|
||||||
item.setData(QtCore.Qt.UserRole, tempId[row])
|
item.setData(QtCore.Qt.UserRole, tempId[row])
|
||||||
self.VerseListWidget.addItem(item)
|
self.VerseListWidget.addItem(item)
|
||||||
self.VerseListWidget.repaint()
|
self.VerseListWidget.repaint()
|
||||||
self.VerseEditButton.setEnabled(False)
|
self.VerseEditButton.setEnabled(False)
|
||||||
self.VerseDeleteButton.setEnabled(False)
|
self.VerseDeleteButton.setEnabled(False)
|
||||||
|
|
||||||
@ -410,7 +410,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
self.AuthorsListView.setFocus()
|
self.AuthorsListView.setFocus()
|
||||||
#split the verse list by space and mark lower case for testing
|
#split the verse list by space and mark lower case for testing
|
||||||
for verse in unicode(self.VerseOrderEdit.text()).lower().split(u' '):
|
for verse in unicode(self.VerseOrderEdit.text()).lower().split(u' '):
|
||||||
if len(verse) == 2:
|
if len(verse) > 1:
|
||||||
if verse[0:1] == u'v' and verse[1:].isdigit():
|
if verse[0:1] == u'v' and verse[1:].isdigit():
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
@ -533,4 +533,4 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
self.song.search_title = self.song.search_title.replace(u'{', u'')
|
self.song.search_title = self.song.search_title.replace(u'{', u'')
|
||||||
self.song.search_title = self.song.search_title.replace(u'}', u'')
|
self.song.search_title = self.song.search_title.replace(u'}', u'')
|
||||||
self.song.search_title = self.song.search_title.replace(u'?', u'')
|
self.song.search_title = self.song.search_title.replace(u'?', u'')
|
||||||
self.song.search_title = unicode(self.song.search_title)
|
self.song.search_title = unicode(self.song.search_title)
|
||||||
|
@ -310,7 +310,7 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
for verse in verseList:
|
for verse in verseList:
|
||||||
if verse[1]:
|
if verse[1]:
|
||||||
if verse[0][u'type'] == "Verse":
|
if verse[0][u'type'] == "Verse":
|
||||||
if verse[0][u'label'][0] == order[1:]:
|
if verse[0][u'label'] == 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\
|
||||||
|
@ -1 +1 @@
|
|||||||
1.9.0-701
|
1.9.0-703
|
||||||
|
Loading…
Reference in New Issue
Block a user