diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index c8dd5e045..296809128 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -311,8 +311,8 @@ class Ui_MainWindow(object): self.export_language_item)) add_actions(self.file_menu, (self.file_new_item, self.file_open_item, self.file_save_item, self.file_save_as_item, self.recent_files_menu.menuAction(), None, - self.file_import_menu.menuAction(), self.file_export_menu.menuAction(), None, self.print_service_order_item, - self.file_exit_item)) + self.file_import_menu.menuAction(), self.file_export_menu.menuAction(), None, + self.print_service_order_item, self.file_exit_item)) add_actions(self.view_mode_menu, (self.mode_default_item, self.mode_setup_item, self.mode_live_item)) add_actions(self.view_menu, (self.view_mode_menu.menuAction(), None, self.view_media_manager_item, self.view_service_manager_item, self.view_theme_manager_item, None, self.view_preview_panel, diff --git a/openlp/core/ui/printserviceform.py b/openlp/core/ui/printserviceform.py index 1adb3290c..3a6fbe8c1 100644 --- a/openlp/core/ui/printserviceform.py +++ b/openlp/core/ui/printserviceform.py @@ -31,9 +31,10 @@ The actual print service dialog """ import datetime import os +import html +import lxml.html from PyQt4 import QtCore, QtGui -from lxml import html from openlp.core.common import Registry, Settings, UiStrings, translate from openlp.core.lib import get_text_file_string @@ -183,7 +184,7 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog): self._add_element( 'span', translate('OpenLP.ServiceManager', 'Custom Service Notes: '), div, classId='customNotesTitle') self._add_element('span', html.escape(self.footer_text_edit.toPlainText()), div, classId='customNotesText') - self.document.setHtml(html.tostring(html_data).decode()) + self.document.setHtml(lxml.html.tostring(html_data).decode()) self.preview_widget.updatePreview() def _add_preview_item(self, body, item, index): @@ -257,9 +258,9 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog): Tuple name/value pair to add as an optional attribute """ if text is not None: - element = html.fragment_fromstring(str(text), create_parent=tag) + element = lxml.html.fragment_fromstring(str(text), create_parent=tag) else: - element = html.Element(tag) + element = lxml.html.Element(tag) if parent is not None: parent.append(element) if classId is not None: diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index ce941688d..8a1989881 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -1627,7 +1627,7 @@ class ServiceManager(OpenLPMixin, RegistryMixin, QtGui.QWidget, Ui_ServiceManage else: return parent_item.data(0, QtCore.Qt.UserRole) - def print_service_order(self): + def print_service_order(self, field=None): """ Print a Service Order Sheet. """