openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #01668
[Merge] lp:~m2j/openlp/work into lp:openlp
mmj has proposed merging lp:~m2j/openlp/work into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
This are a fraction of my utf8fit changes for the songmaintenance form. Furthermore this will enable multiple items for all verse types, while entries w/o index are handled as the first one. Still the GUI accepts only multible verses and choruses.
--
https://code.launchpad.net/~m2j/openlp/work/+merge/26605
Your team OpenLP Core is requested to review the proposed merge of lp:~m2j/openlp/work into lp:openlp.
=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py 2010-05-25 15:35:34 +0000
+++ openlp/plugins/songs/forms/editsongform.py 2010-06-02 15:50:37 +0000
@@ -469,7 +469,7 @@
self.SongTabWidget.setCurrentIndex(1)
self.AuthorsListView.setFocus()
#split the verse list by space and mark lower case for testing
- taglist = unicode(self.trUtf8(' bitped'))
+ taglist = unicode(self.trUtf8(' bitpeovc'))
for verse in unicode(self.VerseOrderEdit.text()).lower().split(u' '):
if len(verse) > 1:
if (verse[0:1] == u'%s' % self.trUtf8('v') or
=== modified file 'openlp/plugins/songs/forms/songmaintenanceform.py'
--- openlp/plugins/songs/forms/songmaintenanceform.py 2010-05-25 23:47:26 +0000
+++ openlp/plugins/songs/forms/songmaintenanceform.py 2010-06-02 15:50:37 +0000
@@ -129,12 +129,9 @@
self.authorform.setAutoDisplayName(True)
if self.authorform.exec_():
author = Author.populate(
- first_name=unicode(
- self.authorform.FirstNameEdit.text(), u'utf-8'),
- last_name=unicode(
- self.authorform.LastNameEdit.text(), u'utf-8'),
- display_name=unicode(
- self.authorform.DisplayEdit.text(), u'utf-8'))
+ first_name=unicode(self.authorform.FirstNameEdit.text()),
+ last_name=unicode(self.authorform.LastNameEdit.text()),
+ display_name=unicode(self.authorform.DisplayEdit.text()))
if self.songmanager.save_author(author):
self.resetAuthors()
else:
@@ -144,8 +141,7 @@
def onTopicAddButtonClick(self):
if self.topicform.exec_():
- topic = Topic.populate(
- name=unicode(self.topicform.NameEdit.text(), u'utf-8'))
+ topic = Topic.populate(name=unicode(self.topicform.NameEdit.text()))
if self.songmanager.save_topic(topic):
self.resetTopics()
else:
@@ -156,8 +152,8 @@
def onBookAddButtonClick(self):
if self.bookform.exec_():
book = Book.populate(
- name=unicode(self.bookform.NameEdit.text(), u'utf-8'),
- publisher=unicode(self.bookform.PublisherEdit.text(), u'utf-8'))
+ name=unicode(self.bookform.NameEdit.text()),
+ publisher=unicode(self.bookform.PublisherEdit.text()))
if self.songmanager.save_book(book):
self.resetBooks()
else:
@@ -174,12 +170,11 @@
self.authorform.LastNameEdit.setText(author.last_name)
self.authorform.DisplayEdit.setText(author.display_name)
if self.authorform.exec_(False):
- author.first_name = unicode(
- self.authorform.FirstNameEdit.text(), u'utf-8')
- author.last_name = unicode(
- self.authorform.LastNameEdit.text(), u'utf-8')
- author.display_name = unicode(
- self.authorform.DisplayEdit.text(), u'utf-8')
+ author.first_name = unicode(
+ self.authorform.FirstNameEdit.text())
+ author.last_name = unicode(self.authorform.LastNameEdit.text())
+ author.display_name = unicode(
+ self.authorform.DisplayEdit.text())
if self.songmanager.save_author(author):
self.resetAuthors()
else:
@@ -193,7 +188,7 @@
topic = self.songmanager.get_topic(topic_id)
self.topicform.NameEdit.setText(topic.name)
if self.topicform.exec_(False):
- topic.name = unicode(self.topicform.NameEdit.text(), u'utf-8')
+ topic.name = unicode(self.topicform.NameEdit.text())
if self.songmanager.save_topic(topic):
self.resetTopics()
else:
@@ -208,9 +203,8 @@
self.bookform.NameEdit.setText(book.name)
self.bookform.PublisherEdit.setText(book.publisher)
if self.bookform.exec_(False):
- book.name = unicode(self.bookform.NameEdit.text(), u'utf-8')
- book.publisher = unicode(
- self.bookform.PublisherEdit.text(), u'utf-8')
+ book.name = unicode(self.bookform.NameEdit.text())
+ book.publisher = unicode(self.bookform.PublisherEdit.text())
if self.songmanager.save_book(book):
self.resetBooks()
else:
=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py 2010-05-25 23:47:26 +0000
+++ openlp/plugins/songs/lib/mediaitem.py 2010-06-02 15:50:37 +0000
@@ -335,16 +335,16 @@
break
for verse in verseList:
if verse[1]:
- if verse[0][u'type'] == "Verse" \
- or verse[0][u'type'] == "Chorus":
- if verse[0][u'label'] == order[1:] and \
- verse[0][u'type'][0] == order[0]:
+ if order[1:]:
+ if verse[0][u'type'][0] == order[0] and \
+ verse[0][u'label'] == order[1:]:
verseTag = u'%s:%s' % \
(verse[0][u'type'], verse[0][u'label'])
service_item.add_from_text\
(verse[1][:30], verse[1], verseTag)
else:
- if verse[0][u'type'][0] == order[0]:
+ if verse[0][u'type'][0] == order[0] and \
+ verse[0][u'label'] == u'1':
verseTag = u'%s:%s' % \
(verse[0][u'type'], verse[0][u'label'])
service_item.add_from_text\
Follow ups