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