mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-30 17:01:34 +00:00
transaction_dialog: allow plugins manipulate transaction sharing buttons
This commit is contained in:
parent
a23247634c
commit
a0c891d73f
2 changed files with 5 additions and 2 deletions
|
@ -99,10 +99,13 @@ class TxDialog(QWidget):
|
||||||
|
|
||||||
# Action buttons
|
# Action buttons
|
||||||
self.buttons = [self.sign_button, self.broadcast_button, self.cancel_button]
|
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)
|
run_hook('transaction_dialog', self)
|
||||||
|
|
||||||
hbox = QHBoxLayout()
|
hbox = QHBoxLayout()
|
||||||
hbox.addLayout(Buttons(self.copy_button, self.qr_button, self.save_button))
|
hbox.addLayout(Buttons(*self.sharing_buttons))
|
||||||
hbox.addStretch(1)
|
hbox.addStretch(1)
|
||||||
hbox.addLayout(Buttons(*self.buttons))
|
hbox.addLayout(Buttons(*self.buttons))
|
||||||
vbox.addLayout(hbox)
|
vbox.addLayout(hbox)
|
||||||
|
|
|
@ -78,7 +78,7 @@ class Plugin(BasePlugin):
|
||||||
self.sender = self._send(parent=dialog, blob=blob)
|
self.sender = self._send(parent=dialog, blob=blob)
|
||||||
self.sender.start()
|
self.sender.start()
|
||||||
b.clicked.connect(handler)
|
b.clicked.connect(handler)
|
||||||
dialog.buttons.insert(0, b)
|
dialog.sharing_buttons.insert(-1, b)
|
||||||
|
|
||||||
@hook
|
@hook
|
||||||
def scan_text_edit(self, parent):
|
def scan_text_edit(self, parent):
|
||||||
|
|
Loading…
Add table
Reference in a new issue