MCPcopy Create free account
hub / github.com/amule-project/amule / ShowUserCount

Method ShowUserCount

src/amule.cpp:2170–2191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2168}
2169
2170void CamuleApp::ShowUserCount() {
2171 uint32 totaluser = 0, totalfile = 0;
2172
2173 theApp->serverlist->GetUserFileStatus( totaluser, totalfile );
2174
2175 wxString buffer;
2176
2177 static const wxString s_singlenetstatusformat = _("Users: %s | Files: %s");
2178 static const wxString s_bothnetstatusformat = _("Users: E: %s K: %s | Files: E: %s K: %s");
2179
2180 if (thePrefs::GetNetworkED2K() && thePrefs::GetNetworkKademlia()) {
2181 buffer = CFormat(s_bothnetstatusformat) % CastItoIShort(totaluser) % CastItoIShort(Kademlia::CKademlia::GetKademliaUsers()) % CastItoIShort(totalfile) % CastItoIShort(Kademlia::CKademlia::GetKademliaFiles());
2182 } else if (thePrefs::GetNetworkED2K()) {
2183 buffer = CFormat(s_singlenetstatusformat) % CastItoIShort(totaluser) % CastItoIShort(totalfile);
2184 } else if (thePrefs::GetNetworkKademlia()) {
2185 buffer = CFormat(s_singlenetstatusformat) % CastItoIShort(Kademlia::CKademlia::GetKademliaUsers()) % CastItoIShort(Kademlia::CKademlia::GetKademliaFiles());
2186 } else {
2187 buffer = _("No networks selected");
2188 }
2189
2190 Notify_ShowUserCount(buffer);
2191}
2192
2193
2194void CamuleApp::ShowConnectionState(bool forceUpdate)

Callers 4

ProcessPacketMethod · 0.45
ShowUserCountFunction · 0.45
ProcessPacketMethod · 0.45
ProcessMethod · 0.45

Calls 3

CFormatClass · 0.85
CastItoIShortFunction · 0.85
GetUserFileStatusMethod · 0.45

Tested by

no test coverage detected