mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-13 11:32:48 -04:00
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:
parent
8da8f24683
commit
e24ea71348
2 changed files with 93 additions and 22 deletions
|
@ -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));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue