From 5807dcd2fe1fa07ef7f7e4d77bf2ee15f4aac7fd Mon Sep 17 00:00:00 2001 From: defnax Date: Mon, 4 Jan 2010 16:03:26 +0000 Subject: [PATCH] added switch signed/none string when Forum has signed or none signed message git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1973 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/ForumsDialog.cpp | 33 ++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/retroshare-gui/src/gui/ForumsDialog.cpp b/retroshare-gui/src/gui/ForumsDialog.cpp index b6487f95f..9bf0e7433 100644 --- a/retroshare-gui/src/gui/ForumsDialog.cpp +++ b/retroshare-gui/src/gui/ForumsDialog.cpp @@ -670,7 +670,15 @@ void ForumsDialog::insertThreads() item->setText(2, tr("Anonymous")); } - item->setText(3, "signed"); + if (msginfo.msgflags & RS_DISTRIB_AUTHEN_REQ) + { + item->setText(3, tr("signed")); + } + else + { + item->setText(3, tr("none")); + } + item->setText(4, QString::fromStdString(tit->parentId)); item->setText(5, QString::fromStdString(tit->msgId)); @@ -736,9 +744,26 @@ void ForumsDialog::insertThreads() ForumMsgInfo msginfo ; rsForums->getForumMessage(fId,mit->msgId,msginfo) ; - child->setText(1, QString::fromStdWString(mit->title)); - child->setText(2, QString::fromStdString(rsPeers->getPeerName(msginfo.srcId))); - child->setText(3, "signed"); + child->setText(1, QString::fromStdWString(mit->title)); + + if (rsPeers->getPeerName(msginfo.srcId) !="") + { + child->setText(2, QString::fromStdString(rsPeers->getPeerName(msginfo.srcId))); + } + else + { + child->setText(2, tr("Anonymous")); + } + + if (msginfo.msgflags & RS_DISTRIB_AUTHEN_REQ) + { + child->setText(3, tr("signed")); + } + else + { + child->setText(3, tr("none")); + } + child->setText(4, QString::fromStdString(mit->parentId)); child->setText(5, QString::fromStdString(mit->msgId));