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