| 908 | #endif // ENABLE_WALLET |
| 909 | |
| 910 | void BitcoinGUI::updateNetworkState() |
| 911 | { |
| 912 | int count = clientModel->getNumConnections(); |
| 913 | QString icon; |
| 914 | switch(count) |
| 915 | { |
| 916 | case 0: icon = ":/icons/connect_0"; break; |
| 917 | case 1: case 2: case 3: icon = ":/icons/connect_1"; break; |
| 918 | case 4: case 5: case 6: icon = ":/icons/connect_2"; break; |
| 919 | case 7: case 8: case 9: icon = ":/icons/connect_3"; break; |
| 920 | default: icon = ":/icons/connect_4"; break; |
| 921 | } |
| 922 | |
| 923 | QString tooltip; |
| 924 | |
| 925 | if (m_node.getNetworkActive()) { |
| 926 | //: A substring of the tooltip. |
| 927 | tooltip = tr("%n active connection(s) to %1 network", "", count).arg("Liquid"); |
| 928 | } else { |
| 929 | //: A substring of the tooltip. |
| 930 | tooltip = tr("Network activity disabled."); |
| 931 | icon = ":/icons/network_disabled"; |
| 932 | } |
| 933 | |
| 934 | // Don't word-wrap this (fixed-width) tooltip |
| 935 | tooltip = QLatin1String("<nobr>") + tooltip + QLatin1String("<br>") + |
| 936 | //: A substring of the tooltip. "More actions" are available via the context menu. |
| 937 | tr("Click for more actions.") + QLatin1String("</nobr>"); |
| 938 | connectionsControl->setToolTip(tooltip); |
| 939 | |
| 940 | connectionsControl->setThemedPixmap(icon, STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE); |
| 941 | } |
| 942 | |
| 943 | void BitcoinGUI::setNumConnections(int count) |
| 944 | { |
nothing calls this directly
no test coverage detected