mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-25 09:11:06 -04:00
Changed style of the reply/forwarded message.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5141 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
173ce82099
commit
2611da2f72
10 changed files with 296 additions and 175 deletions
|
@ -1517,6 +1517,27 @@ void ForumsDialog::editForumDetails()
|
|||
editUi.exec();
|
||||
}
|
||||
|
||||
static QString buildReplyHeader(const ForumMsgInfo &msgInfo)
|
||||
{
|
||||
RetroShareLink link;
|
||||
link.createMessage(msgInfo.srcId, "");
|
||||
QString from = link.toHtml();
|
||||
|
||||
QDateTime qtime;
|
||||
qtime.setTime_t(msgInfo.ts);
|
||||
|
||||
QString header = QString("<span>-----%1-----").arg(QApplication::translate("ForumsDialog", "Original Message"));
|
||||
header += QString("<br><font size='3'><strong>%1: </strong>%2</font><br>").arg(QApplication::translate("ForumsDialog", "From"), from);
|
||||
|
||||
header += QString("<br><font size='3'><strong>%1: </strong>%2</font><br>").arg(QApplication::translate("ForumsDialog", "Sent"), qtime.toString(Qt::SystemLocaleLongDate));
|
||||
header += QString("<font size='3'><strong>%1: </strong>%2</font></span><br>").arg(QApplication::translate("ForumsDialog", "Subject"), QString::fromStdWString(msgInfo.title));
|
||||
header += "<br>";
|
||||
|
||||
header += QApplication::translate("ForumsDialog", "On %1, %2 wrote:").arg(qtime.toString(Qt::SystemLocaleShortDate), from);
|
||||
|
||||
return header;
|
||||
}
|
||||
|
||||
void ForumsDialog::replytomessage()
|
||||
{
|
||||
if (mCurrForumId.empty()) {
|
||||
|
@ -1532,13 +1553,11 @@ void ForumsDialog::replytomessage()
|
|||
if (rsPeers->getPeerName(msgInfo.srcId) !="")
|
||||
{
|
||||
MessageComposer *nMsgDialog = MessageComposer::newMsg();
|
||||
nMsgDialog->insertTitleText(QString::fromStdWString(msgInfo.title), MessageComposer::REPLY);
|
||||
nMsgDialog->setTitleText(QString::fromStdWString(msgInfo.title), MessageComposer::REPLY);
|
||||
|
||||
QTextDocument doc ;
|
||||
doc.setHtml(QString::fromStdWString(msgInfo.msg)) ;
|
||||
|
||||
nMsgDialog->insertPastedText(doc.toPlainText());
|
||||
nMsgDialog->setQuotedMsg(QString::fromStdWString(msgInfo.msg), buildReplyHeader(msgInfo));
|
||||
nMsgDialog->addRecipient(MessageComposer::TO, msgInfo.srcId, false);
|
||||
|
||||
nMsgDialog->show();
|
||||
nMsgDialog->activateWindow();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue