ported branch commits 2666-2668, 2670-2672, 2679, 2682-2683 into trunk

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2702 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-04-10 14:56:34 +00:00
parent 063a366d12
commit c6c8e63e91
12 changed files with 153 additions and 233 deletions

View file

@ -165,13 +165,13 @@ void ServerPage::load()
/** Loads the settings for this page */
void ServerPage::updateStatus()
{
if(!isVisible())
return ;
/* load up configuration from rsPeers */
RsPeerDetails detail;
if (!rsPeers->getPeerDetails(rsPeers->getOwnId(), detail))
{
return;
}
/* only update if can't edit */
if (!ui.localPort->isEnabled())
@ -185,8 +185,6 @@ void ServerPage::updateStatus()
ui.localAddress->setText(QString::fromStdString(detail.localAddr));
/* set the server address */
ui.extAddress->setText(QString::fromStdString(detail.extAddr));
}
void ServerPage::toggleUPnP()
@ -220,14 +218,11 @@ void ServerPage::saveAddresses()
bool saveAddr = false;
RsPeerDetails detail;
std::string ownId = rsPeers->getOwnId();
if (!rsPeers->getPeerDetails(ownId, detail))
{
return;
}
int netIndex = ui.netModeComboBox->currentIndex();
@ -248,26 +243,18 @@ void ServerPage::saveAddresses()
}
if (detail.tryNetMode != netMode)
{
rsPeers->setNetworkMode(ownId, netMode);
}
int visState = 0;
/* Check if vis has changed */
if (0 == ui.discComboBox->currentIndex())
{
visState |= RS_VS_DISC_ON;
}
if (visState != detail.visState)
{
rsPeers->setVisState(ownId, visState);
}
if (0 != netIndex)
{
saveAddr = true;
}
if (saveAddr)
{