new computing for download and upload rate. No more indiv rate settings

Merge branch 'maxUploadRate'

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1293 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2009-06-08 17:09:00 +00:00
parent 9d0f90d434
commit 646603d71d
13 changed files with 381 additions and 542 deletions

View file

@ -654,7 +654,9 @@ void PeersDialog::insertChat()
{
if (!rsMsgs->chatAvailable())
{
// std::cerr << "no chat available." << std::endl ;
#ifdef PEERS_DEBUG
std::cerr << "no chat available." << std::endl ;
#endif
return;
}

View file

@ -91,12 +91,6 @@ ServerDialog::save(QString &errmsg)
}
/** Change of maxDataRate limits the Individual Data Rate */
void ServerDialog::setMaximumIndivRate(int maximum) {
ui.indivRate->setMaximum(maximum);
}
/** Loads the settings for this page */
void ServerDialog::load()
{
@ -142,15 +136,8 @@ void ServerDialog::load()
rsiface->lockData(); /* Lock Interface */
ui.totalRate->setValue(rsiface->getConfig().maxDataRate);
ui.indivRate->setValue(rsiface->getConfig().maxIndivDataRate);
// It makes no sense to set the total transfer rate lower than the individual rate.
// Avoid this by setting the upper limit for individual rate to total transfer rate now,
// and every time the user changes the total transfer rate.
ui.indivRate->setMaximum(rsiface->getConfig().maxDataRate);
QObject::connect(ui.totalRate, SIGNAL (valueChanged(int)),
this, SLOT (setMaximumIndivRate(int)));
ui.totalDownloadRate->setValue(rsiface->getConfig().maxDownloadDataRate);
ui.totalUploadRate->setValue(rsiface->getConfig().maxUploadDataRate);
rsiface->unlockData(); /* UnLock Interface */
@ -371,7 +358,7 @@ void ServerDialog::saveAddresses()
rsPeers->setExtAddress(rsPeers->getOwnId(), ui.extAddress->text().toStdString(), ui.extPort->value());
}
rsicontrol->ConfigSetDataRates( ui.totalRate->value(), ui.indivRate->value() );
rsicontrol->ConfigSetDataRates( ui.totalDownloadRate->value(), ui.totalUploadRate->value() );
load();
}

View file

@ -50,7 +50,6 @@ private slots:
void saveAddresses();
void toggleUPnP();
void toggleIpDetermination(bool) ;
void setMaximumIndivRate(int);
private:
/** A RshareSettings object used for saving/loading settings */

File diff suppressed because it is too large Load diff