Skip to content

Commit

Permalink
Merge #9130: Mention the new network toggle functionality in the tool…
Browse files Browse the repository at this point in the history
…tip.

1260c11 Mention the new network toggle functionality in the tooltip. (Pavel Janík)
  • Loading branch information
jonasschnelli committed Nov 22, 2016
2 parents 55b2edd + 1260c11 commit ac489b2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -713,13 +713,19 @@ void BitcoinGUI::updateNetworkState()
default: icon = ":/icons/connect_4"; break;
}

QString tooltip;

if (clientModel->getNetworkActive()) {
connectionsControl->setToolTip(tr("%n active connection(s) to Bitcoin network", "", count));
tooltip = tr("%n active connection(s) to Bitcoin network", "", count) + QString(".<br>") + tr("Click to disable network activity.");
} else {
connectionsControl->setToolTip(tr("Network activity disabled"));
tooltip = tr("Network activity disabled.") + QString("<br>") + tr("Click to enable network activity again.");
icon = ":/icons/network_disabled";
}

// Don't word-wrap this (fixed-width) tooltip
tooltip = QString("<nobr>") + tooltip + QString("</nobr>");
connectionsControl->setToolTip(tooltip);

connectionsControl->setPixmap(platformStyle->SingleColorIcon(icon).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
}

Expand Down

0 comments on commit ac489b2

Please sign in to comment.