mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-13 08:29:32 -05:00
* Tweaks to switch DHT On/Off, (coupled with Discovery)
* display of DHT size. * Added CoreFoundation to .pro file. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3723 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
5b70ef6076
commit
33282bfc77
@ -118,9 +118,12 @@ macx {
|
|||||||
LIBS += ../../libretroshare/src/lib/libretroshare.a
|
LIBS += ../../libretroshare/src/lib/libretroshare.a
|
||||||
LIBS += -lssl -lcrypto -lz -lgpgme -lgpg-error
|
LIBS += -lssl -lcrypto -lz -lgpgme -lgpg-error
|
||||||
LIBS += ../../../miniupnpc-1.0/libminiupnpc.a
|
LIBS += ../../../miniupnpc-1.0/libminiupnpc.a
|
||||||
|
LIBS += -framework CoreFoundation
|
||||||
|
|
||||||
INCLUDEPATH += .
|
INCLUDEPATH += .
|
||||||
#DEFINES* = MAC_IDLE # for idle feature
|
#DEFINES* = MAC_IDLE # for idle feature
|
||||||
|
CONFIG -= uitools
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,11 +135,36 @@ void ServerPage::load()
|
|||||||
}
|
}
|
||||||
ui.netModeComboBox->setCurrentIndex(netIndex);
|
ui.netModeComboBox->setCurrentIndex(netIndex);
|
||||||
|
|
||||||
netIndex = 1;
|
/* DHT + Discovery: (public)
|
||||||
if (detail.visState & RS_VS_DISC_ON)
|
* Discovery only: (private)
|
||||||
|
* DHT only: (inverted)
|
||||||
|
* None: (dark net)
|
||||||
|
*/
|
||||||
|
|
||||||
|
netIndex = 3; // NONE.
|
||||||
|
if (detail.visState & RS_VS_DHT_ON)
|
||||||
{
|
{
|
||||||
netIndex = 0;
|
if (detail.visState & RS_VS_DISC_ON)
|
||||||
|
{
|
||||||
|
netIndex = 0; // PUBLIC
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
netIndex = 2; // INVERTED
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (detail.visState & RS_VS_DISC_ON)
|
||||||
|
{
|
||||||
|
netIndex = 1; // PRIVATE
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
netIndex = 3; // NONE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ui.discComboBox->setCurrentIndex(netIndex);
|
ui.discComboBox->setCurrentIndex(netIndex);
|
||||||
|
|
||||||
rsiface->lockData(); /* Lock Interface */
|
rsiface->lockData(); /* Lock Interface */
|
||||||
@ -249,8 +274,21 @@ void ServerPage::saveAddresses()
|
|||||||
|
|
||||||
uint32_t visState = 0;
|
uint32_t visState = 0;
|
||||||
/* Check if vis has changed */
|
/* Check if vis has changed */
|
||||||
if (0 == ui.discComboBox->currentIndex())
|
switch(ui.discComboBox->currentIndex())
|
||||||
visState |= RS_VS_DISC_ON;
|
{
|
||||||
|
case 0:
|
||||||
|
visState |= (RS_VS_DISC_ON | RS_VS_DHT_ON);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
visState |= RS_VS_DISC_ON;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
visState |= RS_VS_DHT_ON;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (visState != detail.visState)
|
if (visState != detail.visState)
|
||||||
rsPeers->setVisState(ownId, visState);
|
rsPeers->setVisState(ownId, visState);
|
||||||
|
@ -492,9 +492,6 @@
|
|||||||
<property name="margin">
|
<property name="margin">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -546,17 +543,33 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="discComboBox">
|
<widget class="QComboBox" name="discComboBox">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>200</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Should be disabled if you don't want to share connection information between peers.</string>
|
<string>Should be disabled if you don't want to share connection information between peers.</string>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Discovery Enabled</string>
|
<string>Public: DHT & Discovery</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Discovery Disabled</string>
|
<string>Private: Discovery Only</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Inverted: DHT Only</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Dark Net: None</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
@ -580,12 +593,6 @@
|
|||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout">
|
<layout class="QHBoxLayout">
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_14">
|
<widget class="QLabel" name="label_14">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -83,6 +83,15 @@ void DHTStatus::getDHTStatus()
|
|||||||
dhtstatusLabel->setToolTip(tr("DHT Off"));
|
dhtstatusLabel->setToolTip(tr("DHT Off"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString dhtsize;
|
||||||
|
{
|
||||||
|
std::ostringstream out;
|
||||||
|
out << (int) config.netDhtRsNetSize << " ( " << (int) config.netDhtNetSize << " )";
|
||||||
|
dhtsize = QString::fromStdString(out.str());
|
||||||
|
}
|
||||||
|
|
||||||
|
dhtnetworksizeLabel->setText(dhtsize);
|
||||||
|
|
||||||
rsiface->unlockData(); /* UnLock Interface */
|
rsiface->unlockData(); /* UnLock Interface */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user