Use sslid to add a location when accepting a friend request from the security item with a known pgp key.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6668 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2013-09-01 22:18:39 +00:00
parent 8239c69963
commit 4559b48a9d
5 changed files with 28 additions and 7 deletions

View file

@ -139,7 +139,7 @@ void ConnectFriendWizard::setCertificate(const QString &certificate, bool friend
}
}
void ConnectFriendWizard::setGpgId(const std::string &gpgId, bool friendRequest)
void ConnectFriendWizard::setGpgId(const std::string &gpgId, const std::string &sslId, bool friendRequest)
{
if (!rsPeers->getPeerDetails(gpgId, peerDetails)) {
setField("errorMessage", tr("Cannot get peer details of PGP key %1").arg(QString::fromStdString(gpgId)));
@ -147,6 +147,9 @@ void ConnectFriendWizard::setGpgId(const std::string &gpgId, bool friendRequest)
return;
}
/* Set ssl id when available */
peerDetails.id = sslId;
setStartId(friendRequest ? Page_FriendRequest : Page_Conclusion);
}
@ -371,7 +374,23 @@ void ConnectFriendWizard::initializePage(int id)
ui->fr_nameEdit->setText(QString::fromUtf8(peerDetails.name.c_str()));
ui->fr_emailEdit->setText(QString::fromUtf8(peerDetails.email.c_str()));
ui->fr_locationEdit->setText(QString::fromUtf8(peerDetails.location.c_str()));
QString loc = QString::fromUtf8(peerDetails.location.c_str());
if (!loc.isEmpty())
{
loc += " (";
loc += QString::fromStdString(peerDetails.id);
loc += ")";
}
else
{
if (!peerDetails.id.empty())
{
loc += QString::fromStdString(peerDetails.id);
}
}
ui->fr_locationEdit->setText(loc);
ui->fr_label->setText(tr("You have a friend request from") + " " + QString::fromUtf8(peerDetails.name.c_str()));