Add checkbox option for IpFilterTrackers.

This commit is contained in:
Chocobo1
2015-06-14 19:05:26 +08:00
parent 0423a28f30
commit 8fa79a0690
5 changed files with 52 additions and 29 deletions

View File

@@ -228,6 +228,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()));
@@ -457,8 +458,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());
@@ -764,6 +767,7 @@ void options_imp::loadOptions() {
// Misc preferences
// * IP Filter
checkIPFilter->setChecked(pref->isFilteringEnabled());
checkIpFilterTrackers->setChecked(pref->isFilteringTrackerEnabled());
textFilterPath->setText(fsutils::toNativePath(pref->getFilter()));
// End IP Filter
// Queueing system preferences