electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 5a4a9f5369906fd60e5c7a8373131ce9bed3099f
parent 0b874b2bb03250584ef1bfc35f9151868595ffb7
Author: ThomasV <thomasv@gitorious>
Date:   Sun,  7 Jun 2015 16:51:27 +0200

make txdialog a nonmodal widget

Diffstat:
Mgui/qt/main_window.py | 2+-
Mgui/qt/transaction_dialog.py | 11++++++-----
2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py @@ -570,7 +570,7 @@ class ElectrumWindow(QMainWindow): def show_transaction(self, tx): import transaction_dialog d = transaction_dialog.TxDialog(tx, self) - d.exec_() + d.show() def update_history_tab(self): domain = self.wallet.get_account_addresses(self.current_account) diff --git a/gui/qt/transaction_dialog.py b/gui/qt/transaction_dialog.py @@ -40,7 +40,7 @@ from electrum.plugins import run_hook from util import * -class TxDialog(QDialog): +class TxDialog(QWidget): def __init__(self, tx, parent): self.tx = tx @@ -49,10 +49,9 @@ class TxDialog(QDialog): self.wallet = parent.wallet self.saved = True - QDialog.__init__(self) + QWidget.__init__(self) self.setMinimumWidth(600) self.setWindowTitle(_("Transaction")) - self.setModal(1) vbox = QVBoxLayout() self.setLayout(vbox) @@ -109,9 +108,11 @@ class TxDialog(QDialog): def close(self): if not self.saved: - if QMessageBox.question(self, _('Message'), _('This transaction is not saved. Close anyway?'), QMessageBox.Yes | QMessageBox.No, QMessageBox.No) == QMessageBox.No: + if QMessageBox.question( + self, _('Message'), _('This transaction is not saved. Close anyway?'), + QMessageBox.Yes | QMessageBox.No, QMessageBox.No) == QMessageBox.No: return - self.done(0) + QWidget.close(self) def show_qr(self): text = self.tx.raw.decode('hex')