Updated retroshare-gui to match libretroshare interface changes.

* remove calls to rsPeers->setAcceptToConnectGPGCertificate();
 * these are replaced with addFriend() / removeFriend().
 * renamed rsPeers->getSSLChildListOfGPGId() => rsPeers->getAssociatedSSLIds().



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4543 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2011-08-07 21:14:09 +00:00
parent 8e3e7d5209
commit b082362c58
8 changed files with 18 additions and 19 deletions

View File

@ -621,7 +621,7 @@ void FriendsDialog::insertPeers()
//add own gpg id, if we have more than on location (ssl client)
std::list<std::string> ownSslContacts;
std::string ownId = rsPeers->getGPGOwnId();
rsPeers->getSSLChildListOfGPGId(ownId, ownSslContacts);
rsPeers->getAssociatedSSLIds(ownId, ownSslContacts);
if (ownSslContacts.size() > 0) {
gpgFriends.push_back(ownId);
}
@ -864,7 +864,7 @@ void FriendsDialog::insertPeers()
bool gpg_hasPrivateChat = false;
std::list<std::string> sslContacts;
rsPeers->getSSLChildListOfGPGId(detail.gpg_id, sslContacts);
rsPeers->getAssociatedSSLIds(detail.gpg_id, sslContacts);
for (std::list<std::string>::iterator sslIt = sslContacts.begin(); sslIt != sslContacts.end(); sslIt++) {
QTreeWidgetItem *sslItem = NULL;
std::string sslId = *sslIt;

View File

@ -449,7 +449,7 @@ void MessengerWindow::insertPeers()
//add own gpg id, if we have more than on location (ssl client)
std::list<std::string> ownSslContacts;
rsPeers->getSSLChildListOfGPGId(sOwnId, ownSslContacts);
rsPeers->getAssociatedSSLIds(sOwnId, ownSslContacts);
if (ownSslContacts.size() > 0) {
gpgFriends.push_back(sOwnId);
}
@ -530,7 +530,7 @@ void MessengerWindow::insertPeers()
std::map<std::string, std::string> sslLocations;
std::map<std::string, QString> sslCustomStateStrings;
rsPeers->getSSLChildListOfGPGId(detail.gpg_id, sslContacts);
rsPeers->getAssociatedSSLIds(detail.gpg_id, sslContacts);
for(std::list<std::string>::iterator sslIt = sslContacts.begin(); sslIt != sslContacts.end(); sslIt++) {
QTreeWidgetItem *sslItem = NULL;

View File

@ -694,7 +694,7 @@ bool RetroShareLink::process(int flag)
return true;
}
if (rsPeers->setAcceptToConnectGPGCertificate(hash().toStdString(), true)) {
if (rsPeers->addFriend("", hash().toStdString())) {
ConfCertDialog::loadAll();
if (flag & RSLINK_PROCESS_NOTIFY_SUCCESS) {
QMessageBox mb(QObject::tr("Friend Request Confirmation"), QObject::tr("The friend has been added to your list."),QMessageBox::Information,QMessageBox::Ok,0,0);

View File

@ -378,7 +378,7 @@ void PopupChatDialog::chatFriend(const std::string &id)
if (detail.isOnlyGPGdetail) {
//let's get the ssl child details, and open all the chat boxes
std::list<std::string> sslIds;
rsPeers->getSSLChildListOfGPGId(detail.gpg_id, sslIds);
rsPeers->getAssociatedSSLIds(detail.gpg_id, sslIds);
for (std::list<std::string>::iterator it = sslIds.begin(); it != sslIds.end(); it++) {
if (firstId.empty()) {
firstId = *it;

View File

@ -393,9 +393,8 @@ void ConfCertDialog::makeFriend()
std::string gpg_id = rsPeers->getGPGId(mId);
if (ui.signGPGKeyCheckBox->isChecked()) {
rsPeers->signGPGCertificate(gpg_id);
} else {
rsPeers->setAcceptToConnectGPGCertificate(gpg_id, true);
}
rsPeers->addFriend(mId, gpg_id);
loadAll();
@ -405,7 +404,7 @@ void ConfCertDialog::makeFriend()
void ConfCertDialog::denyFriend()
{
std::string gpg_id = rsPeers->getGPGId(mId);
rsPeers->setAcceptToConnectGPGCertificate(gpg_id, false);
rsPeers->removeFriend(gpg_id);
loadAll();
emit configChanged();

View File

@ -128,7 +128,7 @@ ConnectFriendWizard::accept()
rsPeers->signGPGCertificate(gpg_Id); //bye default sign set accept_connection to true;
} else if (accept_connection) {
std::cerr << "ConclusionPage::validatePage() accepting GPG key for connection." << std::endl;
rsPeers->setAcceptToConnectGPGCertificate(gpg_Id, true);
rsPeers->addFriend("", gpg_Id);
}
QString groupId = field(GROUP_ID_FIELD_CONNECT_FRIEND_WIZARD).toString();

View File

@ -402,7 +402,7 @@ void ForumMsgItem::updateAvatar(const QString &peer_id)
if (mGpgIdPrev.empty() == false) {
/* Is this one of the ssl ids of the gpg id ? */
std::list<std::string> sslIds;
if (rsPeers->getSSLChildListOfGPGId(mGpgIdPrev, sslIds) == false) {
if (rsPeers->getAssociatedSSLIds(mGpgIdPrev, sslIds) == false) {
return;
}
@ -415,7 +415,7 @@ void ForumMsgItem::updateAvatar(const QString &peer_id)
if (mGpgIdNext.empty() == false) {
/* Is this one of the ssl ids of the gpg id ? */
std::list<std::string> sslIds;
if (rsPeers->getSSLChildListOfGPGId(mGpgIdNext, sslIds) == false) {
if (rsPeers->getAssociatedSSLIds(mGpgIdNext, sslIds) == false) {
return;
}
@ -446,7 +446,7 @@ void ForumMsgItem::showAvatar(const std::string &peer_id, bool next)
if (peer_id.empty()) {
/* Show the first available avatar of one of the ssl ids */
std::list<std::string> sslIds;
if (rsPeers->getSSLChildListOfGPGId(gpgId, sslIds) == false) {
if (rsPeers->getAssociatedSSLIds(gpgId, sslIds) == false) {
return;
}

View File

@ -366,7 +366,7 @@ void MessageComposer::processSettings(bool bLoad)
if (detail.isOnlyGPGdetail) {
//put all sslChilds in message list
std::list<std::string> sslIds;
rsPeers->getSSLChildListOfGPGId(id, sslIds);
rsPeers->getAssociatedSSLIds(id, sslIds);
std::list<std::string>::const_iterator it;
for (it = sslIds.begin(); it != sslIds.end(); it++) {
@ -859,7 +859,7 @@ static void calculateGroupsOfSslIds(std::list<RsGroupInfo> &existingGroupInfos,
std::map<std::string, std::list<std::string> >::iterator it = gpgToSslIds.find(*peerIt);
if (it == gpgToSslIds.end()) {
rsPeers->getSSLChildListOfGPGId(*peerIt, sslIds);
rsPeers->getAssociatedSSLIds(*peerIt, sslIds);
gpgToSslIds[*peerIt] = sslIds;
} else {
@ -896,7 +896,7 @@ static void calculateGroupsOfSslIds(std::list<RsGroupInfo> &existingGroupInfos,
std::map<std::string, std::list<std::string> >::iterator it = gpgToSslIds.find(*peerIt);
if (it == gpgToSslIds.end()) {
rsPeers->getSSLChildListOfGPGId(*peerIt, sslIds);
rsPeers->getAssociatedSSLIds(*peerIt, sslIds);
gpgToSslIds[*peerIt] = sslIds;
} else {
@ -1209,7 +1209,7 @@ bool MessageComposer::sendMessage_internal(bool bDraftbox)
std::list<std::string>::const_iterator groupIt;
for (groupIt = groupInfo.peerIds.begin(); groupIt != groupInfo.peerIds.end(); groupIt++) {
std::list<std::string> sslIds;
rsPeers->getSSLChildListOfGPGId(*groupIt, sslIds);
rsPeers->getAssociatedSSLIds(*groupIt, sslIds);
std::list<std::string>::const_iterator sslIt;
for (sslIt = sslIds.begin(); sslIt != sslIds.end(); sslIt++) {
@ -1578,7 +1578,7 @@ void MessageComposer::addRecipient(enumType type, const std::string &id, bool gr
}
if (detail.isOnlyGPGdetail) {
if (!rsPeers->getSSLChildListOfGPGId(id, sslIds)) {
if (!rsPeers->getAssociatedSSLIds(id, sslIds)) {
return;
}
} else {