removing of own gpg key as friend when not necessary

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2080 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2010-01-19 13:09:11 +00:00
parent 98820697d4
commit b617dcd1f7
3 changed files with 17 additions and 3 deletions

View file

@ -334,8 +334,16 @@ void PeersDialog::insertPeers()
//remove items that are not fiends anymore
int index = 0;
while (index < peertreeWidget->topLevelItemCount()) {
std::string gpg_id = (peertreeWidget->topLevelItem(index))->text(3).toStdString();
if (!rsPeers->isGPGAccepted(gpg_id) && gpg_id != rsPeers->getGPGOwnId()) {
std::string gpg_widget_id = (peertreeWidget->topLevelItem(index))->text(3).toStdString();
std::list<std::string>::iterator gpgfriendIt;
bool found = false;
for (gpgfriendIt = gpgFriends.begin(); gpgfriendIt != gpgFriends.end(); gpgfriendIt++) {
if (gpg_widget_id == *gpgfriendIt) {
found = true;
break;
}
}
if (!found) {
peertreeWidget->takeTopLevelItem(index);
} else {
index++;