mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-05 01:25:39 -05:00
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:
parent
2b5dca3a39
commit
df5d69540a
@ -135,7 +135,7 @@ void RsBanListToolButton::applyIp()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sockaddr_storage addr ;
|
sockaddr_storage addr;
|
||||||
int masked_bytes;
|
int masked_bytes;
|
||||||
|
|
||||||
if (!RsNetUtil::parseAddrFromQString(mIpAddress, addr, masked_bytes)) {
|
if (!RsNetUtil::parseAddrFromQString(mIpAddress, addr, masked_bytes)) {
|
||||||
@ -165,6 +165,6 @@ void RsBanListToolButton::applyIp()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (changed) {
|
if (changed) {
|
||||||
emit banListChanged();
|
emit banListChanged(RsNetUtil::printAddrRange(addr, masked_bytes));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ public:
|
|||||||
bool setIpAddress(const QString &ipAddress);
|
bool setIpAddress(const QString &ipAddress);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void banListChanged();
|
void banListChanged(const QString &ipAddress);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updateUi();
|
void updateUi();
|
||||||
|
@ -67,7 +67,7 @@ void SecurityIpItem::setup()
|
|||||||
|
|
||||||
/* specific ones */
|
/* specific ones */
|
||||||
connect(ui->peerDetailsButton, SIGNAL(clicked()), this, SLOT(peerDetails()));
|
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->avatar->setId(ChatId(mSslId));
|
||||||
ui->rsBanListButton->setMode(RsBanListToolButton::LIST_WHITELIST, RsBanListToolButton::MODE_ADD);
|
ui->rsBanListButton->setMode(RsBanListToolButton::LIST_WHITELIST, RsBanListToolButton::MODE_ADD);
|
||||||
@ -250,3 +250,9 @@ void SecurityIpItem::peerDetails()
|
|||||||
ConfCertDialog::showIt(mSslId, ConfCertDialog::PageDetails);
|
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();
|
||||||
|
}
|
||||||
|
@ -58,6 +58,7 @@ private slots:
|
|||||||
void toggle();
|
void toggle();
|
||||||
void peerDetails();
|
void peerDetails();
|
||||||
void updateItem();
|
void updateItem();
|
||||||
|
void banIpListChanged(const QString &ipAddress);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FeedHolder *mParent;
|
FeedHolder *mParent;
|
||||||
|
@ -210,7 +210,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="rsBanListChangedLabel">
|
<widget class="QLabel" name="rsBanListChangedLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>IP address was added to the whitelist</string>
|
<string notr="true">IP address was added to the whitelist</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user