Added to use now only the default Message Composer for MsgItem and PeerItem too, GeneralMessage needs to be removed soon.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2971 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2010-05-21 23:49:01 +00:00
parent 5b9b0aba96
commit f79afbf7c3
2 changed files with 38 additions and 3 deletions

View file

@ -28,6 +28,8 @@
#include "rsiface/rsmsgs.h"
#include "rsiface/rspeers.h"
#include "gui/msgs/ChanMsgDialog.h"
#include <iostream>
/****
@ -246,8 +248,29 @@ void MsgItem::replyMsg()
#endif
if (mParent)
{
mParent->openMsg(FEEDHOLDER_MSG_MESSAGE, mPeerId, mMsgId);
}
//mParent->openMsg(FEEDHOLDER_MSG_MESSAGE, mPeerId, mMsgId);
MessageInfo msgInfo;
if (!rsMsgs -> getMessage(mMsgId, msgInfo))
return ;
ChanMsgDialog *nMsgDialog = new ChanMsgDialog(true);
nMsgDialog->newMsg();
nMsgDialog->insertTitleText( (QString("Re: ") + QString::fromStdWString(msgInfo.title)).toStdString()) ;
nMsgDialog->setWindowTitle(tr("Re: ") + QString::fromStdWString(msgInfo.title) ) ;
QTextDocument doc ;
doc.setHtml(QString::fromStdWString(msgInfo.msg)) ;
std::string cited_text(doc.toPlainText().toStdString()) ;
nMsgDialog->insertPastedText(cited_text) ;
nMsgDialog->addRecipient( msgInfo.srcId ) ;
nMsgDialog->show();
nMsgDialog->activateWindow();
/* window will destroy itself! */
}
}