Mention the new network toggle functionality in the tooltip.

This commit is contained in:
Pavel Janík 2016-11-11 11:59:33 +01:00
parent 87ab49e4fe
commit 1260c1103b

View file

@ -713,13 +713,19 @@ void BitcoinGUI::updateNetworkState()
default: icon = ":/icons/connect_4"; break; default: icon = ":/icons/connect_4"; break;
} }
QString tooltip;
if (clientModel->getNetworkActive()) { 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 { } 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"; 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)); connectionsControl->setPixmap(platformStyle->SingleColorIcon(icon).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
} }