From 25b888d31f03489851580c7120905c4102c38203 Mon Sep 17 00:00:00 2001 From: thunder2 Date: Tue, 14 Jun 2011 20:42:32 +0000 Subject: [PATCH] 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 --- retroshare-gui/src/gui/msgs/MessageComposer.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/retroshare-gui/src/gui/msgs/MessageComposer.cpp b/retroshare-gui/src/gui/msgs/MessageComposer.cpp index d8156fc6b..e028d0276 100644 --- a/retroshare-gui/src/gui/msgs/MessageComposer.cpp +++ b/retroshare-gui/src/gui/msgs/MessageComposer.cpp @@ -417,7 +417,11 @@ void MessageComposer::recommendFriend(std::list &peerids) sMsgText += BuildRecommendHtml(peerids); pMsgDialog->insertMsgText(sMsgText); -// pMsgDialog->insertFileList(files_info); + std::list ::iterator peerIt; + for (peerIt = peerids.begin(); peerIt != peerids.end(); peerIt++) { + pMsgDialog->addRecipient(CC, *peerIt, false); + } + pMsgDialog->show(); /* 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); } @@ -2435,6 +2439,11 @@ void MessageComposer::addRecommend() return; } + std::list ::iterator it; + for (it = gpgIds.begin(); it != gpgIds.end(); it++) { + addRecipient(CC, *it, false); + } + QString text = BuildRecommendHtml(gpgIds); ui.msgText->textCursor().insertHtml(text); ui.msgText->setFocus(Qt::OtherFocusReason);