diff --git a/openlp/.version b/openlp/.version index 5e9287b86..1fe2d3795 100644 --- a/openlp/.version +++ b/openlp/.version @@ -1 +1 @@ -1.9.11 +1.9.12 diff --git a/openlp/core/__init__.py b/openlp/core/__init__.py index 7ea737709..548a18c79 100644 --- a/openlp/core/__init__.py +++ b/openlp/core/__init__.py @@ -35,6 +35,7 @@ logging and a plugin framework are contained within the openlp.core module. import os import sys +import platform import logging from optparse import OptionParser from traceback import format_exception @@ -102,8 +103,13 @@ class OpenLP(QtGui.QApplication): Run the OpenLP application. """ self.eventLoopIsActive = False - # On Windows, the args passed into the constructor are - # ignored. Not very handy, so set the ones we want to use. + # On Windows, the args passed into the constructor are ignored. Not + # very handy, so set the ones we want to use. On Linux and FreeBSD, in + # order to set the WM_CLASS property for X11, we pass "OpenLP" in as a + # command line argument. This interferes with files being passed in as + # command line arguments, so we remove it from the list. + if 'OpenLP' in args: + args.remove('OpenLP') self.args.extend(args) # provide a listener for widgets to reqest a screen update. QtCore.QObject.connect(Receiver.get_receiver(), @@ -266,6 +272,9 @@ def main(args=None): qt_args.extend(['-style', options.style]) # Throw the rest of the arguments at Qt, just in case. qt_args.extend(args) + # Bug #1018855: Set the WM_CLASS property in X11 + if platform.system() not in ['Windows', 'Darwin']: + qt_args.append('OpenLP') # Initialise the resources qInitResources() # Now create and actually run the application. diff --git a/openlp/core/lib/renderer.py b/openlp/core/lib/renderer.py index 81d5361cb..f16568f06 100644 --- a/openlp/core/lib/renderer.py +++ b/openlp/core/lib/renderer.py @@ -256,7 +256,7 @@ class Renderer(object): if not self.force_page: self.display.buildHtml(serviceItem) raw_html = serviceItem.get_rendered_frame(0) - self.display.text(raw_html) + self.display.text(raw_html, False) preview = self.display.preview() return preview self.force_page = False @@ -365,7 +365,7 @@ class Renderer(object): The theme information """ if not theme_data.font_main_override: - return QtCore.QRect(10, 0, self.width, self.footer_start) + return QtCore.QRect(10, 0, self.width - 20, self.footer_start) else: return QtCore.QRect(theme_data.font_main_x, theme_data.font_main_y, theme_data.font_main_width - 1, theme_data.font_main_height - 1) @@ -406,7 +406,14 @@ class Renderer(object): if theme_data.font_main_shadow: self.page_width -= int(theme_data.font_main_shadow_size) self.page_height -= int(theme_data.font_main_shadow_size) + # For the life of my I don't know why we have to completely kill the + # QWebView in order for the display to work properly, but we do. See + # bug #1041366 for an example of what happens if we take this out. + self.web = None + self.web = QtWebKit.QWebView() + self.web.setVisible(False) self.web.resize(self.page_width, self.page_height) + self.web_frame = self.web.page().mainFrame() # Adjust width and height to account for shadow. outline done in css. html = u"""