Added own flag and new checkbox in settings for security ip feed items.

Changed NewsFeed::addUnique for SecurityIpItem to compare the ip addresses.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8424 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2015-06-13 01:28:01 +00:00
parent f360e9d0ba
commit ad4f57d756
8 changed files with 75 additions and 24 deletions

View file

@ -79,9 +79,9 @@ void SecurityIpItem::setup()
updateItem();
}
bool SecurityIpItem::isSame(const RsPeerId &sslId, uint32_t type)
bool SecurityIpItem::isSame(const std::string& ipAddr, const std::string& ipAddrReported, uint32_t type)
{
if (mSslId == sslId && mType == type) {
if (mType == type && mIpAddr == ipAddr && mIpAddrReported == ipAddrReported) {
return true;
}
@ -106,7 +106,7 @@ void SecurityIpItem::updateItemStatic()
ui->ipAddrReported->hide();
ui->ipAddrReportedLabel->hide();
break;
case RS_FEED_ITEM_SEC_WRONG_EXTERNAL_IP_REPORTED:
case RS_FEED_ITEM_SEC_IP_WRONG_EXTERNAL_IP_REPORTED:
ui->rsBanListButton->hide();
break;
default:
@ -149,7 +149,7 @@ void SecurityIpItem::updateItem()
}
}
break;
case RS_FEED_ITEM_SEC_WRONG_EXTERNAL_IP_REPORTED:
case RS_FEED_ITEM_SEC_IP_WRONG_EXTERNAL_IP_REPORTED:
ui->titleLabel->setText(tr("Wrong external ip address reported"));
ui->ipAddr->setText(QString::fromStdString(mIpAddr));
ui->ipAddr->setToolTip(tr("<p>This is the external IP your Retroshare node thinks it is using.</p>")) ;

View file

@ -44,7 +44,7 @@ public:
void updateItemStatic();
bool isSame(const RsPeerId &sslId, uint32_t type);
bool isSame(const std::string& ipAddr, const std::string& ipAddrReported, uint32_t type);
/* FeedItem */
virtual void expand(bool open);