mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-07 11:09:47 +00:00
menu action: paste tx ID to clipboard
This commit is contained in:
parent
b271483ee1
commit
41ef9aa4f7
1 changed files with 4 additions and 3 deletions
|
@ -272,14 +272,15 @@ class ElectrumWindow(QMainWindow):
|
||||||
def create_history_menu(self, position):
|
def create_history_menu(self, position):
|
||||||
self.history_list.selectedIndexes()
|
self.history_list.selectedIndexes()
|
||||||
item = self.history_list.currentItem()
|
item = self.history_list.currentItem()
|
||||||
|
tx_hash = str(item.toolTip(0))
|
||||||
if not item: return
|
if not item: return
|
||||||
menu = QMenu()
|
menu = QMenu()
|
||||||
menu.addAction(_("Details"), lambda: self.tx_details(item,2))
|
menu.addAction(_("Copy ID to Clipboard"), lambda: self.app.clipboard().setText(tx_hash))
|
||||||
|
menu.addAction(_("Details"), lambda: self.tx_details(tx_hash))
|
||||||
menu.addAction(_("Edit description"), lambda: self.tx_label_clicked(item,2))
|
menu.addAction(_("Edit description"), lambda: self.tx_label_clicked(item,2))
|
||||||
menu.exec_(self.contacts_list.viewport().mapToGlobal(position))
|
menu.exec_(self.contacts_list.viewport().mapToGlobal(position))
|
||||||
|
|
||||||
def tx_details(self, item, column):
|
def tx_details(self, tx_hash):
|
||||||
tx_hash = str(item.toolTip(0))
|
|
||||||
tx = self.wallet.tx_history.get(tx_hash)
|
tx = self.wallet.tx_history.get(tx_hash)
|
||||||
|
|
||||||
if tx['height']:
|
if tx['height']:
|
||||||
|
|
Loading…
Add table
Reference in a new issue