mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-06 08:05:18 -04:00
Added a insertPastedText() method to ChanMsgDialog to allow inserting blue text while responding to msg
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@721 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
9b0bfb26c2
commit
787159debe
3 changed files with 11 additions and 5 deletions
|
@ -505,6 +505,14 @@ void ChanMsgDialog::insertTitleText(std::string title)
|
|||
ui.titleEdit->setText(QString::fromStdString(title));
|
||||
}
|
||||
|
||||
void ChanMsgDialog::insertPastedText(std::string msg)
|
||||
{
|
||||
std::string::size_type i=0 ;
|
||||
while( (i=msg.find_first_of('\n',i+1)) < msg.size())
|
||||
msg.replace(i,1,std::string("\n<BR/>> ")) ;
|
||||
|
||||
ui.msgText->setHtml(QString("<HTML><font color=\"blue\">")+QString::fromStdString(std::string("> ") + msg)+"</font><br/><br/></HTML>") ;
|
||||
}
|
||||
|
||||
void ChanMsgDialog::insertMsgText(std::string msg)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue