mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
qt: Add "Copy address" item to the context menu in the Peers table
Co-authored-by: Jarol Rodriguez <jarolrod@tutanota.com>
This commit is contained in:
parent
0ebd88fe0b
commit
3ec061d9da
1 changed files with 5 additions and 0 deletions
|
@ -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); });
|
||||
|
|
Loading…
Reference in a new issue