From 4286f6389dda9888a90b61857e34ea7765c43d81 Mon Sep 17 00:00:00 2001 From: Jonathan Corwin Date: Thu, 14 Apr 2011 22:34:01 +0100 Subject: [PATCH] Switching from ppt to songs now fine --- openlp/core/lib/htmlbuilder.py | 8 ++++---- openlp/core/ui/slidecontroller.py | 10 ++++++---- openlp/plugins/presentations/lib/messagelistener.py | 5 ----- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/openlp/core/lib/htmlbuilder.py b/openlp/core/lib/htmlbuilder.py index 2ba235265..1f2d2498d 100644 --- a/openlp/core/lib/htmlbuilder.py +++ b/openlp/core/lib/htmlbuilder.py @@ -343,11 +343,11 @@ def build_html(item, screen, alert, islive, background, image=None): webkitvers = webkit_version() # Image generated and poked in if background: - bgimage = u'src="data:image/png;base64,%s"' % background + bgimage_src = u'src="data:image/png;base64,%s"' % background elif item.bg_image_bytes: - bgimage = u'src="data:image/png;base64,%s"' % item.bg_image_bytes + bgimage_src = u'src="data:image/png;base64,%s"' % item.bg_image_bytes else: - bgimage = u'style="display:none;"' + bgimage_src = u'style="display:none;"' if image: image_src = u'src="data:image/png;base64,%s"' % image else: @@ -359,7 +359,7 @@ def build_html(item, screen, alert, islive, background, image=None): build_lyrics_css(item, webkitvers), u'true' if theme and theme.display_slide_transition and islive \ else u'false', - bgimage, image_src, + bgimage_src, image_src, build_lyrics_html(item, webkitvers)) return html diff --git a/openlp/core/ui/slidecontroller.py b/openlp/core/ui/slidecontroller.py index b940b1e73..7110ddf02 100644 --- a/openlp/core/ui/slidecontroller.py +++ b/openlp/core/ui/slidecontroller.py @@ -365,7 +365,7 @@ class SlideController(QtGui.QWidget): QtCore.SIGNAL(u'config_screen_changed'), self.screenSizeChanged) def setPreviewHotkeys(self, parent=None): - self.previousItem.setObjectName(u'previousItemPreview') + self.previousItem.setObjectName(u'previousItemPreview') self.nextItem.setObjectName(u'nextItemPreview') action_list = ActionList.get_instance() action_list.add_category( @@ -374,7 +374,7 @@ class SlideController(QtGui.QWidget): action_list.add_action(self.nextItem, UiStrings.PreviewToolbar) def setLiveHotkeys(self, parent=None): - self.previousItem.setObjectName(u'previousItemLive') + self.previousItem.setObjectName(u'previousItemLive') self.nextItem.setObjectName(u'nextItemLive') action_list = ActionList.get_instance() action_list.add_category( @@ -575,6 +575,7 @@ class SlideController(QtGui.QWidget): log.debug(u'processManagerItem live = %s' % self.isLive) self.onStopLoop() old_item = self.serviceItem + self.serviceItem = serviceItem if old_item and self.isLive and old_item.is_capable( ItemCapabilities.ProvidesOwnDisplay): self._resetBlank() @@ -582,7 +583,6 @@ class SlideController(QtGui.QWidget): [serviceItem, self.isLive, self.hideMode(), slideno]) self.slideList = {} width = self.parent.controlSplitter.sizes()[self.split] - self.serviceItem = serviceItem self.previewListWidget.clear() self.previewListWidget.setRowCount(0) self.previewListWidget.setColumnWidth(0, width) @@ -642,7 +642,7 @@ class SlideController(QtGui.QWidget): self.__updatePreviewSelection(slideno) self.enableToolBar(serviceItem) # Pass to display for viewing. - # Postpone image build, we need to do this later to avoid theme + # Postpone image build, we need to do this later to avoid the theme # flashing on the screen if not self.serviceItem.is_image(): self.display.buildHtml(self.serviceItem) @@ -1136,6 +1136,8 @@ class SlideController(QtGui.QWidget): self.onThemeDisplay(True) elif hide_mode == HideMode.Screen: self.onHideDisplay(True) + else: + self.hidePlugin(False) def hideMode(self): """ diff --git a/openlp/plugins/presentations/lib/messagelistener.py b/openlp/plugins/presentations/lib/messagelistener.py index b76fd7d4c..94cd2bfa4 100644 --- a/openlp/plugins/presentations/lib/messagelistener.py +++ b/openlp/plugins/presentations/lib/messagelistener.py @@ -173,12 +173,8 @@ class Controller(object): Based on the handler passed at startup triggers slide show to shut down """ log.debug(u'Live = %s, shutdown' % self.is_live) - if self.is_live: - Receiver.send_message(u'maindisplay_show') self.doc.close_presentation() self.doc = None - #self.doc.slidenumber = 0 - #self.timer.stop() def blank(self, hide_mode): """ @@ -345,7 +341,6 @@ class MessageListener(object): """ is_live = message[1] if is_live: - Receiver.send_message(u'maindisplay_show') self.live_handler.shutdown() else: self.preview_handler.shutdown()