Improved dialog centring
Password requests from the tx dialog box are now centred on the tx dialog. Similarly for error messages if misentering the password. Also, "Signing transaction..." and "Broadcasting transaction..." are centred on the appropriate tx dialog. Finally restore the old "Sign" button enabling / disabling, as we can now tell if the user cancelled the password request.
This commit is contained in:
@@ -116,7 +116,7 @@ class TxDialog(QWidget):
|
||||
self.update()
|
||||
|
||||
def do_broadcast(self):
|
||||
self.parent.broadcast_transaction(self.tx, self.desc)
|
||||
self.parent.broadcast_transaction(self.tx, self.desc, parent=self)
|
||||
self.broadcast = True
|
||||
self.update()
|
||||
|
||||
@@ -142,10 +142,15 @@ class TxDialog(QWidget):
|
||||
|
||||
def sign(self):
|
||||
def sign_done(success):
|
||||
self.sign_button.setDisabled(False)
|
||||
self.prompt_if_unsaved = True
|
||||
self.saved = False
|
||||
self.update()
|
||||
self.parent.sign_tx(self.tx, sign_done)
|
||||
self.sign_button.setDisabled(True)
|
||||
cancelled, ret = self.parent.sign_tx(self.tx, sign_done, parent=self)
|
||||
if cancelled:
|
||||
self.sign_button.setDisabled(False)
|
||||
|
||||
|
||||
def save(self):
|
||||
name = 'signed_%s.txn' % (self.tx.hash()[0:8]) if self.tx.is_complete() else 'unsigned.txn'
|
||||
|
||||
Reference in New Issue
Block a user