mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
update the QuickStartWizard with the changes for the Discovery combobox
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3762 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f3ec123b88
commit
4c43c471ec
@ -403,11 +403,36 @@ void QuickStartWizard::loadNetwork()
|
|||||||
}
|
}
|
||||||
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.discoveryComboBox->setCurrentIndex(netIndex);
|
ui.discoveryComboBox->setCurrentIndex(netIndex);
|
||||||
|
|
||||||
rsiface->lockData(); /* Lock Interface */
|
rsiface->lockData(); /* Lock Interface */
|
||||||
@ -448,22 +473,34 @@ void QuickStartWizard::saveChanges()
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
case 0:
|
case 0:
|
||||||
netMode = RS_NETMODE_UPNP;
|
netMode = RS_NETMODE_UPNP;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
rsPeers->setNetworkMode(ownId, netMode);
|
|
||||||
|
rsPeers->setNetworkMode(ownId, netMode);
|
||||||
|
|
||||||
uint32_t visState = 0;
|
uint32_t visState = 0;
|
||||||
/* Check if vis has changed */
|
/* Check if vis has changed */
|
||||||
if (0 == ui.discoveryComboBox->currentIndex())
|
switch(ui.discoveryComboBox->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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if (0 != netIndex)
|
/*if (0 != netIndex)
|
||||||
{
|
{
|
||||||
|
@ -437,12 +437,22 @@ p, li { white-space: pre-wrap; }
|
|||||||
<widget class="QComboBox" name="discoveryComboBox">
|
<widget class="QComboBox" name="discoveryComboBox">
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Share Ip and information with your friend (Disc On)</string>
|
<string>Public: DHT & Discovery</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Don't share any information (Disc Off)</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>
|
||||||
|
Loading…
Reference in New Issue
Block a user