|
|
@ -125,7 +125,6 @@ options_imp::options_imp(QWidget *parent): |
|
|
|
|
|
|
|
|
|
|
|
// Connect signals / slots
|
|
|
|
// Connect signals / slots
|
|
|
|
connect(comboProxyType, SIGNAL(currentIndexChanged(int)),this, SLOT(enableProxy(int))); |
|
|
|
connect(comboProxyType, SIGNAL(currentIndexChanged(int)),this, SLOT(enableProxy(int))); |
|
|
|
connect(checkAnonymousMode, SIGNAL(toggled(bool)), this, SLOT(toggleAnonymousMode(bool))); |
|
|
|
|
|
|
|
connect(checkRandomPort, SIGNAL(toggled(bool)), spinPort, SLOT(setDisabled(bool))); |
|
|
|
connect(checkRandomPort, SIGNAL(toggled(bool)), spinPort, SLOT(setDisabled(bool))); |
|
|
|
|
|
|
|
|
|
|
|
// Apply button is activated when a value is changed
|
|
|
|
// Apply button is activated when a value is changed
|
|
|
@ -699,8 +698,6 @@ void options_imp::loadOptions() { |
|
|
|
checkLSD->setChecked(pref->isLSDEnabled()); |
|
|
|
checkLSD->setChecked(pref->isLSDEnabled()); |
|
|
|
comboEncryption->setCurrentIndex(pref->getEncryptionSetting()); |
|
|
|
comboEncryption->setCurrentIndex(pref->getEncryptionSetting()); |
|
|
|
checkAnonymousMode->setChecked(pref->isAnonymousModeEnabled()); |
|
|
|
checkAnonymousMode->setChecked(pref->isAnonymousModeEnabled()); |
|
|
|
/* make sure ui matches options */ |
|
|
|
|
|
|
|
toggleAnonymousMode(checkAnonymousMode->isChecked()); |
|
|
|
|
|
|
|
// Ratio limit
|
|
|
|
// Ratio limit
|
|
|
|
floatValue = pref->getGlobalMaxRatio(); |
|
|
|
floatValue = pref->getGlobalMaxRatio(); |
|
|
|
if (floatValue >= 0.) { |
|
|
|
if (floatValue >= 0.) { |
|
|
@ -1327,23 +1324,6 @@ void options_imp::setSslCertificate(const QByteArray &cert, bool interactive) |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void options_imp::toggleAnonymousMode(bool enabled) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (enabled) { |
|
|
|
|
|
|
|
// Disable DHT, LSD, UPnP / NAT-PMP
|
|
|
|
|
|
|
|
checkDHT->setEnabled(false); |
|
|
|
|
|
|
|
checkDHT->setChecked(false); |
|
|
|
|
|
|
|
checkLSD->setEnabled(false); |
|
|
|
|
|
|
|
checkLSD->setChecked(false); |
|
|
|
|
|
|
|
checkUPnP->setEnabled(false); |
|
|
|
|
|
|
|
checkUPnP->setChecked(false); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
checkDHT->setEnabled(true); |
|
|
|
|
|
|
|
checkLSD->setEnabled(true); |
|
|
|
|
|
|
|
checkUPnP->setEnabled(true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool options_imp::schedTimesOk() { |
|
|
|
bool options_imp::schedTimesOk() { |
|
|
|
QString msg; |
|
|
|
QString msg; |
|
|
|
|
|
|
|
|
|
|
|