ttransaction show_qr - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit c9fd14e3435fd0f6ce5b0535db39d00cec28b18d (DIR) parent e5b44bacda6da6c69538ae2efd04ba6eb0f3b2b3 (HTM) Author: ThomasV <thomasv@gitorious> Date: Tue, 17 Jun 2014 16:24:01 +0200 ttransaction show_qr Diffstat: M gui/qt/transaction_dialog.py | 11 +++++++++-- M plugins/qrscanner.py | 12 ------------ 2 files changed, 9 insertions(+), 14 deletions(-) --- (DIR) diff --git a/gui/qt/transaction_dialog.py b/gui/qt/transaction_dialog.py t@@ -96,11 +96,18 @@ class TxDialog(QDialog): buttons.addWidget(cancelButton) cancelButton.setDefault(True) - run_hook('init_transaction_dialog', self, buttons) - + b = QPushButton(_("Show QR code")) + b.clicked.connect(self.show_qr) + buttons.insertWidget(1,b) self.update() + def show_qr(self): + try: + json_text = json.dumps(self.tx.as_dict()).replace(' ', '') + self.parent.show_qrcode(json_text, 'Transaction') + except Exception as e: + self.parent.show_message(str(e)) def sign(self): (DIR) diff --git a/plugins/qrscanner.py b/plugins/qrscanner.py t@@ -46,11 +46,6 @@ class Plugin(BasePlugin): self.win = self.gui.main_window self.win.raw_transaction_menu.addAction(_("&From QR code"), self.read_raw_qr) - def init_transaction_dialog(self, dialog, buttons): - b = QPushButton(_("Show QR code")) - b.clicked.connect(lambda: self.show_raw_qr(dialog.tx)) - buttons.insertWidget(1,b) - def is_available(self): return self._is_available t@@ -82,13 +77,6 @@ class Plugin(BasePlugin): continue return r.data - def show_raw_qr(self, tx): - try: - json_text = json.dumps(tx.as_dict()).replace(' ', '') - self.win.show_qrcode(json_text, 'Transaction') - except Exception as e: - self.win.show_message(str(e)) - def read_raw_qr(self): qrcode = self.scan_qr()