Skip to content

Commit

Permalink
qt: Add copy IP/Netmask action for banned peer
Browse files Browse the repository at this point in the history
This adds a copy IP/Netmask context menu action for peers in the banned peer table
  • Loading branch information
shaavan committed Aug 26, 2021
1 parent 201c5e4 commit ab1461d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/qt/rpcconsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,13 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_

// create ban table context menu
banTableContextMenu = new QMenu(this);
/*: Context menu action to copy the IP/Netmask of a banned peer.
IP/Netmask is the combination of a peer's IP address and its Netmask.
For IP address see: https://en.wikipedia.org/wiki/IP_address */
banTableContextMenu->addAction(tr("&Copy IP/Netmask"), [this] {
GUIUtil::copyEntryData(ui->banlistWidget, BanTableModel::Address, Qt::DisplayRole);
});
banTableContextMenu->addSeparator();
banTableContextMenu->addAction(tr("&Unban"), this, &RPCConsole::unbanSelectedNode);
connect(ui->banlistWidget, &QTableView::customContextMenuRequested, this, &RPCConsole::showBanTableContextMenu);

Expand Down

0 comments on commit ab1461d

Please sign in to comment.