mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-07 13:52:43 -04:00
fixed display of TOR information for hidden nodes (patch from Sehraf)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8108 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
bdabfeea46
commit
65da6090fe
2 changed files with 84 additions and 42 deletions
|
@ -217,17 +217,39 @@ void ConfCertDialog::load()
|
||||||
|
|
||||||
if (detail.isHiddenNode)
|
if (detail.isHiddenNode)
|
||||||
{
|
{
|
||||||
/* set local address */
|
// enable only the first row and set name of the first label to "Hidden Address"
|
||||||
ui.localAddress->setText("hidden");
|
ui.l_localAddress->setText(tr("Hidden Address"));
|
||||||
ui.localPort -> setValue(0);
|
|
||||||
/* set the server address */
|
|
||||||
ui.extAddress->setText("hidden");
|
|
||||||
ui.extPort -> setValue(0);
|
|
||||||
|
|
||||||
ui.dynDNS->setText(QString::fromStdString(detail.hiddenNodeAddress));
|
ui.l_extAddress->setEnabled(false);
|
||||||
|
ui.extAddress->setEnabled(false);
|
||||||
|
ui.l_portExternal->setEnabled(false);
|
||||||
|
ui.extPort->setEnabled(false);
|
||||||
|
|
||||||
|
ui.l_dynDNS->setEnabled(false);
|
||||||
|
ui.dynDNS->setEnabled(false);
|
||||||
|
|
||||||
|
/* set hidden address */
|
||||||
|
ui.localAddress->setText(QString::fromStdString(detail.hiddenNodeAddress));
|
||||||
|
ui.localPort -> setValue(detail.hiddenNodePort);
|
||||||
|
|
||||||
|
// set everything else to none
|
||||||
|
ui.extAddress->setText(tr("none"));
|
||||||
|
ui.extPort->setValue(0);
|
||||||
|
ui.dynDNS->setText(tr("none"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// enable everything and set name of the first label to "Local Address"
|
||||||
|
ui.l_localAddress->setText(tr("Local Address"));
|
||||||
|
|
||||||
|
ui.l_extAddress->setEnabled(true);
|
||||||
|
ui.extAddress->setEnabled(true);
|
||||||
|
ui.l_portExternal->setEnabled(true);
|
||||||
|
ui.extPort->setEnabled(true);
|
||||||
|
|
||||||
|
ui.l_dynDNS->setEnabled(true);
|
||||||
|
ui.dynDNS->setEnabled(true);
|
||||||
|
|
||||||
/* set local address */
|
/* set local address */
|
||||||
ui.localAddress->setText(QString::fromStdString(detail.localAddr));
|
ui.localAddress->setText(QString::fromStdString(detail.localAddr));
|
||||||
ui.localPort -> setValue(detail.localPort);
|
ui.localPort -> setValue(detail.localPort);
|
||||||
|
@ -476,6 +498,7 @@ void ConfCertDialog::applyDialog()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!detail.isOnlyGPGdetail) {
|
if (!detail.isOnlyGPGdetail) {
|
||||||
|
if(!detail.isHiddenNode) {
|
||||||
/* check if the data is the same */
|
/* check if the data is the same */
|
||||||
bool localChanged = false;
|
bool localChanged = false;
|
||||||
bool extChanged = false;
|
bool extChanged = false;
|
||||||
|
@ -503,6 +526,12 @@ void ConfCertDialog::applyDialog()
|
||||||
|
|
||||||
if(localChanged || extChanged || dnsChanged)
|
if(localChanged || extChanged || dnsChanged)
|
||||||
emit configChanged();
|
emit configChanged();
|
||||||
|
} else {
|
||||||
|
if((detail.hiddenNodeAddress != ui.localAddress->text().toStdString()) || (detail.hiddenNodePort != ui.localPort->value())) {
|
||||||
|
rsPeers->setHiddenNode(peerId,ui.localAddress->text().toStdString(), ui.localPort->value());
|
||||||
|
emit configChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setServiceFlags() ;
|
setServiceFlags() ;
|
||||||
|
|
|
@ -285,12 +285,25 @@
|
||||||
<string>Peer Address</string>
|
<string>Peer Address</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_6">
|
<layout class="QGridLayout" name="gridLayout_6">
|
||||||
<item row="0" column="0" colspan="2">
|
<item row="2" column="0" colspan="2">
|
||||||
|
<spacer>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>47</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0" rowspan="2" colspan="2">
|
||||||
<layout class="QHBoxLayout" name="_4">
|
<layout class="QHBoxLayout" name="_4">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="_5">
|
<layout class="QVBoxLayout" name="_5">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="l_localAddress">
|
||||||
<property name="layoutDirection">
|
<property name="layoutDirection">
|
||||||
<enum>Qt::LeftToRight</enum>
|
<enum>Qt::LeftToRight</enum>
|
||||||
</property>
|
</property>
|
||||||
|
@ -303,14 +316,14 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="l_extAddress">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>External Address</string>
|
<string>External Address</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="l_dynDNS">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Dynamic DNS</string>
|
<string>Dynamic DNS</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -334,14 +347,14 @@
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="_7">
|
<layout class="QVBoxLayout" name="_7">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_5">
|
<widget class="QLabel" name="l_portLocal">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Port</string>
|
<string>Port</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_4">
|
<widget class="QLabel" name="l_portExternal">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Port</string>
|
<string>Port</string>
|
||||||
</property>
|
</property>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue