mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
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:
parent
8e3e7d5209
commit
b082362c58
@ -621,7 +621,7 @@ void FriendsDialog::insertPeers()
|
|||||||
//add own gpg id, if we have more than on location (ssl client)
|
//add own gpg id, if we have more than on location (ssl client)
|
||||||
std::list<std::string> ownSslContacts;
|
std::list<std::string> ownSslContacts;
|
||||||
std::string ownId = rsPeers->getGPGOwnId();
|
std::string ownId = rsPeers->getGPGOwnId();
|
||||||
rsPeers->getSSLChildListOfGPGId(ownId, ownSslContacts);
|
rsPeers->getAssociatedSSLIds(ownId, ownSslContacts);
|
||||||
if (ownSslContacts.size() > 0) {
|
if (ownSslContacts.size() > 0) {
|
||||||
gpgFriends.push_back(ownId);
|
gpgFriends.push_back(ownId);
|
||||||
}
|
}
|
||||||
@ -864,7 +864,7 @@ void FriendsDialog::insertPeers()
|
|||||||
bool gpg_hasPrivateChat = false;
|
bool gpg_hasPrivateChat = false;
|
||||||
std::list<std::string> sslContacts;
|
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++) {
|
for (std::list<std::string>::iterator sslIt = sslContacts.begin(); sslIt != sslContacts.end(); sslIt++) {
|
||||||
QTreeWidgetItem *sslItem = NULL;
|
QTreeWidgetItem *sslItem = NULL;
|
||||||
std::string sslId = *sslIt;
|
std::string sslId = *sslIt;
|
||||||
|
@ -449,7 +449,7 @@ void MessengerWindow::insertPeers()
|
|||||||
|
|
||||||
//add own gpg id, if we have more than on location (ssl client)
|
//add own gpg id, if we have more than on location (ssl client)
|
||||||
std::list<std::string> ownSslContacts;
|
std::list<std::string> ownSslContacts;
|
||||||
rsPeers->getSSLChildListOfGPGId(sOwnId, ownSslContacts);
|
rsPeers->getAssociatedSSLIds(sOwnId, ownSslContacts);
|
||||||
if (ownSslContacts.size() > 0) {
|
if (ownSslContacts.size() > 0) {
|
||||||
gpgFriends.push_back(sOwnId);
|
gpgFriends.push_back(sOwnId);
|
||||||
}
|
}
|
||||||
@ -530,7 +530,7 @@ void MessengerWindow::insertPeers()
|
|||||||
std::map<std::string, std::string> sslLocations;
|
std::map<std::string, std::string> sslLocations;
|
||||||
std::map<std::string, QString> sslCustomStateStrings;
|
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++) {
|
for(std::list<std::string>::iterator sslIt = sslContacts.begin(); sslIt != sslContacts.end(); sslIt++) {
|
||||||
QTreeWidgetItem *sslItem = NULL;
|
QTreeWidgetItem *sslItem = NULL;
|
||||||
|
|
||||||
|
@ -694,7 +694,7 @@ bool RetroShareLink::process(int flag)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rsPeers->setAcceptToConnectGPGCertificate(hash().toStdString(), true)) {
|
if (rsPeers->addFriend("", hash().toStdString())) {
|
||||||
ConfCertDialog::loadAll();
|
ConfCertDialog::loadAll();
|
||||||
if (flag & RSLINK_PROCESS_NOTIFY_SUCCESS) {
|
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);
|
QMessageBox mb(QObject::tr("Friend Request Confirmation"), QObject::tr("The friend has been added to your list."),QMessageBox::Information,QMessageBox::Ok,0,0);
|
||||||
|
@ -378,7 +378,7 @@ void PopupChatDialog::chatFriend(const std::string &id)
|
|||||||
if (detail.isOnlyGPGdetail) {
|
if (detail.isOnlyGPGdetail) {
|
||||||
//let's get the ssl child details, and open all the chat boxes
|
//let's get the ssl child details, and open all the chat boxes
|
||||||
std::list<std::string> sslIds;
|
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++) {
|
for (std::list<std::string>::iterator it = sslIds.begin(); it != sslIds.end(); it++) {
|
||||||
if (firstId.empty()) {
|
if (firstId.empty()) {
|
||||||
firstId = *it;
|
firstId = *it;
|
||||||
|
@ -393,9 +393,8 @@ void ConfCertDialog::makeFriend()
|
|||||||
std::string gpg_id = rsPeers->getGPGId(mId);
|
std::string gpg_id = rsPeers->getGPGId(mId);
|
||||||
if (ui.signGPGKeyCheckBox->isChecked()) {
|
if (ui.signGPGKeyCheckBox->isChecked()) {
|
||||||
rsPeers->signGPGCertificate(gpg_id);
|
rsPeers->signGPGCertificate(gpg_id);
|
||||||
} else {
|
|
||||||
rsPeers->setAcceptToConnectGPGCertificate(gpg_id, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rsPeers->addFriend(mId, gpg_id);
|
rsPeers->addFriend(mId, gpg_id);
|
||||||
loadAll();
|
loadAll();
|
||||||
|
|
||||||
@ -405,7 +404,7 @@ void ConfCertDialog::makeFriend()
|
|||||||
void ConfCertDialog::denyFriend()
|
void ConfCertDialog::denyFriend()
|
||||||
{
|
{
|
||||||
std::string gpg_id = rsPeers->getGPGId(mId);
|
std::string gpg_id = rsPeers->getGPGId(mId);
|
||||||
rsPeers->setAcceptToConnectGPGCertificate(gpg_id, false);
|
rsPeers->removeFriend(gpg_id);
|
||||||
loadAll();
|
loadAll();
|
||||||
|
|
||||||
emit configChanged();
|
emit configChanged();
|
||||||
|
@ -128,7 +128,7 @@ ConnectFriendWizard::accept()
|
|||||||
rsPeers->signGPGCertificate(gpg_Id); //bye default sign set accept_connection to true;
|
rsPeers->signGPGCertificate(gpg_Id); //bye default sign set accept_connection to true;
|
||||||
} else if (accept_connection) {
|
} else if (accept_connection) {
|
||||||
std::cerr << "ConclusionPage::validatePage() accepting GPG key for connection." << std::endl;
|
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();
|
QString groupId = field(GROUP_ID_FIELD_CONNECT_FRIEND_WIZARD).toString();
|
||||||
|
@ -402,7 +402,7 @@ void ForumMsgItem::updateAvatar(const QString &peer_id)
|
|||||||
if (mGpgIdPrev.empty() == false) {
|
if (mGpgIdPrev.empty() == false) {
|
||||||
/* Is this one of the ssl ids of the gpg id ? */
|
/* Is this one of the ssl ids of the gpg id ? */
|
||||||
std::list<std::string> sslIds;
|
std::list<std::string> sslIds;
|
||||||
if (rsPeers->getSSLChildListOfGPGId(mGpgIdPrev, sslIds) == false) {
|
if (rsPeers->getAssociatedSSLIds(mGpgIdPrev, sslIds) == false) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -415,7 +415,7 @@ void ForumMsgItem::updateAvatar(const QString &peer_id)
|
|||||||
if (mGpgIdNext.empty() == false) {
|
if (mGpgIdNext.empty() == false) {
|
||||||
/* Is this one of the ssl ids of the gpg id ? */
|
/* Is this one of the ssl ids of the gpg id ? */
|
||||||
std::list<std::string> sslIds;
|
std::list<std::string> sslIds;
|
||||||
if (rsPeers->getSSLChildListOfGPGId(mGpgIdNext, sslIds) == false) {
|
if (rsPeers->getAssociatedSSLIds(mGpgIdNext, sslIds) == false) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -446,7 +446,7 @@ void ForumMsgItem::showAvatar(const std::string &peer_id, bool next)
|
|||||||
if (peer_id.empty()) {
|
if (peer_id.empty()) {
|
||||||
/* Show the first available avatar of one of the ssl ids */
|
/* Show the first available avatar of one of the ssl ids */
|
||||||
std::list<std::string> sslIds;
|
std::list<std::string> sslIds;
|
||||||
if (rsPeers->getSSLChildListOfGPGId(gpgId, sslIds) == false) {
|
if (rsPeers->getAssociatedSSLIds(gpgId, sslIds) == false) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -366,7 +366,7 @@ void MessageComposer::processSettings(bool bLoad)
|
|||||||
if (detail.isOnlyGPGdetail) {
|
if (detail.isOnlyGPGdetail) {
|
||||||
//put all sslChilds in message list
|
//put all sslChilds in message list
|
||||||
std::list<std::string> sslIds;
|
std::list<std::string> sslIds;
|
||||||
rsPeers->getSSLChildListOfGPGId(id, sslIds);
|
rsPeers->getAssociatedSSLIds(id, sslIds);
|
||||||
|
|
||||||
std::list<std::string>::const_iterator it;
|
std::list<std::string>::const_iterator it;
|
||||||
for (it = sslIds.begin(); it != sslIds.end(); 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);
|
std::map<std::string, std::list<std::string> >::iterator it = gpgToSslIds.find(*peerIt);
|
||||||
if (it == gpgToSslIds.end()) {
|
if (it == gpgToSslIds.end()) {
|
||||||
rsPeers->getSSLChildListOfGPGId(*peerIt, sslIds);
|
rsPeers->getAssociatedSSLIds(*peerIt, sslIds);
|
||||||
|
|
||||||
gpgToSslIds[*peerIt] = sslIds;
|
gpgToSslIds[*peerIt] = sslIds;
|
||||||
} else {
|
} 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);
|
std::map<std::string, std::list<std::string> >::iterator it = gpgToSslIds.find(*peerIt);
|
||||||
if (it == gpgToSslIds.end()) {
|
if (it == gpgToSslIds.end()) {
|
||||||
rsPeers->getSSLChildListOfGPGId(*peerIt, sslIds);
|
rsPeers->getAssociatedSSLIds(*peerIt, sslIds);
|
||||||
|
|
||||||
gpgToSslIds[*peerIt] = sslIds;
|
gpgToSslIds[*peerIt] = sslIds;
|
||||||
} else {
|
} else {
|
||||||
@ -1209,7 +1209,7 @@ bool MessageComposer::sendMessage_internal(bool bDraftbox)
|
|||||||
std::list<std::string>::const_iterator groupIt;
|
std::list<std::string>::const_iterator groupIt;
|
||||||
for (groupIt = groupInfo.peerIds.begin(); groupIt != groupInfo.peerIds.end(); groupIt++) {
|
for (groupIt = groupInfo.peerIds.begin(); groupIt != groupInfo.peerIds.end(); groupIt++) {
|
||||||
std::list<std::string> sslIds;
|
std::list<std::string> sslIds;
|
||||||
rsPeers->getSSLChildListOfGPGId(*groupIt, sslIds);
|
rsPeers->getAssociatedSSLIds(*groupIt, sslIds);
|
||||||
|
|
||||||
std::list<std::string>::const_iterator sslIt;
|
std::list<std::string>::const_iterator sslIt;
|
||||||
for (sslIt = sslIds.begin(); sslIt != sslIds.end(); 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 (detail.isOnlyGPGdetail) {
|
||||||
if (!rsPeers->getSSLChildListOfGPGId(id, sslIds)) {
|
if (!rsPeers->getAssociatedSSLIds(id, sslIds)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user