From a0c891d73f198e8b18320f741904131f6354e7ad Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Mon, 29 Jun 2015 17:00:31 +0300 Subject: [PATCH] transaction_dialog: allow plugins manipulate transaction sharing buttons --- gui/qt/transaction_dialog.py | 5 ++++- plugins/audio_modem.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gui/qt/transaction_dialog.py b/gui/qt/transaction_dialog.py index ca590ba51..bfbdf5fa2 100644 --- a/gui/qt/transaction_dialog.py +++ b/gui/qt/transaction_dialog.py @@ -99,10 +99,13 @@ class TxDialog(QWidget): # Action buttons self.buttons = [self.sign_button, self.broadcast_button, self.cancel_button] + # Transaction sharing buttons + self.sharing_buttons = [self.copy_button, self.qr_button, self.save_button] + run_hook('transaction_dialog', self) hbox = QHBoxLayout() - hbox.addLayout(Buttons(self.copy_button, self.qr_button, self.save_button)) + hbox.addLayout(Buttons(*self.sharing_buttons)) hbox.addStretch(1) hbox.addLayout(Buttons(*self.buttons)) vbox.addLayout(hbox) diff --git a/plugins/audio_modem.py b/plugins/audio_modem.py index 6e4fd251a..ed1d919c4 100644 --- a/plugins/audio_modem.py +++ b/plugins/audio_modem.py @@ -78,7 +78,7 @@ class Plugin(BasePlugin): self.sender = self._send(parent=dialog, blob=blob) self.sender.start() b.clicked.connect(handler) - dialog.buttons.insert(0, b) + dialog.sharing_buttons.insert(-1, b) @hook def scan_text_edit(self, parent):