Show forums with unread messages with bold font.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3356 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-08-10 15:41:25 +00:00
parent 27acf18b28
commit 2b597d4542

View File

@ -1888,11 +1888,16 @@ void ForumsDialog::updateMessageSummaryList(std::string forumId)
rsForums->getMessageCount(fId, newMessageCount, unreadMessageCount); rsForums->getMessageCount(fId, newMessageCount, unreadMessageCount);
QString sTitle = pItem->data(COLUMN_FORUM_DATA, ROLE_FORUM_TITLE).toString(); QString sTitle = pItem->data(COLUMN_FORUM_DATA, ROLE_FORUM_TITLE).toString();
QFont qf = pItem->font(COLUMN_FORUM_TITLE);
if (unreadMessageCount) { if (unreadMessageCount) {
sTitle += " (" + QString::number(unreadMessageCount) + ")"; sTitle += " (" + QString::number(unreadMessageCount) + ")";
qf.setBold(true);
} else {
qf.setBold(false);
} }
pItem->setText(COLUMN_FORUM_TITLE, sTitle); pItem->setText(COLUMN_FORUM_TITLE, sTitle);
pItem->setFont(COLUMN_FORUM_TITLE, qf);
if (forumId.empty() == false) { if (forumId.empty() == false) {
/* calculate only this forum */ /* calculate only this forum */