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

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
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.

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 : 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
=== modified file 'openlp/core/common/settings.py'
--- openlp/core/common/settings.py 2019-06-21 20:53:42 +0000
+++ openlp/core/common/settings.py 2019-08-04 15:58:13 +0000
@@ -90,12 +90,13 @@
90 number: {90 number: {
91 'number': number,91 'number': number,
92 geometry_key: {92 geometry_key: {
93 'x': x_position,93 'x': int(x_position),
94 'y': y_position,94 'y': int(y_position),
95 'height': height,95 'height': int(height),
96 'width': width96 'width': int(width)
97 },97 },
98 'is_display': is_display_screen98 'is_display': is_display_screen,
99 'is_primary': can_override
99 }100 }
100 }101 }
101102
@@ -309,7 +310,7 @@
309 ('songuasge/db hostname', 'songusage/db hostname', []),310 ('songuasge/db hostname', 'songusage/db hostname', []),
310 ('songuasge/db database', 'songusage/db database', []),311 ('songuasge/db database', 'songusage/db database', []),
311 ('presentations / Powerpoint Viewer', '', []),312 ('presentations / Powerpoint Viewer', '', []),
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',
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])]),
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!
315 ('bibles/proxy address', '', []),316 ('bibles/proxy address', '', []),
316317
=== modified file 'openlp/core/display/render.py'
--- openlp/core/display/render.py 2019-06-09 20:22:43 +0000
+++ openlp/core/display/render.py 2019-08-04 15:58:13 +0000
@@ -482,6 +482,7 @@
482482
483 :param theme_data: The theme to generated a preview for.483 :param theme_data: The theme to generated a preview for.
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.
485 :param generate_screenshot: Do I need to generate a screen shot?
485 :rtype: QtGui.QPixmap486 :rtype: QtGui.QPixmap
486 """487 """
487 # save value for use in format_slide488 # save value for use in format_slide
488489
=== modified file 'openlp/core/display/screens.py'
--- openlp/core/display/screens.py 2019-04-13 13:00:22 +0000
+++ openlp/core/display/screens.py 2019-08-04 15:58:13 +0000
@@ -133,8 +133,13 @@
133 self.number = int(screen_dict['number'])133 self.number = int(screen_dict['number'])
134 self.is_display = screen_dict['is_display']134 self.is_display = screen_dict['is_display']
135 self.is_primary = screen_dict['is_primary']135 self.is_primary = screen_dict['is_primary']
136 self.geometry = QtCore.QRect(screen_dict['geometry']['x'], screen_dict['geometry']['y'],136 try:
137 screen_dict['geometry']['width'], screen_dict['geometry']['height'])137 self.geometry = QtCore.QRect(screen_dict['geometry']['x'], screen_dict['geometry']['y'],
138 screen_dict['geometry']['width'], screen_dict['geometry']['height'])
139 except KeyError:
140 # Preserve the current values as this has come from the settings update which does not have
141 # the geometry information
142 pass
138 if 'custom_geometry' in screen_dict:143 if 'custom_geometry' in screen_dict:
139 self.custom_geometry = QtCore.QRect(screen_dict['custom_geometry']['x'],144 self.custom_geometry = QtCore.QRect(screen_dict['custom_geometry']['x'],
140 screen_dict['custom_geometry']['y'],145 screen_dict['custom_geometry']['y'],
141146
=== modified file 'openlp/core/threading.py'
--- openlp/core/threading.py 2019-04-13 13:00:22 +0000
+++ openlp/core/threading.py 2019-08-04 15:58:13 +0000
@@ -24,10 +24,11 @@
24"""24"""
25from PyQt5 import QtCore25from PyQt5 import QtCore
2626
27from openlp.core.common.mixins import LogMixin
27from openlp.core.common.registry import Registry28from openlp.core.common.registry import Registry
2829
2930
30class ThreadWorker(QtCore.QObject):31class ThreadWorker(QtCore.QObject, LogMixin):
31 """32 """
32 The :class:`~openlp.core.threading.ThreadWorker` class provides a base class for all worker objects33 The :class:`~openlp.core.threading.ThreadWorker` class provides a base class for all worker objects
33 """34 """
3435
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2019-07-01 22:36:14 +0000
+++ openlp/core/ui/mainwindow.py 2019-08-04 15:58:13 +0000
@@ -635,7 +635,10 @@
635 # if self.live_controller.display.isVisible():635 # if self.live_controller.display.isVisible():
636 # self.live_controller.display.setFocus()636 # self.live_controller.display.setFocus()
637 self.activateWindow()637 self.activateWindow()
638 if self.application.args:638 # We have -disable-web-security added by our code.
639 # If a file is passed in we will have that as well so count of 2
640 # If not we need to see if we want to use the previous file.so count of 1
641 if self.application.args and len(self.application.args) > 1:
639 self.open_cmd_line_files(self.application.args)642 self.open_cmd_line_files(self.application.args)
640 elif Settings().value(self.general_settings_section + '/auto open'):643 elif Settings().value(self.general_settings_section + '/auto open'):
641 self.service_manager_contents.load_last_file()644 self.service_manager_contents.load_last_file()
642645
=== modified file 'openlp/core/ui/printserviceform.py'
--- openlp/core/ui/printserviceform.py 2019-04-28 19:21:23 +0000
+++ openlp/core/ui/printserviceform.py 2019-08-04 15:58:13 +0000
@@ -219,13 +219,13 @@
219 verse_def = None219 verse_def = None
220 verse_html = None220 verse_html = None
221 for slide in item.get_frames():221 for slide in item.get_frames():
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']:
223 text_div = self._add_element('div', parent=div, class_id='itemText')223 text_div = self._add_element('div', parent=div, class_id='itemText')
224 elif 'chordspacing' not in slide['printing_html']:224 elif 'chordspacing' not in slide['text']:
225 self._add_element('br', parent=text_div)225 self._add_element('br', parent=text_div)
226 self._add_element('span', slide['printing_html'], text_div)226 self._add_element('span', slide['text'], text_div)
227 verse_def = slide['verseTag']227 verse_def = slide['verse']
228 verse_html = slide['printing_html']228 verse_html = slide['text']
229 # Break the page before the div element.229 # Break the page before the div element.
230 if index != 0 and self.page_break_after_text.isChecked():230 if index != 0 and self.page_break_after_text.isChecked():
231 div.set('class', 'item newPage')231 div.set('class', 'item newPage')
232232
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py 2019-06-11 18:40:20 +0000
+++ openlp/core/ui/servicemanager.py 2019-08-04 15:58:13 +0000
@@ -34,6 +34,7 @@
3434
35from PyQt5 import QtCore, QtGui, QtWidgets35from PyQt5 import QtCore, QtGui, QtWidgets
3636
37from openlp.core.state import State
37from openlp.core.common import ThemeLevel, delete_file38from openlp.core.common import ThemeLevel, delete_file
38from openlp.core.common.actions import ActionList, CategoryOrder39from openlp.core.common.actions import ActionList, CategoryOrder
39from openlp.core.common.applocation import AppLocation40from openlp.core.common.applocation import AppLocation
@@ -828,7 +829,7 @@
828 self.auto_start_action.setIcon(UiIcons().inactive)829 self.auto_start_action.setIcon(UiIcons().inactive)
829 self.auto_start_action.setText(translate('OpenLP.ServiceManager', '&Auto Start - inactive'))830 self.auto_start_action.setText(translate('OpenLP.ServiceManager', '&Auto Start - inactive'))
830 if service_item['service_item'].is_text():831 if service_item['service_item'].is_text():
831 for plugin in self.plugin_manager.plugins:832 for plugin in State().list_plugins():
832 if plugin.name == 'custom' and plugin.status == PluginStatus.Active:833 if plugin.name == 'custom' and plugin.status == PluginStatus.Active:
833 self.create_custom_action.setVisible(True)834 self.create_custom_action.setVisible(True)
834 break835 break
835836
=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py 2019-06-11 19:11:54 +0000
+++ openlp/core/ui/thememanager.py 2019-08-04 15:58:13 +0000
@@ -30,6 +30,7 @@
3030
31from PyQt5 import QtCore, QtWidgets31from PyQt5 import QtCore, QtWidgets
3232
33from openlp.core.state import State
33from openlp.core.common import delete_file34from openlp.core.common import delete_file
34from openlp.core.common.applocation import AppLocation35from openlp.core.common.applocation import AppLocation
35from openlp.core.common.i18n import UiStrings, get_locale_key, translate36from openlp.core.common.i18n import UiStrings, get_locale_key, translate
@@ -293,7 +294,7 @@
293 old_theme_data = self.get_theme_data(old_theme_name)294 old_theme_data = self.get_theme_data(old_theme_name)
294 self.clone_theme_data(old_theme_data, new_theme_name)295 self.clone_theme_data(old_theme_data, new_theme_name)
295 self.delete_theme(old_theme_name)296 self.delete_theme(old_theme_name)
296 for plugin in self.plugin_manager.plugins:297 for plugin in State().list_plugins():
297 if plugin.uses_theme(old_theme_name):298 if plugin.uses_theme(old_theme_name):
298 plugin.rename_theme(old_theme_name, new_theme_name)299 plugin.rename_theme(old_theme_name, new_theme_name)
299 self.renderer.set_theme(self.get_theme_data(new_theme_name))300 self.renderer.set_theme(self.get_theme_data(new_theme_name))
@@ -771,7 +772,7 @@
771 # check for use in the system else where.772 # check for use in the system else where.
772 if test_plugin:773 if test_plugin:
773 plugin_usage = ""774 plugin_usage = ""
774 for plugin in self.plugin_manager.plugins:775 for plugin in State().list_plugins():
775 used_count = plugin.uses_theme(theme)776 used_count = plugin.uses_theme(theme)
776 if used_count:777 if used_count:
777 plugin_usage = "{plug}{text}".format(plug=plugin_usage,778 plugin_usage = "{plug}{text}".format(plug=plugin_usage,
778779
=== modified file 'openlp/plugins/custom/lib/mediaitem.py'
--- openlp/plugins/custom/lib/mediaitem.py 2019-04-13 13:00:22 +0000
+++ openlp/plugins/custom/lib/mediaitem.py 2019-08-04 15:58:13 +0000
@@ -349,7 +349,7 @@
349 custom.credits = ''349 custom.credits = ''
350 custom_xml = CustomXMLBuilder()350 custom_xml = CustomXMLBuilder()
351 for (idx, slide) in enumerate(item.slides):351 for (idx, slide) in enumerate(item.slides):
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'])
353 custom.text = str(custom_xml.extract_xml(), 'utf-8')353 custom.text = str(custom_xml.extract_xml(), 'utf-8')
354 self.plugin.db_manager.save_object(custom)354 self.plugin.db_manager.save_object(custom)
355 self.on_search_text_button_clicked()355 self.on_search_text_button_clicked()
356356
=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py 2019-05-22 06:47:00 +0000
+++ openlp/plugins/songs/forms/editsongform.py 2019-08-04 15:58:13 +0000
@@ -29,6 +29,7 @@
2929
30from PyQt5 import QtCore, QtWidgets30from PyQt5 import QtCore, QtWidgets
3131
32from openlp.core.state import State
32from openlp.core.common.applocation import AppLocation33from openlp.core.common.applocation import AppLocation
33from openlp.core.common.i18n import UiStrings, get_natural_key, translate34from openlp.core.common.i18n import UiStrings, get_natural_key, translate
34from openlp.core.common.mixins import RegistryProperties35from openlp.core.common.mixins import RegistryProperties
@@ -416,7 +417,7 @@
416 Load the media files into a combobox.417 Load the media files into a combobox.
417 """418 """
418 self.from_media_button.setVisible(False)419 self.from_media_button.setVisible(False)
419 for plugin in self.plugin_manager.plugins:420 for plugin in State().list_plugins():
420 if plugin.name == 'media' and plugin.status == PluginStatus.Active:421 if plugin.name == 'media' and plugin.status == PluginStatus.Active:
421 self.from_media_button.setVisible(True)422 self.from_media_button.setVisible(True)
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))