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);
|
||||
|
||||
netIndex = 1;
|
||||
/* DHT + Discovery: (public)
|
||||
* Discovery only: (private)
|
||||
* DHT only: (inverted)
|
||||
* None: (dark net)
|
||||
*/
|
||||
|
||||
netIndex = 3; // NONE.
|
||||
if (detail.visState & RS_VS_DHT_ON)
|
||||
{
|
||||
if (detail.visState & RS_VS_DISC_ON)
|
||||
{
|
||||
netIndex = 0;
|
||||
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);
|
||||
|
||||
rsiface->lockData(); /* Lock Interface */
|
||||
@ -451,13 +476,25 @@ void QuickStartWizard::saveChanges()
|
||||
netMode = RS_NETMODE_UPNP;
|
||||
break;
|
||||
}
|
||||
|
||||
rsPeers->setNetworkMode(ownId, netMode);
|
||||
|
||||
uint32_t visState = 0;
|
||||
/* Check if vis has changed */
|
||||
if (0 == ui.discoveryComboBox->currentIndex())
|
||||
switch(ui.discoveryComboBox->currentIndex())
|
||||
{
|
||||
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)
|
||||
|
@ -437,12 +437,22 @@ p, li { white-space: pre-wrap; }
|
||||
<widget class="QComboBox" name="discoveryComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Share Ip and information with your friend (Disc On)</string>
|
||||
<string>Public: DHT & Discovery</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<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>
|
||||
</item>
|
||||
</widget>
|
||||
|
Loading…
Reference in New Issue
Block a user