Merge lp:~thelinuxguy/openlp/fix-1490184 into lp:openlp
- fix-1490184
- Merge into trunk
Status: | Merged |
---|---|
Merged at revision: | 2591 |
Proposed branch: | lp:~thelinuxguy/openlp/fix-1490184 |
Merge into: | lp:openlp |
Diff against target: |
752 lines (+174/-53) 35 files modified
.bzrignore (+2/-0) openlp/core/ui/aboutform.py (+3/-2) openlp/core/ui/exceptionform.py (+2/-1) openlp/core/ui/filerenameform.py (+3/-2) openlp/core/ui/firsttimelanguageform.py (+3/-2) openlp/core/ui/formattingtagform.py (+3/-2) openlp/core/ui/pluginform.py (+3/-2) openlp/core/ui/printserviceform.py (+2/-1) openlp/core/ui/projector/editform.py (+2/-1) openlp/core/ui/projector/sourceselectform.py (+4/-2) openlp/core/ui/serviceitemeditform.py (+3/-2) openlp/core/ui/servicenoteform.py (+3/-2) openlp/core/ui/settingsform.py (+2/-1) openlp/core/ui/shortcutlistform.py (+2/-1) openlp/core/ui/starttimeform.py (+3/-2) openlp/plugins/alerts/forms/alertform.py (+2/-1) openlp/plugins/bibles/forms/booknameform.py (+2/-1) openlp/plugins/bibles/forms/editbibleform.py (+3/-2) openlp/plugins/bibles/forms/languageform.py (+3/-1) openlp/plugins/custom/forms/editcustomform.py (+3/-2) openlp/plugins/custom/forms/editcustomslideform.py (+3/-2) openlp/plugins/images/forms/addgroupform.py (+3/-2) openlp/plugins/images/forms/choosegroupform.py (+3/-2) openlp/plugins/media/forms/mediaclipselectorform.py (+2/-1) openlp/plugins/songs/forms/authorsform.py (+3/-2) openlp/plugins/songs/forms/editsongform.py (+2/-1) openlp/plugins/songs/forms/editverseform.py (+3/-2) openlp/plugins/songs/forms/mediafilesform.py (+2/-1) openlp/plugins/songs/forms/songbookform.py (+3/-2) openlp/plugins/songs/forms/songmaintenanceform.py (+2/-1) openlp/plugins/songs/forms/songselectform.py (+2/-1) openlp/plugins/songs/forms/topicsform.py (+3/-2) openlp/plugins/songusage/forms/songusagedeleteform.py (+3/-2) openlp/plugins/songusage/forms/songusagedetailform.py (+3/-2) tests/functional/openlp_plugins/songs/test_songformat.py (+84/-0) |
To merge this branch: | bzr merge lp:~thelinuxguy/openlp/fix-1490184 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tomas Groth | Approve | ||
Tim Bentley | Approve | ||
Review via email: mp+281696@code.launchpad.net |
This proposal supersedes a proposal from 2015-12-30.
Commit message
Description of the change
Modify all forms to remove the help button from their status bar.
I don't think I missed a form. The Wizards remain untouched as the help button works there
Tomas Groth (tomasgroth) wrote : Posted in a previous version of this proposal | # |
Simon Hanna (thelinuxguy) wrote : Posted in a previous version of this proposal | # |
It's not the greatest test, it's the first I found, that I knew I would be able to write a test for
Tim Bentley (trb143) wrote : Posted in a previous version of this proposal | # |
Four new tests is great but we do have a style about our tests.
All the tests are based around the simple structure. Note the comments are very important as they are the only part of the test visible when it fails so it give a clue where to look
# GIVEN:
# WHEN:
# THEN:
so
def test_get_
self.
becomes something like.
def test_get_
"""
Test for default format list
"""
# GIVEN: a SongFormat
# WHEN: I have a basic object
# THEN: the following data should be constructed
self.
Tim Bentley (trb143) : Posted in a previous version of this proposal | # |
Tim Bentley (trb143) wrote : Posted in a previous version of this proposal | # |
See below each test needs a proper comment line - unique as that says what test is failing
Tim Bentley (trb143) wrote : | # |
Tests look better constructed.
No windows machine to confirm validity of fix.
Tomas Groth (tomasgroth) : | # |
Preview Diff
1 | === modified file '.bzrignore' | |||
2 | --- .bzrignore 2015-05-07 21:29:43 +0000 | |||
3 | +++ .bzrignore 2016-01-05 21:38:21 +0000 | |||
4 | @@ -43,3 +43,5 @@ | |||
5 | 43 | .coverage | 43 | .coverage |
6 | 44 | cover | 44 | cover |
7 | 45 | *.kdev4 | 45 | *.kdev4 |
8 | 46 | ./.coveragerc | ||
9 | 47 | ./coverage | ||
10 | 46 | 48 | ||
11 | === modified file 'openlp/core/ui/aboutform.py' | |||
12 | --- openlp/core/ui/aboutform.py 2015-12-31 22:46:06 +0000 | |||
13 | +++ openlp/core/ui/aboutform.py 2016-01-05 21:38:21 +0000 | |||
14 | @@ -24,7 +24,7 @@ | |||
15 | 24 | """ | 24 | """ |
16 | 25 | import webbrowser | 25 | import webbrowser |
17 | 26 | 26 | ||
19 | 27 | from PyQt5 import QtWidgets | 27 | from PyQt5 import QtCore, QtWidgets |
20 | 28 | 28 | ||
21 | 29 | from openlp.core.lib import translate | 29 | from openlp.core.lib import translate |
22 | 30 | from openlp.core.utils import get_application_version | 30 | from openlp.core.utils import get_application_version |
23 | @@ -40,7 +40,8 @@ | |||
24 | 40 | """ | 40 | """ |
25 | 41 | Do some initialisation stuff | 41 | Do some initialisation stuff |
26 | 42 | """ | 42 | """ |
28 | 43 | super(AboutForm, self).__init__(parent) | 43 | super(AboutForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
29 | 44 | | QtCore.Qt.WindowTitleHint) | ||
30 | 44 | self._setup() | 45 | self._setup() |
31 | 45 | 46 | ||
32 | 46 | def _setup(self): | 47 | def _setup(self): |
33 | 47 | 48 | ||
34 | === modified file 'openlp/core/ui/exceptionform.py' | |||
35 | --- openlp/core/ui/exceptionform.py 2015-12-31 22:46:06 +0000 | |||
36 | +++ openlp/core/ui/exceptionform.py 2016-01-05 21:38:21 +0000 | |||
37 | @@ -89,7 +89,8 @@ | |||
38 | 89 | """ | 89 | """ |
39 | 90 | Constructor. | 90 | Constructor. |
40 | 91 | """ | 91 | """ |
42 | 92 | super(ExceptionForm, self).__init__() | 92 | super(ExceptionForm, self).__init__(None, QtCore.Qt.WindowSystemMenuHint |
43 | 93 | | QtCore.Qt.WindowTitleHint) | ||
44 | 93 | self.setupUi(self) | 94 | self.setupUi(self) |
45 | 94 | self.settings_section = 'crashreport' | 95 | self.settings_section = 'crashreport' |
46 | 95 | self.report_text = '**OpenLP Bug Report**\n' \ | 96 | self.report_text = '**OpenLP Bug Report**\n' \ |
47 | 96 | 97 | ||
48 | === modified file 'openlp/core/ui/filerenameform.py' | |||
49 | --- openlp/core/ui/filerenameform.py 2015-12-31 22:46:06 +0000 | |||
50 | +++ openlp/core/ui/filerenameform.py 2016-01-05 21:38:21 +0000 | |||
51 | @@ -23,7 +23,7 @@ | |||
52 | 23 | The file rename dialog. | 23 | The file rename dialog. |
53 | 24 | """ | 24 | """ |
54 | 25 | 25 | ||
56 | 26 | from PyQt5 import QtWidgets | 26 | from PyQt5 import QtCore, QtWidgets |
57 | 27 | 27 | ||
58 | 28 | from .filerenamedialog import Ui_FileRenameDialog | 28 | from .filerenamedialog import Ui_FileRenameDialog |
59 | 29 | 29 | ||
60 | @@ -38,7 +38,8 @@ | |||
61 | 38 | """ | 38 | """ |
62 | 39 | Constructor | 39 | Constructor |
63 | 40 | """ | 40 | """ |
65 | 41 | super(FileRenameForm, self).__init__(Registry().get('main_window')) | 41 | super(FileRenameForm, self).__init__(Registry().get('main_window'), |
66 | 42 | QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) | ||
67 | 42 | self._setup() | 43 | self._setup() |
68 | 43 | 44 | ||
69 | 44 | def _setup(self): | 45 | def _setup(self): |
70 | 45 | 46 | ||
71 | === modified file 'openlp/core/ui/firsttimelanguageform.py' | |||
72 | --- openlp/core/ui/firsttimelanguageform.py 2015-12-31 22:46:06 +0000 | |||
73 | +++ openlp/core/ui/firsttimelanguageform.py 2016-01-05 21:38:21 +0000 | |||
74 | @@ -22,7 +22,7 @@ | |||
75 | 22 | """ | 22 | """ |
76 | 23 | The language selection dialog. | 23 | The language selection dialog. |
77 | 24 | """ | 24 | """ |
79 | 25 | from PyQt5 import QtWidgets | 25 | from PyQt5 import QtCore, QtWidgets |
80 | 26 | 26 | ||
81 | 27 | from openlp.core.lib.ui import create_action | 27 | from openlp.core.lib.ui import create_action |
82 | 28 | from openlp.core.utils import LanguageManager | 28 | from openlp.core.utils import LanguageManager |
83 | @@ -37,7 +37,8 @@ | |||
84 | 37 | """ | 37 | """ |
85 | 38 | Constructor | 38 | Constructor |
86 | 39 | """ | 39 | """ |
88 | 40 | super(FirstTimeLanguageForm, self).__init__(parent) | 40 | super(FirstTimeLanguageForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
89 | 41 | | QtCore.Qt.WindowTitleHint) | ||
90 | 41 | self.setupUi(self) | 42 | self.setupUi(self) |
91 | 42 | self.qm_list = LanguageManager.get_qm_list() | 43 | self.qm_list = LanguageManager.get_qm_list() |
92 | 43 | self.language_combo_box.addItem('Autodetect') | 44 | self.language_combo_box.addItem('Autodetect') |
93 | 44 | 45 | ||
94 | === modified file 'openlp/core/ui/formattingtagform.py' | |||
95 | --- openlp/core/ui/formattingtagform.py 2015-12-31 22:46:06 +0000 | |||
96 | +++ openlp/core/ui/formattingtagform.py 2016-01-05 21:38:21 +0000 | |||
97 | @@ -25,7 +25,7 @@ | |||
98 | 25 | Base Tags cannot be changed. | 25 | Base Tags cannot be changed. |
99 | 26 | """ | 26 | """ |
100 | 27 | 27 | ||
102 | 28 | from PyQt5 import QtWidgets | 28 | from PyQt5 import QtCore, QtWidgets |
103 | 29 | 29 | ||
104 | 30 | from openlp.core.common import translate | 30 | from openlp.core.common import translate |
105 | 31 | from openlp.core.lib import FormattingTags | 31 | from openlp.core.lib import FormattingTags |
106 | @@ -51,7 +51,8 @@ | |||
107 | 51 | """ | 51 | """ |
108 | 52 | Constructor | 52 | Constructor |
109 | 53 | """ | 53 | """ |
111 | 54 | super(FormattingTagForm, self).__init__(parent) | 54 | super(FormattingTagForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
112 | 55 | | QtCore.Qt.WindowTitleHint) | ||
113 | 55 | self.setupUi(self) | 56 | self.setupUi(self) |
114 | 56 | self._setup() | 57 | self._setup() |
115 | 57 | 58 | ||
116 | 58 | 59 | ||
117 | === modified file 'openlp/core/ui/pluginform.py' | |||
118 | --- openlp/core/ui/pluginform.py 2015-12-31 22:46:06 +0000 | |||
119 | +++ openlp/core/ui/pluginform.py 2016-01-05 21:38:21 +0000 | |||
120 | @@ -24,7 +24,7 @@ | |||
121 | 24 | """ | 24 | """ |
122 | 25 | import logging | 25 | import logging |
123 | 26 | 26 | ||
125 | 27 | from PyQt5 import QtWidgets | 27 | from PyQt5 import QtCore, QtWidgets |
126 | 28 | 28 | ||
127 | 29 | from openlp.core.common import RegistryProperties, translate | 29 | from openlp.core.common import RegistryProperties, translate |
128 | 30 | from openlp.core.lib import PluginStatus | 30 | from openlp.core.lib import PluginStatus |
129 | @@ -41,7 +41,8 @@ | |||
130 | 41 | """ | 41 | """ |
131 | 42 | Constructor | 42 | Constructor |
132 | 43 | """ | 43 | """ |
134 | 44 | super(PluginForm, self).__init__(parent) | 44 | super(PluginForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
135 | 45 | | QtCore.Qt.WindowTitleHint) | ||
136 | 45 | self.active_plugin = None | 46 | self.active_plugin = None |
137 | 46 | self.programatic_change = False | 47 | self.programatic_change = False |
138 | 47 | self.setupUi(self) | 48 | self.setupUi(self) |
139 | 48 | 49 | ||
140 | === modified file 'openlp/core/ui/printserviceform.py' | |||
141 | --- openlp/core/ui/printserviceform.py 2015-12-31 22:46:06 +0000 | |||
142 | +++ openlp/core/ui/printserviceform.py 2016-01-05 21:38:21 +0000 | |||
143 | @@ -112,7 +112,8 @@ | |||
144 | 112 | """ | 112 | """ |
145 | 113 | Constructor | 113 | Constructor |
146 | 114 | """ | 114 | """ |
148 | 115 | super(PrintServiceForm, self).__init__(Registry().get('main_window')) | 115 | super(PrintServiceForm, self).__init__(Registry().get('main_window'), |
149 | 116 | QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) | ||
150 | 116 | self.printer = QtPrintSupport.QPrinter() | 117 | self.printer = QtPrintSupport.QPrinter() |
151 | 117 | self.print_dialog = QtPrintSupport.QPrintDialog(self.printer, self) | 118 | self.print_dialog = QtPrintSupport.QPrintDialog(self.printer, self) |
152 | 118 | self.document = QtGui.QTextDocument() | 119 | self.document = QtGui.QTextDocument() |
153 | 119 | 120 | ||
154 | === modified file 'openlp/core/ui/projector/editform.py' | |||
155 | --- openlp/core/ui/projector/editform.py 2015-12-31 22:46:06 +0000 | |||
156 | +++ openlp/core/ui/projector/editform.py 2016-01-05 21:38:21 +0000 | |||
157 | @@ -144,7 +144,8 @@ | |||
158 | 144 | editProjector = pyqtSignal(object) | 144 | editProjector = pyqtSignal(object) |
159 | 145 | 145 | ||
160 | 146 | def __init__(self, parent=None, projectordb=None): | 146 | def __init__(self, parent=None, projectordb=None): |
162 | 147 | super(ProjectorEditForm, self).__init__(parent=parent) | 147 | super(ProjectorEditForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
163 | 148 | | QtCore.Qt.WindowTitleHint) | ||
164 | 148 | self.projectordb = projectordb | 149 | self.projectordb = projectordb |
165 | 149 | self.setupUi(self) | 150 | self.setupUi(self) |
166 | 150 | self.button_box.accepted.connect(self.accept_me) | 151 | self.button_box.accepted.connect(self.accept_me) |
167 | 151 | 152 | ||
168 | === modified file 'openlp/core/ui/projector/sourceselectform.py' | |||
169 | --- openlp/core/ui/projector/sourceselectform.py 2015-12-31 22:46:06 +0000 | |||
170 | +++ openlp/core/ui/projector/sourceselectform.py 2016-01-05 21:38:21 +0000 | |||
171 | @@ -236,7 +236,8 @@ | |||
172 | 236 | :param projectordb: ProjectorDB session to use | 236 | :param projectordb: ProjectorDB session to use |
173 | 237 | """ | 237 | """ |
174 | 238 | log.debug('Initializing SourceSelectTabs()') | 238 | log.debug('Initializing SourceSelectTabs()') |
176 | 239 | super(SourceSelectTabs, self).__init__(parent) | 239 | super(SourceSelectTabs, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
177 | 240 | | QtCore.Qt.WindowTitleHint) | ||
178 | 240 | self.setMinimumWidth(350) | 241 | self.setMinimumWidth(350) |
179 | 241 | self.projectordb = projectordb | 242 | self.projectordb = projectordb |
180 | 242 | self.edit = edit | 243 | self.edit = edit |
181 | @@ -385,7 +386,8 @@ | |||
182 | 385 | """ | 386 | """ |
183 | 386 | log.debug('Initializing SourceSelectSingle()') | 387 | log.debug('Initializing SourceSelectSingle()') |
184 | 387 | self.projectordb = projectordb | 388 | self.projectordb = projectordb |
186 | 388 | super(SourceSelectSingle, self).__init__(parent) | 389 | super(SourceSelectSingle, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
187 | 390 | | QtCore.Qt.WindowTitleHint) | ||
188 | 389 | self.edit = edit | 391 | self.edit = edit |
189 | 390 | if self.edit: | 392 | if self.edit: |
190 | 391 | title = translate('OpenLP.SourceSelectForm', 'Edit Projector Source Text') | 393 | title = translate('OpenLP.SourceSelectForm', 'Edit Projector Source Text') |
191 | 392 | 394 | ||
192 | === modified file 'openlp/core/ui/serviceitemeditform.py' | |||
193 | --- openlp/core/ui/serviceitemeditform.py 2015-12-31 22:46:06 +0000 | |||
194 | +++ openlp/core/ui/serviceitemeditform.py 2016-01-05 21:38:21 +0000 | |||
195 | @@ -22,7 +22,7 @@ | |||
196 | 22 | """ | 22 | """ |
197 | 23 | The service item edit dialog | 23 | The service item edit dialog |
198 | 24 | """ | 24 | """ |
200 | 25 | from PyQt5 import QtWidgets | 25 | from PyQt5 import QtCore, QtWidgets |
201 | 26 | 26 | ||
202 | 27 | from openlp.core.common import Registry, RegistryProperties | 27 | from openlp.core.common import Registry, RegistryProperties |
203 | 28 | 28 | ||
204 | @@ -37,7 +37,8 @@ | |||
205 | 37 | """ | 37 | """ |
206 | 38 | Constructor | 38 | Constructor |
207 | 39 | """ | 39 | """ |
209 | 40 | super(ServiceItemEditForm, self).__init__(Registry().get('main_window')) | 40 | super(ServiceItemEditForm, self).__init__(Registry().get('main_window'), |
210 | 41 | QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) | ||
211 | 41 | self.setupUi(self) | 42 | self.setupUi(self) |
212 | 42 | self.item_list = [] | 43 | self.item_list = [] |
213 | 43 | self.list_widget.currentRowChanged.connect(self.on_current_row_changed) | 44 | self.list_widget.currentRowChanged.connect(self.on_current_row_changed) |
214 | 44 | 45 | ||
215 | === modified file 'openlp/core/ui/servicenoteform.py' | |||
216 | --- openlp/core/ui/servicenoteform.py 2015-12-31 22:46:06 +0000 | |||
217 | +++ openlp/core/ui/servicenoteform.py 2016-01-05 21:38:21 +0000 | |||
218 | @@ -22,7 +22,7 @@ | |||
219 | 22 | """ | 22 | """ |
220 | 23 | The :mod:`~openlp.core.ui.servicenoteform` module contains the `ServiceNoteForm` class. | 23 | The :mod:`~openlp.core.ui.servicenoteform` module contains the `ServiceNoteForm` class. |
221 | 24 | """ | 24 | """ |
223 | 25 | from PyQt5 import QtWidgets | 25 | from PyQt5 import QtCore, QtWidgets |
224 | 26 | 26 | ||
225 | 27 | from openlp.core.common import Registry, RegistryProperties, translate | 27 | from openlp.core.common import Registry, RegistryProperties, translate |
226 | 28 | from openlp.core.lib import SpellTextEdit | 28 | from openlp.core.lib import SpellTextEdit |
227 | @@ -37,7 +37,8 @@ | |||
228 | 37 | """ | 37 | """ |
229 | 38 | Constructor | 38 | Constructor |
230 | 39 | """ | 39 | """ |
232 | 40 | super(ServiceNoteForm, self).__init__(Registry().get('main_window')) | 40 | super(ServiceNoteForm, self).__init__(Registry().get('main_window'), |
233 | 41 | QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) | ||
234 | 41 | self.setupUi() | 42 | self.setupUi() |
235 | 42 | self.retranslateUi() | 43 | self.retranslateUi() |
236 | 43 | 44 | ||
237 | 44 | 45 | ||
238 | === modified file 'openlp/core/ui/settingsform.py' | |||
239 | --- openlp/core/ui/settingsform.py 2015-12-31 22:46:06 +0000 | |||
240 | +++ openlp/core/ui/settingsform.py 2016-01-05 21:38:21 +0000 | |||
241 | @@ -46,7 +46,8 @@ | |||
242 | 46 | """ | 46 | """ |
243 | 47 | Registry().register('settings_form', self) | 47 | Registry().register('settings_form', self) |
244 | 48 | Registry().register_function('bootstrap_post_set_up', self.bootstrap_post_set_up) | 48 | Registry().register_function('bootstrap_post_set_up', self.bootstrap_post_set_up) |
246 | 49 | super(SettingsForm, self).__init__(parent) | 49 | super(SettingsForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
247 | 50 | | QtCore.Qt.WindowTitleHint) | ||
248 | 50 | self.processes = [] | 51 | self.processes = [] |
249 | 51 | self.setupUi(self) | 52 | self.setupUi(self) |
250 | 52 | self.setting_list_widget.currentRowChanged.connect(self.list_item_changed) | 53 | self.setting_list_widget.currentRowChanged.connect(self.list_item_changed) |
251 | 53 | 54 | ||
252 | === modified file 'openlp/core/ui/shortcutlistform.py' | |||
253 | --- openlp/core/ui/shortcutlistform.py 2015-12-31 22:46:06 +0000 | |||
254 | +++ openlp/core/ui/shortcutlistform.py 2016-01-05 21:38:21 +0000 | |||
255 | @@ -44,7 +44,8 @@ | |||
256 | 44 | """ | 44 | """ |
257 | 45 | Constructor | 45 | Constructor |
258 | 46 | """ | 46 | """ |
260 | 47 | super(ShortcutListForm, self).__init__(parent) | 47 | super(ShortcutListForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
261 | 48 | | QtCore.Qt.WindowTitleHint) | ||
262 | 48 | self.setupUi(self) | 49 | self.setupUi(self) |
263 | 49 | self.changed_actions = {} | 50 | self.changed_actions = {} |
264 | 50 | self.action_list = ActionList.get_instance() | 51 | self.action_list = ActionList.get_instance() |
265 | 51 | 52 | ||
266 | === modified file 'openlp/core/ui/starttimeform.py' | |||
267 | --- openlp/core/ui/starttimeform.py 2015-12-31 22:46:06 +0000 | |||
268 | +++ openlp/core/ui/starttimeform.py 2016-01-05 21:38:21 +0000 | |||
269 | @@ -22,7 +22,7 @@ | |||
270 | 22 | """ | 22 | """ |
271 | 23 | The actual start time form. | 23 | The actual start time form. |
272 | 24 | """ | 24 | """ |
274 | 25 | from PyQt5 import QtWidgets | 25 | from PyQt5 import QtCore, QtWidgets |
275 | 26 | 26 | ||
276 | 27 | from .starttimedialog import Ui_StartTimeDialog | 27 | from .starttimedialog import Ui_StartTimeDialog |
277 | 28 | 28 | ||
278 | @@ -38,7 +38,8 @@ | |||
279 | 38 | """ | 38 | """ |
280 | 39 | Constructor | 39 | Constructor |
281 | 40 | """ | 40 | """ |
283 | 41 | super(StartTimeForm, self).__init__(Registry().get('main_window')) | 41 | super(StartTimeForm, self).__init__(Registry().get('main_window'), |
284 | 42 | QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) | ||
285 | 42 | self.setupUi(self) | 43 | self.setupUi(self) |
286 | 43 | 44 | ||
287 | 44 | def exec(self): | 45 | def exec(self): |
288 | 45 | 46 | ||
289 | === modified file 'openlp/plugins/alerts/forms/alertform.py' | |||
290 | --- openlp/plugins/alerts/forms/alertform.py 2015-12-31 22:46:06 +0000 | |||
291 | +++ openlp/plugins/alerts/forms/alertform.py 2016-01-05 21:38:21 +0000 | |||
292 | @@ -36,10 +36,11 @@ | |||
293 | 36 | """ | 36 | """ |
294 | 37 | Initialise the alert form | 37 | Initialise the alert form |
295 | 38 | """ | 38 | """ |
296 | 39 | super(AlertForm, self).__init__(Registry().get('main_window'), | ||
297 | 40 | QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) | ||
298 | 39 | self.manager = plugin.manager | 41 | self.manager = plugin.manager |
299 | 40 | self.plugin = plugin | 42 | self.plugin = plugin |
300 | 41 | self.item_id = None | 43 | self.item_id = None |
301 | 42 | super(AlertForm, self).__init__(Registry().get('main_window')) | ||
302 | 43 | self.setupUi(self) | 44 | self.setupUi(self) |
303 | 44 | self.display_button.clicked.connect(self.on_display_clicked) | 45 | self.display_button.clicked.connect(self.on_display_clicked) |
304 | 45 | self.display_close_button.clicked.connect(self.on_display_close_clicked) | 46 | self.display_close_button.clicked.connect(self.on_display_close_clicked) |
305 | 46 | 47 | ||
306 | === modified file 'openlp/plugins/bibles/forms/booknameform.py' | |||
307 | --- openlp/plugins/bibles/forms/booknameform.py 2015-12-31 22:46:06 +0000 | |||
308 | +++ openlp/plugins/bibles/forms/booknameform.py 2016-01-05 21:38:21 +0000 | |||
309 | @@ -49,7 +49,8 @@ | |||
310 | 49 | """ | 49 | """ |
311 | 50 | Constructor | 50 | Constructor |
312 | 51 | """ | 51 | """ |
314 | 52 | super(BookNameForm, self).__init__(parent) | 52 | super(BookNameForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
315 | 53 | | QtCore.Qt.WindowTitleHint) | ||
316 | 53 | self.setupUi(self) | 54 | self.setupUi(self) |
317 | 54 | self.custom_signals() | 55 | self.custom_signals() |
318 | 55 | self.book_names = BibleStrings().BookNames | 56 | self.book_names = BibleStrings().BookNames |
319 | 56 | 57 | ||
320 | === modified file 'openlp/plugins/bibles/forms/editbibleform.py' | |||
321 | --- openlp/plugins/bibles/forms/editbibleform.py 2015-12-31 22:46:06 +0000 | |||
322 | +++ openlp/plugins/bibles/forms/editbibleform.py 2016-01-05 21:38:21 +0000 | |||
323 | @@ -24,7 +24,7 @@ | |||
324 | 24 | import os | 24 | import os |
325 | 25 | import re | 25 | import re |
326 | 26 | 26 | ||
328 | 27 | from PyQt5 import QtWidgets | 27 | from PyQt5 import QtCore, QtWidgets |
329 | 28 | 28 | ||
330 | 29 | from openlp.core.common import RegistryProperties, UiStrings, translate | 29 | from openlp.core.common import RegistryProperties, UiStrings, translate |
331 | 30 | from openlp.core.lib.ui import critical_error_message_box | 30 | from openlp.core.lib.ui import critical_error_message_box |
332 | @@ -45,7 +45,8 @@ | |||
333 | 45 | """ | 45 | """ |
334 | 46 | Constructor | 46 | Constructor |
335 | 47 | """ | 47 | """ |
337 | 48 | super(EditBibleForm, self).__init__(parent) | 48 | super(EditBibleForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
338 | 49 | | QtCore.Qt.WindowTitleHint) | ||
339 | 49 | self.media_item = media_item | 50 | self.media_item = media_item |
340 | 50 | self.book_names = BibleStrings().BookNames | 51 | self.book_names = BibleStrings().BookNames |
341 | 51 | self.setupUi(self) | 52 | self.setupUi(self) |
342 | 52 | 53 | ||
343 | === modified file 'openlp/plugins/bibles/forms/languageform.py' | |||
344 | --- openlp/plugins/bibles/forms/languageform.py 2015-12-31 22:46:06 +0000 | |||
345 | +++ openlp/plugins/bibles/forms/languageform.py 2016-01-05 21:38:21 +0000 | |||
346 | @@ -26,6 +26,7 @@ | |||
347 | 26 | import logging | 26 | import logging |
348 | 27 | 27 | ||
349 | 28 | from PyQt5.QtWidgets import QDialog | 28 | from PyQt5.QtWidgets import QDialog |
350 | 29 | from PyQt5 import QtCore | ||
351 | 29 | 30 | ||
352 | 30 | from openlp.core.common import translate | 31 | from openlp.core.common import translate |
353 | 31 | from openlp.core.lib.ui import critical_error_message_box | 32 | from openlp.core.lib.ui import critical_error_message_box |
354 | @@ -46,7 +47,8 @@ | |||
355 | 46 | """ | 47 | """ |
356 | 47 | Constructor | 48 | Constructor |
357 | 48 | """ | 49 | """ |
359 | 49 | super(LanguageForm, self).__init__(parent) | 50 | super(LanguageForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
360 | 51 | | QtCore.Qt.WindowTitleHint) | ||
361 | 50 | self.setupUi(self) | 52 | self.setupUi(self) |
362 | 51 | 53 | ||
363 | 52 | def exec(self, bible_name): | 54 | def exec(self, bible_name): |
364 | 53 | 55 | ||
365 | === modified file 'openlp/plugins/custom/forms/editcustomform.py' | |||
366 | --- openlp/plugins/custom/forms/editcustomform.py 2015-12-31 22:46:06 +0000 | |||
367 | +++ openlp/plugins/custom/forms/editcustomform.py 2016-01-05 21:38:21 +0000 | |||
368 | @@ -22,7 +22,7 @@ | |||
369 | 22 | 22 | ||
370 | 23 | import logging | 23 | import logging |
371 | 24 | 24 | ||
373 | 25 | from PyQt5 import QtWidgets | 25 | from PyQt5 import QtCore, QtWidgets |
374 | 26 | 26 | ||
375 | 27 | from openlp.core.common import Registry, translate | 27 | from openlp.core.common import Registry, translate |
376 | 28 | from openlp.core.lib.ui import critical_error_message_box, find_and_set_in_combo_box | 28 | from openlp.core.lib.ui import critical_error_message_box, find_and_set_in_combo_box |
377 | @@ -44,7 +44,8 @@ | |||
378 | 44 | """ | 44 | """ |
379 | 45 | Constructor | 45 | Constructor |
380 | 46 | """ | 46 | """ |
382 | 47 | super(EditCustomForm, self).__init__(parent) | 47 | super(EditCustomForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
383 | 48 | | QtCore.Qt.WindowTitleHint) | ||
384 | 48 | self.manager = manager | 49 | self.manager = manager |
385 | 49 | self.media_item = media_item | 50 | self.media_item = media_item |
386 | 50 | self.setupUi(self) | 51 | self.setupUi(self) |
387 | 51 | 52 | ||
388 | === modified file 'openlp/plugins/custom/forms/editcustomslideform.py' | |||
389 | --- openlp/plugins/custom/forms/editcustomslideform.py 2015-12-31 22:46:06 +0000 | |||
390 | +++ openlp/plugins/custom/forms/editcustomslideform.py 2016-01-05 21:38:21 +0000 | |||
391 | @@ -22,7 +22,7 @@ | |||
392 | 22 | 22 | ||
393 | 23 | import logging | 23 | import logging |
394 | 24 | 24 | ||
396 | 25 | from PyQt5 import QtWidgets | 25 | from PyQt5 import QtCore, QtWidgets |
397 | 26 | 26 | ||
398 | 27 | from .editcustomslidedialog import Ui_CustomSlideEditDialog | 27 | from .editcustomslidedialog import Ui_CustomSlideEditDialog |
399 | 28 | 28 | ||
400 | @@ -39,7 +39,8 @@ | |||
401 | 39 | """ | 39 | """ |
402 | 40 | Constructor | 40 | Constructor |
403 | 41 | """ | 41 | """ |
405 | 42 | super(EditCustomSlideForm, self).__init__(parent) | 42 | super(EditCustomSlideForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
406 | 43 | | QtCore.Qt.WindowTitleHint) | ||
407 | 43 | self.setupUi(self) | 44 | self.setupUi(self) |
408 | 44 | # Connecting signals and slots | 45 | # Connecting signals and slots |
409 | 45 | self.insert_button.clicked.connect(self.on_insert_button_clicked) | 46 | self.insert_button.clicked.connect(self.on_insert_button_clicked) |
410 | 46 | 47 | ||
411 | === modified file 'openlp/plugins/images/forms/addgroupform.py' | |||
412 | --- openlp/plugins/images/forms/addgroupform.py 2015-12-31 22:46:06 +0000 | |||
413 | +++ openlp/plugins/images/forms/addgroupform.py 2016-01-05 21:38:21 +0000 | |||
414 | @@ -20,7 +20,7 @@ | |||
415 | 20 | # Temple Place, Suite 330, Boston, MA 02111-1307 USA # | 20 | # Temple Place, Suite 330, Boston, MA 02111-1307 USA # |
416 | 21 | ############################################################################### | 21 | ############################################################################### |
417 | 22 | 22 | ||
419 | 23 | from PyQt5 import QtWidgets | 23 | from PyQt5 import QtCore, QtWidgets |
420 | 24 | 24 | ||
421 | 25 | from openlp.core.common import translate | 25 | from openlp.core.common import translate |
422 | 26 | from openlp.core.lib.ui import critical_error_message_box | 26 | from openlp.core.lib.ui import critical_error_message_box |
423 | @@ -35,7 +35,8 @@ | |||
424 | 35 | """ | 35 | """ |
425 | 36 | Constructor | 36 | Constructor |
426 | 37 | """ | 37 | """ |
428 | 38 | super(AddGroupForm, self).__init__(parent) | 38 | super(AddGroupForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
429 | 39 | | QtCore.Qt.WindowTitleHint) | ||
430 | 39 | self.setupUi(self) | 40 | self.setupUi(self) |
431 | 40 | 41 | ||
432 | 41 | def exec(self, clear=True, show_top_level_group=False, selected_group=None): | 42 | def exec(self, clear=True, show_top_level_group=False, selected_group=None): |
433 | 42 | 43 | ||
434 | === modified file 'openlp/plugins/images/forms/choosegroupform.py' | |||
435 | --- openlp/plugins/images/forms/choosegroupform.py 2015-12-31 22:46:06 +0000 | |||
436 | +++ openlp/plugins/images/forms/choosegroupform.py 2016-01-05 21:38:21 +0000 | |||
437 | @@ -20,7 +20,7 @@ | |||
438 | 20 | # Temple Place, Suite 330, Boston, MA 02111-1307 USA # | 20 | # Temple Place, Suite 330, Boston, MA 02111-1307 USA # |
439 | 21 | ############################################################################### | 21 | ############################################################################### |
440 | 22 | 22 | ||
442 | 23 | from PyQt5 import QtWidgets | 23 | from PyQt5 import QtCore, QtWidgets |
443 | 24 | 24 | ||
444 | 25 | from openlp.plugins.images.forms.choosegroupdialog import Ui_ChooseGroupDialog | 25 | from openlp.plugins.images.forms.choosegroupdialog import Ui_ChooseGroupDialog |
445 | 26 | 26 | ||
446 | @@ -33,7 +33,8 @@ | |||
447 | 33 | """ | 33 | """ |
448 | 34 | Constructor | 34 | Constructor |
449 | 35 | """ | 35 | """ |
451 | 36 | super(ChooseGroupForm, self).__init__(parent) | 36 | super(ChooseGroupForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
452 | 37 | | QtCore.Qt.WindowTitleHint) | ||
453 | 37 | self.setupUi(self) | 38 | self.setupUi(self) |
454 | 38 | 39 | ||
455 | 39 | def exec(self, selected_group=None): | 40 | def exec(self, selected_group=None): |
456 | 40 | 41 | ||
457 | === modified file 'openlp/plugins/media/forms/mediaclipselectorform.py' | |||
458 | --- openlp/plugins/media/forms/mediaclipselectorform.py 2015-12-31 22:46:06 +0000 | |||
459 | +++ openlp/plugins/media/forms/mediaclipselectorform.py 2016-01-05 21:38:21 +0000 | |||
460 | @@ -52,7 +52,8 @@ | |||
461 | 52 | """ | 52 | """ |
462 | 53 | Constructor | 53 | Constructor |
463 | 54 | """ | 54 | """ |
465 | 55 | super(MediaClipSelectorForm, self).__init__(parent) | 55 | super(MediaClipSelectorForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
466 | 56 | | QtCore.Qt.WindowTitleHint) | ||
467 | 56 | self.vlc_instance = None | 57 | self.vlc_instance = None |
468 | 57 | self.vlc_media_player = None | 58 | self.vlc_media_player = None |
469 | 58 | self.vlc_media = None | 59 | self.vlc_media = None |
470 | 59 | 60 | ||
471 | === modified file 'openlp/plugins/songs/forms/authorsform.py' | |||
472 | --- openlp/plugins/songs/forms/authorsform.py 2015-12-31 22:46:06 +0000 | |||
473 | +++ openlp/plugins/songs/forms/authorsform.py 2016-01-05 21:38:21 +0000 | |||
474 | @@ -20,7 +20,7 @@ | |||
475 | 20 | # Temple Place, Suite 330, Boston, MA 02111-1307 USA # | 20 | # Temple Place, Suite 330, Boston, MA 02111-1307 USA # |
476 | 21 | ############################################################################### | 21 | ############################################################################### |
477 | 22 | 22 | ||
479 | 23 | from PyQt5 import QtWidgets | 23 | from PyQt5 import QtCore, QtWidgets |
480 | 24 | 24 | ||
481 | 25 | from openlp.core.lib import translate | 25 | from openlp.core.lib import translate |
482 | 26 | from openlp.core.lib.ui import critical_error_message_box | 26 | from openlp.core.lib.ui import critical_error_message_box |
483 | @@ -35,7 +35,8 @@ | |||
484 | 35 | """ | 35 | """ |
485 | 36 | Set up the screen and common data | 36 | Set up the screen and common data |
486 | 37 | """ | 37 | """ |
488 | 38 | super(AuthorsForm, self).__init__(parent) | 38 | super(AuthorsForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
489 | 39 | | QtCore.Qt.WindowTitleHint) | ||
490 | 39 | self.setupUi(self) | 40 | self.setupUi(self) |
491 | 40 | self.auto_display_name = False | 41 | self.auto_display_name = False |
492 | 41 | self.first_name_edit.textEdited.connect(self.on_first_name_edited) | 42 | self.first_name_edit.textEdited.connect(self.on_first_name_edited) |
493 | 42 | 43 | ||
494 | === modified file 'openlp/plugins/songs/forms/editsongform.py' | |||
495 | --- openlp/plugins/songs/forms/editsongform.py 2015-12-31 22:46:06 +0000 | |||
496 | +++ openlp/plugins/songs/forms/editsongform.py 2016-01-05 21:38:21 +0000 | |||
497 | @@ -55,7 +55,8 @@ | |||
498 | 55 | """ | 55 | """ |
499 | 56 | Constructor | 56 | Constructor |
500 | 57 | """ | 57 | """ |
502 | 58 | super(EditSongForm, self).__init__(parent) | 58 | super(EditSongForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
503 | 59 | | QtCore.Qt.WindowTitleHint) | ||
504 | 59 | self.media_item = media_item | 60 | self.media_item = media_item |
505 | 60 | self.song = None | 61 | self.song = None |
506 | 61 | # can this be automated? | 62 | # can this be automated? |
507 | 62 | 63 | ||
508 | === modified file 'openlp/plugins/songs/forms/editverseform.py' | |||
509 | --- openlp/plugins/songs/forms/editverseform.py 2015-12-31 22:46:06 +0000 | |||
510 | +++ openlp/plugins/songs/forms/editverseform.py 2016-01-05 21:38:21 +0000 | |||
511 | @@ -23,7 +23,7 @@ | |||
512 | 23 | import re | 23 | import re |
513 | 24 | import logging | 24 | import logging |
514 | 25 | 25 | ||
516 | 26 | from PyQt5 import QtGui, QtWidgets | 26 | from PyQt5 import QtCore, QtGui, QtWidgets |
517 | 27 | 27 | ||
518 | 28 | from openlp.plugins.songs.lib import VerseType | 28 | from openlp.plugins.songs.lib import VerseType |
519 | 29 | from .editversedialog import Ui_EditVerseDialog | 29 | from .editversedialog import Ui_EditVerseDialog |
520 | @@ -41,7 +41,8 @@ | |||
521 | 41 | """ | 41 | """ |
522 | 42 | Constructor | 42 | Constructor |
523 | 43 | """ | 43 | """ |
525 | 44 | super(EditVerseForm, self).__init__(parent) | 44 | super(EditVerseForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
526 | 45 | | QtCore.Qt.WindowTitleHint) | ||
527 | 45 | self.setupUi(self) | 46 | self.setupUi(self) |
528 | 46 | self.has_single_verse = False | 47 | self.has_single_verse = False |
529 | 47 | self.insert_button.clicked.connect(self.on_insert_button_clicked) | 48 | self.insert_button.clicked.connect(self.on_insert_button_clicked) |
530 | 48 | 49 | ||
531 | === modified file 'openlp/plugins/songs/forms/mediafilesform.py' | |||
532 | --- openlp/plugins/songs/forms/mediafilesform.py 2015-12-31 22:46:06 +0000 | |||
533 | +++ openlp/plugins/songs/forms/mediafilesform.py 2016-01-05 21:38:21 +0000 | |||
534 | @@ -37,7 +37,8 @@ | |||
535 | 37 | log.info('%s MediaFilesForm loaded', __name__) | 37 | log.info('%s MediaFilesForm loaded', __name__) |
536 | 38 | 38 | ||
537 | 39 | def __init__(self, parent): | 39 | def __init__(self, parent): |
539 | 40 | super(MediaFilesForm, self).__init__() | 40 | super(MediaFilesForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
540 | 41 | | QtCore.Qt.WindowTitleHint) | ||
541 | 41 | self.setupUi(self) | 42 | self.setupUi(self) |
542 | 42 | 43 | ||
543 | 43 | def populate_files(self, files): | 44 | def populate_files(self, files): |
544 | 44 | 45 | ||
545 | === modified file 'openlp/plugins/songs/forms/songbookform.py' | |||
546 | --- openlp/plugins/songs/forms/songbookform.py 2015-12-31 22:46:06 +0000 | |||
547 | +++ openlp/plugins/songs/forms/songbookform.py 2016-01-05 21:38:21 +0000 | |||
548 | @@ -23,7 +23,7 @@ | |||
549 | 23 | This module contains the song book form | 23 | This module contains the song book form |
550 | 24 | """ | 24 | """ |
551 | 25 | 25 | ||
553 | 26 | from PyQt5 import QtWidgets | 26 | from PyQt5 import QtCore, QtWidgets |
554 | 27 | 27 | ||
555 | 28 | from openlp.core.lib import translate | 28 | from openlp.core.lib import translate |
556 | 29 | from openlp.core.lib.ui import critical_error_message_box | 29 | from openlp.core.lib.ui import critical_error_message_box |
557 | @@ -38,7 +38,8 @@ | |||
558 | 38 | """ | 38 | """ |
559 | 39 | Constructor | 39 | Constructor |
560 | 40 | """ | 40 | """ |
562 | 41 | super(SongBookForm, self).__init__(parent) | 41 | super(SongBookForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
563 | 42 | | QtCore.Qt.WindowTitleHint) | ||
564 | 42 | self.setupUi(self) | 43 | self.setupUi(self) |
565 | 43 | 44 | ||
566 | 44 | def exec(self, clear=True): | 45 | def exec(self, clear=True): |
567 | 45 | 46 | ||
568 | === modified file 'openlp/plugins/songs/forms/songmaintenanceform.py' | |||
569 | --- openlp/plugins/songs/forms/songmaintenanceform.py 2015-12-31 22:46:06 +0000 | |||
570 | +++ openlp/plugins/songs/forms/songmaintenanceform.py 2016-01-05 21:38:21 +0000 | |||
571 | @@ -44,7 +44,8 @@ | |||
572 | 44 | """ | 44 | """ |
573 | 45 | Constructor | 45 | Constructor |
574 | 46 | """ | 46 | """ |
576 | 47 | super(SongMaintenanceForm, self).__init__(parent) | 47 | super(SongMaintenanceForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
577 | 48 | | QtCore.Qt.WindowTitleHint) | ||
578 | 48 | self.setupUi(self) | 49 | self.setupUi(self) |
579 | 49 | self.manager = manager | 50 | self.manager = manager |
580 | 50 | self.author_form = AuthorsForm(self) | 51 | self.author_form = AuthorsForm(self) |
581 | 51 | 52 | ||
582 | === modified file 'openlp/plugins/songs/forms/songselectform.py' | |||
583 | --- openlp/plugins/songs/forms/songselectform.py 2015-12-31 22:46:06 +0000 | |||
584 | +++ openlp/plugins/songs/forms/songselectform.py 2016-01-05 21:38:21 +0000 | |||
585 | @@ -81,7 +81,8 @@ | |||
586 | 81 | """ | 81 | """ |
587 | 82 | 82 | ||
588 | 83 | def __init__(self, parent=None, plugin=None, db_manager=None): | 83 | def __init__(self, parent=None, plugin=None, db_manager=None): |
590 | 84 | QtWidgets.QDialog.__init__(self, parent) | 84 | QtWidgets.QDialog.__init__(self, parent, QtCore.Qt.WindowSystemMenuHint |
591 | 85 | | QtCore.Qt.WindowTitleHint) | ||
592 | 85 | self.plugin = plugin | 86 | self.plugin = plugin |
593 | 86 | self.db_manager = db_manager | 87 | self.db_manager = db_manager |
594 | 87 | self.setup_ui(self) | 88 | self.setup_ui(self) |
595 | 88 | 89 | ||
596 | === modified file 'openlp/plugins/songs/forms/topicsform.py' | |||
597 | --- openlp/plugins/songs/forms/topicsform.py 2015-12-31 22:46:06 +0000 | |||
598 | +++ openlp/plugins/songs/forms/topicsform.py 2016-01-05 21:38:21 +0000 | |||
599 | @@ -23,7 +23,7 @@ | |||
600 | 23 | This module contains the topic edit form. | 23 | This module contains the topic edit form. |
601 | 24 | """ | 24 | """ |
602 | 25 | 25 | ||
604 | 26 | from PyQt5 import QtWidgets | 26 | from PyQt5 import QtCore, QtWidgets |
605 | 27 | 27 | ||
606 | 28 | from openlp.core.lib import translate | 28 | from openlp.core.lib import translate |
607 | 29 | from openlp.core.lib.ui import critical_error_message_box | 29 | from openlp.core.lib.ui import critical_error_message_box |
608 | @@ -38,7 +38,8 @@ | |||
609 | 38 | """ | 38 | """ |
610 | 39 | Constructor | 39 | Constructor |
611 | 40 | """ | 40 | """ |
613 | 41 | super(TopicsForm, self).__init__(parent) | 41 | super(TopicsForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
614 | 42 | | QtCore.Qt.WindowTitleHint) | ||
615 | 42 | self.setupUi(self) | 43 | self.setupUi(self) |
616 | 43 | 44 | ||
617 | 44 | def exec(self, clear=True): | 45 | def exec(self, clear=True): |
618 | 45 | 46 | ||
619 | === modified file 'openlp/plugins/songusage/forms/songusagedeleteform.py' | |||
620 | --- openlp/plugins/songusage/forms/songusagedeleteform.py 2015-12-31 22:46:06 +0000 | |||
621 | +++ openlp/plugins/songusage/forms/songusagedeleteform.py 2016-01-05 21:38:21 +0000 | |||
622 | @@ -20,7 +20,7 @@ | |||
623 | 20 | # Temple Place, Suite 330, Boston, MA 02111-1307 USA # | 20 | # Temple Place, Suite 330, Boston, MA 02111-1307 USA # |
624 | 21 | ############################################################################### | 21 | ############################################################################### |
625 | 22 | 22 | ||
627 | 23 | from PyQt5 import QtWidgets | 23 | from PyQt5 import QtCore, QtWidgets |
628 | 24 | 24 | ||
629 | 25 | from openlp.core.common import RegistryProperties, translate | 25 | from openlp.core.common import RegistryProperties, translate |
630 | 26 | from openlp.plugins.songusage.lib.db import SongUsageItem | 26 | from openlp.plugins.songusage.lib.db import SongUsageItem |
631 | @@ -36,7 +36,8 @@ | |||
632 | 36 | Constructor | 36 | Constructor |
633 | 37 | """ | 37 | """ |
634 | 38 | self.manager = manager | 38 | self.manager = manager |
636 | 39 | super(SongUsageDeleteForm, self).__init__(parent) | 39 | super(SongUsageDeleteForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
637 | 40 | | QtCore.Qt.WindowTitleHint) | ||
638 | 40 | self.setupUi(self) | 41 | self.setupUi(self) |
639 | 41 | self.button_box.clicked.connect(self.on_button_box_clicked) | 42 | self.button_box.clicked.connect(self.on_button_box_clicked) |
640 | 42 | 43 | ||
641 | 43 | 44 | ||
642 | === modified file 'openlp/plugins/songusage/forms/songusagedetailform.py' | |||
643 | --- openlp/plugins/songusage/forms/songusagedetailform.py 2015-12-31 22:46:06 +0000 | |||
644 | +++ openlp/plugins/songusage/forms/songusagedetailform.py 2016-01-05 21:38:21 +0000 | |||
645 | @@ -23,7 +23,7 @@ | |||
646 | 23 | import logging | 23 | import logging |
647 | 24 | import os | 24 | import os |
648 | 25 | 25 | ||
650 | 26 | from PyQt5 import QtWidgets | 26 | from PyQt5 import QtCore, QtWidgets |
651 | 27 | from sqlalchemy.sql import and_ | 27 | from sqlalchemy.sql import and_ |
652 | 28 | 28 | ||
653 | 29 | from openlp.core.common import RegistryProperties, Settings, check_directory_exists, translate | 29 | from openlp.core.common import RegistryProperties, Settings, check_directory_exists, translate |
654 | @@ -44,7 +44,8 @@ | |||
655 | 44 | """ | 44 | """ |
656 | 45 | Initialise the form | 45 | Initialise the form |
657 | 46 | """ | 46 | """ |
659 | 47 | super(SongUsageDetailForm, self).__init__(parent) | 47 | super(SongUsageDetailForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint |
660 | 48 | | QtCore.Qt.WindowTitleHint) | ||
661 | 48 | self.plugin = plugin | 49 | self.plugin = plugin |
662 | 49 | self.setupUi(self) | 50 | self.setupUi(self) |
663 | 50 | 51 | ||
664 | 51 | 52 | ||
665 | === added file 'tests/functional/openlp_plugins/songs/test_songformat.py' | |||
666 | --- tests/functional/openlp_plugins/songs/test_songformat.py 1970-01-01 00:00:00 +0000 | |||
667 | +++ tests/functional/openlp_plugins/songs/test_songformat.py 2016-01-05 21:38:21 +0000 | |||
668 | @@ -0,0 +1,84 @@ | |||
669 | 1 | # -*- coding: utf-8 -*- | ||
670 | 2 | # vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4 | ||
671 | 3 | |||
672 | 4 | ############################################################################### | ||
673 | 5 | # OpenLP - Open Source Lyrics Projection # | ||
674 | 6 | # --------------------------------------------------------------------------- # | ||
675 | 7 | # Copyright (c) 2008-2015 OpenLP Developers # | ||
676 | 8 | # --------------------------------------------------------------------------- # | ||
677 | 9 | # This program is free software; you can redistribute it and/or modify it # | ||
678 | 10 | # under the terms of the GNU General Public License as published by the Free # | ||
679 | 11 | # Software Foundation; version 2 of the License. # | ||
680 | 12 | # # | ||
681 | 13 | # This program is distributed in the hope that it will be useful, but WITHOUT # | ||
682 | 14 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # | ||
683 | 15 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # | ||
684 | 16 | # more details. # | ||
685 | 17 | # # | ||
686 | 18 | # You should have received a copy of the GNU General Public License along # | ||
687 | 19 | # with this program; if not, write to the Free Software Foundation, Inc., 59 # | ||
688 | 20 | # Temple Place, Suite 330, Boston, MA 02111-1307 USA # | ||
689 | 21 | ############################################################################### | ||
690 | 22 | """ | ||
691 | 23 | This module contains tests for the SongFormat class | ||
692 | 24 | """ | ||
693 | 25 | from unittest import TestCase | ||
694 | 26 | |||
695 | 27 | from openlp.plugins.songs.lib.importer import SongFormat | ||
696 | 28 | |||
697 | 29 | |||
698 | 30 | class TestSongFormat(TestCase): | ||
699 | 31 | """ | ||
700 | 32 | Test the functions in the :class:`SongFormat` class. | ||
701 | 33 | """ | ||
702 | 34 | |||
703 | 35 | def test_get_format_list(self): | ||
704 | 36 | """ | ||
705 | 37 | Test that get_format_list() returns all available formats | ||
706 | 38 | """ | ||
707 | 39 | # GIVEN: The SongFormat class | ||
708 | 40 | # WHEN: Retrieving the format list | ||
709 | 41 | # THEN: All SongFormats should be returned | ||
710 | 42 | self.assertEquals(len(SongFormat.get_format_list()), len(SongFormat.__attributes__), | ||
711 | 43 | "The returned SongFormats don't match the stored ones") | ||
712 | 44 | |||
713 | 45 | def test_get_attributed_no_attributes(self): | ||
714 | 46 | """ | ||
715 | 47 | Test that SongFormat.get(song_format) returns all attributes associated with the given song_format | ||
716 | 48 | """ | ||
717 | 49 | # GIVEN: A SongFormat | ||
718 | 50 | # WHEN: Retrieving all attributes of a SongFormat | ||
719 | 51 | for song_format in SongFormat.get_format_list(): | ||
720 | 52 | # THEN: All attributes associated with the SongFormat should be returned | ||
721 | 53 | self.assertEquals(SongFormat.get(song_format), SongFormat.__attributes__[song_format], | ||
722 | 54 | "The returned attributes don't match the stored ones") | ||
723 | 55 | |||
724 | 56 | def test_get_attributed_single_attribute(self): | ||
725 | 57 | """ | ||
726 | 58 | Test that SongFormat.get(song_format, attribute) returns only one -and the correct- attribute | ||
727 | 59 | """ | ||
728 | 60 | # GIVEN: A SongFormat | ||
729 | 61 | for song_format in SongFormat.get_format_list(): | ||
730 | 62 | # WHEN: Retrieving an attribute that overrides the default values | ||
731 | 63 | for attribute in SongFormat.get(song_format).keys(): | ||
732 | 64 | # THEN: Return the attribute | ||
733 | 65 | self.assertEquals(SongFormat.get(song_format, attribute), SongFormat.get(song_format)[attribute], | ||
734 | 66 | "The returned attribute doesn't match the stored one") | ||
735 | 67 | # WHEN: Retrieving an attribute that was not overridden | ||
736 | 68 | for attribute in SongFormat.__defaults__.keys(): | ||
737 | 69 | if attribute not in SongFormat.get(song_format).keys(): | ||
738 | 70 | # THEN: Return the default value | ||
739 | 71 | self.assertEquals(SongFormat.get(song_format, attribute), SongFormat.__defaults__[attribute], | ||
740 | 72 | "The returned attribute does not match the default values stored") | ||
741 | 73 | |||
742 | 74 | def test_get_attributed_multiple_attributes(self): | ||
743 | 75 | """ | ||
744 | 76 | Test that multiple attributes can be retrieved for a song_format | ||
745 | 77 | """ | ||
746 | 78 | # GIVEN: A SongFormat | ||
747 | 79 | # WHEN: Retrieving multiple attributes at the same time | ||
748 | 80 | for song_format in SongFormat.get_format_list(): | ||
749 | 81 | # THEN: Return all attributes that were specified | ||
750 | 82 | self.assertEquals(len(SongFormat.get(song_format, 'canDisable', 'availability')), 2, | ||
751 | 83 | "Did not return the correct number of attributes when retrieving multiple attributes at once") | ||
752 | 84 |
Looks good, but we'll need a test. This fix might be hard to make a test for, so feel free to make test for something else.