forked from openlp/openlp
Add Yes / No to Error Message
This commit is contained in:
parent
afaf10f986
commit
dce9a73153
@ -133,10 +133,13 @@ class OpenLP(QtGui.QApplication):
|
|||||||
def isAlreadyRunning(self):
|
def isAlreadyRunning(self):
|
||||||
self.sharedMemory = QtCore.QSharedMemory('OpenLP')
|
self.sharedMemory = QtCore.QSharedMemory('OpenLP')
|
||||||
if self.sharedMemory.attach():
|
if self.sharedMemory.attach():
|
||||||
QtGui.QMessageBox.critical(None,
|
status = QtGui.QMessageBox.critical(None,
|
||||||
UiStrings.Error, UiStrings.OpenLPStart,
|
UiStrings.Error, UiStrings.OpenLPStart,
|
||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
QtGui.QMessageBox.StandardButtons(
|
||||||
return True
|
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No))
|
||||||
|
if status == QtGui.QMessageBox.No:
|
||||||
|
return True
|
||||||
|
return False
|
||||||
else:
|
else:
|
||||||
self.sharedMemory.create(1)
|
self.sharedMemory.create(1)
|
||||||
return False
|
return False
|
||||||
|
@ -76,7 +76,8 @@ class UiStrings(object):
|
|||||||
NISp = translate('OpenLP.Ui', 'No Items Selected', 'Plural')
|
NISp = translate('OpenLP.Ui', 'No Items Selected', 'Plural')
|
||||||
OLPV1 = translate('OpenLP.Ui', 'openlp.org 1.x')
|
OLPV1 = translate('OpenLP.Ui', 'openlp.org 1.x')
|
||||||
OLPV2 = translate('OpenLP.Ui', 'OpenLP 2.0')
|
OLPV2 = translate('OpenLP.Ui', 'OpenLP 2.0')
|
||||||
OpenLPStart = translate('OpenLP.Ui', 'OpenLP is already running')
|
OpenLPStart = translate('OpenLP.Ui', 'OpenLP is already running. Do you '
|
||||||
|
'wish continue.')
|
||||||
OpenService = translate('OpenLP.Ui', 'Open Service')
|
OpenService = translate('OpenLP.Ui', 'Open Service')
|
||||||
Preview = translate('OpenLP.Ui', 'Preview')
|
Preview = translate('OpenLP.Ui', 'Preview')
|
||||||
PreviewPanel = translate('OpenLP.Ui', 'Preview Panel')
|
PreviewPanel = translate('OpenLP.Ui', 'Preview Panel')
|
||||||
|
Loading…
Reference in New Issue
Block a user