Skip to content

Commit 32b4a54

Browse files
committed
qt: add copy subnet action banned peer
This adds a copy subnet context menu action for peers in the banned peer table
1 parent 201c5e4 commit 32b4a54

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/qt/rpcconsole.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,13 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_
706706

707707
// create ban table context menu
708708
banTableContextMenu = new QMenu(this);
709+
/*: Context menu action to copy the subnet of a banned peer.
710+
Subnet is the combination of a peer's IP address and it's Netmask.
711+
Depending on the language, the translation of 'IP address' can be subbed in for subnet. */
712+
banTableContextMenu->addAction(tr("&Copy subnet"), [this] {
713+
GUIUtil::copyEntryData(ui->banlistWidget, BanTableModel::Address, Qt::DisplayRole);
714+
});
715+
banTableContextMenu->addSeparator();
709716
banTableContextMenu->addAction(tr("&Unban"), this, &RPCConsole::unbanSelectedNode);
710717
connect(ui->banlistWidget, &QTableView::customContextMenuRequested, this, &RPCConsole::showBanTableContextMenu);
711718

0 commit comments

Comments
 (0)