electrum

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

commit 2f729c25053a4102a0fd1b5dcf8e35b2f1944863
parent 6b3d88fa2fd77b95d3ae2475d20a45e8cc63c635
Author: ThomasV <thomasv@gitorious>
Date:   Mon, 20 Apr 2015 14:44:59 +0200

add copy button to tx dialog

Diffstat:
Mgui/qt/transaction_dialog.py | 4+++-
Mgui/qt/util.py | 4++--
2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/gui/qt/transaction_dialog.py b/gui/qt/transaction_dialog.py @@ -95,7 +95,9 @@ class TxDialog(QDialog): b.setIcon(QIcon(":icons/qrcode.png")) b.clicked.connect(self.show_qr) - self.buttons = [self.qr_button, self.sign_button, self.broadcast_button, self.save_button, self.cancel_button] + self.copy_button = CopyButton(lambda: str(self.tx), self.parent.app) + + self.buttons = [self.copy_button, self.qr_button, self.sign_button, self.broadcast_button, self.save_button, self.cancel_button] run_hook('transaction_dialog', self) vbox.addLayout(Buttons(*self.buttons)) diff --git a/gui/qt/util.py b/gui/qt/util.py @@ -138,9 +138,9 @@ class CloseButton(QPushButton): self.setDefault(True) class CopyButton(QPushButton): - def __init__(self, text, app): + def __init__(self, text_getter, app): QPushButton.__init__(self, _("Copy")) - self.clicked.connect(lambda: app.clipboard().setText(str(text.toPlainText()))) + self.clicked.connect(lambda: app.clipboard().setText(text_getter())) class OkButton(QPushButton): def __init__(self, dialog, label=None):