Added ip address to the info in SecurityIpItem

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8357 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2015-06-03 17:16:06 +00:00
parent 2b5dca3a39
commit df5d69540a
5 changed files with 12 additions and 5 deletions

View File

@ -165,6 +165,6 @@ void RsBanListToolButton::applyIp()
}
if (changed) {
emit banListChanged();
emit banListChanged(RsNetUtil::printAddrRange(addr, masked_bytes));
}
}

View File

@ -47,7 +47,7 @@ public:
bool setIpAddress(const QString &ipAddress);
signals:
void banListChanged();
void banListChanged(const QString &ipAddress);
private:
void updateUi();

View File

@ -67,7 +67,7 @@ void SecurityIpItem::setup()
/* specific ones */
connect(ui->peerDetailsButton, SIGNAL(clicked()), this, SLOT(peerDetails()));
connect(ui->rsBanListButton, SIGNAL(banListChanged()), ui->rsBanListChangedLabel, SLOT(show()));
connect(ui->rsBanListButton, SIGNAL(banListChanged(QString)), this, SLOT(banIpListChanged(QString)));
ui->avatar->setId(ChatId(mSslId));
ui->rsBanListButton->setMode(RsBanListToolButton::LIST_WHITELIST, RsBanListToolButton::MODE_ADD);
@ -250,3 +250,9 @@ void SecurityIpItem::peerDetails()
ConfCertDialog::showIt(mSslId, ConfCertDialog::PageDetails);
}
}
void SecurityIpItem::banIpListChanged(const QString &ipAddress)
{
ui->rsBanListChangedLabel->setText(tr("IP address %1 was added to the whitelist").arg(ipAddress));
ui->rsBanListChangedLabel->show();
}

View File

@ -58,6 +58,7 @@ private slots:
void toggle();
void peerDetails();
void updateItem();
void banIpListChanged(const QString &ipAddress);
private:
FeedHolder *mParent;

View File

@ -210,7 +210,7 @@
<item>
<widget class="QLabel" name="rsBanListChangedLabel">
<property name="text">
<string>IP address was added to the whitelist</string>
<string notr="true">IP address was added to the whitelist</string>
</property>
</widget>
</item>