Add Quit button to error dialog
This commit is contained in:
parent
8ccc71780a
commit
45c5e713ee
@ -60,9 +60,12 @@ class ErrorDialog(QtGui.QDialog):
|
|||||||
|
|
||||||
self.restartMCEditLabel.setVisible(fatal)
|
self.restartMCEditLabel.setVisible(fatal)
|
||||||
|
|
||||||
self.restartMCEditButton.setEnabled(fatal)
|
self.restartMCEditButton.setVisible(fatal)
|
||||||
self.restartMCEditButton.clicked.connect(self.restartMCEdit)
|
self.restartMCEditButton.clicked.connect(self.restartMCEdit)
|
||||||
|
|
||||||
|
self.quitMCEditButton.setVisible(fatal)
|
||||||
|
self.quitMCEditButton.clicked.connect(self.quitMCEdit)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import Pastebin
|
import Pastebin
|
||||||
except ImportError:
|
except ImportError:
|
||||||
@ -108,4 +111,7 @@ class ErrorDialog(QtGui.QDialog):
|
|||||||
|
|
||||||
def restartMCEdit(self):
|
def restartMCEdit(self):
|
||||||
QtCore.QProcess.startDetached(sys.executable, sys.argv)
|
QtCore.QProcess.startDetached(sys.executable, sys.argv)
|
||||||
raise SystemExit # xxxxxxxxxxx
|
raise SystemExit
|
||||||
|
|
||||||
|
def quitMCEdit(self):
|
||||||
|
raise SystemExit
|
@ -114,6 +114,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="quitMCEditButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Quit</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="continueButton">
|
<widget class="QPushButton" name="continueButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
Reference in New Issue
Block a user