forked from openlp/openlp
Make display blanking work correctly
This commit is contained in:
parent
e6e6eeb7c0
commit
d6912adbf8
@ -576,12 +576,12 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
self.ServiceManagerContents.onLoadService(True)
|
self.ServiceManagerContents.onLoadService(True)
|
||||||
if str_to_bool(self.generalConfig.get_config(u'screen blank', False)) \
|
if str_to_bool(self.generalConfig.get_config(u'screen blank', False)) \
|
||||||
and str_to_bool(self.generalConfig.get_config(u'blank warning', False)):
|
and str_to_bool(self.generalConfig.get_config(u'blank warning', False)):
|
||||||
|
self.LiveController.onBlankDisplay(True)
|
||||||
QtGui.QMessageBox.question(self,
|
QtGui.QMessageBox.question(self,
|
||||||
self.trUtf8('OpenLP Main Display Blanked'),
|
self.trUtf8('OpenLP Main Display Blanked'),
|
||||||
self.trUtf8('The Main Display has been blanked out'),
|
self.trUtf8('The Main Display has been blanked out'),
|
||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
|
||||||
QtGui.QMessageBox.Ok)
|
QtGui.QMessageBox.Ok)
|
||||||
self.LiveController.blankButton.setChecked(True)
|
|
||||||
|
|
||||||
def onHelpAboutItemClicked(self):
|
def onHelpAboutItemClicked(self):
|
||||||
"""
|
"""
|
||||||
|
@ -164,9 +164,9 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.Toolbar.addToolbarSeparator(u'Close Separator')
|
self.Toolbar.addToolbarSeparator(u'Close Separator')
|
||||||
self.blankButton = self.Toolbar.addToolbarButton(
|
self.blankButton = self.Toolbar.addToolbarButton(
|
||||||
u'Blank Screen', u':/slides/slide_close.png',
|
u'Blank Screen', u':/slides/slide_close.png',
|
||||||
self.trUtf8('Blank Screen'), self.onBlankScreen, True)
|
self.trUtf8('Blank Screen'), self.onBlankDisplay, True)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'live_slide_blank'), self.onBlankDisplay)
|
QtCore.SIGNAL(u'live_slide_blank'), self.blankScreen)
|
||||||
if not self.isLive:
|
if not self.isLive:
|
||||||
self.Toolbar.addToolbarSeparator(u'Close Separator')
|
self.Toolbar.addToolbarSeparator(u'Close Separator')
|
||||||
self.Toolbar.addToolbarButton(
|
self.Toolbar.addToolbarButton(
|
||||||
@ -485,12 +485,19 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.PreviewListWidget.selectRow(0)
|
self.PreviewListWidget.selectRow(0)
|
||||||
self.onSlideSelected()
|
self.onSlideSelected()
|
||||||
|
|
||||||
def onBlankDisplay(self):
|
def onBlankDisplay(self, force=False):
|
||||||
self.blankButton.setChecked(self.parent.mainDisplay.displayBlank)
|
|
||||||
|
|
||||||
def onBlankScreen(self, blanked):
|
|
||||||
"""
|
"""
|
||||||
Blank the screen.
|
Handle the blank screen button
|
||||||
|
"""
|
||||||
|
if force:
|
||||||
|
self.blankButton.setChecked(True)
|
||||||
|
self.blankScreen(self.blankButton.isChecked())
|
||||||
|
self.parent.generalConfig.set_config(u'screen blank',
|
||||||
|
self.blankButton.isChecked())
|
||||||
|
|
||||||
|
def blankScreen(self, blanked=False):
|
||||||
|
"""
|
||||||
|
Blank the display screen.
|
||||||
"""
|
"""
|
||||||
if self.serviceItem is not None:
|
if self.serviceItem is not None:
|
||||||
if self.serviceItem.is_command():
|
if self.serviceItem.is_command():
|
||||||
|
Loading…
Reference in New Issue
Block a user