Automatic add the recommended friend(s) as CC in the MessageComposer.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4262 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2011-06-14 20:42:32 +00:00
parent aa71b9320d
commit 25b888d31f

View File

@ -417,7 +417,11 @@ void MessageComposer::recommendFriend(std::list <std::string> &peerids)
sMsgText += BuildRecommendHtml(peerids); sMsgText += BuildRecommendHtml(peerids);
pMsgDialog->insertMsgText(sMsgText); pMsgDialog->insertMsgText(sMsgText);
// pMsgDialog->insertFileList(files_info); std::list <std::string>::iterator peerIt;
for (peerIt = peerids.begin(); peerIt != peerids.end(); peerIt++) {
pMsgDialog->addRecipient(CC, *peerIt, false);
}
pMsgDialog->show(); pMsgDialog->show();
/* window will destroy itself! */ /* window will destroy itself! */
@ -651,7 +655,7 @@ void MessageComposer::insertSendList()
} }
} }
if (state != RS_STATUS_OFFLINE) { if (state != (int) RS_STATUS_OFFLINE) {
item->setTextColor(COLUMN_CONTACT_NAME, COLOR_CONNECT); item->setTextColor(COLUMN_CONTACT_NAME, COLOR_CONNECT);
} }
@ -2435,6 +2439,11 @@ void MessageComposer::addRecommend()
return; return;
} }
std::list <std::string>::iterator it;
for (it = gpgIds.begin(); it != gpgIds.end(); it++) {
addRecipient(CC, *it, false);
}
QString text = BuildRecommendHtml(gpgIds); QString text = BuildRecommendHtml(gpgIds);
ui.msgText->textCursor().insertHtml(text); ui.msgText->textCursor().insertHtml(text);
ui.msgText->setFocus(Qt::OtherFocusReason); ui.msgText->setFocus(Qt::OtherFocusReason);