Confirmation for network switch

This commit is contained in:
Dmitri Bogomolov 2018-07-07 15:27:56 +03:00
parent 09e7cc42ad
commit 996a48f298
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13
1 changed files with 13 additions and 0 deletions

View File

@ -2684,6 +2684,19 @@ class MyForm(settingsmixin.SMainWindow):
def network_switch(self):
dontconnect_option = not BMConfigParser().safeGetBoolean(
'bitmessagesettings', 'dontconnect')
reply = QtGui.QMessageBox.question(
self, _translate("MainWindow", "Disconnecting")
if dontconnect_option else _translate("MainWindow", "Connecting"),
"Bitmessage will now drop all connectins. Are you sure?"
) if dontconnect_option else _translate(
"Bitmessage will now start connecting to network. Are you sure?"
), QtGui.QMessageBox.Yes | QtGui.QMessageBox.Cancel,
if reply != QtGui.QMessageBox.Yes:
'bitmessagesettings', 'dontconnect', str(dontconnect_option))