← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~richie-the-g/openlp/sec-global-option into lp:openlp

 

Richard Graham has proposed merging lp:~richie-the-g/openlp/sec-global-option into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~richie-the-g/openlp/sec-global-option/+merge/290915

Added in the option to put an end character onto the final slide of a song. Unlike my previous version, this one adds it as an option in the 'Songs' global settings as opposed to within the theme definition.
-- 
Your team OpenLP Core is requested to review the proposed merge of lp:~richie-the-g/openlp/sec-global-option into lp:openlp.
=== modified file 'openlp/core/lib/serviceitem.py'
--- openlp/core/lib/serviceitem.py	2015-12-31 22:46:06 +0000
+++ openlp/core/lib/serviceitem.py	2016-04-04 19:15:20 +0000
@@ -267,6 +267,9 @@
                         'html': html_data.replace(' ', ' '),
                         'verseTag': verse_tag
                     })
+            else:
+                display_at_end = "<br>" + (Settings().value('songs/song end character'))
+                self._display_frames[(len(self._display_frames)) - 1]['html'] += display_at_end
         elif self.service_item_type == ServiceItemType.Image or self.service_item_type == ServiceItemType.Command:
             pass
         else:

=== modified file 'openlp/plugins/songs/lib/songstab.py'
--- openlp/plugins/songs/lib/songstab.py	2015-12-31 22:46:06 +0000
+++ openlp/plugins/songs/lib/songstab.py	2016-04-04 19:15:20 +0000
@@ -57,6 +57,21 @@
         self.display_copyright_check_box.setObjectName('copyright_check_box')
         self.mode_layout.addWidget(self.display_copyright_check_box)
         self.left_layout.addWidget(self.mode_group_box)
+        self.end_settings_group_box = QtWidgets.QGroupBox(self.left_column)
+        self.end_settings_group_box.setObjectName('end_settings_group_box')
+        self.end_settings_layout = QtWidgets.QFormLayout(self.end_settings_group_box)
+        self.end_settings_layout.setObjectName('end_settings_layout')
+        self.end_character_label = QtWidgets.QLabel(self.end_settings_group_box)
+        self.end_character_label.setObjectName('end_character_label')
+        self.end_character_line_edit = QtWidgets.QLineEdit(self.end_settings_group_box)
+        self.end_character_line_edit.setObjectName('end_character_line_edit')
+        self.end_character_line_edit.setMaxLength(1)
+        self.end_settings_layout.addRow(self.end_character_label, self.end_character_line_edit)
+        self.info_on_end_check_box = QtWidgets.QCheckBox(self.end_settings_group_box)
+        self.info_on_end_check_box.setObjectName('info_on_end_check_box')
+        self.info_on_end_check_box.setDisabled(True)
+        self.end_settings_layout.addRow(self.info_on_end_check_box)
+        self.left_layout.addWidget(self.end_settings_group_box)
         self.left_layout.addStretch()
         self.right_layout.addStretch()
         self.tool_bar_active_check_box.stateChanged.connect(self.on_tool_bar_active_check_box_changed)
@@ -76,6 +91,9 @@
         self.display_copyright_check_box.setText(translate('SongsPlugin.SongsTab',
                                                            'Display "%s" symbol before copyright info') %
                                                  SongStrings.CopyrightSymbol)
+        self.end_settings_group_box.setTitle(translate('SongsPlugin.SongsTab', 'End slide behaviour'))
+        self.end_character_label.setText(translate('SongsPlugin.SongsTab', 'Song end character:'))
+        self.info_on_end_check_box.setText(translate('SongsPlugin.SongsTab', 'Show copyright info on end slide only'))
 
     def on_search_as_type_check_box_changed(self, check_state):
         self.song_search = (check_state == QtCore.Qt.Checked)
@@ -108,6 +126,7 @@
         self.add_from_service_check_box.setChecked(self.update_load)
         self.display_songbook_check_box.setChecked(self.display_songbook)
         self.display_copyright_check_box.setChecked(self.display_copyright_symbol)
+        self.end_character_line_edit.setText(settings.value('song end character'))
         settings.endGroup()
 
     def save(self):
@@ -118,6 +137,7 @@
         settings.setValue('add song from service', self.update_load)
         settings.setValue('display songbook', self.display_songbook)
         settings.setValue('display copyright symbol', self.display_copyright_symbol)
+        settings.setValue('song end character', self.end_character_line_edit.text())
         settings.endGroup()
         if self.tab_visited:
             self.settings_form.register_post_process('songs_config_updated')

=== modified file 'openlp/plugins/songs/songsplugin.py'
--- openlp/plugins/songs/songsplugin.py	2016-03-31 16:34:22 +0000
+++ openlp/plugins/songs/songsplugin.py	2016-04-04 19:15:20 +0000
@@ -64,7 +64,8 @@
     'songs/last directory export': '',
     'songs/songselect username': '',
     'songs/songselect password': '',
-    'songs/songselect searches': ''
+    'songs/songselect searches': '',
+    'songs/song end character': ''
 }
 
 


Follow ups