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()
|
webkitvers = webkit_version()
|
||||||
# Image generated and poked in
|
# Image generated and poked in
|
||||||
if background:
|
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:
|
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:
|
else:
|
||||||
bgimage = u'style="display:none;"'
|
bgimage_src = u'style="display:none;"'
|
||||||
if image:
|
if image:
|
||||||
image_src = u'src="data:image/png;base64,%s"' % image
|
image_src = u'src="data:image/png;base64,%s"' % image
|
||||||
else:
|
else:
|
||||||
@ -359,7 +359,7 @@ def build_html(item, screen, alert, islive, background, image=None):
|
|||||||
build_lyrics_css(item, webkitvers),
|
build_lyrics_css(item, webkitvers),
|
||||||
u'true' if theme and theme.display_slide_transition and islive \
|
u'true' if theme and theme.display_slide_transition and islive \
|
||||||
else u'false',
|
else u'false',
|
||||||
bgimage, image_src,
|
bgimage_src, image_src,
|
||||||
build_lyrics_html(item, webkitvers))
|
build_lyrics_html(item, webkitvers))
|
||||||
return html
|
return html
|
||||||
|
|
||||||
|
@ -365,7 +365,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
QtCore.SIGNAL(u'config_screen_changed'), self.screenSizeChanged)
|
QtCore.SIGNAL(u'config_screen_changed'), self.screenSizeChanged)
|
||||||
|
|
||||||
def setPreviewHotkeys(self, parent=None):
|
def setPreviewHotkeys(self, parent=None):
|
||||||
self.previousItem.setObjectName(u'previousItemPreview')
|
self.previousItem.setObjectName(u'previousItemPreview')
|
||||||
self.nextItem.setObjectName(u'nextItemPreview')
|
self.nextItem.setObjectName(u'nextItemPreview')
|
||||||
action_list = ActionList.get_instance()
|
action_list = ActionList.get_instance()
|
||||||
action_list.add_category(
|
action_list.add_category(
|
||||||
@ -374,7 +374,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
action_list.add_action(self.nextItem, UiStrings.PreviewToolbar)
|
action_list.add_action(self.nextItem, UiStrings.PreviewToolbar)
|
||||||
|
|
||||||
def setLiveHotkeys(self, parent=None):
|
def setLiveHotkeys(self, parent=None):
|
||||||
self.previousItem.setObjectName(u'previousItemLive')
|
self.previousItem.setObjectName(u'previousItemLive')
|
||||||
self.nextItem.setObjectName(u'nextItemLive')
|
self.nextItem.setObjectName(u'nextItemLive')
|
||||||
action_list = ActionList.get_instance()
|
action_list = ActionList.get_instance()
|
||||||
action_list.add_category(
|
action_list.add_category(
|
||||||
@ -575,6 +575,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
log.debug(u'processManagerItem live = %s' % self.isLive)
|
log.debug(u'processManagerItem live = %s' % self.isLive)
|
||||||
self.onStopLoop()
|
self.onStopLoop()
|
||||||
old_item = self.serviceItem
|
old_item = self.serviceItem
|
||||||
|
self.serviceItem = serviceItem
|
||||||
if old_item and self.isLive and old_item.is_capable(
|
if old_item and self.isLive and old_item.is_capable(
|
||||||
ItemCapabilities.ProvidesOwnDisplay):
|
ItemCapabilities.ProvidesOwnDisplay):
|
||||||
self._resetBlank()
|
self._resetBlank()
|
||||||
@ -582,7 +583,6 @@ class SlideController(QtGui.QWidget):
|
|||||||
[serviceItem, self.isLive, self.hideMode(), slideno])
|
[serviceItem, self.isLive, self.hideMode(), slideno])
|
||||||
self.slideList = {}
|
self.slideList = {}
|
||||||
width = self.parent.controlSplitter.sizes()[self.split]
|
width = self.parent.controlSplitter.sizes()[self.split]
|
||||||
self.serviceItem = serviceItem
|
|
||||||
self.previewListWidget.clear()
|
self.previewListWidget.clear()
|
||||||
self.previewListWidget.setRowCount(0)
|
self.previewListWidget.setRowCount(0)
|
||||||
self.previewListWidget.setColumnWidth(0, width)
|
self.previewListWidget.setColumnWidth(0, width)
|
||||||
@ -642,7 +642,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.__updatePreviewSelection(slideno)
|
self.__updatePreviewSelection(slideno)
|
||||||
self.enableToolBar(serviceItem)
|
self.enableToolBar(serviceItem)
|
||||||
# Pass to display for viewing.
|
# 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
|
# flashing on the screen
|
||||||
if not self.serviceItem.is_image():
|
if not self.serviceItem.is_image():
|
||||||
self.display.buildHtml(self.serviceItem)
|
self.display.buildHtml(self.serviceItem)
|
||||||
@ -1136,6 +1136,8 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.onThemeDisplay(True)
|
self.onThemeDisplay(True)
|
||||||
elif hide_mode == HideMode.Screen:
|
elif hide_mode == HideMode.Screen:
|
||||||
self.onHideDisplay(True)
|
self.onHideDisplay(True)
|
||||||
|
else:
|
||||||
|
self.hidePlugin(False)
|
||||||
|
|
||||||
def hideMode(self):
|
def hideMode(self):
|
||||||
"""
|
"""
|
||||||
|
@ -173,12 +173,8 @@ class Controller(object):
|
|||||||
Based on the handler passed at startup triggers slide show to shut down
|
Based on the handler passed at startup triggers slide show to shut down
|
||||||
"""
|
"""
|
||||||
log.debug(u'Live = %s, shutdown' % self.is_live)
|
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.close_presentation()
|
||||||
self.doc = None
|
self.doc = None
|
||||||
#self.doc.slidenumber = 0
|
|
||||||
#self.timer.stop()
|
|
||||||
|
|
||||||
def blank(self, hide_mode):
|
def blank(self, hide_mode):
|
||||||
"""
|
"""
|
||||||
@ -345,7 +341,6 @@ class MessageListener(object):
|
|||||||
"""
|
"""
|
||||||
is_live = message[1]
|
is_live = message[1]
|
||||||
if is_live:
|
if is_live:
|
||||||
Receiver.send_message(u'maindisplay_show')
|
|
||||||
self.live_handler.shutdown()
|
self.live_handler.shutdown()
|
||||||
else:
|
else:
|
||||||
self.preview_handler.shutdown()
|
self.preview_handler.shutdown()
|
||||||
|
Loading…
Reference in New Issue
Block a user