mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-04 09:05:34 -05: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
@ -230,11 +230,7 @@ void MessagesDialog::replytomessage()
|
||||
doc.setHtml(QString::fromStdWString(msgInfo.msg)) ;
|
||||
std::string cited_text(doc.toPlainText().toStdString()) ;
|
||||
|
||||
std::string::size_type i=0 ;
|
||||
while( (i=cited_text.find_first_of('\n',i+1)) < cited_text.size())
|
||||
cited_text.replace(i,1,std::string("\n> ")) ;
|
||||
|
||||
nMsgDialog->insertMsgText( std::string("> ") + cited_text ) ;
|
||||
nMsgDialog->insertPastedText(cited_text) ;
|
||||
nMsgDialog->addRecipient( msgInfo.srcId ) ;
|
||||
nMsgDialog->show();
|
||||
nMsgDialog->activateWindow();
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -53,6 +53,7 @@ void insertSendList(); /* for Msgs */
|
||||
void insertChannelSendList(); /* for Channels */
|
||||
void insertFileList(); /* for Both */
|
||||
void insertTitleText(std::string title);
|
||||
void insertPastedText(std::string msg) ;
|
||||
void insertMsgText(std::string msg);
|
||||
void addRecipient(std::string id) ;
|
||||
void Create_New_Image_Tag( const QString urlremoteorlocal );
|
||||
@ -110,6 +111,7 @@ private slots:
|
||||
|
||||
|
||||
private:
|
||||
void setTextColor(const QColor& col) ;
|
||||
void setupFileActions();
|
||||
void setupEditActions();
|
||||
void setupViewActions();
|
||||
|
Loading…
x
Reference in New Issue
Block a user