forked from openlp/openlp
Allow the exit conformation dialog to be disabled
bzr-revno: 1186
This commit is contained in:
commit
38524576ef
@ -90,6 +90,10 @@ class AdvancedTab(SettingsTab):
|
|||||||
self.expandServiceItemCheckBox.setObjectName(
|
self.expandServiceItemCheckBox.setObjectName(
|
||||||
u'expandServiceItemCheckBox')
|
u'expandServiceItemCheckBox')
|
||||||
self.uiLayout.addWidget(self.expandServiceItemCheckBox)
|
self.uiLayout.addWidget(self.expandServiceItemCheckBox)
|
||||||
|
self.enableAutoCloseCheckBox = QtGui.QCheckBox(self.uiGroupBox)
|
||||||
|
self.enableAutoCloseCheckBox.setObjectName(
|
||||||
|
u'enableAutoCloseCheckBox')
|
||||||
|
self.uiLayout.addWidget(self.enableAutoCloseCheckBox)
|
||||||
# self.sharedDirGroupBox = QtGui.QGroupBox(self.leftWidget)
|
# self.sharedDirGroupBox = QtGui.QGroupBox(self.leftWidget)
|
||||||
# self.sharedDirGroupBox.setObjectName(u'sharedDirGroupBox')
|
# self.sharedDirGroupBox.setObjectName(u'sharedDirGroupBox')
|
||||||
# self.sharedDirGroupBox.setGeometry(QtCore.QRect(0, 65, 500, 85))
|
# self.sharedDirGroupBox.setGeometry(QtCore.QRect(0, 65, 500, 85))
|
||||||
@ -150,6 +154,8 @@ class AdvancedTab(SettingsTab):
|
|||||||
'Double-click to send items straight to live'))
|
'Double-click to send items straight to live'))
|
||||||
self.expandServiceItemCheckBox.setText(translate('OpenLP.AdvancedTab',
|
self.expandServiceItemCheckBox.setText(translate('OpenLP.AdvancedTab',
|
||||||
'Expand new service items on creation'))
|
'Expand new service items on creation'))
|
||||||
|
self.enableAutoCloseCheckBox.setText(translate('OpenLP.AdvancedTab',
|
||||||
|
'Enable application exit confirmation'))
|
||||||
# self.sharedDirGroupBox.setTitle(
|
# self.sharedDirGroupBox.setTitle(
|
||||||
# translate('AdvancedTab', 'Central Data Store'))
|
# translate('AdvancedTab', 'Central Data Store'))
|
||||||
# self.sharedCheckBox.setText(
|
# self.sharedCheckBox.setText(
|
||||||
@ -180,6 +186,9 @@ class AdvancedTab(SettingsTab):
|
|||||||
self.expandServiceItemCheckBox.setChecked(
|
self.expandServiceItemCheckBox.setChecked(
|
||||||
settings.value(u'expand service item',
|
settings.value(u'expand service item',
|
||||||
QtCore.QVariant(False)).toBool())
|
QtCore.QVariant(False)).toBool())
|
||||||
|
self.enableAutoCloseCheckBox.setChecked(
|
||||||
|
settings.value(u'enable exit confirmation',
|
||||||
|
QtCore.QVariant(True)).toBool())
|
||||||
settings.endGroup()
|
settings.endGroup()
|
||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
@ -196,12 +205,14 @@ class AdvancedTab(SettingsTab):
|
|||||||
QtCore.QVariant(self.doubleClickLiveCheckBox.isChecked()))
|
QtCore.QVariant(self.doubleClickLiveCheckBox.isChecked()))
|
||||||
settings.setValue(u'expand service item',
|
settings.setValue(u'expand service item',
|
||||||
QtCore.QVariant(self.expandServiceItemCheckBox.isChecked()))
|
QtCore.QVariant(self.expandServiceItemCheckBox.isChecked()))
|
||||||
|
settings.setValue(u'enable exit confirmation',
|
||||||
|
QtCore.QVariant(self.enableAutoCloseCheckBox.isChecked()))
|
||||||
settings.endGroup()
|
settings.endGroup()
|
||||||
|
|
||||||
def onSharedCheckBoxChanged(self, checked):
|
# def onSharedCheckBoxChanged(self, checked):
|
||||||
"""
|
# """
|
||||||
Enables the widgets to allow a shared data location
|
# Enables the widgets to allow a shared data location
|
||||||
"""
|
# """
|
||||||
self.sharedLabel.setEnabled(checked)
|
# self.sharedLabel.setEnabled(checked)
|
||||||
self.sharedTextEdit.setEnabled(checked)
|
# self.sharedTextEdit.setEnabled(checked)
|
||||||
self.sharedPushButton.setEnabled(checked)
|
# self.sharedPushButton.setEnabled(checked)
|
@ -94,7 +94,6 @@ class MainDisplay(DisplayWidget):
|
|||||||
"""
|
"""
|
||||||
This is the display screen.
|
This is the display screen.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, parent, screens, live):
|
def __init__(self, parent, screens, live):
|
||||||
DisplayWidget.__init__(self, live, parent=None)
|
DisplayWidget.__init__(self, live, parent=None)
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
@ -116,7 +115,7 @@ class MainDisplay(DisplayWidget):
|
|||||||
"""
|
"""
|
||||||
Set up and build the output screen
|
Set up and build the output screen
|
||||||
"""
|
"""
|
||||||
log.debug(u'Setup live = %s for %s ' % (self.isLive,
|
log.debug(u'Setup live = %s for monitor %s ' % (self.isLive,
|
||||||
self.screens.monitor_number))
|
self.screens.monitor_number))
|
||||||
self.usePhonon = QtCore.QSettings().value(
|
self.usePhonon = QtCore.QSettings().value(
|
||||||
u'media/use phonon', QtCore.QVariant(True)).toBool()
|
u'media/use phonon', QtCore.QVariant(True)).toBool()
|
||||||
|
@ -842,7 +842,6 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
QtGui.QMessageBox.Save),
|
QtGui.QMessageBox.Save),
|
||||||
QtGui.QMessageBox.Save)
|
QtGui.QMessageBox.Save)
|
||||||
if ret == QtGui.QMessageBox.Save:
|
if ret == QtGui.QMessageBox.Save:
|
||||||
#self.ServiceManagerContents.onSaveService(True)
|
|
||||||
if self.ServiceManagerContents.saveFile():
|
if self.ServiceManagerContents.saveFile():
|
||||||
self.cleanUp()
|
self.cleanUp()
|
||||||
event.accept()
|
event.accept()
|
||||||
@ -854,18 +853,24 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
else:
|
else:
|
||||||
event.ignore()
|
event.ignore()
|
||||||
else:
|
else:
|
||||||
ret = QtGui.QMessageBox.question(self,
|
if QtCore.QSettings().value(u'advanced/enable exit confirmation',
|
||||||
translate('OpenLP.MainWindow', 'Close OpenLP'),
|
QtCore.QVariant(True)).toBool():
|
||||||
translate('OpenLP.MainWindow', 'Are you sure you want to close OpenLP?'),
|
ret = QtGui.QMessageBox.question(self,
|
||||||
QtGui.QMessageBox.StandardButtons(
|
translate('OpenLP.MainWindow', 'Close OpenLP'),
|
||||||
QtGui.QMessageBox.Yes |
|
translate('OpenLP.MainWindow', 'Are you sure you want to close OpenLP?'),
|
||||||
QtGui.QMessageBox.No),
|
QtGui.QMessageBox.StandardButtons(
|
||||||
QtGui.QMessageBox.Yes)
|
QtGui.QMessageBox.Yes |
|
||||||
if ret == QtGui.QMessageBox.Yes:
|
QtGui.QMessageBox.No),
|
||||||
|
QtGui.QMessageBox.Yes)
|
||||||
|
if ret == QtGui.QMessageBox.Yes:
|
||||||
|
self.cleanUp()
|
||||||
|
event.accept()
|
||||||
|
else:
|
||||||
|
event.ignore()
|
||||||
|
else:
|
||||||
self.cleanUp()
|
self.cleanUp()
|
||||||
event.accept()
|
event.accept()
|
||||||
else:
|
|
||||||
event.ignore()
|
|
||||||
|
|
||||||
def cleanUp(self):
|
def cleanUp(self):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user