Merge lp:~trb143/openlp/alpha_fixes into lp:openlp

Proposed by Tim Bentley
Status: Superseded
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
Reviewer Review Type Date Requested Status
Phill Pending
Review via email: mp+370937@code.launchpad.net

This proposal supersedes a proposal from 2019-08-04.

This proposal has been superseded by 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.

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

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://ci.openlp.io/job/MP-03-Linting/142/ for more details

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://ci.openlp.io/job/MP-03-Linting/143/ for more details

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) wrote :

One more, sorry I didn't mention it earlier

lp:~trb143/openlp/alpha_fixes updated
2897. By Tim Bentley

minor fix

Unmerged revisions

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:56:15 +0000
4@@ -90,12 +90,13 @@
5 number: {
6 'number': number,
7 geometry_key: {
8- 'x': x_position,
9- 'y': y_position,
10- 'height': height,
11- 'width': width
12+ 'x': int(x_position),
13+ 'y': int(y_position),
14+ 'height': int(height),
15+ 'width': int(width)
16 },
17- 'is_display': is_display_screen
18+ 'is_display': is_display_screen,
19+ 'is_primary': can_override
20 }
21 }
22
23@@ -309,7 +310,7 @@
24 ('songuasge/db hostname', 'songusage/db hostname', []),
25 ('songuasge/db database', 'songusage/db database', []),
26 ('presentations / Powerpoint Viewer', '', []),
27- (['core/monitor', 'core/x position', 'core/y position', 'core/height', 'core/width', 'core/override',
28+ (['core/monitor', 'core/x position', 'core/y position', 'core/height', 'core/width', 'core/override position',
29 'core/display on monitor'], 'core/screens', [(upgrade_screens, [1, 0, 0, None, None, False, False])]),
30 ('bibles/proxy name', '', []), # Just remove these bible proxy settings. They weren't used in 2.4!
31 ('bibles/proxy address', '', []),
32
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:56:15 +0000
36@@ -482,6 +482,7 @@
37
38 :param theme_data: The theme to generated a preview for.
39 :param force_page: Flag to tell message lines per page need to be generated.
40+ :param generate_screenshot: Do I need to generate a screen shot?
41 :rtype: QtGui.QPixmap
42 """
43 # save value for use in format_slide
44
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:56:15 +0000
48@@ -133,8 +133,13 @@
49 self.number = int(screen_dict['number'])
50 self.is_display = screen_dict['is_display']
51 self.is_primary = screen_dict['is_primary']
52- self.geometry = QtCore.QRect(screen_dict['geometry']['x'], screen_dict['geometry']['y'],
53- screen_dict['geometry']['width'], screen_dict['geometry']['height'])
54+ try:
55+ self.geometry = QtCore.QRect(screen_dict['geometry']['x'], screen_dict['geometry']['y'],
56+ screen_dict['geometry']['width'], screen_dict['geometry']['height'])
57+ except KeyError:
58+ # Preserve the current values as this has come from the settings update which does not have
59+ # the geometry information
60+ pass
61 if 'custom_geometry' in screen_dict:
62 self.custom_geometry = QtCore.QRect(screen_dict['custom_geometry']['x'],
63 screen_dict['custom_geometry']['y'],
64
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:56:15 +0000
68@@ -24,10 +24,11 @@
69 """
70 from PyQt5 import QtCore
71
72+from openlp.core.common.mixins import LogMixin
73 from openlp.core.common.registry import Registry
74
75
76-class ThreadWorker(QtCore.QObject):
77+class ThreadWorker(QtCore.QObject, LogMixin):
78 """
79 The :class:`~openlp.core.threading.ThreadWorker` class provides a base class for all worker objects
80 """
81
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:56:15 +0000
85@@ -635,7 +635,10 @@
86 # if self.live_controller.display.isVisible():
87 # self.live_controller.display.setFocus()
88 self.activateWindow()
89- if self.application.args:
90+ # We have -disable-web-security added by our code.
91+ # If a file is passed in we will have that as well so count of 2
92+ # If not we need to see if we want to use the previous file.so count of 1
93+ if self.application.args and len(self.application.args) > 1:
94 self.open_cmd_line_files(self.application.args)
95 elif Settings().value(self.general_settings_section + '/auto open'):
96 self.service_manager_contents.load_last_file()
97
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:56:15 +0000
101@@ -219,13 +219,13 @@
102 verse_def = None
103 verse_html = None
104 for slide in item.get_frames():
105- if not verse_def or verse_def != slide['verseTag'] or verse_html == slide['printing_html']:
106+ if not verse_def or verse_def != slide['verse'] or verse_html == slide['text']:
107 text_div = self._add_element('div', parent=div, class_id='itemText')
108- elif 'chordspacing' not in slide['printing_html']:
109+ elif 'chordspacing' not in slide['text']:
110 self._add_element('br', parent=text_div)
111- self._add_element('span', slide['printing_html'], text_div)
112- verse_def = slide['verseTag']
113- verse_html = slide['printing_html']
114+ self._add_element('span', slide['text'], text_div)
115+ verse_def = slide['verse']
116+ verse_html = slide['text']
117 # Break the page before the div element.
118 if index != 0 and self.page_break_after_text.isChecked():
119 div.set('class', 'item newPage')
120
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:56:15 +0000
124@@ -34,6 +34,7 @@
125
126 from PyQt5 import QtCore, QtGui, QtWidgets
127
128+from openlp.core.state import State
129 from openlp.core.common import ThemeLevel, delete_file
130 from openlp.core.common.actions import ActionList, CategoryOrder
131 from openlp.core.common.applocation import AppLocation
132@@ -828,7 +829,7 @@
133 self.auto_start_action.setIcon(UiIcons().inactive)
134 self.auto_start_action.setText(translate('OpenLP.ServiceManager', '&Auto Start - inactive'))
135 if service_item['service_item'].is_text():
136- for plugin in self.plugin_manager.plugins:
137+ for plugin in State().list_plugins():
138 if plugin.name == 'custom' and plugin.status == PluginStatus.Active:
139 self.create_custom_action.setVisible(True)
140 break
141
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:56:15 +0000
145@@ -30,6 +30,7 @@
146
147 from PyQt5 import QtCore, QtWidgets
148
149+from openlp.core.state import State
150 from openlp.core.common import delete_file
151 from openlp.core.common.applocation import AppLocation
152 from openlp.core.common.i18n import UiStrings, get_locale_key, translate
153@@ -293,7 +294,7 @@
154 old_theme_data = self.get_theme_data(old_theme_name)
155 self.clone_theme_data(old_theme_data, new_theme_name)
156 self.delete_theme(old_theme_name)
157- for plugin in self.plugin_manager.plugins:
158+ for plugin in State().list_plugins():
159 if plugin.uses_theme(old_theme_name):
160 plugin.rename_theme(old_theme_name, new_theme_name)
161 self.renderer.set_theme(self.get_theme_data(new_theme_name))
162@@ -771,7 +772,7 @@
163 # check for use in the system else where.
164 if test_plugin:
165 plugin_usage = ""
166- for plugin in self.plugin_manager.plugins:
167+ for plugin in State().list_plugins():
168 used_count = plugin.uses_theme(theme)
169 if used_count:
170 plugin_usage = "{plug}{text}".format(plug=plugin_usage,
171
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:56:15 +0000
175@@ -349,7 +349,7 @@
176 custom.credits = ''
177 custom_xml = CustomXMLBuilder()
178 for (idx, slide) in enumerate(item.slides):
179- custom_xml.add_verse_to_lyrics('custom', str(idx + 1), slide['raw_slide'])
180+ custom_xml.add_verse_to_lyrics('custom', str(idx + 1), slide['text'])
181 custom.text = str(custom_xml.extract_xml(), 'utf-8')
182 self.plugin.db_manager.save_object(custom)
183 self.on_search_text_button_clicked()
184
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:56:15 +0000
188@@ -29,6 +29,7 @@
189
190 from PyQt5 import QtCore, QtWidgets
191
192+from openlp.core.state import State
193 from openlp.core.common.applocation import AppLocation
194 from openlp.core.common.i18n import UiStrings, get_natural_key, translate
195 from openlp.core.common.mixins import RegistryProperties
196@@ -416,7 +417,7 @@
197 Load the media files into a combobox.
198 """
199 self.from_media_button.setVisible(False)
200- for plugin in self.plugin_manager.plugins:
201+ for plugin in State().list_plugins():
202 if plugin.name == 'media' and plugin.status == PluginStatus.Active:
203 self.from_media_button.setVisible(True)
204 self.media_form.populate_files(plugin.media_item.get_list(MediaType.Audio))