← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~phill-ridout/openlp/verse_order into lp:openlp

 

phill has proposed merging lp:~phill-ridout/openlp/verse_order into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

-- 
https://code.launchpad.net/~phill-ridout/openlp/verse_order/+merge/38033
Your team OpenLP Core is requested to review the proposed merge of lp:~phill-ridout/openlp/verse_order into lp:openlp.
=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py	2010-10-06 20:24:53 +0000
+++ openlp/plugins/songs/lib/mediaitem.py	2010-10-08 23:30:58 +0000
@@ -141,9 +141,12 @@
         self.updateServiceOnEdit = QtCore.QSettings().value(
             self.settingsSection + u'/update service on edit',
             QtCore.QVariant(u'False')).toBool()
-        self.AddSongFromServide = QtCore.QSettings().value(
+        self.AddSongFromService = QtCore.QSettings().value(
             self.settingsSection + u'/add song from service',
             QtCore.QVariant(u'True')).toBool()
+        self.RepeatVerses = QtCore.QSettings().value(
+            self.settingsSection + u'/repeat verses in controllers',
+            QtCore.QVariant(u'True')).toBool()
 
     def retranslateUi(self):
         self.SearchTextLabel.setText(
@@ -350,7 +353,8 @@
             songXML = SongXMLParser(song.lyrics)
             verseList = songXML.get_verses()
             #no verse list or only 1 space (in error)
-            if not song.verse_order or not song.verse_order.strip():
+            if (not song.verse_order or not song.verse_order.strip() 
+                or self.RepeatVerses):
                 for verse in verseList:
                     verseTag = u'%s:%s' % (
                         verse[0][u'type'], verse[0][u'label'])

=== modified file 'openlp/plugins/songs/lib/songstab.py'
--- openlp/plugins/songs/lib/songstab.py	2010-10-06 20:30:49 +0000
+++ openlp/plugins/songs/lib/songstab.py	2010-10-08 23:30:58 +0000
@@ -56,9 +56,16 @@
         self.SongUpdateOnEditCheckBox = QtGui.QCheckBox(self.SongsModeGroupBox)
         self.SongUpdateOnEditCheckBox.setObjectName(u'SongUpdateOnEditCheckBox')
         self.SongsModeLayout.addWidget(self.SongUpdateOnEditCheckBox)
-        self.SongAddFromServiceCheckBox = QtGui.QCheckBox(self.SongsModeGroupBox)
-        self.SongAddFromServiceCheckBox.setObjectName(u'SongAddFromServiceCheckBox')
+        self.SongAddFromServiceCheckBox = QtGui.QCheckBox(
+            self.SongsModeGroupBox)
+        self.SongAddFromServiceCheckBox.setObjectName(
+            u'SongAddFromServiceCheckBox')
         self.SongsModeLayout.addWidget(self.SongAddFromServiceCheckBox)
+        self.ShowVerseOrderInControllerCheckBox = QtGui.QCheckBox(
+            self.SongsModeGroupBox)
+        self.ShowVerseOrderInControllerCheckBox.setObjectName(
+            u'ShowVerseOrderInControllerCheckBox')
+        self.SongsModeLayout.addWidget(self.ShowVerseOrderInControllerCheckBox)
         self.SongsLayout.setWidget(
             0, QtGui.QFormLayout.LabelRole, self.SongsModeGroupBox)
         QtCore.QObject.connect(self.SearchAsTypeCheckBox,
@@ -73,6 +80,9 @@
         QtCore.QObject.connect(self.SongBarActiveCheckBox,
             QtCore.SIGNAL(u'stateChanged(int)'),
             self.onSongAddFromServiceCheckBoxChanged)
+        QtCore.QObject.connect(self.ShowVerseOrderInControllerCheckBox,
+            QtCore.SIGNAL(u'stateChanged(int)'),
+            self.onShowVerseOrderInControllerCheckBoxChanged)
 
     def retranslateUi(self):
         self.SongsModeGroupBox.setTitle(
@@ -83,8 +93,13 @@
             'Display verses on live tool bar'))
         self.SongUpdateOnEditCheckBox.setText(
             translate('SongsPlugin.SongsTab', 'Update service from song edit'))
-        self.SongAddFromServiceCheckBox.setText(translate('SongsPlugin.SongsTab',
-            'Add missing songs when opening service'))
+        self.SongAddFromServiceCheckBox.setText(
+            translate('SongsPlugin.SongsTab',
+                'Add missing songs when opening service'))
+        self.ShowVerseOrderInControllerCheckBox.setText(
+            translate('SongsPlugin.SongsTab',
+                'Show verse order in slide controllers (Replicate Verses)'))
+            
 
     def onSearchAsTypeCheckBoxChanged(self, check_state):
         self.song_search = False
@@ -109,6 +124,12 @@
         # we have a set value convert to True/False
         if check_state == QtCore.Qt.Checked:
             self.update_load = True
+            
+    def onShowVerseOrderInControllerCheckBoxChanged(self, check_state):
+        self.repeat_verses = False
+        # we have a set value convert to True/False
+        if check_state == QtCore.Qt.Checked:
+            self.repeat_verses = True
 
     def load(self):
         settings = QtCore.QSettings()
@@ -121,10 +142,13 @@
             u'update service on edit', QtCore.QVariant(False)).toBool()
         self.update_load = settings.value(
             u'add song from service', QtCore.QVariant(True)).toBool()
+        self.repeat_verses = settings.value(
+            u'repeat verses in controllers', QtCore.QVariant(True)).toBool()
         self.SearchAsTypeCheckBox.setChecked(self.song_search)
         self.SongBarActiveCheckBox.setChecked(self.song_bar)
         self.SongUpdateOnEditCheckBox.setChecked(self.update_edit)
         self.SongAddFromServiceCheckBox.setChecked(self.update_load)
+        self.ShowVerseOrderInControllerCheckBox.setChecked(self.repeat_verses)
         settings.endGroup()
 
     def save(self):
@@ -132,6 +156,10 @@
         settings.beginGroup(self.settingsSection)
         settings.setValue(u'search as type', QtCore.QVariant(self.song_search))
         settings.setValue(u'display songbar', QtCore.QVariant(self.song_bar))
-        settings.setValue(u'update service on edit', QtCore.QVariant(self.update_edit))
-        settings.setValue(u'add song from service', QtCore.QVariant(self.update_load))
+        settings.setValue(u'update service on edit', 
+            QtCore.QVariant(self.update_edit))
+        settings.setValue(u'add song from service', 
+            QtCore.QVariant(self.update_load))
+        settings.setValue(u'repeat verses in controllers', 
+            QtCore.QVariant(self.repeat_verses))
         settings.endGroup()


Follow ups