forked from openlp/openlp
Custom plugin fixes
This commit is contained in:
parent
7a349c998e
commit
8420e4a438
@ -120,7 +120,7 @@ class Ui_customEditDialog(object):
|
||||
self.gridLayout.addLayout(self.horizontalLayout_2, 4, 0, 1, 1)
|
||||
self.buttonBox = QtGui.QDialogButtonBox(customEditDialog)
|
||||
self.buttonBox.setStandardButtons(
|
||||
QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
|
||||
QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Save)
|
||||
self.buttonBox.setObjectName(u'buttonBox')
|
||||
self.gridLayout.addWidget(self.buttonBox, 5, 0, 1, 1)
|
||||
|
||||
|
@ -101,7 +101,7 @@ class EditCustomForm(QtGui.QDialog, Ui_customEditDialog):
|
||||
verseList = songXML.get_verses()
|
||||
for verse in verseList:
|
||||
self.VerseListView.addItem(verse[1])
|
||||
theme = unicode(self.customSlide.theme_name)
|
||||
theme = self.customSlide.theme_name
|
||||
id = self.ThemeComboBox.findText(theme, QtCore.Qt.MatchExactly)
|
||||
if id == -1:
|
||||
id = 0 # Not Found
|
||||
@ -224,9 +224,12 @@ class EditCustomForm(QtGui.QDialog, Ui_customEditDialog):
|
||||
def _validate(self):
|
||||
if len(self.TitleEdit.displayText()) == 0:
|
||||
self.TitleEdit.setFocus()
|
||||
return False, self.trUtf8(u'You need to enter a title \n')
|
||||
return False, self.trUtf8(u'You need to enter a title')
|
||||
# must have 1 slide
|
||||
if self.VerseListView.count() == 0:
|
||||
self.VerseTextEdit.setFocus()
|
||||
return False, self.trUtf8(u'You need to enter a slide \n')
|
||||
return False, self.trUtf8(u'You need to enter a slide')
|
||||
if len(self.VerseTextEdit.toPlainText()) > 0:
|
||||
self.VerseTextEdit.setFocus()
|
||||
return False, self.trUtf8(u'You have unsaved data')
|
||||
return True, u''
|
||||
|
Loading…
Reference in New Issue
Block a user