Merge lp:~suutari-olli/openlp/azaziah-fixes-and-improvements into lp:openlp

Proposed by Azaziah
Status: Merged
Merged at revision: 2749
Proposed branch: lp:~suutari-olli/openlp/azaziah-fixes-and-improvements
Merge into: lp:openlp
Diff against target: 798 lines (+123/-66)
49 files modified
openlp/core/common/settings.py (+5/-1)
openlp/core/lib/searchedit.py (+2/-2)
openlp/core/lib/ui.py (+1/-0)
openlp/core/ui/__init__.py (+3/-3)
openlp/core/ui/aboutform.py (+2/-1)
openlp/core/ui/filerenameform.py (+2/-2)
openlp/core/ui/firsttimelanguageform.py (+2/-1)
openlp/core/ui/formattingtagform.py (+2/-1)
openlp/core/ui/lib/wizard.py (+5/-2)
openlp/core/ui/maindisplay.py (+1/-1)
openlp/core/ui/pluginform.py (+2/-1)
openlp/core/ui/printserviceform.py (+2/-2)
openlp/core/ui/projector/editform.py (+2/-1)
openlp/core/ui/projector/sourceselectform.py (+4/-2)
openlp/core/ui/serviceitemeditform.py (+2/-2)
openlp/core/ui/servicenoteform.py (+2/-2)
openlp/core/ui/settingsform.py (+2/-1)
openlp/core/ui/shortcutlistform.py (+2/-1)
openlp/core/ui/starttimeform.py (+2/-2)
openlp/plugins/alerts/forms/alertform.py (+2/-2)
openlp/plugins/bibles/bibleplugin.py (+1/-1)
openlp/plugins/bibles/forms/booknameform.py (+2/-1)
openlp/plugins/bibles/forms/editbibleform.py (+2/-1)
openlp/plugins/bibles/forms/languageform.py (+2/-1)
openlp/plugins/bibles/lib/__init__.py (+2/-2)
openlp/plugins/bibles/lib/mediaitem.py (+3/-1)
openlp/plugins/custom/customplugin.py (+1/-1)
openlp/plugins/custom/forms/editcustomform.py (+2/-1)
openlp/plugins/custom/forms/editcustomslideform.py (+2/-1)
openlp/plugins/images/forms/addgroupform.py (+2/-1)
openlp/plugins/images/forms/choosegroupform.py (+2/-1)
openlp/plugins/media/forms/mediaclipselectorform.py (+2/-1)
openlp/plugins/songs/forms/authorsform.py (+2/-1)
openlp/plugins/songs/forms/duplicatesongremovalform.py (+3/-0)
openlp/plugins/songs/forms/editsongform.py (+2/-1)
openlp/plugins/songs/forms/editverseform.py (+2/-1)
openlp/plugins/songs/forms/mediafilesform.py (+2/-1)
openlp/plugins/songs/forms/songbookform.py (+2/-1)
openlp/plugins/songs/forms/songmaintenancedialog.py (+1/-1)
openlp/plugins/songs/forms/songmaintenanceform.py (+2/-1)
openlp/plugins/songs/forms/songselectform.py (+2/-1)
openlp/plugins/songs/forms/topicsform.py (+2/-1)
openlp/plugins/songs/songsplugin.py (+1/-1)
openlp/plugins/songusage/forms/songusagedeleteform.py (+1/-1)
openlp/plugins/songusage/forms/songusagedetailform.py (+2/-1)
tests/functional/openlp_core_ui/test_maindisplay.py (+16/-1)
tests/functional/openlp_plugins/bibles/test_lib.py (+4/-1)
tests/functional/openlp_plugins/bibles/test_mediaitem.py (+7/-7)
tests/interfaces/openlp_core_lib/test_searchedit.py (+2/-2)
To merge this branch: bzr merge lp:~suutari-olli/openlp/azaziah-fixes-and-improvements
Reviewer Review Type Date Requested Status
Tim Bentley Approve
Raoul Snyman Approve
Review via email: mp+325102@code.launchpad.net

This proposal supersedes a proposal from 2017-06-05.

Description of the change

Fixed bugs:
Bug #1639860: Close button is disabled in numerous windows
Bug #1652559: Find duplicates wizard does not reset cursor if closed from "x" instead of "cancel" button and causes traceback on exit
Bug #1666272: Linked audio "next" button results in traceback
Bug #1678292: Space after Bible book name auto-completion is missing
Bug #1694732: wizard sub title does not wrap
Bug #1695268: Bibles plugin fails to load due to invalid "last search type"
Bug: If Bible book name contains dot after number, the reference search
does not work.

Improvements
- Increased song maintanance window size.
- Removed "?" from all Wizard windows.

Add this to your merge proposal:
--------------------------------
lp:~suutari-olli/openlp/azaziah-fixes-and-improvements (revision 2765)
[SUCCESS] https://ci.openlp.io/job/Branch-01-Pull/2075/
[SUCCESS] https://ci.openlp.io/job/Branch-02-Functional-Tests/1985/
[SUCCESS] https://ci.openlp.io/job/Branch-03-Interface-Tests/1901/
[SUCCESS] https://ci.openlp.io/job/Branch-04a-Code_Analysis/1279/
[SUCCESS] https://ci.openlp.io/job/Branch-04b-Test_Coverage/1129/
[SUCCESS] https://ci.openlp.io/job/Branch-04c-Code_Analysis2/258/
[SUCCESS] https://ci.openlp.io/job/Branch-05-AppVeyor-Tests/104/

To post a comment you must log in.
Revision history for this message
Raoul Snyman (raoul-snyman) wrote : Posted in a previous version of this proposal

Just some minor things.

Also, I really would prefer to see 1 new test, not just updates to tests.

review: Needs Fixing
Revision history for this message
Tim Bentley (trb143) wrote : Posted in a previous version of this proposal

This needs checking on MAC as from memory there were issues with dialog closing and mac os.
This is goin back a number of years in the 2.0 dev period. I have tried to find the changs nut no luck.

review: Needs Fixing
Revision history for this message
Raoul Snyman (raoul-snyman) wrote : Posted in a previous version of this proposal

I'll test it out on my Mac.

Revision history for this message
Tim Bentley (trb143) wrote : Posted in a previous version of this proposal

Please rerun CI with new test and resubmit.

Thanks

review: Needs Fixing
Revision history for this message
Azaziah (suutari-olli) wrote : Posted in a previous version of this proposal

> Please rerun CI with new test and resubmit.
>
> Thanks

I did re-run it, just forgot to copy-paste the new results.
I've updated them to the description.

Sorry for the delay.

Revision history for this message
Raoul Snyman (raoul-snyman) wrote :

Nicely done Olli!

review: Approve
Revision history for this message
Tim Bentley (trb143) wrote :

Approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openlp/core/common/settings.py'
2--- openlp/core/common/settings.py 2017-03-15 19:51:10 +0000
3+++ openlp/core/common/settings.py 2017-06-05 19:21:48 +0000
4@@ -219,7 +219,11 @@
5 ('shortcuts/offlineHelpItem', 'shortcuts/userManualItem', []), # Online and Offline help were combined in 2.6.
6 ('shortcuts/onlineHelpItem', 'shortcuts/userManualItem', []), # Online and Offline help were combined in 2.6.
7 ('bibles/advanced bible', '', []), # Common bible search widgets combined in 2.6
8- ('bibles/quick bible', 'bibles/primary bible', []) # Common bible search widgets combined in 2.6
9+ ('bibles/quick bible', 'bibles/primary bible', []), # Common bible search widgets combined in 2.6
10+ # Last search type was renamed to last used search type in 2.6 since Bible search value type changed in 2.6.
11+ ('songs/last search type', 'songs/last used search type', []),
12+ ('bibles/last search type', '', []),
13+ ('custom/last search type', 'custom/last used search type', [])
14 ]
15
16 @staticmethod
17
18=== modified file 'openlp/core/lib/searchedit.py'
19--- openlp/core/lib/searchedit.py 2016-12-31 11:01:36 +0000
20+++ openlp/core/lib/searchedit.py 2017-06-05 19:21:48 +0000
21@@ -105,7 +105,7 @@
22 self.setPlaceholderText(action.placeholder_text)
23 self.menu_button.setDefaultAction(action)
24 self._current_search_type = identifier
25- Settings().setValue('{section}/last search type'.format(section=self.settings_section), identifier)
26+ Settings().setValue('{section}/last used search type'.format(section=self.settings_section), identifier)
27 self.searchTypeChanged.emit(identifier)
28 return True
29
30@@ -141,7 +141,7 @@
31 self.menu_button.resize(QtCore.QSize(28, 18))
32 self.menu_button.setMenu(menu)
33 self.set_current_search_type(
34- Settings().value('{section}/last search type'.format(section=self.settings_section)))
35+ Settings().value('{section}/last used search type'.format(section=self.settings_section)))
36 self.menu_button.show()
37 self._update_style_sheet()
38
39
40=== modified file 'openlp/core/lib/ui.py'
41--- openlp/core/lib/ui.py 2016-12-31 11:01:36 +0000
42+++ openlp/core/lib/ui.py 2017-06-05 19:21:48 +0000
43@@ -49,6 +49,7 @@
44 parent.title_label = QtWidgets.QLabel(parent.welcome_page)
45 parent.title_label.setObjectName('title_label')
46 parent.welcome_layout.addWidget(parent.title_label)
47+ parent.title_label.setWordWrap(True)
48 parent.welcome_layout.addSpacing(40)
49 parent.information_label = QtWidgets.QLabel(parent.welcome_page)
50 parent.information_label.setWordWrap(True)
51
52=== modified file 'openlp/core/ui/__init__.py'
53--- openlp/core/ui/__init__.py 2016-12-31 11:01:36 +0000
54+++ openlp/core/ui/__init__.py 2017-06-05 19:21:48 +0000
55@@ -99,7 +99,7 @@
56 from .themeform import ThemeForm
57 from .filerenameform import FileRenameForm
58 from .starttimeform import StartTimeForm
59-from .maindisplay import MainDisplay, Display
60+from .maindisplay import MainDisplay, Display, AudioPlayer
61 from .servicenoteform import ServiceNoteForm
62 from .serviceitemeditform import ServiceItemEditForm
63 from .slidecontroller import SlideController, DisplayController, PreviewController, LiveController
64@@ -120,8 +120,8 @@
65 from .projector.editform import ProjectorEditForm
66
67 __all__ = ['SplashScreen', 'AboutForm', 'SettingsForm', 'MainDisplay', 'SlideController', 'ServiceManager', 'ThemeForm',
68- 'ThemeManager', 'ServiceItemEditForm', 'FirstTimeForm', 'FirstTimeLanguageForm',
69- 'Display', 'ServiceNoteForm', 'ThemeLayoutForm', 'FileRenameForm', 'StartTimeForm', 'MainDisplay',
70+ 'ThemeManager', 'ServiceItemEditForm', 'FirstTimeForm', 'FirstTimeLanguageForm', 'Display', 'AudioPlayer',
71+ 'ServiceNoteForm', 'ThemeLayoutForm', 'FileRenameForm', 'StartTimeForm', 'MainDisplay',
72 'SlideController', 'DisplayController', 'GeneralTab', 'ThemesTab', 'AdvancedTab', 'PluginForm',
73 'FormattingTagForm', 'ShortcutListForm', 'FormattingTagController', 'SingleColumnTableWidget',
74 'ProjectorManager', 'ProjectorTab', 'ProjectorEditForm']
75
76=== modified file 'openlp/core/ui/aboutform.py'
77--- openlp/core/ui/aboutform.py 2016-12-31 11:01:36 +0000
78+++ openlp/core/ui/aboutform.py 2017-06-05 19:21:48 +0000
79@@ -40,7 +40,8 @@
80 """
81 Do some initialisation stuff
82 """
83- super(AboutForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
84+ super(AboutForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
85+ QtCore.Qt.WindowCloseButtonHint)
86 self._setup()
87
88 def _setup(self):
89
90=== modified file 'openlp/core/ui/filerenameform.py'
91--- openlp/core/ui/filerenameform.py 2016-12-31 11:01:36 +0000
92+++ openlp/core/ui/filerenameform.py 2017-06-05 19:21:48 +0000
93@@ -38,8 +38,8 @@
94 """
95 Constructor
96 """
97- super(FileRenameForm, self).__init__(Registry().get('main_window'),
98- QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
99+ super(FileRenameForm, self).__init__(Registry().get('main_window'), QtCore.Qt.WindowSystemMenuHint |
100+ QtCore.Qt.WindowTitleHint | QtCore.Qt.WindowCloseButtonHint)
101 self._setup()
102
103 def _setup(self):
104
105=== modified file 'openlp/core/ui/firsttimelanguageform.py'
106--- openlp/core/ui/firsttimelanguageform.py 2016-12-31 11:01:36 +0000
107+++ openlp/core/ui/firsttimelanguageform.py 2017-06-05 19:21:48 +0000
108@@ -37,7 +37,8 @@
109 """
110 Constructor
111 """
112- super(FirstTimeLanguageForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
113+ super(FirstTimeLanguageForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
114+ QtCore.Qt.WindowTitleHint | QtCore.Qt.WindowCloseButtonHint)
115 self.setupUi(self)
116 self.qm_list = LanguageManager.get_qm_list()
117 self.language_combo_box.addItem('Autodetect')
118
119=== modified file 'openlp/core/ui/formattingtagform.py'
120--- openlp/core/ui/formattingtagform.py 2016-12-31 11:01:36 +0000
121+++ openlp/core/ui/formattingtagform.py 2017-06-05 19:21:48 +0000
122@@ -51,7 +51,8 @@
123 """
124 Constructor
125 """
126- super(FormattingTagForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
127+ super(FormattingTagForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
128+ QtCore.Qt.WindowCloseButtonHint)
129 self.setupUi(self)
130 self._setup()
131
132
133=== modified file 'openlp/core/ui/lib/wizard.py'
134--- openlp/core/ui/lib/wizard.py 2016-12-31 11:01:36 +0000
135+++ openlp/core/ui/lib/wizard.py 2017-06-05 19:21:48 +0000
136@@ -25,7 +25,7 @@
137 import logging
138 import os
139
140-from PyQt5 import QtGui, QtWidgets
141+from PyQt5 import QtCore, QtGui, QtWidgets
142
143 from openlp.core.common import Registry, RegistryProperties, Settings, UiStrings, translate, is_macosx
144 from openlp.core.lib import build_icon
145@@ -93,7 +93,10 @@
146 """
147 Constructor
148 """
149- super(OpenLPWizard, self).__init__(parent)
150+ # QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint remove the "?" buttons from windows,
151+ # QtCore.Qt.WindowCloseButtonHint enables the "x" button to close these windows.
152+ super(OpenLPWizard, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
153+ QtCore.Qt.WindowCloseButtonHint)
154 self.plugin = plugin
155 self.with_progress_page = add_progress_page
156 self.setFixedWidth(640)
157
158=== modified file 'openlp/core/ui/maindisplay.py'
159--- openlp/core/ui/maindisplay.py 2017-03-23 04:43:13 +0000
160+++ openlp/core/ui/maindisplay.py 2017-06-05 19:21:48 +0000
161@@ -689,7 +689,7 @@
162 """
163 Skip forward to the next track in the list
164 """
165- self.playerlist.next()
166+ self.playlist.next()
167
168 def go_to(self, index):
169 """
170
171=== modified file 'openlp/core/ui/pluginform.py'
172--- openlp/core/ui/pluginform.py 2016-12-31 11:01:36 +0000
173+++ openlp/core/ui/pluginform.py 2017-06-05 19:21:48 +0000
174@@ -41,7 +41,8 @@
175 """
176 Constructor
177 """
178- super(PluginForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
179+ super(PluginForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
180+ QtCore.Qt.WindowCloseButtonHint)
181 self.active_plugin = None
182 self.programatic_change = False
183 self.setupUi(self)
184
185=== modified file 'openlp/core/ui/printserviceform.py'
186--- openlp/core/ui/printserviceform.py 2017-02-19 21:35:40 +0000
187+++ openlp/core/ui/printserviceform.py 2017-06-05 19:21:48 +0000
188@@ -125,8 +125,8 @@
189 """
190 Constructor
191 """
192- super(PrintServiceForm, self).__init__(Registry().get('main_window'),
193- QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
194+ super(PrintServiceForm, self).__init__(Registry().get('main_window'), QtCore.Qt.WindowSystemMenuHint |
195+ QtCore.Qt.WindowTitleHint | QtCore.Qt.WindowCloseButtonHint)
196 self.printer = QtPrintSupport.QPrinter()
197 self.print_dialog = QtPrintSupport.QPrintDialog(self.printer, self)
198 self.document = QtGui.QTextDocument()
199
200=== modified file 'openlp/core/ui/projector/editform.py'
201--- openlp/core/ui/projector/editform.py 2016-12-31 11:01:36 +0000
202+++ openlp/core/ui/projector/editform.py 2017-06-05 19:21:48 +0000
203@@ -142,7 +142,8 @@
204 editProjector = QtCore.pyqtSignal(object)
205
206 def __init__(self, parent=None, projectordb=None):
207- super(ProjectorEditForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
208+ super(ProjectorEditForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
209+ QtCore.Qt.WindowCloseButtonHint)
210 self.projectordb = projectordb
211 self.setupUi(self)
212 self.button_box.accepted.connect(self.accept_me)
213
214=== modified file 'openlp/core/ui/projector/sourceselectform.py'
215--- openlp/core/ui/projector/sourceselectform.py 2016-12-31 11:01:36 +0000
216+++ openlp/core/ui/projector/sourceselectform.py 2017-06-05 19:21:48 +0000
217@@ -233,7 +233,8 @@
218 :param projectordb: ProjectorDB session to use
219 """
220 log.debug('Initializing SourceSelectTabs()')
221- super(SourceSelectTabs, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
222+ super(SourceSelectTabs, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
223+ QtCore.Qt.WindowCloseButtonHint)
224 self.setMinimumWidth(350)
225 self.projectordb = projectordb
226 self.edit = edit
227@@ -388,7 +389,8 @@
228 """
229 log.debug('Initializing SourceSelectSingle()')
230 self.projectordb = projectordb
231- super(SourceSelectSingle, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
232+ super(SourceSelectSingle, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
233+ QtCore.Qt.WindowCloseButtonHint)
234 self.edit = edit
235 if self.edit:
236 title = translate('OpenLP.SourceSelectForm', 'Edit Projector Source Text')
237
238=== modified file 'openlp/core/ui/serviceitemeditform.py'
239--- openlp/core/ui/serviceitemeditform.py 2016-12-31 11:01:36 +0000
240+++ openlp/core/ui/serviceitemeditform.py 2017-06-05 19:21:48 +0000
241@@ -37,8 +37,8 @@
242 """
243 Constructor
244 """
245- super(ServiceItemEditForm, self).__init__(Registry().get('main_window'),
246- QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
247+ super(ServiceItemEditForm, self).__init__(Registry().get('main_window'), QtCore.Qt.WindowSystemMenuHint |
248+ QtCore.Qt.WindowTitleHint | QtCore.Qt.WindowCloseButtonHint)
249 self.setupUi(self)
250 self.item_list = []
251 self.list_widget.currentRowChanged.connect(self.on_current_row_changed)
252
253=== modified file 'openlp/core/ui/servicenoteform.py'
254--- openlp/core/ui/servicenoteform.py 2016-12-31 11:01:36 +0000
255+++ openlp/core/ui/servicenoteform.py 2017-06-05 19:21:48 +0000
256@@ -37,8 +37,8 @@
257 """
258 Constructor
259 """
260- super(ServiceNoteForm, self).__init__(Registry().get('main_window'),
261- QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
262+ super(ServiceNoteForm, self).__init__(Registry().get('main_window'), QtCore.Qt.WindowSystemMenuHint |
263+ QtCore.Qt.WindowTitleHint | QtCore.Qt.WindowCloseButtonHint)
264 self.setupUi()
265 self.retranslateUi()
266
267
268=== modified file 'openlp/core/ui/settingsform.py'
269--- openlp/core/ui/settingsform.py 2016-12-31 11:01:36 +0000
270+++ openlp/core/ui/settingsform.py 2017-06-05 19:21:48 +0000
271@@ -46,7 +46,8 @@
272 """
273 Registry().register('settings_form', self)
274 Registry().register_function('bootstrap_post_set_up', self.bootstrap_post_set_up)
275- super(SettingsForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
276+ super(SettingsForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
277+ QtCore.Qt.WindowCloseButtonHint)
278 self.processes = []
279 self.setupUi(self)
280 self.setting_list_widget.currentRowChanged.connect(self.list_item_changed)
281
282=== modified file 'openlp/core/ui/shortcutlistform.py'
283--- openlp/core/ui/shortcutlistform.py 2016-12-31 11:01:36 +0000
284+++ openlp/core/ui/shortcutlistform.py 2017-06-05 19:21:48 +0000
285@@ -44,7 +44,8 @@
286 """
287 Constructor
288 """
289- super(ShortcutListForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
290+ super(ShortcutListForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
291+ QtCore.Qt.WindowCloseButtonHint)
292 self.setupUi(self)
293 self.changed_actions = {}
294 self.action_list = ActionList.get_instance()
295
296=== modified file 'openlp/core/ui/starttimeform.py'
297--- openlp/core/ui/starttimeform.py 2016-12-31 11:01:36 +0000
298+++ openlp/core/ui/starttimeform.py 2017-06-05 19:21:48 +0000
299@@ -38,8 +38,8 @@
300 """
301 Constructor
302 """
303- super(StartTimeForm, self).__init__(Registry().get('main_window'),
304- QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
305+ super(StartTimeForm, self).__init__(Registry().get('main_window'), QtCore.Qt.WindowSystemMenuHint |
306+ QtCore.Qt.WindowTitleHint | QtCore.Qt.WindowCloseButtonHint)
307 self.setupUi(self)
308
309 def exec(self):
310
311=== modified file 'openlp/plugins/alerts/forms/alertform.py'
312--- openlp/plugins/alerts/forms/alertform.py 2016-12-31 11:01:36 +0000
313+++ openlp/plugins/alerts/forms/alertform.py 2017-06-05 19:21:48 +0000
314@@ -36,8 +36,8 @@
315 """
316 Initialise the alert form
317 """
318- super(AlertForm, self).__init__(Registry().get('main_window'),
319- QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
320+ super(AlertForm, self).__init__(Registry().get('main_window'), QtCore.Qt.WindowSystemMenuHint |
321+ QtCore.Qt.WindowTitleHint | QtCore.Qt.WindowCloseButtonHint)
322 self.manager = plugin.manager
323 self.plugin = plugin
324 self.item_id = None
325
326=== modified file 'openlp/plugins/bibles/bibleplugin.py'
327--- openlp/plugins/bibles/bibleplugin.py 2017-02-18 07:23:15 +0000
328+++ openlp/plugins/bibles/bibleplugin.py 2017-06-05 19:21:48 +0000
329@@ -38,7 +38,7 @@
330 'bibles/db password': '',
331 'bibles/db hostname': '',
332 'bibles/db database': '',
333- 'bibles/last search type': BibleSearch.Combined,
334+ 'bibles/last used search type': BibleSearch.Combined,
335 'bibles/reset to combined quick search': True,
336 'bibles/verse layout style': LayoutStyle.VersePerSlide,
337 'bibles/book name language': LanguageSelection.Bible,
338
339=== modified file 'openlp/plugins/bibles/forms/booknameform.py'
340--- openlp/plugins/bibles/forms/booknameform.py 2016-12-31 11:01:36 +0000
341+++ openlp/plugins/bibles/forms/booknameform.py 2017-06-05 19:21:48 +0000
342@@ -49,7 +49,8 @@
343 """
344 Constructor
345 """
346- super(BookNameForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
347+ super(BookNameForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
348+ QtCore.Qt.WindowCloseButtonHint)
349 self.setupUi(self)
350 self.custom_signals()
351 self.book_names = BibleStrings().BookNames
352
353=== modified file 'openlp/plugins/bibles/forms/editbibleform.py'
354--- openlp/plugins/bibles/forms/editbibleform.py 2017-01-08 19:12:12 +0000
355+++ openlp/plugins/bibles/forms/editbibleform.py 2017-06-05 19:21:48 +0000
356@@ -45,7 +45,8 @@
357 """
358 Constructor
359 """
360- super(EditBibleForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
361+ super(EditBibleForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
362+ QtCore.Qt.WindowCloseButtonHint)
363 self.media_item = media_item
364 self.book_names = BibleStrings().BookNames
365 self.setupUi(self)
366
367=== modified file 'openlp/plugins/bibles/forms/languageform.py'
368--- openlp/plugins/bibles/forms/languageform.py 2016-12-31 11:01:36 +0000
369+++ openlp/plugins/bibles/forms/languageform.py 2017-06-05 19:21:48 +0000
370@@ -47,7 +47,8 @@
371 """
372 Constructor
373 """
374- super(LanguageForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
375+ super(LanguageForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
376+ QtCore.Qt.WindowCloseButtonHint)
377 self.setupUi(self)
378
379 def exec(self, bible_name):
380
381=== modified file 'openlp/plugins/bibles/lib/__init__.py'
382--- openlp/plugins/bibles/lib/__init__.py 2017-05-05 21:00:59 +0000
383+++ openlp/plugins/bibles/lib/__init__.py 2017-06-05 19:21:48 +0000
384@@ -230,7 +230,7 @@
385 REFERENCE_MATCHES['range_separator'] = re.compile(REFERENCE_SEPARATORS['sep_l'], re.UNICODE)
386 # full reference match: <book>(<range>(,(?!$)|(?=$)))+
387 REFERENCE_MATCHES['full'] = \
388- re.compile('^\s*(?!\s)(?P<book>[\d]*[^\d\.]+)\.*(?<!\s)\s*'
389+ re.compile('^\s*(?!\s)(?P<book>[\d]*[.]?[^\d\.]+)\.*(?<!\s)\s*'
390 '(?P<ranges>(?:%(range_regex)s(?:%(sep_l)s(?!\s*$)|(?=\s*$)))+)\s*$'
391 % dict(list(REFERENCE_SEPARATORS.items()) + [('range_regex', range_regex)]), re.UNICODE)
392
393@@ -326,7 +326,7 @@
394
395 ``^\s*(?!\s)(?P<book>[\d]*[^\d]+)(?<!\s)\s*``
396 The ``book`` group starts with the first non-whitespace character. There are optional leading digits followed by
397- non-digits. The group ends before the whitspace, or a full stop in front of the next digit.
398+ non-digits. The group ends before the whitespace, or a full stop in front of the next digit.
399
400 ``(?P<ranges>(?:%(range_regex)s(?:%(sep_l)s(?!\s*$)|(?=\s*$)))+)\s*$``
401 The second group contains all ``ranges``. This can be multiple declarations of range_regex separated by a list
402
403=== modified file 'openlp/plugins/bibles/lib/mediaitem.py'
404--- openlp/plugins/bibles/lib/mediaitem.py 2017-05-07 18:39:17 +0000
405+++ openlp/plugins/bibles/lib/mediaitem.py 2017-06-05 19:21:48 +0000
406@@ -414,7 +414,9 @@
407 if self.bible:
408 book_data = self.get_common_books(self.bible, self.second_bible)
409 language_selection = self.plugin.manager.get_language_selection(self.bible.name)
410- books = [book.get_name(language_selection) for book in book_data]
411+ # Get book names + add a space to the end. Thus Psalm23 becomes Psalm 23
412+ # when auto complete is used and user does not need to add the space manually.
413+ books = [book.get_name(language_selection) + ' ' for book in book_data]
414 books.sort(key=get_locale_key)
415 set_case_insensitive_completer(books, self.search_edit)
416
417
418=== modified file 'openlp/plugins/custom/customplugin.py'
419--- openlp/plugins/custom/customplugin.py 2016-12-31 11:01:36 +0000
420+++ openlp/plugins/custom/customplugin.py 2017-06-05 19:21:48 +0000
421@@ -40,7 +40,7 @@
422 'custom/db password': '',
423 'custom/db hostname': '',
424 'custom/db database': '',
425- 'custom/last search type': CustomSearch.Titles,
426+ 'custom/last used search type': CustomSearch.Titles,
427 'custom/display footer': True,
428 'custom/add custom from service': True
429 }
430
431=== modified file 'openlp/plugins/custom/forms/editcustomform.py'
432--- openlp/plugins/custom/forms/editcustomform.py 2016-12-31 11:01:36 +0000
433+++ openlp/plugins/custom/forms/editcustomform.py 2017-06-05 19:21:48 +0000
434@@ -44,7 +44,8 @@
435 """
436 Constructor
437 """
438- super(EditCustomForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
439+ super(EditCustomForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
440+ QtCore.Qt.WindowCloseButtonHint)
441 self.manager = manager
442 self.media_item = media_item
443 self.setupUi(self)
444
445=== modified file 'openlp/plugins/custom/forms/editcustomslideform.py'
446--- openlp/plugins/custom/forms/editcustomslideform.py 2016-12-31 11:01:36 +0000
447+++ openlp/plugins/custom/forms/editcustomslideform.py 2017-06-05 19:21:48 +0000
448@@ -39,7 +39,8 @@
449 """
450 Constructor
451 """
452- super(EditCustomSlideForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
453+ super(EditCustomSlideForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
454+ QtCore.Qt.WindowCloseButtonHint)
455 self.setupUi(self)
456 # Connecting signals and slots
457 self.insert_button.clicked.connect(self.on_insert_button_clicked)
458
459=== modified file 'openlp/plugins/images/forms/addgroupform.py'
460--- openlp/plugins/images/forms/addgroupform.py 2016-12-31 11:01:36 +0000
461+++ openlp/plugins/images/forms/addgroupform.py 2017-06-05 19:21:48 +0000
462@@ -35,7 +35,8 @@
463 """
464 Constructor
465 """
466- super(AddGroupForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
467+ super(AddGroupForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
468+ QtCore.Qt.WindowCloseButtonHint)
469 self.setupUi(self)
470
471 def exec(self, clear=True, show_top_level_group=False, selected_group=None):
472
473=== modified file 'openlp/plugins/images/forms/choosegroupform.py'
474--- openlp/plugins/images/forms/choosegroupform.py 2016-12-31 11:01:36 +0000
475+++ openlp/plugins/images/forms/choosegroupform.py 2017-06-05 19:21:48 +0000
476@@ -33,7 +33,8 @@
477 """
478 Constructor
479 """
480- super(ChooseGroupForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
481+ super(ChooseGroupForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
482+ QtCore.Qt.WindowCloseButtonHint)
483 self.setupUi(self)
484
485 def exec(self, selected_group=None):
486
487=== modified file 'openlp/plugins/media/forms/mediaclipselectorform.py'
488--- openlp/plugins/media/forms/mediaclipselectorform.py 2016-12-31 11:01:36 +0000
489+++ openlp/plugins/media/forms/mediaclipselectorform.py 2017-06-05 19:21:48 +0000
490@@ -52,7 +52,8 @@
491 """
492 Constructor
493 """
494- super(MediaClipSelectorForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
495+ super(MediaClipSelectorForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
496+ QtCore.Qt.WindowTitleHint | QtCore.Qt.WindowCloseButtonHint)
497 self.vlc_instance = None
498 self.vlc_media_player = None
499 self.vlc_media = None
500
501=== modified file 'openlp/plugins/songs/forms/authorsform.py'
502--- openlp/plugins/songs/forms/authorsform.py 2016-12-31 11:01:36 +0000
503+++ openlp/plugins/songs/forms/authorsform.py 2017-06-05 19:21:48 +0000
504@@ -35,7 +35,8 @@
505 """
506 Set up the screen and common data
507 """
508- super(AuthorsForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
509+ super(AuthorsForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
510+ QtCore.Qt.WindowCloseButtonHint)
511 self.setupUi(self)
512 self.auto_display_name = False
513 self.first_name_edit.textEdited.connect(self.on_first_name_edited)
514
515=== modified file 'openlp/plugins/songs/forms/duplicatesongremovalform.py'
516--- openlp/plugins/songs/forms/duplicatesongremovalform.py 2016-12-31 11:01:36 +0000
517+++ openlp/plugins/songs/forms/duplicatesongremovalform.py 2017-06-05 19:21:48 +0000
518@@ -82,6 +82,9 @@
519 self.finish_button.clicked.connect(self.on_wizard_exit)
520 self.cancel_button.clicked.connect(self.on_wizard_exit)
521
522+ def closeEvent(self, event):
523+ self.on_wizard_exit()
524+
525 def add_custom_pages(self):
526 """
527 Add song wizard specific pages.
528
529=== modified file 'openlp/plugins/songs/forms/editsongform.py'
530--- openlp/plugins/songs/forms/editsongform.py 2017-03-02 04:34:24 +0000
531+++ openlp/plugins/songs/forms/editsongform.py 2017-06-05 19:21:48 +0000
532@@ -56,7 +56,8 @@
533 """
534 Constructor
535 """
536- super(EditSongForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
537+ super(EditSongForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
538+ QtCore.Qt.WindowCloseButtonHint)
539 self.media_item = media_item
540 self.song = None
541 # can this be automated?
542
543=== modified file 'openlp/plugins/songs/forms/editverseform.py'
544--- openlp/plugins/songs/forms/editverseform.py 2017-04-20 20:23:17 +0000
545+++ openlp/plugins/songs/forms/editverseform.py 2017-06-05 19:21:48 +0000
546@@ -43,7 +43,8 @@
547 """
548 Constructor
549 """
550- super(EditVerseForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
551+ super(EditVerseForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
552+ QtCore.Qt.WindowCloseButtonHint)
553 self.setupUi(self)
554 self.has_single_verse = False
555 self.insert_button.clicked.connect(self.on_insert_button_clicked)
556
557=== modified file 'openlp/plugins/songs/forms/mediafilesform.py'
558--- openlp/plugins/songs/forms/mediafilesform.py 2016-12-31 11:01:36 +0000
559+++ openlp/plugins/songs/forms/mediafilesform.py 2017-06-05 19:21:48 +0000
560@@ -37,7 +37,8 @@
561 log.info('{name} MediaFilesForm loaded'.format(name=__name__))
562
563 def __init__(self, parent):
564- super(MediaFilesForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
565+ super(MediaFilesForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
566+ QtCore.Qt.WindowCloseButtonHint)
567 self.setupUi(self)
568
569 def populate_files(self, files):
570
571=== modified file 'openlp/plugins/songs/forms/songbookform.py'
572--- openlp/plugins/songs/forms/songbookform.py 2016-12-31 11:01:36 +0000
573+++ openlp/plugins/songs/forms/songbookform.py 2017-06-05 19:21:48 +0000
574@@ -38,7 +38,8 @@
575 """
576 Constructor
577 """
578- super(SongBookForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
579+ super(SongBookForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
580+ QtCore.Qt.WindowCloseButtonHint)
581 self.setupUi(self)
582
583 def exec(self, clear=True):
584
585=== modified file 'openlp/plugins/songs/forms/songmaintenancedialog.py'
586--- openlp/plugins/songs/forms/songmaintenancedialog.py 2016-12-31 11:01:36 +0000
587+++ openlp/plugins/songs/forms/songmaintenancedialog.py 2017-06-05 19:21:48 +0000
588@@ -39,7 +39,7 @@
589 song_maintenance_dialog.setObjectName('song_maintenance_dialog')
590 song_maintenance_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
591 song_maintenance_dialog.setWindowModality(QtCore.Qt.ApplicationModal)
592- song_maintenance_dialog.resize(10, 350)
593+ song_maintenance_dialog.resize(600, 600)
594 self.dialog_layout = QtWidgets.QGridLayout(song_maintenance_dialog)
595 self.dialog_layout.setObjectName('dialog_layout')
596 self.type_list_widget = QtWidgets.QListWidget(song_maintenance_dialog)
597
598=== modified file 'openlp/plugins/songs/forms/songmaintenanceform.py'
599--- openlp/plugins/songs/forms/songmaintenanceform.py 2017-03-28 00:36:54 +0000
600+++ openlp/plugins/songs/forms/songmaintenanceform.py 2017-06-05 19:21:48 +0000
601@@ -44,7 +44,8 @@
602 """
603 Constructor
604 """
605- super(SongMaintenanceForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
606+ super(SongMaintenanceForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
607+ QtCore.Qt.WindowCloseButtonHint)
608 self.setupUi(self)
609 self.manager = manager
610 self.author_form = AuthorsForm(self)
611
612=== modified file 'openlp/plugins/songs/forms/songselectform.py'
613--- openlp/plugins/songs/forms/songselectform.py 2017-02-18 07:23:15 +0000
614+++ openlp/plugins/songs/forms/songselectform.py 2017-06-05 19:21:48 +0000
615@@ -81,7 +81,8 @@
616 """
617
618 def __init__(self, parent=None, plugin=None, db_manager=None):
619- QtWidgets.QDialog.__init__(self, parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
620+ QtWidgets.QDialog.__init__(self, parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
621+ QtCore.Qt.WindowCloseButtonHint)
622 self.plugin = plugin
623 self.db_manager = db_manager
624 self.setup_ui(self)
625
626=== modified file 'openlp/plugins/songs/forms/topicsform.py'
627--- openlp/plugins/songs/forms/topicsform.py 2016-12-31 11:01:36 +0000
628+++ openlp/plugins/songs/forms/topicsform.py 2017-06-05 19:21:48 +0000
629@@ -38,7 +38,8 @@
630 """
631 Constructor
632 """
633- super(TopicsForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
634+ super(TopicsForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
635+ QtCore.Qt.WindowCloseButtonHint)
636 self.setupUi(self)
637
638 def exec(self, clear=True):
639
640=== modified file 'openlp/plugins/songs/songsplugin.py'
641--- openlp/plugins/songs/songsplugin.py 2017-02-26 21:14:49 +0000
642+++ openlp/plugins/songs/songsplugin.py 2017-06-05 19:21:48 +0000
643@@ -54,7 +54,7 @@
644 'songs/db password': '',
645 'songs/db hostname': '',
646 'songs/db database': '',
647- 'songs/last search type': SongSearch.Entire,
648+ 'songs/last used search type': SongSearch.Entire,
649 'songs/last import type': SongFormat.OpenLyrics,
650 'songs/update service on edit': False,
651 'songs/add song from service': True,
652
653=== modified file 'openlp/plugins/songusage/forms/songusagedeleteform.py'
654--- openlp/plugins/songusage/forms/songusagedeleteform.py 2016-12-31 11:01:36 +0000
655+++ openlp/plugins/songusage/forms/songusagedeleteform.py 2017-06-05 19:21:48 +0000
656@@ -37,7 +37,7 @@
657 """
658 self.manager = manager
659 super(SongUsageDeleteForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
660- QtCore.Qt.WindowTitleHint)
661+ QtCore.Qt.WindowTitleHint | QtCore.Qt.WindowCloseButtonHint)
662 self.setupUi(self)
663 self.button_box.clicked.connect(self.on_button_box_clicked)
664
665
666=== modified file 'openlp/plugins/songusage/forms/songusagedetailform.py'
667--- openlp/plugins/songusage/forms/songusagedetailform.py 2017-05-12 21:05:50 +0000
668+++ openlp/plugins/songusage/forms/songusagedetailform.py 2017-06-05 19:21:48 +0000
669@@ -44,7 +44,8 @@
670 """
671 Initialise the form
672 """
673- super(SongUsageDetailForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
674+ super(SongUsageDetailForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint |
675+ QtCore.Qt.WindowCloseButtonHint)
676 self.plugin = plugin
677 self.setupUi(self)
678
679
680=== modified file 'tests/functional/openlp_core_ui/test_maindisplay.py'
681--- tests/functional/openlp_core_ui/test_maindisplay.py 2017-04-24 05:17:55 +0000
682+++ tests/functional/openlp_core_ui/test_maindisplay.py 2017-06-05 19:21:48 +0000
683@@ -29,7 +29,7 @@
684
685 from openlp.core.common import Registry, is_macosx, Settings
686 from openlp.core.lib import ScreenList, PluginManager
687-from openlp.core.ui import MainDisplay
688+from openlp.core.ui import MainDisplay, AudioPlayer
689 from openlp.core.ui.media import MediaController
690 from openlp.core.ui.maindisplay import TRANSPARENT_STYLESHEET, OPAQUE_STYLESHEET
691
692@@ -283,3 +283,18 @@
693 self.assertEquals(main_display.web_view.setHtml.call_count, 1, 'setHTML should be called once')
694 self.assertEquals(main_display.media_controller.video.call_count, 1,
695 'Media Controller video should have been called once')
696+
697+
698+def test_calling_next_item_in_playlist():
699+ """
700+ Test the AudioPlayer.next() method
701+ """
702+ # GIVEN: An instance of AudioPlayer with a mocked out playlist
703+ audio_player = AudioPlayer(None)
704+
705+ # WHEN: next is called.
706+ with patch.object(audio_player, 'playlist') as mocked_playlist:
707+ audio_player.next()
708+
709+ # THEN: playlist.next should had been called once.
710+ mocked_playlist.next.assert_called_once_with()
711
712=== modified file 'tests/functional/openlp_plugins/bibles/test_lib.py'
713--- tests/functional/openlp_plugins/bibles/test_lib.py 2017-04-24 05:17:55 +0000
714+++ tests/functional/openlp_plugins/bibles/test_lib.py 2017-06-05 19:21:48 +0000
715@@ -68,7 +68,8 @@
716 """
717 # GIVEN: Some test data which contains different references to parse, with the expected results.
718 with patch('openlp.plugins.bibles.lib.Settings', return_value=MagicMock(**{'value.return_value': ''})):
719- # The following test data tests with 222 variants when using the default 'separators'
720+ # The following test data tests with about 240 variants when using the default 'separators'
721+ # The amount is exactly 222 without '1. John 23' and'1. John. 23'
722 test_data = [
723 # Input reference, book name, chapter + verse reference
724 ('Psalm 23', 'Psalm', '23'),
725@@ -84,6 +85,8 @@
726 ('Psalm 23{_and}24', 'Psalm', '23,24'),
727 ('1 John 23', '1 John', '23'),
728 ('1 John. 23', '1 John', '23'),
729+ ('1. John 23', '1. John', '23'),
730+ ('1. John. 23', '1. John', '23'),
731 ('1 John 23{to}24', '1 John', '23-24'),
732 ('1 John 23{verse}1{to}2', '1 John', '23:1-2'),
733 ('1 John 23{verse}1{to}{end}', '1 John', '23:1-end'),
734
735=== modified file 'tests/functional/openlp_plugins/bibles/test_mediaitem.py'
736--- tests/functional/openlp_plugins/bibles/test_mediaitem.py 2017-06-03 22:34:19 +0000
737+++ tests/functional/openlp_plugins/bibles/test_mediaitem.py 2017-06-05 19:21:48 +0000
738@@ -480,9 +480,9 @@
739 # WHEN: Calling update_auto_completer
740 self.media_item.update_auto_completer()
741
742- # THEN: set_case_insensitive_completer should have been called with the names of the books in order
743+ # THEN: set_case_insensitive_completer should have been called with the names of the books + space in order
744 mocked_set_case_insensitive_completer.assert_called_once_with(
745- ['Book 1', 'Book 2', 'Book 3'], mocked_search_edit)
746+ ['Book 1 ', 'Book 2 ', 'Book 3 '], mocked_search_edit)
747
748 def test_update_auto_completer_search_combined_type(self):
749 """
750@@ -500,11 +500,11 @@
751 # WHEN: Calling update_auto_completer
752 self.media_item.update_auto_completer()
753
754- # THEN: set_case_insensitive_completer should have been called with the names of the books in order
755+ # THEN: set_case_insensitive_completer should have been called with the names of the books + space in order
756 mocked_set_case_insensitive_completer.assert_called_once_with(
757- ['Book 1', 'Book 2', 'Book 3'], mocked_search_edit)
758+ ['Book 1 ', 'Book 2 ', 'Book 3 '], mocked_search_edit)
759
760- def test_on_import_click_no_import_wizzard_attr(self):
761+ def test_on_import_click_no_import_wizard_attr(self):
762 """
763 Test on_import_click when media_item does not have the `import_wizard` attribute. And the wizard was canceled.
764 """
765@@ -521,9 +521,9 @@
766 self.assertTrue(mocked_bible_import_form.called)
767 self.assertFalse(mocked_reload_bibles.called)
768
769- def test_on_import_click_wizzard_not_canceled(self):
770+ def test_on_import_click_wizard_not_canceled(self):
771 """
772- Test on_import_click when the media item has the import_wizzard attr set and wizard completes sucessfully.
773+ Test on_import_click when the media item has the import_wizard attr set and wizard completes sucessfully.
774 """
775 # GIVEN: An instance of :class:`MediaManagerItem` and a mocked import_wizard
776 mocked_import_wizard = MagicMock(**{'exec.return_value': True})
777
778=== modified file 'tests/interfaces/openlp_core_lib/test_searchedit.py'
779--- tests/interfaces/openlp_core_lib/test_searchedit.py 2016-12-31 11:01:36 +0000
780+++ tests/interfaces/openlp_core_lib/test_searchedit.py 2017-06-05 19:21:48 +0000
781@@ -88,7 +88,7 @@
782 # settings
783 self.assertEqual(self.search_edit.current_search_type(), SearchTypes.First,
784 "The first search type should be selected.")
785- self.mocked_settings().setValue.assert_called_once_with('settings_section/last search type', 0)
786+ self.mocked_settings().setValue.assert_called_once_with('settings_section/last used search type', 0)
787
788 def test_set_current_search_type(self):
789 """
790@@ -105,7 +105,7 @@
791 self.assertEqual(self.search_edit.placeholderText(), SECOND_PLACEHOLDER_TEXT,
792 "The correct placeholder text should be 'Second Placeholder Text'.")
793 self.mocked_settings().setValue.assert_has_calls(
794- [call('settings_section/last search type', 0), call('settings_section/last search type', 1)])
795+ [call('settings_section/last used search type', 0), call('settings_section/last used search type', 1)])
796
797 def test_clear_button_visibility(self):
798 """