openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #04884
[Merge] lp:~trb143/openlp/bugs into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/bugs into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
#691952 To create a songs fails
https://bugs.launchpad.net/bugs/691952
Songs being edited must have an Author
Songs being edited must have text in a verse.
--
https://code.launchpad.net/~trb143/openlp/bugs/+merge/44136
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/bugs into lp:openlp.
=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py 2010-12-16 18:20:46 +0000
+++ openlp/plugins/songs/forms/editsongform.py 2010-12-18 17:31:13 +0000
@@ -547,14 +547,11 @@
if self.AuthorsListView.count() == 0:
self.SongTabWidget.setCurrentIndex(1)
self.AuthorsListView.setFocus()
- answer = QtGui.QMessageBox.warning(self,
+ QtGui.QMessageBox.critical(self,
translate('SongsPlugin.EditSongForm', 'Warning'),
translate('SongsPlugin.EditSongForm',
- 'You have not added any authors for this song. Do you '
- 'want to add an author now?'),
- QtGui.QMessageBox.Yes | QtGui.QMessageBox.No)
- if answer == QtGui.QMessageBox.Yes:
- return False
+ 'You need to have an author for this song.'))
+ return False
if self.song.verse_order:
order = []
order_names = self.song.verse_order.split()
=== modified file 'openlp/plugins/songs/forms/editverseform.py'
--- openlp/plugins/songs/forms/editverseform.py 2010-11-18 17:57:51 +0000
+++ openlp/plugins/songs/forms/editverseform.py 2010-12-18 17:31:13 +0000
@@ -29,7 +29,7 @@
from PyQt4 import QtCore, QtGui
-from openlp.plugins.songs.lib import VerseType
+from openlp.plugins.songs.lib import VerseType, translate
from editversedialog import Ui_EditVerseDialog
@@ -130,7 +130,7 @@
self.verseNumberBox.setValue(verse_number)
def setVerse(self, text, single=False,
- tag=u'%s:1' % VerseType.to_string(VerseType.Verse)):
+ tag = u'%s:1' % VerseType.to_string(VerseType.Verse)):
if single:
verse_type, verse_number = tag.split(u':')
verse_type_index = VerseType.from_string(verse_type)
@@ -159,3 +159,12 @@
text = u'---[%s:1]---\n%s' % (VerseType.to_string(VerseType.Verse),
text)
return text
+
+ def accept(self):
+ if len(unicode(self.getVerse()[0])) == 0:
+ QtGui.QMessageBox.critical(self,
+ translate('SongsPlugin.EditSongForm', 'Error'),
+ translate('SongsPlugin.EditSongForm',
+ 'You need to type some text in to the verse.'))
+ return False
+ QtGui.QDialog.accept(self)