tRevert "Improved dialog centring" - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit d3104a17b7043815f01d54dd947f7a32c563850d (DIR) parent 0368a2cd5e48e98c34bce13aa5f9a15f3ab806d5 (HTM) Author: ThomasV <thomasv@gitorious> Date: Sun, 5 Jul 2015 20:37:57 +0200 Revert "Improved dialog centring" This reverts commit d41dfa394b757ca04889782a14d203b8253daf77. Diffstat: M gui/qt/main_window.py | 16 ++++++---------- M gui/qt/transaction_dialog.py | 9 ++------- 2 files changed, 8 insertions(+), 17 deletions(-) --- (DIR) diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py t@@ -1141,12 +1141,10 @@ class ElectrumWindow(QMainWindow): @protected - def sign_tx(self, tx, callback, password, parent=None): + def sign_tx(self, tx, callback, password): '''Sign the transaction in a separate thread. When done, calls the callback with a success code of True or False. ''' - if parent == None: - parent = self self.send_button.setDisabled(True) # call hook to see if plugin needs gui interaction t@@ -1164,11 +1162,11 @@ class ElectrumWindow(QMainWindow): callback(success[0]) # keep a reference to WaitingDialog or the gui might crash - self.waiting_dialog = WaitingDialog(parent, 'Signing transaction...', sign_thread, on_sign_successful, on_dialog_close) + self.waiting_dialog = WaitingDialog(self, 'Signing transaction...', sign_thread, on_sign_successful, on_dialog_close) self.waiting_dialog.start() - def broadcast_transaction(self, tx, tx_desc, parent=None): + def broadcast_transaction(self, tx, tx_desc): def broadcast_thread(): # non-GUI thread t@@ -1195,16 +1193,14 @@ class ElectrumWindow(QMainWindow): if status: if tx_desc is not None and tx.is_complete(): self.wallet.set_label(tx.hash(), tx_desc) - QMessageBox.information(parent, '', _('Payment sent.') + '\n' + msg, _('OK')) + QMessageBox.information(self, '', _('Payment sent.') + '\n' + msg, _('OK')) self.update_invoices_list() self.do_clear() else: - QMessageBox.warning(parent, _('Error'), msg, _('OK')) + QMessageBox.warning(self, _('Error'), msg, _('OK')) self.send_button.setDisabled(False) - if parent == None: - parent = self - self.waiting_dialog = WaitingDialog(parent, 'Broadcasting transaction...', broadcast_thread, broadcast_done) + self.waiting_dialog = WaitingDialog(self, 'Broadcasting transaction...', broadcast_thread, broadcast_done) self.waiting_dialog.start() (DIR) diff --git a/gui/qt/transaction_dialog.py b/gui/qt/transaction_dialog.py t@@ -116,7 +116,7 @@ class TxDialog(QDialog): self.update() def do_broadcast(self): - self.parent.broadcast_transaction(self.tx, self.desc, parent=self) + self.parent.broadcast_transaction(self.tx, self.desc) self.broadcast = True self.update() t@@ -142,15 +142,10 @@ class TxDialog(QDialog): def sign(self): def sign_done(success): - self.sign_button.setDisabled(False) self.prompt_if_unsaved = True self.saved = False self.update() - self.sign_button.setDisabled(True) - cancelled, ret = self.parent.sign_tx(self.tx, sign_done, parent=self) - if cancelled: - self.sign_button.setDisabled(False) - + self.parent.sign_tx(self.tx, sign_done) def save(self): name = 'signed_%s.txn' % (self.tx.hash()[0:8]) if self.tx.is_complete() else 'unsigned.txn'