Add checkbox option for IpFilterTrackers, closes #3154.

This commit is contained in:
Chocobo1 2015-06-09 17:18:33 +08:00
parent 77786bb8bb
commit 32a712f005
5 changed files with 3213 additions and 28 deletions

View file

@ -226,6 +226,7 @@ options_imp::options_imp(QWidget *parent):
connect(textProxyPassword, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
// Misc tab
connect(checkIPFilter, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
connect(checkIpFilterTrackers, SIGNAL(toggled(bool)), SLOT(enableApplyButton()));
connect(textFilterPath, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
connect(checkEnableQueueing, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
connect(spinMaxActiveDownloads, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton()));
@ -455,8 +456,10 @@ void options_imp::saveOptions() {
// Misc preferences
// * IPFilter
pref->setFilteringEnabled(isFilteringEnabled());
if (isFilteringEnabled())
if (isFilteringEnabled()) {
pref->setFilteringTrackerEnabled(checkIpFilterTrackers->isChecked());
pref->setFilter(textFilterPath->text());
}
// End IPFilter preferences
// Queueing system
pref->setQueueingSystemEnabled(isQueueingSystemEnabled());
@ -762,6 +765,7 @@ void options_imp::loadOptions() {
// Misc preferences
// * IP Filter
checkIPFilter->setChecked(pref->isFilteringEnabled());
checkIpFilterTrackers->setChecked(pref->isFilteringTrackerEnabled());
textFilterPath->setText(Utils::Fs::toNativePath(pref->getFilter()));
// End IP Filter
// Queueing system preferences