From 54a1e25cb7e90a809977e937033b71bf13c02497 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Tue, 20 Sep 2011 18:24:07 +0200 Subject: [PATCH 1/3] Trying to fix bug #803342 --- openlp/core/utils/__init__.py | 6 +++--- openlp/plugins/presentations/lib/mediaitem.py | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/openlp/core/utils/__init__.py b/openlp/core/utils/__init__.py index 3612bb002..2d800d1b0 100644 --- a/openlp/core/utils/__init__.py +++ b/openlp/core/utils/__init__.py @@ -475,11 +475,11 @@ def get_uno_command(): Returns the UNO command to launch an openoffice.org instance. """ COMMAND = u'soffice' - OPTIONS = u'-nologo -norestore -minimized -nodefault -nofirststartwizard' + OPTIONS = u'--nologo --norestore --minimized --nodefault --nofirststartwizard' if UNO_CONNECTION_TYPE == u'pipe': - CONNECTION = u'"-accept=pipe,name=openlp_pipe;urp;"' + CONNECTION = u'"--accept=pipe,name=openlp_pipe;urp;"' else: - CONNECTION = u'"-accept=socket,host=localhost,port=2002;urp;"' + CONNECTION = u'"--accept=socket,host=localhost,port=2002;urp;"' return u'%s %s %s' % (COMMAND, OPTIONS, CONNECTION) def get_uno_instance(resolver): diff --git a/openlp/plugins/presentations/lib/mediaitem.py b/openlp/plugins/presentations/lib/mediaitem.py index 6c997a6b6..c6455a03a 100644 --- a/openlp/plugins/presentations/lib/mediaitem.py +++ b/openlp/plugins/presentations/lib/mediaitem.py @@ -56,6 +56,7 @@ class PresentationMediaItem(MediaManagerItem): MediaManagerItem.__init__(self, parent, plugin, icon) self.message_listener = MessageListener(self) self.hasSearch = True + self.singleServiceItem = False QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'mediaitem_presentation_rebuild'), self.rebuild) # Allow DnD from the desktop From bd3961eb5013adf04c2bcd8b9b18acd60bf5d01d Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Tue, 20 Sep 2011 18:26:04 +0200 Subject: [PATCH 2/3] Reverted a change for deprecated options (for now). --- openlp/core/utils/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openlp/core/utils/__init__.py b/openlp/core/utils/__init__.py index 2d800d1b0..3612bb002 100644 --- a/openlp/core/utils/__init__.py +++ b/openlp/core/utils/__init__.py @@ -475,11 +475,11 @@ def get_uno_command(): Returns the UNO command to launch an openoffice.org instance. """ COMMAND = u'soffice' - OPTIONS = u'--nologo --norestore --minimized --nodefault --nofirststartwizard' + OPTIONS = u'-nologo -norestore -minimized -nodefault -nofirststartwizard' if UNO_CONNECTION_TYPE == u'pipe': - CONNECTION = u'"--accept=pipe,name=openlp_pipe;urp;"' + CONNECTION = u'"-accept=pipe,name=openlp_pipe;urp;"' else: - CONNECTION = u'"--accept=socket,host=localhost,port=2002;urp;"' + CONNECTION = u'"-accept=socket,host=localhost,port=2002;urp;"' return u'%s %s %s' % (COMMAND, OPTIONS, CONNECTION) def get_uno_instance(resolver): From b0dc146043361df166dc616dc3d6840b5594789b Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Tue, 20 Sep 2011 19:53:09 +0200 Subject: [PATCH 3/3] Added the default background colour back in so that the rest of the app that is not expecting to have to supply a background colour doesn't have to be changed. Fixes: https://launchpad.net/bugs/803342 --- openlp/core/lib/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index 1454f877e..e24045883 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -144,7 +144,7 @@ def image_to_byte(image): # convert to base64 encoding so does not get missed! return byte_array.toBase64() -def resize_image(image_path, width, height, background): +def resize_image(image_path, width, height, background=u'#000000'): """ Resize an image to fit on the current screen. @@ -159,6 +159,8 @@ def resize_image(image_path, width, height, background): ``background`` The background colour defaults to black. + + DO NOT REMOVE THE DEFAULT BACKGROUND VALUE! """ log.debug(u'resize_image - start') reader = QtGui.QImageReader(image_path)