diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-03-30 09:15:55 +0300 |
---|---|---|
committer | Jarol Rodriguez <jarolrod@tutanota.com> | 2021-09-05 15:37:14 -0400 |
commit | 3ec061d9da0c8742bd9dec94ffeb82a11d000aba (patch) | |
tree | ab7bcd6323f6598714ac09fc63017f12ae16057a /src/qt/rpcconsole.cpp | |
parent | 0ebd88fe0bf45d872883b4d361147f5c047b1a46 (diff) |
qt: Add "Copy address" item to the context menu in the Peers table
Co-authored-by: Jarol Rodriguez <jarolrod@tutanota.com>
Diffstat (limited to 'src/qt/rpcconsole.cpp')
-rw-r--r-- | src/qt/rpcconsole.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 829f7add80..bcfdd1fa80 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -680,6 +680,11 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_ // create peer table context menu peersTableContextMenu = new QMenu(this); + //: Context menu action to copy the address of a peer + peersTableContextMenu->addAction(tr("&Copy address"), [this] { + GUIUtil::copyEntryData(ui->peerWidget, PeerTableModel::Address, Qt::DisplayRole); + }); + peersTableContextMenu->addSeparator(); peersTableContextMenu->addAction(tr("&Disconnect"), this, &RPCConsole::disconnectSelectedNode); peersTableContextMenu->addAction(ts.ban_for + " " + tr("1 &hour"), [this] { banSelectedNode(60 * 60); }); peersTableContextMenu->addAction(ts.ban_for + " " + tr("1 d&ay"), [this] { banSelectedNode(60 * 60 * 24); }); |