Skip to content
Snippets Groups Projects
Commit 693b0000 authored by inso's avatar inso
Browse files

Fix bug #322

Disable buttonbox while broadcasting certification/send
parent b00fa641
No related branches found
No related tags found
No related merge requests found
......@@ -54,6 +54,7 @@ class CertificationDialog(QDialog, Ui_CertificationDialog):
@asyncify
@asyncio.coroutine
def accept(self):
self.button_box.setEnabled(False)
if self.radio_contact.isChecked():
for contact in self.account.contacts:
if contact['name'] == self.combo_contact.currentText():
......@@ -64,6 +65,7 @@ class CertificationDialog(QDialog, Ui_CertificationDialog):
password = yield from self.password_asker.async_exec()
if password == "":
self.button_box.setEnabled(True)
return
QApplication.setOverrideCursor(Qt.WaitCursor)
result = yield from self.account.certify(password, self.community, pubkey)
......@@ -85,6 +87,7 @@ class CertificationDialog(QDialog, Ui_CertificationDialog):
self.tr("Could not broadcast certification : {0}"
.format(result[1])))
QApplication.restoreOverrideCursor()
self.button_box.setEnabled(True)
def change_current_community(self, index):
self.community = self.account.communities[index]
......
......@@ -93,6 +93,7 @@ class TransferMoneyDialog(QDialog, Ui_TransferMoneyDialog):
@asyncify
@asyncio.coroutine
def accept(self):
self.button_box.setEnabled(False)
comment = self.edit_message.text()
if self.radio_contact.isChecked():
......@@ -108,6 +109,7 @@ class TransferMoneyDialog(QDialog, Ui_TransferMoneyDialog):
yield from QAsyncMessageBox.critical(self, self.tr("Money transfer"),
self.tr("No amount. Please give the transfert amount"),
QMessageBox.Ok)
self.button_box.setEnabled(True)
return
password = yield from self.password_asker.async_exec()
......@@ -139,6 +141,7 @@ class TransferMoneyDialog(QDialog, Ui_TransferMoneyDialog):
yield from QAsyncMessageBox.critical(self, self.tr("Transfer"), result[1])
QApplication.restoreOverrideCursor()
self.button_box.setEnabled(True)
@asyncify
@asyncio.coroutine
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment