mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-06 21:58:57 -04:00
Merge pull request #1118 from RetroPooh/net_settings_antifreeze
fix freezes in network settings
This commit is contained in:
commit
22292fc2a1
2 changed files with 15 additions and 13 deletions
|
@ -163,10 +163,11 @@ ServerPage::ServerPage(QWidget * parent, Qt::WindowFlags flags)
|
||||||
connect(ui.extAddress, SIGNAL(textChanged(QString)),this,SLOT(saveAddresses()));
|
connect(ui.extAddress, SIGNAL(textChanged(QString)),this,SLOT(saveAddresses()));
|
||||||
connect(ui.dynDNS, SIGNAL(textChanged(QString)),this,SLOT(saveAddresses()));
|
connect(ui.dynDNS, SIGNAL(textChanged(QString)),this,SLOT(saveAddresses()));
|
||||||
|
|
||||||
connect(ui.hiddenpage_proxyAddress_tor, SIGNAL(textChanged(QString)),this,SLOT(saveAddresses()));
|
connect(ui.tabWidget, SIGNAL(currentChanged(int)), this, SLOT(tabChanged(int)));
|
||||||
connect(ui.hiddenpage_proxyPort_tor, SIGNAL(valueChanged(int)),this,SLOT(saveAddresses()));
|
connect(ui.hiddenpage_proxyAddress_tor, SIGNAL(editingFinished()),this,SLOT(saveAddresses()));
|
||||||
connect(ui.hiddenpage_proxyAddress_i2p, SIGNAL(textChanged(QString)),this,SLOT(saveAddresses()));
|
connect(ui.hiddenpage_proxyPort_tor, SIGNAL(editingFinished()),this,SLOT(saveAddresses()));
|
||||||
connect(ui.hiddenpage_proxyPort_i2p, SIGNAL(valueChanged(int)),this,SLOT(saveAddresses()));
|
connect(ui.hiddenpage_proxyAddress_i2p, SIGNAL(editingFinished()),this,SLOT(saveAddresses()));
|
||||||
|
connect(ui.hiddenpage_proxyPort_i2p, SIGNAL(editingFinished()),this,SLOT(saveAddresses()));
|
||||||
|
|
||||||
connect(ui.totalDownloadRate,SIGNAL(valueChanged(int)),this,SLOT(saveRates()));
|
connect(ui.totalDownloadRate,SIGNAL(valueChanged(int)),this,SLOT(saveRates()));
|
||||||
connect(ui.totalUploadRate, SIGNAL(valueChanged(int)),this,SLOT(saveRates()));
|
connect(ui.totalUploadRate, SIGNAL(valueChanged(int)),this,SLOT(saveRates()));
|
||||||
|
@ -395,7 +396,6 @@ void ServerPage::load()
|
||||||
whileBlocking(ui.hiddenpage_proxyAddress_i2p) -> setText(QString::fromStdString(proxyaddr));
|
whileBlocking(ui.hiddenpage_proxyAddress_i2p) -> setText(QString::fromStdString(proxyaddr));
|
||||||
whileBlocking(ui.hiddenpage_proxyPort_i2p) -> setValue(proxyport);
|
whileBlocking(ui.hiddenpage_proxyPort_i2p) -> setValue(proxyport);
|
||||||
|
|
||||||
updateOutProxyIndicator();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Relay Tab
|
//Relay Tab
|
||||||
|
@ -843,8 +843,6 @@ void ServerPage::updateStatus()
|
||||||
else
|
else
|
||||||
ui.iconlabel_ext->setPixmap(QPixmap(":/images/ledoff1.png"));
|
ui.iconlabel_ext->setPixmap(QPixmap(":/images/ledoff1.png"));
|
||||||
|
|
||||||
// check for Tor
|
|
||||||
updateOutProxyIndicator();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServerPage::toggleUPnP()
|
void ServerPage::toggleUPnP()
|
||||||
|
@ -878,6 +876,9 @@ void ServerPage::saveAddresses()
|
||||||
|
|
||||||
saveCommon();
|
saveCommon();
|
||||||
|
|
||||||
|
if(ui.tabWidget->currentIndex() == 2) // hidden services tab
|
||||||
|
updateOutProxyIndicator();
|
||||||
|
|
||||||
if (mIsHiddenNode) {
|
if (mIsHiddenNode) {
|
||||||
saveAddressesHiddenNode();
|
saveAddressesHiddenNode();
|
||||||
return;
|
return;
|
||||||
|
@ -959,6 +960,12 @@ void ServerPage::saveRates()
|
||||||
rsConfig->SetMaxDataRates( ui.totalDownloadRate->value(), ui.totalUploadRate->value() );
|
rsConfig->SetMaxDataRates( ui.totalDownloadRate->value(), ui.totalUploadRate->value() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ServerPage::tabChanged(int page)
|
||||||
|
{
|
||||||
|
if(page == 2)
|
||||||
|
updateOutProxyIndicator();
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************************/
|
/***********************************************************************************/
|
||||||
/***********************************************************************************/
|
/***********************************************************************************/
|
||||||
/******* ALTERNATIVE VERSION IF HIDDEN NODE ***************************************/
|
/******* ALTERNATIVE VERSION IF HIDDEN NODE ***************************************/
|
||||||
|
@ -1099,8 +1106,6 @@ void ServerPage::loadHiddenNode()
|
||||||
whileBlocking(ui.hiddenpage_proxyAddress_i2p) -> setText(QString::fromStdString(proxyaddr));
|
whileBlocking(ui.hiddenpage_proxyAddress_i2p) -> setText(QString::fromStdString(proxyaddr));
|
||||||
whileBlocking(ui.hiddenpage_proxyPort_i2p) -> setValue(proxyport);
|
whileBlocking(ui.hiddenpage_proxyPort_i2p) -> setValue(proxyport);
|
||||||
|
|
||||||
updateOutProxyIndicator();
|
|
||||||
|
|
||||||
QString expected = "";
|
QString expected = "";
|
||||||
switch (mHiddenType) {
|
switch (mHiddenType) {
|
||||||
case RS_HIDDEN_TYPE_I2P:
|
case RS_HIDDEN_TYPE_I2P:
|
||||||
|
@ -1188,8 +1193,6 @@ void ServerPage::updateStatusHiddenNode()
|
||||||
ui.iconlabel_ext->setPixmap(QPixmap(":/images/ledoff1.png"));
|
ui.iconlabel_ext->setPixmap(QPixmap(":/images/ledoff1.png"));
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
updateOutProxyIndicator();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServerPage::saveAddressesHiddenNode()
|
void ServerPage::saveAddressesHiddenNode()
|
||||||
|
@ -1522,8 +1525,6 @@ void ServerPage::loadCommon()
|
||||||
whileBlocking(ui.hiddenpage_proxyPort_i2p) -> setValue(proxyport);
|
whileBlocking(ui.hiddenpage_proxyPort_i2p) -> setValue(proxyport);
|
||||||
whileBlocking(ui.hiddenpage_proxyPort_i2p_2)->setValue(proxyport); // this one is for bob tab
|
whileBlocking(ui.hiddenpage_proxyPort_i2p_2)->setValue(proxyport); // this one is for bob tab
|
||||||
|
|
||||||
updateOutProxyIndicator();
|
|
||||||
|
|
||||||
// don't use whileBlocking here
|
// don't use whileBlocking here
|
||||||
ui.cb_enableBob->setChecked(mBobSettings.enableBob);
|
ui.cb_enableBob->setChecked(mBobSettings.enableBob);
|
||||||
|
|
||||||
|
|
|
@ -84,6 +84,7 @@ private slots:
|
||||||
void ipWhiteListContextMenu(const QPoint &point);
|
void ipWhiteListContextMenu(const QPoint &point);
|
||||||
void removeBannedIp();
|
void removeBannedIp();
|
||||||
|
|
||||||
|
void tabChanged(int page);
|
||||||
// server
|
// server
|
||||||
void saveAddresses();
|
void saveAddresses();
|
||||||
void saveRates();
|
void saveRates();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue