openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #14976
[Merge] lp:~m2j/openlp/bug-969282 into lp:openlp
Meinert Jordan has proposed merging lp:~m2j/openlp/bug-969282 into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~m2j/openlp/bug-969282/+merge/100395
Bug #969282: Remove control characters from song copyright string
--
https://code.launchpad.net/~m2j/openlp/bug-969282/+merge/100395
Your team OpenLP Core is requested to review the proposed merge of lp:~m2j/openlp/bug-969282 into lp:openlp.
=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py 2012-03-31 09:58:34 +0000
+++ openlp/plugins/songs/forms/editsongform.py 2012-04-02 11:52:35 +0000
@@ -193,19 +193,19 @@
self.song = None
self.initialise()
self.songTabWidget.setCurrentIndex(0)
- self.titleEdit.setText(u'')
- self.alternativeEdit.setText(u'')
- self.copyrightEdit.setText(u'')
- self.verseOrderEdit.setText(u'')
- self.commentsEdit.setText(u'')
- self.CCLNumberEdit.setText(u'')
+ self.titleEdit.clear()
+ self.alternativeEdit.clear()
+ self.copyrightEdit.clear()
+ self.verseOrderEdit.clear()
+ self.commentsEdit.clear()
+ self.CCLNumberEdit.clear()
self.verseListWidget.clear()
self.verseListWidget.setRowCount(0)
self.authorsListView.clear()
self.topicsListView.clear()
self.audioListWidget.clear()
self.titleEdit.setFocus(QtCore.Qt.OtherFocusReason)
- self.songBookNumberEdit.setText(u'')
+ self.songBookNumberEdit.clear()
self.loadAuthors()
self.loadTopics()
self.loadBooks()
@@ -236,7 +236,7 @@
if self.song.alternate_title:
self.alternativeEdit.setText(self.song.alternate_title)
else:
- self.alternativeEdit.setText(u'')
+ self.alternativeEdit.clear()
if self.song.song_book_id != 0:
book_name = self.manager.get_object(Book, self.song.song_book_id)
find_and_set_in_combo_box(
@@ -247,21 +247,21 @@
if self.song.copyright:
self.copyrightEdit.setText(self.song.copyright)
else:
- self.copyrightEdit.setText(u'')
+ self.copyrightEdit.clear()
self.verseListWidget.clear()
self.verseListWidget.setRowCount(0)
if self.song.comments:
self.commentsEdit.setPlainText(self.song.comments)
else:
- self.commentsEdit.setPlainText(u'')
+ self.commentsEdit.clear()
if self.song.ccli_number:
self.CCLNumberEdit.setText(self.song.ccli_number)
else:
- self.CCLNumberEdit.setText(u'')
+ self.CCLNumberEdit.clear()
if self.song.song_number:
self.songBookNumberEdit.setText(self.song.song_number)
else:
- self.songBookNumberEdit.setText(u'')
+ self.songBookNumberEdit.clear()
# lazy xml migration for now
self.verseListWidget.clear()
self.verseListWidget.setRowCount(0)
=== modified file 'openlp/plugins/songs/lib/__init__.py'
--- openlp/plugins/songs/lib/__init__.py 2012-03-22 17:22:01 +0000
+++ openlp/plugins/songs/lib/__init__.py 2012-04-02 11:52:35 +0000
@@ -326,7 +326,7 @@
# Rebuild the verse order, to convert translated verse tags, which might
# have been added prior to 1.9.5.
if song.verse_order:
- order = song.verse_order.strip().split()
+ order = CONTROL_CHARS.sub(u'', song.verse_order).strip().split()
else:
order = []
new_order = []
@@ -358,6 +358,8 @@
author = Author.populate(
display_name=name, last_name=u'', first_name=u'')
song.authors.append(author)
+ if song.copyright:
+ song.copyright = CONTROL_CHARS.sub(u'', song.copyright).strip()
from xml import OpenLyrics, SongXML
from songstab import SongsTab
Follow ups