electrum

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

commit 66de59234345ccc4a272c2f3d40d414f074682b5
parent b93aa9bc43d4e3fb3b3a73a731db46f08afa39fa
Author: ThomasV <thomasv@gitorious>
Date:   Sat, 14 Mar 2015 19:08:56 +0100

fix tx dialog buttons using new widgets

Diffstat:
Mgui/qt/seed_dialog.py | 2++
Mgui/qt/transaction_dialog.py | 25++++++++-----------------
Mplugins/cosigner_pool.py | 2+-
3 files changed, 11 insertions(+), 18 deletions(-)

diff --git a/gui/qt/seed_dialog.py b/gui/qt/seed_dialog.py @@ -21,6 +21,8 @@ from PyQt4.QtCore import * import PyQt4.QtCore as QtCore from electrum.i18n import _ from electrum import mnemonic + +from util import * from qrcodewidget import QRCodeWidget, QRDialog from qrtextedit import ShowQRTextEdit, ScanQRTextEdit diff --git a/gui/qt/transaction_dialog.py b/gui/qt/transaction_dialog.py @@ -37,8 +37,8 @@ from electrum import transaction from electrum.bitcoin import base_encode from electrum.plugins import run_hook -from util import MyTreeWidget -from util import MONOSPACE_FONT +from util import * + class TxDialog(QDialog): @@ -74,37 +74,28 @@ class TxDialog(QDialog): vbox.addStretch(1) - self.buttons = buttons = QHBoxLayout() - vbox.addLayout( buttons ) - - buttons.addStretch(1) - self.sign_button = b = QPushButton(_("Sign")) b.clicked.connect(self.sign) - buttons.addWidget(b) self.broadcast_button = b = QPushButton(_("Broadcast")) b.clicked.connect(lambda: self.parent.broadcast_transaction(self.tx)) - b.hide() - buttons.addWidget(b) self.save_button = b = QPushButton(_("Save")) b.clicked.connect(self.save) - buttons.addWidget(b) - cancelButton = QPushButton(_("Close")) - cancelButton.clicked.connect(lambda: self.done(0)) - buttons.addWidget(cancelButton) - cancelButton.setDefault(True) + self.cancel_button = b = QPushButton(_("Close")) + b.clicked.connect(lambda: self.done(0)) + b.setDefault(True) - b = QPushButton() + self.qr_button = b = QPushButton() b.setIcon(QIcon(":icons/qrcode.png")) b.clicked.connect(self.show_qr) - buttons.insertWidget(1,b) + self.buttons = [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)) self.update() diff --git a/plugins/cosigner_pool.py b/plugins/cosigner_pool.py @@ -124,7 +124,7 @@ class Plugin(BasePlugin): def transaction_dialog(self, d): self.send_button = b = QPushButton(_("Send to cosigner")) b.clicked.connect(lambda: self.do_send(d.tx)) - d.buttons.insertWidget(2, b) + d.buttons.insert(2, b) self.transaction_dialog_update(d) @hook