openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #00910
[Merge] lp:~trb143/openlp/songediting into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/songediting into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Fix up slidecontroller so it does not crash if you press a button with nothing loaded
Remove the time delays for transitions.
Add verse order code so it now auto expands a song
--
https://code.launchpad.net/~trb143/openlp/songediting/+merge/15440
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py 2009-11-28 12:38:48 +0000
+++ openlp/core/ui/maindisplay.py 2009-11-30 19:25:19 +0000
@@ -198,13 +198,10 @@
elif not self.displayBlank:
if transition:
if self.hasTransition:
- delay = 0.01
self.display.setPixmap(QtGui.QPixmap.fromImage(self.frame[u'trans']))
self.repaint()
- time.sleep(delay)
self.display.setPixmap(QtGui.QPixmap.fromImage(frame[u'trans']))
self.repaint()
- time.sleep(delay)
self.hasTransition = True
self.display.setPixmap(QtGui.QPixmap.fromImage(frame[u'main']))
self.repaint()
=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py 2009-11-29 19:03:20 +0000
+++ openlp/core/ui/slidecontroller.py 2009-11-30 19:25:19 +0000
@@ -556,7 +556,7 @@
"""
Go to the next slide.
"""
- if self.serviceItem.is_command():
+ if self.serviceItem and self.serviceItem.is_command():
Receiver.send_message(u'%s_next'% self.serviceItem.name.lower())
self.updatePreview()
else:
@@ -570,7 +570,7 @@
"""
Go to the previous slide.
"""
- if self.serviceItem.is_command():
+ if self.serviceItem and self.serviceItem.is_command():
Receiver.send_message(
u'%s_previous'% self.serviceItem.name.lower())
self.updatePreview()
@@ -585,7 +585,7 @@
"""
Go to the last slide.
"""
- if self.serviceItem.is_command():
+ if self.serviceItem and self.serviceItem.is_command():
Receiver.send_message(u'%s_last'% self.serviceItem.name.lower())
self.updatePreview()
else:
=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py 2009-11-29 19:03:20 +0000
+++ openlp/plugins/songs/forms/editsongform.py 2009-11-30 19:25:19 +0000
@@ -226,7 +226,7 @@
verses = self.song.lyrics.split(u'\n\n')
for count, verse in enumerate(verses):
item = QtGui.QListWidgetItem(verse)
- variant = u'Verse:%s' % count + 1
+ variant = u'Verse:%s' % unicode(count + 1)
item.setData(QtCore.Qt.UserRole, QtCore.QVariant(variant))
self.VerseListWidget.addItem(item)
# clear the results
=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py 2009-11-29 19:03:20 +0000
+++ openlp/plugins/songs/lib/mediaitem.py 2009-11-30 19:25:19 +0000
@@ -293,10 +293,25 @@
if song.lyrics.startswith(u'<?xml version='):
songXML = SongXMLParser(song.lyrics)
verseList = songXML.get_verses()
- for verse in verseList:
- if verse[1]:
- verseTag = u'%s:%s' % (verse[0][u'type'], verse[0][u'label'])
- service_item.add_from_text(verse[1][:30], verse[1], verseTag)
+ if service_item.verse_order is None or service_item.verse_order == u'':
+ for verse in verseList:
+ service_item.add_from_text(verse[1][:30], unicode(verse[1]))
+ else:
+ for order in service_item.verse_order:
+ for verse in verseList:
+ if verse[1]:
+ if verse[0][u'type'] == "Verse" and \
+ verse[0][u'label'][0] == order[0]:
+ 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]:
+ verseTag = u'%s:%s' % \
+ (verse[0][u'type'], verse[0][u'label'])
+ service_item.add_from_text\
+ (verse[1][:30], verse[1], verseTag)
else:
verses = song.lyrics.split(u'\n\n')
for slide in verses:
Follow ups