mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-29 09:26:18 -05:00
Added to display connection count of friends and down/up speed on tray tooltip
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3704 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
ab5b2a3851
commit
aab3e69e03
@ -498,6 +498,10 @@ void MainWindow::updateStatus()
|
||||
unsigned int nFriendCount = 0;
|
||||
unsigned int nOnlineCount = 0;
|
||||
rsPeers->getPeerCount (&nFriendCount, &nOnlineCount, false);
|
||||
|
||||
float downKb = 0;
|
||||
float upKb = 0;
|
||||
rsicontrol -> ConfigGetDataRates(downKb, upKb);
|
||||
|
||||
if (ratesstatus)
|
||||
ratesstatus->getRatesStatus();
|
||||
@ -527,6 +531,17 @@ void MainWindow::updateStatus()
|
||||
{
|
||||
trayIcon->setIcon(QIcon(IMAGE_RETROSHARE));
|
||||
}
|
||||
|
||||
|
||||
if (nOnlineCount > 1)
|
||||
trayIcon->setToolTip( tr("RetroShare") + "\n" + tr("Down: %1 (kB/s)").arg(downKb) + " | " + tr("Up: %1 (kB/s)").arg(upKb)
|
||||
+ "\n" + tr("%1 friends connected").arg(nOnlineCount) );
|
||||
} else {
|
||||
trayIcon->setToolTip( tr("RetroShare") + "\n" + tr("Down: %1 (kB/s)").arg(downKb) + " | " + tr("Up: %1 (kB/s)").arg(upKb)
|
||||
+ "\n" + tr("%1 friend connected").arg(nOnlineCount) );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::privateChatChanged(int list, int type)
|
||||
|
Loading…
Reference in New Issue
Block a user