Skip to content

Commit

Permalink
qt: add copy subnet action banned peer
Browse files Browse the repository at this point in the history
This adds a copy subnet context menu action for peers in the banned peer table

(cherry picked from commit d518d67)
  • Loading branch information
shaavan committed Jul 21, 2021
1 parent 201c5e4 commit 7c21de2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/qt/rpcconsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,11 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_

// create ban table context menu
banTableContextMenu = new QMenu(this);
//: Context menu action to copy the subnet of a banned peer
banTableContextMenu->addAction(tr("&Copy subnet"), [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 7c21de2

Please sign in to comment.