Browse Source

Merge JoinMarket-Org/joinmarket-clientserver#945: Qt: Minor context menu improvements

dab61bb9d6 Minor context menu improvements (Kristaps Kaupe)

Pull request description:

  1) Added Ctrl+C keyboard shortcut to "Copy address to clipboard" and "Copy extended public key to clipboard" context menu actions of "JM Wallet" tab.
  2) Renamed "pubkey" to "public key" and "tx" to "transaction" in context menus.

Top commit has no ACKs.

Tree-SHA512: 7c4a64940d5ad29d1ad8ff0f935268da750ccd52a9629722a1ad6e6dd9987b930d3b076e0334d226ae6d8bbb038475907399b4c9561b46a48c72ae831878fe05
master
Kristaps Kaupe 4 years ago
parent
commit
63f45941f0
No known key found for this signature in database
GPG Key ID: 33E472FE870C7E5D
  1. 10
      scripts/joinmarket-qt.py

10
scripts/joinmarket-qt.py

@ -1276,7 +1276,7 @@ class TxHistoryTab(QWidget):
lambda: app.clipboard().setText(address))
menu.addAction("Copy transaction id to clipboard",
lambda: app.clipboard().setText(str(item.text(2))))
menu.addAction("Copy full tx info to clipboard",
menu.addAction("Copy full transaction info to clipboard",
lambda: app.clipboard().setText(
','.join([str(item.text(_)) for _ in range(4)])))
menu.exec_(self.tHTW.viewport().mapToGlobal(position))
@ -1448,14 +1448,16 @@ class JMWalletTab(QWidget):
menu = QMenu()
if address_valid:
menu.addAction("Copy address to clipboard",
lambda: app.clipboard().setText(txt))
lambda: app.clipboard().setText(txt),
shortcut=QKeySequence(QKeySequence.Copy))
# Show QR code option only for new addresses to avoid address reuse
if item.text(3) == "new":
menu.addAction("Show QR code",
lambda: self.openQRCodePopup(txt))
if xpub_exists:
menu.addAction("Copy extended pubkey to clipboard",
lambda: app.clipboard().setText(xpub))
menu.addAction("Copy extended public key to clipboard",
lambda: app.clipboard().setText(xpub),
shortcut=QKeySequence(QKeySequence.Copy))
#TODO add more items to context menu
if address_valid or xpub_exists:
menu.exec_(self.walletTree.viewport().mapToGlobal(position))

Loading…
Cancel
Save