mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-14 20:12:29 -04:00
added systray notification for group chat
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1367 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
a2c29ba507
commit
72112fb54c
5 changed files with 24 additions and 0 deletions
|
@ -707,6 +707,20 @@ void PeersDialog::insertChat()
|
|||
|
||||
extraTxt += QString::fromStdWString(it->msg);
|
||||
|
||||
// notify with a systray icon msg
|
||||
if(it->rsid != rsPeers->getOwnId())
|
||||
{
|
||||
QTextEdit editor ;
|
||||
editor.setHtml(QString::fromStdWString(it->msg));
|
||||
QString notifyMsg(QString::fromStdString(it->name)+": "+editor.toPlainText()) ;
|
||||
|
||||
if(notifyMsg.length() > 30)
|
||||
emit notifyGroupChat(QString("New group chat"), notifyMsg.left(30)+QString("..."));
|
||||
else
|
||||
emit notifyGroupChat(QString("New group chat"), notifyMsg);
|
||||
}
|
||||
|
||||
|
||||
/* add it everytime */
|
||||
currenttxt += extraTxt;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue