forked from openlp/openlp
Fix Qstring bug
Update Combo code bzr-revno: 834
This commit is contained in:
commit
3bc1482588
@ -60,8 +60,11 @@ class ImageMediaItem(MediaManagerItem):
|
||||
|
||||
def retranslateUi(self):
|
||||
self.OnNewPrompt = self.trUtf8('Select Image(s)')
|
||||
self.OnNewFileMasks = self.trUtf8(
|
||||
'Images (*.jpg *.jpeg *.gif *.png *.bmp);; All files (*)')
|
||||
file_formats = u''
|
||||
for file_format in QtGui.QImageReader.supportedImageFormats():
|
||||
file_formats += u'*.%s ' % file_format
|
||||
self.OnNewFileMasks = unicode(
|
||||
self.trUtf8('Images (%s);; All files (*)')) % file_formats
|
||||
|
||||
def requiredIcons(self):
|
||||
MediaManagerItem.requiredIcons(self)
|
||||
|
@ -103,8 +103,10 @@ class EditVerseForm(QtGui.QDialog, Ui_EditVerseDialog):
|
||||
if match:
|
||||
verse_type = match.group(1)
|
||||
verse_number = int(match.group(2))
|
||||
self.VerseTypeComboBox.setCurrentIndex(VerseType.from_string(verse_type))
|
||||
self.VerseNumberBox.setValue(verse_number)
|
||||
verse_type_index = VerseType.from_string(verse_type)
|
||||
if verse_type_index:
|
||||
self.VerseTypeComboBox.setCurrentIndex(verse_type_index)
|
||||
self.VerseNumberBox.setValue(verse_number)
|
||||
|
||||
def setVerse(self, text, single=False,
|
||||
tag=u'%s:1' % VerseType.to_string(VerseType.Verse)):
|
||||
|
@ -198,8 +198,8 @@ class SongMediaItem(MediaManagerItem):
|
||||
self.ListView.clear()
|
||||
for author in searchresults:
|
||||
for song in author.songs:
|
||||
song_detail = unicode(self.trUtf8('%s (%s)') %
|
||||
(author.display_name, song.title))
|
||||
song_detail = unicode(self.trUtf8('%s (%s)')) % \
|
||||
(author.display_name, song.title)
|
||||
song_name = QtGui.QListWidgetItem(song_detail)
|
||||
song_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(song.id))
|
||||
self.ListView.addItem(song_name)
|
||||
|
Loading…
Reference in New Issue
Block a user