forked from openlp/openlp
parent
4d8a241eca
commit
1c35810fa5
@ -567,19 +567,36 @@ class SlideController(QtGui.QWidget):
|
||||
"""
|
||||
log.debug(u'processManagerItem live = %s' % self.isLive)
|
||||
self.onStopLoop()
|
||||
# If old item was a command tell it to stop
|
||||
if self.serviceItem:
|
||||
# If old item was a command tell it to stop.
|
||||
if self.serviceItem.is_command():
|
||||
Receiver.send_message(u'%s_stop' %
|
||||
self.serviceItem.name.lower(), [serviceItem, self.isLive])
|
||||
# If the old item had its own display, we have to restore the menu.
|
||||
if self.isLive and self.serviceItem.is_capable(
|
||||
ItemCapabilities.ProvidesOwnDisplay):
|
||||
self.toolbar.actions[u'Hide Menu'].setVisible(True)
|
||||
action = self.hideMenu.defaultAction()
|
||||
# Re check the current blank mode, so that the current item will
|
||||
# not ignore it.
|
||||
if self.blankScreen == action:
|
||||
self.onBlankDisplay(action.isChecked())
|
||||
elif self.themeScreen == action:
|
||||
self.onThemeDisplay(action.isChecked())
|
||||
elif self.desktopScreen == action:
|
||||
self.onHideDisplay(action.isChecked())
|
||||
if self.serviceItem.is_media():
|
||||
self.onMediaClose()
|
||||
blanked = False
|
||||
if self.isLive:
|
||||
if serviceItem.is_capable(ItemCapabilities.ProvidesOwnDisplay):
|
||||
self._forceUnblank()
|
||||
blanked = self.blankScreen.isChecked()
|
||||
# Hide the menu and the screen. Note, that we do not want to use
|
||||
# onHideDisplay, as we want to be able to restore the current
|
||||
# hide mode.
|
||||
self.toolbar.actions[u'Hide Menu'].setVisible(False)
|
||||
Receiver.send_message(u'maindisplay_hide', HideMode.Screen)
|
||||
else:
|
||||
blanked = False
|
||||
blanked = self.blankScreen.isChecked()
|
||||
Receiver.send_message(u'%s_start' % serviceItem.name.lower(),
|
||||
[serviceItem, self.isLive, blanked, slideno])
|
||||
self.slideList = {}
|
||||
@ -1094,21 +1111,3 @@ class SlideController(QtGui.QWidget):
|
||||
self.video.hide()
|
||||
self.slidePreview.clear()
|
||||
self.slidePreview.show()
|
||||
|
||||
def _forceUnblank(self):
|
||||
"""
|
||||
Used by command items which provide their own displays to reset the
|
||||
screen hide attributes
|
||||
"""
|
||||
blank = None
|
||||
if self.blankScreen.isChecked:
|
||||
blank = self.blankScreen
|
||||
if self.themeScreen.isChecked:
|
||||
blank = self.themeScreen
|
||||
if self.desktopScreen.isChecked:
|
||||
blank = self.desktopScreen
|
||||
if blank:
|
||||
blank.setChecked(False)
|
||||
self.hideMenu.setDefaultAction(blank)
|
||||
QtCore.QSettings().remove(
|
||||
self.parent.generalSettingsSection + u'/screen blank')
|
||||
|
@ -333,7 +333,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