Merge lp:~trb143/openlp/alpha_fixes into lp:openlp
- alpha_fixes
- Merge into trunk
Proposed by
Tim Bentley
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Raoul Snyman | ||||
Approved revision: | 2897 | ||||
Merged at revision: | 2888 | ||||
Proposed branch: | lp:~trb143/openlp/alpha_fixes | ||||
Merge into: | lp:openlp | ||||
Diff against target: |
204 lines (+34/-20) 10 files modified
openlp/core/common/settings.py (+7/-6) openlp/core/display/render.py (+1/-0) openlp/core/display/screens.py (+7/-2) openlp/core/threading.py (+2/-1) openlp/core/ui/mainwindow.py (+4/-1) openlp/core/ui/printserviceform.py (+5/-5) openlp/core/ui/servicemanager.py (+2/-1) openlp/core/ui/thememanager.py (+3/-2) openlp/plugins/custom/lib/mediaitem.py (+1/-1) openlp/plugins/songs/forms/editsongform.py (+2/-1) |
||||
To merge this branch: | bzr merge lp:~trb143/openlp/alpha_fixes | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Raoul Snyman | Approve | ||
Phill | Approve | ||
Review via email: mp+370938@code.launchpad.net |
This proposal supersedes a proposal from 2019-08-04.
Commit message
Fixes all over the place.
* Migration from 2.4 to trunk now handles the screen definitions
* Custom generation from service manager works again
* Print service works
* Open last service works again.
Description of the change
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 | # |
Revision history for this message
Raoul Snyman (raoul-snyman) wrote : Posted in a previous version of this proposal | # |
Linting failed, please see https:/
Revision history for this message
Phill (phill-ridout) wrote : Posted in a previous version of this proposal | # |
See inlines
review:
Needs Fixing
Revision history for this message
Raoul Snyman (raoul-snyman) wrote : Posted in a previous version of this proposal | # |
Linux tests passed!
Revision history for this message
Raoul Snyman (raoul-snyman) wrote : Posted in a previous version of this proposal | # |
Linting failed, please see https:/
Revision history for this message
Raoul Snyman (raoul-snyman) wrote : Posted in a previous version of this proposal | # |
Linux tests passed!
Revision history for this message
Raoul Snyman (raoul-snyman) wrote : Posted in a previous version of this proposal | # |
Linting passed!
Revision history for this message
Phill (phill-ridout) wrote : Posted in a previous version of this proposal | # |
One more, sorry I didn't mention it earlier
Revision history for this message
Raoul Snyman (raoul-snyman) wrote : | # |
Linux tests passed!
Revision history for this message
Raoul Snyman (raoul-snyman) wrote : | # |
Linting passed!
Revision history for this message
Phill (phill-ridout) : | # |
review:
Approve
Revision history for this message
Raoul Snyman (raoul-snyman) : | # |
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 2019-06-21 20:53:42 +0000 | |||
3 | +++ openlp/core/common/settings.py 2019-08-04 15:58:13 +0000 | |||
4 | @@ -90,12 +90,13 @@ | |||
5 | 90 | number: { | 90 | number: { |
6 | 91 | 'number': number, | 91 | 'number': number, |
7 | 92 | geometry_key: { | 92 | geometry_key: { |
12 | 93 | 'x': x_position, | 93 | 'x': int(x_position), |
13 | 94 | 'y': y_position, | 94 | 'y': int(y_position), |
14 | 95 | 'height': height, | 95 | 'height': int(height), |
15 | 96 | 'width': width | 96 | 'width': int(width) |
16 | 97 | }, | 97 | }, |
18 | 98 | 'is_display': is_display_screen | 98 | 'is_display': is_display_screen, |
19 | 99 | 'is_primary': can_override | ||
20 | 99 | } | 100 | } |
21 | 100 | } | 101 | } |
22 | 101 | 102 | ||
23 | @@ -309,7 +310,7 @@ | |||
24 | 309 | ('songuasge/db hostname', 'songusage/db hostname', []), | 310 | ('songuasge/db hostname', 'songusage/db hostname', []), |
25 | 310 | ('songuasge/db database', 'songusage/db database', []), | 311 | ('songuasge/db database', 'songusage/db database', []), |
26 | 311 | ('presentations / Powerpoint Viewer', '', []), | 312 | ('presentations / Powerpoint Viewer', '', []), |
28 | 312 | (['core/monitor', 'core/x position', 'core/y position', 'core/height', 'core/width', 'core/override', | 313 | (['core/monitor', 'core/x position', 'core/y position', 'core/height', 'core/width', 'core/override position', |
29 | 313 | 'core/display on monitor'], 'core/screens', [(upgrade_screens, [1, 0, 0, None, None, False, False])]), | 314 | 'core/display on monitor'], 'core/screens', [(upgrade_screens, [1, 0, 0, None, None, False, False])]), |
30 | 314 | ('bibles/proxy name', '', []), # Just remove these bible proxy settings. They weren't used in 2.4! | 315 | ('bibles/proxy name', '', []), # Just remove these bible proxy settings. They weren't used in 2.4! |
31 | 315 | ('bibles/proxy address', '', []), | 316 | ('bibles/proxy address', '', []), |
32 | 316 | 317 | ||
33 | === modified file 'openlp/core/display/render.py' | |||
34 | --- openlp/core/display/render.py 2019-06-09 20:22:43 +0000 | |||
35 | +++ openlp/core/display/render.py 2019-08-04 15:58:13 +0000 | |||
36 | @@ -482,6 +482,7 @@ | |||
37 | 482 | 482 | ||
38 | 483 | :param theme_data: The theme to generated a preview for. | 483 | :param theme_data: The theme to generated a preview for. |
39 | 484 | :param force_page: Flag to tell message lines per page need to be generated. | 484 | :param force_page: Flag to tell message lines per page need to be generated. |
40 | 485 | :param generate_screenshot: Do I need to generate a screen shot? | ||
41 | 485 | :rtype: QtGui.QPixmap | 486 | :rtype: QtGui.QPixmap |
42 | 486 | """ | 487 | """ |
43 | 487 | # save value for use in format_slide | 488 | # save value for use in format_slide |
44 | 488 | 489 | ||
45 | === modified file 'openlp/core/display/screens.py' | |||
46 | --- openlp/core/display/screens.py 2019-04-13 13:00:22 +0000 | |||
47 | +++ openlp/core/display/screens.py 2019-08-04 15:58:13 +0000 | |||
48 | @@ -133,8 +133,13 @@ | |||
49 | 133 | self.number = int(screen_dict['number']) | 133 | self.number = int(screen_dict['number']) |
50 | 134 | self.is_display = screen_dict['is_display'] | 134 | self.is_display = screen_dict['is_display'] |
51 | 135 | self.is_primary = screen_dict['is_primary'] | 135 | self.is_primary = screen_dict['is_primary'] |
54 | 136 | self.geometry = QtCore.QRect(screen_dict['geometry']['x'], screen_dict['geometry']['y'], | 136 | try: |
55 | 137 | screen_dict['geometry']['width'], screen_dict['geometry']['height']) | 137 | self.geometry = QtCore.QRect(screen_dict['geometry']['x'], screen_dict['geometry']['y'], |
56 | 138 | screen_dict['geometry']['width'], screen_dict['geometry']['height']) | ||
57 | 139 | except KeyError: | ||
58 | 140 | # Preserve the current values as this has come from the settings update which does not have | ||
59 | 141 | # the geometry information | ||
60 | 142 | pass | ||
61 | 138 | if 'custom_geometry' in screen_dict: | 143 | if 'custom_geometry' in screen_dict: |
62 | 139 | self.custom_geometry = QtCore.QRect(screen_dict['custom_geometry']['x'], | 144 | self.custom_geometry = QtCore.QRect(screen_dict['custom_geometry']['x'], |
63 | 140 | screen_dict['custom_geometry']['y'], | 145 | screen_dict['custom_geometry']['y'], |
64 | 141 | 146 | ||
65 | === modified file 'openlp/core/threading.py' | |||
66 | --- openlp/core/threading.py 2019-04-13 13:00:22 +0000 | |||
67 | +++ openlp/core/threading.py 2019-08-04 15:58:13 +0000 | |||
68 | @@ -24,10 +24,11 @@ | |||
69 | 24 | """ | 24 | """ |
70 | 25 | from PyQt5 import QtCore | 25 | from PyQt5 import QtCore |
71 | 26 | 26 | ||
72 | 27 | from openlp.core.common.mixins import LogMixin | ||
73 | 27 | from openlp.core.common.registry import Registry | 28 | from openlp.core.common.registry import Registry |
74 | 28 | 29 | ||
75 | 29 | 30 | ||
77 | 30 | class ThreadWorker(QtCore.QObject): | 31 | class ThreadWorker(QtCore.QObject, LogMixin): |
78 | 31 | """ | 32 | """ |
79 | 32 | The :class:`~openlp.core.threading.ThreadWorker` class provides a base class for all worker objects | 33 | The :class:`~openlp.core.threading.ThreadWorker` class provides a base class for all worker objects |
80 | 33 | """ | 34 | """ |
81 | 34 | 35 | ||
82 | === modified file 'openlp/core/ui/mainwindow.py' | |||
83 | --- openlp/core/ui/mainwindow.py 2019-07-01 22:36:14 +0000 | |||
84 | +++ openlp/core/ui/mainwindow.py 2019-08-04 15:58:13 +0000 | |||
85 | @@ -635,7 +635,10 @@ | |||
86 | 635 | # if self.live_controller.display.isVisible(): | 635 | # if self.live_controller.display.isVisible(): |
87 | 636 | # self.live_controller.display.setFocus() | 636 | # self.live_controller.display.setFocus() |
88 | 637 | self.activateWindow() | 637 | self.activateWindow() |
90 | 638 | if self.application.args: | 638 | # We have -disable-web-security added by our code. |
91 | 639 | # If a file is passed in we will have that as well so count of 2 | ||
92 | 640 | # If not we need to see if we want to use the previous file.so count of 1 | ||
93 | 641 | if self.application.args and len(self.application.args) > 1: | ||
94 | 639 | self.open_cmd_line_files(self.application.args) | 642 | self.open_cmd_line_files(self.application.args) |
95 | 640 | elif Settings().value(self.general_settings_section + '/auto open'): | 643 | elif Settings().value(self.general_settings_section + '/auto open'): |
96 | 641 | self.service_manager_contents.load_last_file() | 644 | self.service_manager_contents.load_last_file() |
97 | 642 | 645 | ||
98 | === modified file 'openlp/core/ui/printserviceform.py' | |||
99 | --- openlp/core/ui/printserviceform.py 2019-04-28 19:21:23 +0000 | |||
100 | +++ openlp/core/ui/printserviceform.py 2019-08-04 15:58:13 +0000 | |||
101 | @@ -219,13 +219,13 @@ | |||
102 | 219 | verse_def = None | 219 | verse_def = None |
103 | 220 | verse_html = None | 220 | verse_html = None |
104 | 221 | for slide in item.get_frames(): | 221 | for slide in item.get_frames(): |
106 | 222 | if not verse_def or verse_def != slide['verseTag'] or verse_html == slide['printing_html']: | 222 | if not verse_def or verse_def != slide['verse'] or verse_html == slide['text']: |
107 | 223 | text_div = self._add_element('div', parent=div, class_id='itemText') | 223 | text_div = self._add_element('div', parent=div, class_id='itemText') |
109 | 224 | elif 'chordspacing' not in slide['printing_html']: | 224 | elif 'chordspacing' not in slide['text']: |
110 | 225 | self._add_element('br', parent=text_div) | 225 | self._add_element('br', parent=text_div) |
114 | 226 | self._add_element('span', slide['printing_html'], text_div) | 226 | self._add_element('span', slide['text'], text_div) |
115 | 227 | verse_def = slide['verseTag'] | 227 | verse_def = slide['verse'] |
116 | 228 | verse_html = slide['printing_html'] | 228 | verse_html = slide['text'] |
117 | 229 | # Break the page before the div element. | 229 | # Break the page before the div element. |
118 | 230 | if index != 0 and self.page_break_after_text.isChecked(): | 230 | if index != 0 and self.page_break_after_text.isChecked(): |
119 | 231 | div.set('class', 'item newPage') | 231 | div.set('class', 'item newPage') |
120 | 232 | 232 | ||
121 | === modified file 'openlp/core/ui/servicemanager.py' | |||
122 | --- openlp/core/ui/servicemanager.py 2019-06-11 18:40:20 +0000 | |||
123 | +++ openlp/core/ui/servicemanager.py 2019-08-04 15:58:13 +0000 | |||
124 | @@ -34,6 +34,7 @@ | |||
125 | 34 | 34 | ||
126 | 35 | from PyQt5 import QtCore, QtGui, QtWidgets | 35 | from PyQt5 import QtCore, QtGui, QtWidgets |
127 | 36 | 36 | ||
128 | 37 | from openlp.core.state import State | ||
129 | 37 | from openlp.core.common import ThemeLevel, delete_file | 38 | from openlp.core.common import ThemeLevel, delete_file |
130 | 38 | from openlp.core.common.actions import ActionList, CategoryOrder | 39 | from openlp.core.common.actions import ActionList, CategoryOrder |
131 | 39 | from openlp.core.common.applocation import AppLocation | 40 | from openlp.core.common.applocation import AppLocation |
132 | @@ -828,7 +829,7 @@ | |||
133 | 828 | self.auto_start_action.setIcon(UiIcons().inactive) | 829 | self.auto_start_action.setIcon(UiIcons().inactive) |
134 | 829 | self.auto_start_action.setText(translate('OpenLP.ServiceManager', '&Auto Start - inactive')) | 830 | self.auto_start_action.setText(translate('OpenLP.ServiceManager', '&Auto Start - inactive')) |
135 | 830 | if service_item['service_item'].is_text(): | 831 | if service_item['service_item'].is_text(): |
137 | 831 | for plugin in self.plugin_manager.plugins: | 832 | for plugin in State().list_plugins(): |
138 | 832 | if plugin.name == 'custom' and plugin.status == PluginStatus.Active: | 833 | if plugin.name == 'custom' and plugin.status == PluginStatus.Active: |
139 | 833 | self.create_custom_action.setVisible(True) | 834 | self.create_custom_action.setVisible(True) |
140 | 834 | break | 835 | break |
141 | 835 | 836 | ||
142 | === modified file 'openlp/core/ui/thememanager.py' | |||
143 | --- openlp/core/ui/thememanager.py 2019-06-11 19:11:54 +0000 | |||
144 | +++ openlp/core/ui/thememanager.py 2019-08-04 15:58:13 +0000 | |||
145 | @@ -30,6 +30,7 @@ | |||
146 | 30 | 30 | ||
147 | 31 | from PyQt5 import QtCore, QtWidgets | 31 | from PyQt5 import QtCore, QtWidgets |
148 | 32 | 32 | ||
149 | 33 | from openlp.core.state import State | ||
150 | 33 | from openlp.core.common import delete_file | 34 | from openlp.core.common import delete_file |
151 | 34 | from openlp.core.common.applocation import AppLocation | 35 | from openlp.core.common.applocation import AppLocation |
152 | 35 | from openlp.core.common.i18n import UiStrings, get_locale_key, translate | 36 | from openlp.core.common.i18n import UiStrings, get_locale_key, translate |
153 | @@ -293,7 +294,7 @@ | |||
154 | 293 | old_theme_data = self.get_theme_data(old_theme_name) | 294 | old_theme_data = self.get_theme_data(old_theme_name) |
155 | 294 | self.clone_theme_data(old_theme_data, new_theme_name) | 295 | self.clone_theme_data(old_theme_data, new_theme_name) |
156 | 295 | self.delete_theme(old_theme_name) | 296 | self.delete_theme(old_theme_name) |
158 | 296 | for plugin in self.plugin_manager.plugins: | 297 | for plugin in State().list_plugins(): |
159 | 297 | if plugin.uses_theme(old_theme_name): | 298 | if plugin.uses_theme(old_theme_name): |
160 | 298 | plugin.rename_theme(old_theme_name, new_theme_name) | 299 | plugin.rename_theme(old_theme_name, new_theme_name) |
161 | 299 | self.renderer.set_theme(self.get_theme_data(new_theme_name)) | 300 | self.renderer.set_theme(self.get_theme_data(new_theme_name)) |
162 | @@ -771,7 +772,7 @@ | |||
163 | 771 | # check for use in the system else where. | 772 | # check for use in the system else where. |
164 | 772 | if test_plugin: | 773 | if test_plugin: |
165 | 773 | plugin_usage = "" | 774 | plugin_usage = "" |
167 | 774 | for plugin in self.plugin_manager.plugins: | 775 | for plugin in State().list_plugins(): |
168 | 775 | used_count = plugin.uses_theme(theme) | 776 | used_count = plugin.uses_theme(theme) |
169 | 776 | if used_count: | 777 | if used_count: |
170 | 777 | plugin_usage = "{plug}{text}".format(plug=plugin_usage, | 778 | plugin_usage = "{plug}{text}".format(plug=plugin_usage, |
171 | 778 | 779 | ||
172 | === modified file 'openlp/plugins/custom/lib/mediaitem.py' | |||
173 | --- openlp/plugins/custom/lib/mediaitem.py 2019-04-13 13:00:22 +0000 | |||
174 | +++ openlp/plugins/custom/lib/mediaitem.py 2019-08-04 15:58:13 +0000 | |||
175 | @@ -349,7 +349,7 @@ | |||
176 | 349 | custom.credits = '' | 349 | custom.credits = '' |
177 | 350 | custom_xml = CustomXMLBuilder() | 350 | custom_xml = CustomXMLBuilder() |
178 | 351 | for (idx, slide) in enumerate(item.slides): | 351 | for (idx, slide) in enumerate(item.slides): |
180 | 352 | custom_xml.add_verse_to_lyrics('custom', str(idx + 1), slide['raw_slide']) | 352 | custom_xml.add_verse_to_lyrics('custom', str(idx + 1), slide['text']) |
181 | 353 | custom.text = str(custom_xml.extract_xml(), 'utf-8') | 353 | custom.text = str(custom_xml.extract_xml(), 'utf-8') |
182 | 354 | self.plugin.db_manager.save_object(custom) | 354 | self.plugin.db_manager.save_object(custom) |
183 | 355 | self.on_search_text_button_clicked() | 355 | self.on_search_text_button_clicked() |
184 | 356 | 356 | ||
185 | === modified file 'openlp/plugins/songs/forms/editsongform.py' | |||
186 | --- openlp/plugins/songs/forms/editsongform.py 2019-05-22 06:47:00 +0000 | |||
187 | +++ openlp/plugins/songs/forms/editsongform.py 2019-08-04 15:58:13 +0000 | |||
188 | @@ -29,6 +29,7 @@ | |||
189 | 29 | 29 | ||
190 | 30 | from PyQt5 import QtCore, QtWidgets | 30 | from PyQt5 import QtCore, QtWidgets |
191 | 31 | 31 | ||
192 | 32 | from openlp.core.state import State | ||
193 | 32 | from openlp.core.common.applocation import AppLocation | 33 | from openlp.core.common.applocation import AppLocation |
194 | 33 | from openlp.core.common.i18n import UiStrings, get_natural_key, translate | 34 | from openlp.core.common.i18n import UiStrings, get_natural_key, translate |
195 | 34 | from openlp.core.common.mixins import RegistryProperties | 35 | from openlp.core.common.mixins import RegistryProperties |
196 | @@ -416,7 +417,7 @@ | |||
197 | 416 | Load the media files into a combobox. | 417 | Load the media files into a combobox. |
198 | 417 | """ | 418 | """ |
199 | 418 | self.from_media_button.setVisible(False) | 419 | self.from_media_button.setVisible(False) |
201 | 419 | for plugin in self.plugin_manager.plugins: | 420 | for plugin in State().list_plugins(): |
202 | 420 | if plugin.name == 'media' and plugin.status == PluginStatus.Active: | 421 | if plugin.name == 'media' and plugin.status == PluginStatus.Active: |
203 | 421 | self.from_media_button.setVisible(True) | 422 | self.from_media_button.setVisible(True) |
204 | 422 | self.media_form.populate_files(plugin.media_item.get_list(MediaType.Audio)) | 423 | self.media_form.populate_files(plugin.media_item.get_list(MediaType.Audio)) |
Linux tests passed!