From d71f0594330776bd05691b44b999716bf2be424e Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Fri, 4 Nov 2011 20:09:35 +0000 Subject: [PATCH 1/3] Fix impress and service theme problems --- openlp/core/lib/serviceitem.py | 7 ++++++- openlp/core/ui/aboutdialog.py | 2 +- openlp/core/utils/__init__.py | 7 ++++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/openlp/core/lib/serviceitem.py b/openlp/core/lib/serviceitem.py index 0eb0c866f..f69f861c7 100644 --- a/openlp/core/lib/serviceitem.py +++ b/openlp/core/lib/serviceitem.py @@ -118,6 +118,7 @@ class ServiceItem(object): self.from_service = False self.image_border = u'#000000' self.background_audio = [] + self.theme_overwritten = False self._new_item() def _new_item(self): @@ -273,7 +274,8 @@ class ServiceItem(object): u'start_time': self.start_time, u'end_time': self.end_time, u'media_length': self.media_length, - u'background_audio': self.background_audio + u'background_audio': self.background_audio, + u'theme_overwritten': self.theme_overwritten } service_data = [] if self.service_item_type == ServiceItemType.Text: @@ -323,6 +325,8 @@ class ServiceItem(object): self.media_length = header[u'media_length'] if u'background_audio' in header: self.background_audio = header[u'background_audio'] + if u'theme_overwritten' in header: + self.theme_overwritten = header[u'theme_overwritten'] if self.service_item_type == ServiceItemType.Text: for slide in serviceitem[u'serviceitem'][u'data']: self._raw_frames.append(slide) @@ -484,6 +488,7 @@ class ServiceItem(object): ``theme`` The new theme to be replaced in the service item """ + self.theme_overwritten = False if theme == None else True self.theme = theme self._new_item() self.render() diff --git a/openlp/core/ui/aboutdialog.py b/openlp/core/ui/aboutdialog.py index f4a732fb6..8216d3e7a 100644 --- a/openlp/core/ui/aboutdialog.py +++ b/openlp/core/ui/aboutdialog.py @@ -123,7 +123,7 @@ class Ui_AboutDialog(object): testers = [u'Philip "Phill" Ridout', u'Wesley "wrst" Stout', u'John "jseagull1" Cegalis (lead)'] packagers = ['Thomas "tabthorpe" Abthorpe (FreeBSD)', - u'Tim "TRB143" Bentley (Fedora)', + u'Tim "TRB143" Bentley (Fedora and Android)', u'Matthias "matthub" Hub (Mac OS X)', u'Stevan "ElderP" Pettit (Windows)', u'Raoul "superfly" Snyman (Ubuntu)'] diff --git a/openlp/core/utils/__init__.py b/openlp/core/utils/__init__.py index fbf185474..736e7756c 100644 --- a/openlp/core/utils/__init__.py +++ b/openlp/core/utils/__init__.py @@ -480,11 +480,12 @@ 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' \ + u' --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 516dda5ec3e249dd18086fb48fdc4d62bdab6e99 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sun, 13 Nov 2011 08:57:29 +0000 Subject: [PATCH 2/3] Fixes --- openlp/core/lib/serviceitem.py | 5 ++--- openlp/core/utils/__init__.py | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/openlp/core/lib/serviceitem.py b/openlp/core/lib/serviceitem.py index f69f861c7..b12a27f1d 100644 --- a/openlp/core/lib/serviceitem.py +++ b/openlp/core/lib/serviceitem.py @@ -325,8 +325,7 @@ class ServiceItem(object): self.media_length = header[u'media_length'] if u'background_audio' in header: self.background_audio = header[u'background_audio'] - if u'theme_overwritten' in header: - self.theme_overwritten = header[u'theme_overwritten'] + self.theme_overwritten = header.get(u'theme_overwritten', False) if self.service_item_type == ServiceItemType.Text: for slide in serviceitem[u'serviceitem'][u'data']: self._raw_frames.append(slide) @@ -488,7 +487,7 @@ class ServiceItem(object): ``theme`` The new theme to be replaced in the service item """ - self.theme_overwritten = False if theme == None else True + self.theme_overwritten = (theme == None) self.theme = theme self._new_item() self.render() diff --git a/openlp/core/utils/__init__.py b/openlp/core/utils/__init__.py index 736e7756c..fbf185474 100644 --- a/openlp/core/utils/__init__.py +++ b/openlp/core/utils/__init__.py @@ -480,12 +480,11 @@ def get_uno_command(): Returns the UNO command to launch an openoffice.org instance. """ COMMAND = u'soffice' - OPTIONS = u'--nologo --norestore --minimized --nodefault' \ - u' --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 04b965d166149dee2badecc943ed9b62b7388022 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sun, 13 Nov 2011 16:31:08 +0000 Subject: [PATCH 3/3] Fix incorrect signal --- openlp/plugins/remotes/lib/httpserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/plugins/remotes/lib/httpserver.py b/openlp/plugins/remotes/lib/httpserver.py index 522c354b8..acbe103a7 100644 --- a/openlp/plugins/remotes/lib/httpserver.py +++ b/openlp/plugins/remotes/lib/httpserver.py @@ -411,7 +411,7 @@ class HttpConnection(object): ``action`` This is the action, either ``hide`` or ``show``. """ - event = u'maindisplay_%s' % action + event = u'live_display_%s' % action Receiver.send_message(event, HideMode.Blank) return HttpResponse(json.dumps({u'results': {u'success': True}}), {u'Content-Type': u'application/json'})