forked from openlp/openlp
Switching from ppt to songs now fine
This commit is contained in:
parent
d45423569f
commit
4286f6389d
@ -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
|
||||
|
||||
|
@ -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):
|
||||
"""
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user