Added Author and Timestamp Label's for GxsForums

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5840 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2012-11-18 01:36:22 +00:00
parent 8da8f24683
commit e24ea71348
2 changed files with 93 additions and 22 deletions

View file

@ -1207,11 +1207,35 @@ void GxsForumsDialog::insertPostData(const RsGxsForumMsg &msg)
{
setMsgReadStatus(Row, true);
}
QString text;
{
QDateTime qtime;
qtime.setTime_t(msg.mMeta.mPublishTs);
text = qtime.toString("yyyy-MM-dd hh:mm:ss");
ui.time_label->setText(text);
}
std::string authorName = rsPeers->getPeerName(msg.mMeta.mAuthorId);
text = QString::fromUtf8(authorName.c_str());
if (text.isEmpty())
{
ui.by_label->setText( tr("By") + " " + tr("Anonymous"));
}
else
{
ui.by_label->setText( tr("By") + " " + text );
}
QString extraTxt = RsHtml().formatText(ui.postText->document(), messageFromInfo(msg), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS);
ui.postText->setHtml(extraTxt);
ui.threadTitle->setText(titleFromInfo(msg.mMeta));
}