mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-15 10:54:22 -05:00
Added to count new messages on Tray icon
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2722 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
76a4c34440
commit
4c3651d597
@ -348,10 +348,13 @@ void MainWindow::updateStatus()
|
||||
|
||||
rsMsgs -> getMessageSummaries(msgList);
|
||||
bool new_msg = false ;
|
||||
int newInboxCount = 0;
|
||||
|
||||
for(it = msgList.begin(); it != msgList.end(); it++)
|
||||
if ((it -> msgflags & RS_MSG_BOXMASK) == RS_MSG_INBOX && ((it -> msgflags & RS_MSG_NEW) == RS_MSG_NEW))
|
||||
new_msg = true ;
|
||||
newInboxCount ++;
|
||||
|
||||
|
||||
if(new_msg)
|
||||
messageAction->setIcon(QIcon(QPixmap(":/images/messages_new.png"))) ;
|
||||
@ -361,7 +364,7 @@ void MainWindow::updateStatus()
|
||||
if(new_msg)
|
||||
{
|
||||
trayIcon->setIcon(QIcon(":/images/newmsg.png"));
|
||||
trayIcon->setToolTip(tr("RetroShare") + "\n" + tr("You have received a new message"));
|
||||
trayIcon->setToolTip(tr("RetroShare") + "\n" + tr("You have %1 new message").arg(newInboxCount));
|
||||
}
|
||||
else if (online == 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user