Skip to content

Commit

Permalink
Merge pull request #1734 from div72/qol-peer
Browse files Browse the repository at this point in the history
gui: Show peers tab on connections icon click
  • Loading branch information
jamescowens authored Jun 14, 2020
2 parents 75ccf31 + 3fba708 commit c9472c0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,8 @@ void BitcoinGUI::createToolBars()
frameBlocksLayout->setSpacing(-1);
labelEncryptionIcon = new QLabel();
labelStakingIcon = new QLabel();
labelConnectionsIcon = new QLabel();
labelConnectionsIcon = new ClickLabel();
connect(labelConnectionsIcon, SIGNAL(clicked()), this, SLOT(peersClicked()));
labelBlocksIcon = new QLabel();
labelScraperIcon = new QLabel();
labelBeaconIcon = new QLabel();
Expand Down Expand Up @@ -1125,6 +1126,12 @@ void BitcoinGUI::exchangeClicked()
QDesktopServices::openUrl(QUrl("https://gridcoin.us/exchange.htm#GridcoinWallet"));
}

void BitcoinGUI::peersClicked()
{
if (rpcConsole != nullptr)
rpcConsole->showPeersTab();
}

void BitcoinGUI::gotoOverviewPage()
{
overviewAction->setChecked(true);
Expand Down
1 change: 1 addition & 0 deletions src/qt/bitcoingui.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ private slots:
void boincStatsClicked();
void chatClicked();
void diagnosticsClicked();
void peersClicked();

void newUserWizardClicked();

Expand Down
6 changes: 6 additions & 0 deletions src/qt/rpcconsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,12 @@ void RPCConsole::updateNodeDetail(const CNodeCombinedStats *stats)
ui->peerDetailWidget->show();
}

void RPCConsole::showPeersTab()
{
show();
ui->tabWidget->setCurrentWidget(ui->tab_peers);
}


void RPCConsole::resizeEvent(QResizeEvent *event)
{
Expand Down
2 changes: 2 additions & 0 deletions src/qt/rpcconsole.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ public slots:
void banSelectedNode(int bantime);
/** Unban a selected node on the Bans tab */
void unbanSelectedNode();
/** Show peer tab */
void showPeersTab();


signals:
Expand Down

0 comments on commit c9472c0

Please sign in to comment.