Merge lp:~richie-the-g/openlp/sec-global-option into lp:openlp
- sec-global-option
- Merge into trunk
Status: | Needs review |
---|---|
Proposed branch: | lp:~richie-the-g/openlp/sec-global-option |
Merge into: | lp:openlp |
Diff against target: |
272 lines (+96/-4) 7 files modified
openlp/core/lib/serviceitem.py (+3/-0) openlp/core/ui/maindisplay.py (+0/-2) openlp/core/ui/slidecontroller.py (+21/-0) openlp/plugins/bibles/bibleplugin.py (+3/-1) openlp/plugins/bibles/lib/biblestab.py (+34/-0) openlp/plugins/songs/lib/songstab.py (+32/-0) openlp/plugins/songs/songsplugin.py (+3/-1) |
To merge this branch: | bzr merge lp:~richie-the-g/openlp/sec-global-option |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tim Bentley | Needs Fixing | ||
Review via email: mp+294977@code.launchpad.net |
This proposal supersedes a proposal from 2016-04-04.
Commit message
Description of the change
Added option to put an end character at the end of a song or Bible passage. Added option to show the copyright footer of a song or Bible passage on all slides, the first shown slide, or the final slide of an item. All options are in the specific plugin configuration tabs in 'Configure OpenLP'; end character as a text box and footer as a dropdown box. Not included is the 'Custom Slides' plugin; this is due to the fact that the user can already specify whether or not to show the footer, and if a user wants to put a 'tag' onto the end of an item, they can easily type it in themselves!
Tim Bentley (trb143) wrote : Posted in a previous version of this proposal | # |
Tim Bentley (trb143) wrote : | # |
Looking good but a number of improvements required.
All merges need a test or two and something relevant to this would be good.
Richard Graham (richie-the-g) wrote : | # |
The potential issue with using a <br> is one I did consider. However, my tests with this concluded that although it seems like what you say (ie, a page with only the end character on) will happen, this is not the case. My general theme has a maximum of eight lines; when a ninth was added, the ninth was on a separate page (as expected). However, when the end character was added in this way, it was on its own ninth line. This code is in 'production' use at my church on Windows 7 and Windows 10 computers (dev'd on Win10), and the same behaviour is also what happens when running on Mac OSX.
This is potentially some unexpected behaviour in how OpenLP works, as logically it would seem as if this would break in the way you suggest. However, there is similar behaviour (dare I say a bug!) in Custom Slides where if you have a long paragraph with no line breaks that would overflow one page, the paragraph will continue to display even if it is outside the given frame within the page. I am assuming from my experimentation that when a page is generated, it first looks for manual breaks within the page (with the [---] or [===] tags depending on plugin), then line breaks in the text to decide to break at that point.
As the <br> before the end character happens right at the end of the page generation process, my understanding is that the frame dimensions at that point are ignored as the part of the code that deals with that has already been executed when splitting the item up into separate pages (the end character does not appear on the stage view whereas the semi-arbitrary breaks do).
I hope that made some sort of sense!
The blank line in the code I'll raise my hands to - left blank so while coding I could see where I added code to be able to know which was my broken code and which was the proper non-broken code! Removed in other instances; forgot to do it here!
The excuses and explanations out of the way (possibly in reverse order!), I'll look at the other bits and bobs when I get some downtime during the week ahead! Thank you for being patient with me!
Unmerged revisions
- 2641. By Richard Graham
-
Added Slide options to Bible passages as well as songs. Didn't do Custom Slides as the user can decide to add an end character simply by typing it in. (Updated base OLP version)
- 2640. By Richard Graham
-
Added Slide options to Bible passages as well as songs. Didn't do Custom Slides as the user can decide to add an end character simply by typing it in.
- 2639. By Richard Graham
-
Updated a small syntax error picked up. Also included a dropdown for the end info bit, allowing for all slides, the first shown slide, or the last slide in song only.
- 2638. By Richard Graham
-
Added option to include a character at the end of a final slide of a song. Formerly this was part of the theme definition; it has been shifted to the global song settings.
Preview Diff
1 | === modified file 'openlp/core/lib/serviceitem.py' | |||
2 | --- openlp/core/lib/serviceitem.py 2016-05-05 03:57:04 +0000 | |||
3 | +++ openlp/core/lib/serviceitem.py 2016-05-17 21:10:14 +0000 | |||
4 | @@ -267,6 +267,9 @@ | |||
5 | 267 | 'html': html_data.replace('&nbsp;', ' '), | 267 | 'html': html_data.replace('&nbsp;', ' '), |
6 | 268 | 'verseTag': verse_tag | 268 | 'verseTag': verse_tag |
7 | 269 | }) | 269 | }) |
8 | 270 | if hasattr(self, 'name') and ((self.name == 'songs') or (self.name == 'bibles')): | ||
9 | 271 | display_at_end = "<br>" + (Settings().value(self.name + '/end character')) | ||
10 | 272 | self._display_frames[(len(self._display_frames)) - 1]['html'] += display_at_end | ||
11 | 270 | elif self.service_item_type == ServiceItemType.Image or self.service_item_type == ServiceItemType.Command: | 273 | elif self.service_item_type == ServiceItemType.Image or self.service_item_type == ServiceItemType.Command: |
12 | 271 | pass | 274 | pass |
13 | 272 | else: | 275 | else: |
14 | 273 | 276 | ||
15 | === modified file 'openlp/core/ui/maindisplay.py' | |||
16 | --- openlp/core/ui/maindisplay.py 2016-05-02 08:05:47 +0000 | |||
17 | +++ openlp/core/ui/maindisplay.py 2016-05-17 21:10:14 +0000 | |||
18 | @@ -471,8 +471,6 @@ | |||
19 | 471 | html = build_html(self.service_item, self.screen, self.is_live, background, image_bytes, | 471 | html = build_html(self.service_item, self.screen, self.is_live, background, image_bytes, |
20 | 472 | plugins=self.plugin_manager.plugins) | 472 | plugins=self.plugin_manager.plugins) |
21 | 473 | self.web_view.setHtml(html) | 473 | self.web_view.setHtml(html) |
22 | 474 | if service_item.foot_text: | ||
23 | 475 | self.footer(service_item.foot_text) | ||
24 | 476 | # if was hidden keep it hidden | 474 | # if was hidden keep it hidden |
25 | 477 | if self.hide_mode and self.is_live and not service_item.is_media(): | 475 | if self.hide_mode and self.is_live and not service_item.is_media(): |
26 | 478 | if Settings().value('core/auto unblank'): | 476 | if Settings().value('core/auto unblank'): |
27 | 479 | 477 | ||
28 | === modified file 'openlp/core/ui/slidecontroller.py' | |||
29 | --- openlp/core/ui/slidecontroller.py 2016-05-05 03:57:04 +0000 | |||
30 | +++ openlp/core/ui/slidecontroller.py 2016-05-17 21:10:14 +0000 | |||
31 | @@ -167,6 +167,7 @@ | |||
32 | 167 | self.panel = QtWidgets.QWidget(self.main_window.control_splitter) | 167 | self.panel = QtWidgets.QWidget(self.main_window.control_splitter) |
33 | 168 | self.slide_list = {} | 168 | self.slide_list = {} |
34 | 169 | self.slide_count = 0 | 169 | self.slide_count = 0 |
35 | 170 | self.item_slide_count = 0 | ||
36 | 170 | self.slide_image = None | 171 | self.slide_image = None |
37 | 171 | self.controller_width = -1 | 172 | self.controller_width = -1 |
38 | 172 | # Layout for holding panel | 173 | # Layout for holding panel |
39 | @@ -889,6 +890,7 @@ | |||
40 | 889 | else: | 890 | else: |
41 | 890 | row += 1 | 891 | row += 1 |
42 | 891 | self.slide_list[str(row)] = row - 1 | 892 | self.slide_list[str(row)] = row - 1 |
43 | 893 | self.item_slide_count = 0 # How many slides of the current item have been shown | ||
44 | 892 | else: | 894 | else: |
45 | 893 | row += 1 | 895 | row += 1 |
46 | 894 | self.slide_list[str(row)] = row - 1 | 896 | self.slide_list[str(row)] = row - 1 |
47 | @@ -896,6 +898,7 @@ | |||
48 | 896 | if not self.service_item.is_command() and frame_number == slide_no: | 898 | if not self.service_item.is_command() and frame_number == slide_no: |
49 | 897 | self.service_item.bg_image_bytes = \ | 899 | self.service_item.bg_image_bytes = \ |
50 | 898 | self.image_manager.get_image_bytes(frame['path'], ImageSource.ImagePlugin) | 900 | self.image_manager.get_image_bytes(frame['path'], ImageSource.ImagePlugin) |
51 | 901 | |||
52 | 899 | self.preview_widget.replace_service_item(self.service_item, width, slide_no) | 902 | self.preview_widget.replace_service_item(self.service_item, width, slide_no) |
53 | 900 | self.enable_tool_bar(self.service_item) | 903 | self.enable_tool_bar(self.service_item) |
54 | 901 | # Pass to display for viewing. | 904 | # Pass to display for viewing. |
55 | @@ -1105,6 +1108,23 @@ | |||
56 | 1105 | to_display = self.service_item.get_rendered_frame(row) | 1108 | to_display = self.service_item.get_rendered_frame(row) |
57 | 1106 | if self.service_item.is_text(): | 1109 | if self.service_item.is_text(): |
58 | 1107 | self.display.text(to_display, row != old_selected_row) | 1110 | self.display.text(to_display, row != old_selected_row) |
59 | 1111 | if (self.service_item.name == 'songs') or (self.service_item.name == 'bibles'): | ||
60 | 1112 | if Settings().value(self.service_item.name + '/info on end') == 1: | ||
61 | 1113 | if self.item_slide_count == 0: | ||
62 | 1114 | self.display.footer(self.service_item.foot_text) | ||
63 | 1115 | else: | ||
64 | 1116 | self.display.footer('') | ||
65 | 1117 | elif Settings().value(self.service_item.name + '/info on end') == 2: | ||
66 | 1118 | if row == (len(self.service_item._display_frames)-1): | ||
67 | 1119 | self.display.footer(self.service_item.foot_text) | ||
68 | 1120 | else: | ||
69 | 1121 | self.display.footer('') | ||
70 | 1122 | else: | ||
71 | 1123 | self.display.footer(self.service_item.foot_text) | ||
72 | 1124 | elif self.service_item.foot_text: | ||
73 | 1125 | self.display.footer(self.service_item.foot_text) | ||
74 | 1126 | else: | ||
75 | 1127 | self.display.footer('') | ||
76 | 1108 | else: | 1128 | else: |
77 | 1109 | if start: | 1129 | if start: |
78 | 1110 | self.display.build_html(self.service_item, to_display) | 1130 | self.display.build_html(self.service_item, to_display) |
79 | @@ -1155,6 +1175,7 @@ | |||
80 | 1155 | self.slide_image.setDevicePixelRatio(self.main_window.devicePixelRatio()) | 1175 | self.slide_image.setDevicePixelRatio(self.main_window.devicePixelRatio()) |
81 | 1156 | self.slide_preview.setPixmap(self.slide_image) | 1176 | self.slide_preview.setPixmap(self.slide_image) |
82 | 1157 | self.slide_count += 1 | 1177 | self.slide_count += 1 |
83 | 1178 | self.item_slide_count += 1 | ||
84 | 1158 | 1179 | ||
85 | 1159 | def grab_maindisplay(self): | 1180 | def grab_maindisplay(self): |
86 | 1160 | """ | 1181 | """ |
87 | 1161 | 1182 | ||
88 | === modified file 'openlp/plugins/bibles/bibleplugin.py' | |||
89 | --- openlp/plugins/bibles/bibleplugin.py 2016-03-31 16:34:22 +0000 | |||
90 | +++ openlp/plugins/bibles/bibleplugin.py 2016-05-17 21:10:14 +0000 | |||
91 | @@ -59,7 +59,9 @@ | |||
92 | 59 | 'bibles/range separator': '', | 59 | 'bibles/range separator': '', |
93 | 60 | 'bibles/list separator': '', | 60 | 'bibles/list separator': '', |
94 | 61 | 'bibles/end separator': '', | 61 | 'bibles/end separator': '', |
96 | 62 | 'bibles/last directory import': '' | 62 | 'bibles/last directory import': '', |
97 | 63 | 'bibles/end character': '', | ||
98 | 64 | 'bibles/info on end': 0 # 0: Show on all slides; 1: show on first shown; 2: show on last slide | ||
99 | 63 | } | 65 | } |
100 | 64 | 66 | ||
101 | 65 | 67 | ||
102 | 66 | 68 | ||
103 | === modified file 'openlp/plugins/bibles/lib/biblestab.py' | |||
104 | --- openlp/plugins/bibles/lib/biblestab.py 2015-12-31 22:46:06 +0000 | |||
105 | +++ openlp/plugins/bibles/lib/biblestab.py 2016-05-17 21:10:14 +0000 | |||
106 | @@ -127,6 +127,25 @@ | |||
107 | 127 | self.language_selection_combo_box.addItems(['', '', '']) | 127 | self.language_selection_combo_box.addItems(['', '', '']) |
108 | 128 | self.language_selection_layout.addWidget(self.language_selection_label) | 128 | self.language_selection_layout.addWidget(self.language_selection_label) |
109 | 129 | self.language_selection_layout.addWidget(self.language_selection_combo_box) | 129 | self.language_selection_layout.addWidget(self.language_selection_combo_box) |
110 | 130 | |||
111 | 131 | self.end_settings_group_box = QtWidgets.QGroupBox(self.left_column) | ||
112 | 132 | self.end_settings_group_box.setObjectName('end_settings_group_box') | ||
113 | 133 | self.end_settings_layout = QtWidgets.QFormLayout(self.end_settings_group_box) | ||
114 | 134 | self.end_settings_layout.setObjectName('end_settings_layout') | ||
115 | 135 | self.end_character_label = QtWidgets.QLabel(self.end_settings_group_box) | ||
116 | 136 | self.end_character_label.setObjectName('end_character_label') | ||
117 | 137 | self.end_character_line_edit = QtWidgets.QLineEdit(self.end_settings_group_box) | ||
118 | 138 | self.end_character_line_edit.setObjectName('end_character_line_edit') | ||
119 | 139 | self.end_character_line_edit.setMaxLength(1) | ||
120 | 140 | self.end_settings_layout.addRow(self.end_character_label, self.end_character_line_edit) | ||
121 | 141 | self.info_on_end_label = QtWidgets.QLabel(self.end_settings_group_box) | ||
122 | 142 | self.info_on_end_label.setObjectName('info_on_end_label') | ||
123 | 143 | self.info_on_end_combo_box = QtWidgets.QComboBox(self.end_settings_group_box) | ||
124 | 144 | self.info_on_end_combo_box.setObjectName('info_on_end_combo_box') | ||
125 | 145 | self.info_on_end_combo_box.addItems(['', '', '']) | ||
126 | 146 | self.end_settings_layout.addRow(self.info_on_end_label, self.info_on_end_combo_box) | ||
127 | 147 | |||
128 | 148 | self.right_layout.addWidget(self.end_settings_group_box) | ||
129 | 130 | self.right_layout.addWidget(self.language_selection_group_box) | 149 | self.right_layout.addWidget(self.language_selection_group_box) |
130 | 131 | self.left_layout.addStretch() | 150 | self.left_layout.addStretch() |
131 | 132 | self.right_layout.addStretch() | 151 | self.right_layout.addStretch() |
132 | @@ -151,6 +170,7 @@ | |||
133 | 151 | self.end_separator_line_edit.editingFinished.connect(self.on_end_separator_line_edit_finished) | 170 | self.end_separator_line_edit.editingFinished.connect(self.on_end_separator_line_edit_finished) |
134 | 152 | Registry().register_function('theme_update_list', self.update_theme_list) | 171 | Registry().register_function('theme_update_list', self.update_theme_list) |
135 | 153 | self.language_selection_combo_box.activated.connect(self.on_language_selection_combo_box_changed) | 172 | self.language_selection_combo_box.activated.connect(self.on_language_selection_combo_box_changed) |
136 | 173 | self.info_on_end_combo_box.activated.connect(self.on_info_on_end_combo_box_changed) | ||
137 | 154 | 174 | ||
138 | 155 | def retranslateUi(self): | 175 | def retranslateUi(self): |
139 | 156 | self.verse_display_group_box.setTitle(translate('BiblesPlugin.BiblesTab', 'Verse Display')) | 176 | self.verse_display_group_box.setTitle(translate('BiblesPlugin.BiblesTab', 'Verse Display')) |
140 | @@ -194,6 +214,12 @@ | |||
141 | 194 | LanguageSelection.Application, translate('BiblesPlugin.BiblesTab', 'Application Language')) | 214 | LanguageSelection.Application, translate('BiblesPlugin.BiblesTab', 'Application Language')) |
142 | 195 | self.language_selection_combo_box.setItemText( | 215 | self.language_selection_combo_box.setItemText( |
143 | 196 | LanguageSelection.English, translate('BiblesPlugin.BiblesTab', 'English')) | 216 | LanguageSelection.English, translate('BiblesPlugin.BiblesTab', 'English')) |
144 | 217 | self.end_settings_group_box.setTitle(translate('BiblesPlugin.BiblesTab', 'End slide behaviour')) | ||
145 | 218 | self.end_character_label.setText(translate('BiblesPlugin.BiblesTab', 'Bible passage end character:')) | ||
146 | 219 | self.info_on_end_label.setText(translate('BiblesPlugin.BiblesTab', 'Show copyright info on:')) | ||
147 | 220 | self.info_on_end_combo_box.setItemText(0, translate('BiblesPlugin.BiblesTab', 'All slides (Recommended)')) | ||
148 | 221 | self.info_on_end_combo_box.setItemText(1, translate('BiblesPlugin.BiblesTab', 'First shown slide only')) | ||
149 | 222 | self.info_on_end_combo_box.setItemText(2, translate('BiblesPlugin.BiblesTab', 'Final slide of Bible passage only')) | ||
150 | 197 | 223 | ||
151 | 198 | def on_bible_theme_combo_box_changed(self): | 224 | def on_bible_theme_combo_box_changed(self): |
152 | 199 | self.bible_theme = self.bible_theme_combo_box.currentText() | 225 | self.bible_theme = self.bible_theme_combo_box.currentText() |
153 | @@ -302,6 +328,9 @@ | |||
154 | 302 | self.end_separator_line_edit.setText(get_reference_separator('sep_e_default')) | 328 | self.end_separator_line_edit.setText(get_reference_separator('sep_e_default')) |
155 | 303 | self.end_separator_line_edit.setPalette(self.get_grey_text_palette(True)) | 329 | self.end_separator_line_edit.setPalette(self.get_grey_text_palette(True)) |
156 | 304 | 330 | ||
157 | 331 | def on_info_on_end_combo_box_changed(self): | ||
158 | 332 | self.info_on_end = self.info_on_end_combo_box.currentIndex() | ||
159 | 333 | |||
160 | 305 | def load(self): | 334 | def load(self): |
161 | 306 | settings = Settings() | 335 | settings = Settings() |
162 | 307 | settings.beginGroup(self.settings_section) | 336 | settings.beginGroup(self.settings_section) |
163 | @@ -355,6 +384,9 @@ | |||
164 | 355 | self.end_separator_check_box.setChecked(True) | 384 | self.end_separator_check_box.setChecked(True) |
165 | 356 | self.language_selection = settings.value('book name language') | 385 | self.language_selection = settings.value('book name language') |
166 | 357 | self.language_selection_combo_box.setCurrentIndex(self.language_selection) | 386 | self.language_selection_combo_box.setCurrentIndex(self.language_selection) |
167 | 387 | self.end_character_line_edit.setText(settings.value('end character')) | ||
168 | 388 | self.info_on_end = settings.value('info on end') | ||
169 | 389 | self.info_on_end_combo_box.setCurrentIndex(self.info_on_end) | ||
170 | 358 | settings.endGroup() | 390 | settings.endGroup() |
171 | 359 | 391 | ||
172 | 360 | def save(self): | 392 | def save(self): |
173 | @@ -386,6 +418,8 @@ | |||
174 | 386 | if self.language_selection != settings.value('book name language'): | 418 | if self.language_selection != settings.value('book name language'): |
175 | 387 | settings.setValue('book name language', self.language_selection) | 419 | settings.setValue('book name language', self.language_selection) |
176 | 388 | self.settings_form.register_post_process('bibles_load_list') | 420 | self.settings_form.register_post_process('bibles_load_list') |
177 | 421 | settings.setValue('end character', self.end_character_line_edit.text()) | ||
178 | 422 | settings.setValue('info on end', self.info_on_end) | ||
179 | 389 | settings.endGroup() | 423 | settings.endGroup() |
180 | 390 | if self.tab_visited: | 424 | if self.tab_visited: |
181 | 391 | self.settings_form.register_post_process('bibles_config_updated') | 425 | self.settings_form.register_post_process('bibles_config_updated') |
182 | 392 | 426 | ||
183 | === modified file 'openlp/plugins/songs/lib/songstab.py' | |||
184 | --- openlp/plugins/songs/lib/songstab.py 2015-12-31 22:46:06 +0000 | |||
185 | +++ openlp/plugins/songs/lib/songstab.py 2016-05-17 21:10:14 +0000 | |||
186 | @@ -57,6 +57,23 @@ | |||
187 | 57 | self.display_copyright_check_box.setObjectName('copyright_check_box') | 57 | self.display_copyright_check_box.setObjectName('copyright_check_box') |
188 | 58 | self.mode_layout.addWidget(self.display_copyright_check_box) | 58 | self.mode_layout.addWidget(self.display_copyright_check_box) |
189 | 59 | self.left_layout.addWidget(self.mode_group_box) | 59 | self.left_layout.addWidget(self.mode_group_box) |
190 | 60 | self.end_settings_group_box = QtWidgets.QGroupBox(self.left_column) | ||
191 | 61 | self.end_settings_group_box.setObjectName('end_settings_group_box') | ||
192 | 62 | self.end_settings_layout = QtWidgets.QFormLayout(self.end_settings_group_box) | ||
193 | 63 | self.end_settings_layout.setObjectName('end_settings_layout') | ||
194 | 64 | self.end_character_label = QtWidgets.QLabel(self.end_settings_group_box) | ||
195 | 65 | self.end_character_label.setObjectName('end_character_label') | ||
196 | 66 | self.end_character_line_edit = QtWidgets.QLineEdit(self.end_settings_group_box) | ||
197 | 67 | self.end_character_line_edit.setObjectName('end_character_line_edit') | ||
198 | 68 | self.end_character_line_edit.setMaxLength(1) | ||
199 | 69 | self.end_settings_layout.addRow(self.end_character_label, self.end_character_line_edit) | ||
200 | 70 | self.info_on_end_label = QtWidgets.QLabel(self.end_settings_group_box) | ||
201 | 71 | self.info_on_end_label.setObjectName('info_on_end_label') | ||
202 | 72 | self.info_on_end_combo_box = QtWidgets.QComboBox(self.end_settings_group_box) | ||
203 | 73 | self.info_on_end_combo_box.setObjectName('info_on_end_combo_box') | ||
204 | 74 | self.info_on_end_combo_box.addItems(['', '', '']) | ||
205 | 75 | self.end_settings_layout.addRow(self.info_on_end_label, self.info_on_end_combo_box) | ||
206 | 76 | self.right_layout.addWidget(self.end_settings_group_box) | ||
207 | 60 | self.left_layout.addStretch() | 77 | self.left_layout.addStretch() |
208 | 61 | self.right_layout.addStretch() | 78 | self.right_layout.addStretch() |
209 | 62 | self.tool_bar_active_check_box.stateChanged.connect(self.on_tool_bar_active_check_box_changed) | 79 | self.tool_bar_active_check_box.stateChanged.connect(self.on_tool_bar_active_check_box_changed) |
210 | @@ -64,6 +81,7 @@ | |||
211 | 64 | self.add_from_service_check_box.stateChanged.connect(self.on_add_from_service_check_box_changed) | 81 | self.add_from_service_check_box.stateChanged.connect(self.on_add_from_service_check_box_changed) |
212 | 65 | self.display_songbook_check_box.stateChanged.connect(self.on_songbook_check_box_changed) | 82 | self.display_songbook_check_box.stateChanged.connect(self.on_songbook_check_box_changed) |
213 | 66 | self.display_copyright_check_box.stateChanged.connect(self.on_copyright_check_box_changed) | 83 | self.display_copyright_check_box.stateChanged.connect(self.on_copyright_check_box_changed) |
214 | 84 | self.info_on_end_combo_box.activated.connect(self.on_info_on_end_combo_box_changed) | ||
215 | 67 | 85 | ||
216 | 68 | def retranslateUi(self): | 86 | def retranslateUi(self): |
217 | 69 | self.mode_group_box.setTitle(translate('SongsPlugin.SongsTab', 'Songs Mode')) | 87 | self.mode_group_box.setTitle(translate('SongsPlugin.SongsTab', 'Songs Mode')) |
218 | @@ -76,6 +94,12 @@ | |||
219 | 76 | self.display_copyright_check_box.setText(translate('SongsPlugin.SongsTab', | 94 | self.display_copyright_check_box.setText(translate('SongsPlugin.SongsTab', |
220 | 77 | 'Display "%s" symbol before copyright info') % | 95 | 'Display "%s" symbol before copyright info') % |
221 | 78 | SongStrings.CopyrightSymbol) | 96 | SongStrings.CopyrightSymbol) |
222 | 97 | self.end_settings_group_box.setTitle(translate('SongsPlugin.SongsTab', 'End slide behaviour')) | ||
223 | 98 | self.end_character_label.setText(translate('SongsPlugin.SongsTab', 'Song end character:')) | ||
224 | 99 | self.info_on_end_label.setText(translate('SongsPlugin.SongsTab', 'Show copyright info on:')) | ||
225 | 100 | self.info_on_end_combo_box.setItemText(0, translate('SongsPlugin.SongsTab', 'All slides (Recommended)')) | ||
226 | 101 | self.info_on_end_combo_box.setItemText(1, translate('SongsPlugin.SongsTab', 'First shown slide only')) | ||
227 | 102 | self.info_on_end_combo_box.setItemText(2, translate('SongsPlugin.SongsTab', 'Final slide of song only')) | ||
228 | 79 | 103 | ||
229 | 80 | def on_search_as_type_check_box_changed(self, check_state): | 104 | def on_search_as_type_check_box_changed(self, check_state): |
230 | 81 | self.song_search = (check_state == QtCore.Qt.Checked) | 105 | self.song_search = (check_state == QtCore.Qt.Checked) |
231 | @@ -95,6 +119,9 @@ | |||
232 | 95 | def on_copyright_check_box_changed(self, check_state): | 119 | def on_copyright_check_box_changed(self, check_state): |
233 | 96 | self.display_copyright_symbol = (check_state == QtCore.Qt.Checked) | 120 | self.display_copyright_symbol = (check_state == QtCore.Qt.Checked) |
234 | 97 | 121 | ||
235 | 122 | def on_info_on_end_combo_box_changed(self): | ||
236 | 123 | self.info_on_end = self.info_on_end_combo_box.currentIndex() | ||
237 | 124 | |||
238 | 98 | def load(self): | 125 | def load(self): |
239 | 99 | settings = Settings() | 126 | settings = Settings() |
240 | 100 | settings.beginGroup(self.settings_section) | 127 | settings.beginGroup(self.settings_section) |
241 | @@ -108,6 +135,9 @@ | |||
242 | 108 | self.add_from_service_check_box.setChecked(self.update_load) | 135 | self.add_from_service_check_box.setChecked(self.update_load) |
243 | 109 | self.display_songbook_check_box.setChecked(self.display_songbook) | 136 | self.display_songbook_check_box.setChecked(self.display_songbook) |
244 | 110 | self.display_copyright_check_box.setChecked(self.display_copyright_symbol) | 137 | self.display_copyright_check_box.setChecked(self.display_copyright_symbol) |
245 | 138 | self.end_character_line_edit.setText(settings.value('end character')) | ||
246 | 139 | self.info_on_end = settings.value('info on end') | ||
247 | 140 | self.info_on_end_combo_box.setCurrentIndex(self.info_on_end) | ||
248 | 111 | settings.endGroup() | 141 | settings.endGroup() |
249 | 112 | 142 | ||
250 | 113 | def save(self): | 143 | def save(self): |
251 | @@ -118,6 +148,8 @@ | |||
252 | 118 | settings.setValue('add song from service', self.update_load) | 148 | settings.setValue('add song from service', self.update_load) |
253 | 119 | settings.setValue('display songbook', self.display_songbook) | 149 | settings.setValue('display songbook', self.display_songbook) |
254 | 120 | settings.setValue('display copyright symbol', self.display_copyright_symbol) | 150 | settings.setValue('display copyright symbol', self.display_copyright_symbol) |
255 | 151 | settings.setValue('end character', self.end_character_line_edit.text()) | ||
256 | 152 | settings.setValue('info on end', self.info_on_end) | ||
257 | 121 | settings.endGroup() | 153 | settings.endGroup() |
258 | 122 | if self.tab_visited: | 154 | if self.tab_visited: |
259 | 123 | self.settings_form.register_post_process('songs_config_updated') | 155 | self.settings_form.register_post_process('songs_config_updated') |
260 | 124 | 156 | ||
261 | === modified file 'openlp/plugins/songs/songsplugin.py' | |||
262 | --- openlp/plugins/songs/songsplugin.py 2016-03-31 16:34:22 +0000 | |||
263 | +++ openlp/plugins/songs/songsplugin.py 2016-05-17 21:10:14 +0000 | |||
264 | @@ -64,7 +64,9 @@ | |||
265 | 64 | 'songs/last directory export': '', | 64 | 'songs/last directory export': '', |
266 | 65 | 'songs/songselect username': '', | 65 | 'songs/songselect username': '', |
267 | 66 | 'songs/songselect password': '', | 66 | 'songs/songselect password': '', |
269 | 67 | 'songs/songselect searches': '' | 67 | 'songs/songselect searches': '', |
270 | 68 | 'songs/end character': '', | ||
271 | 69 | 'songs/info on end': 0 # 0: Show on all slides; 1: Show on first shown slide; 2: Show on end slide | ||
272 | 68 | } | 70 | } |
273 | 69 | 71 | ||
274 | 70 | 72 |
See inline.