summaryrefslogtreecommitdiff
path: root/src/adblock/adblockwidget.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-02-13 12:03:23 +0100
committerAndrea Diamantini <adjam7@gmail.com>2012-03-13 10:24:41 +0100
commitfdb6bf971a3f3e0edea840cd92d18374b494aacb (patch)
tree5a106ef755c56b2dd8bd696d4f63552d135b7790 /src/adblock/adblockwidget.cpp
parentRemove ability to manage abp schemes and add subscriptions on click (diff)
downloadrekonq-fdb6bf971a3f3e0edea840cd92d18374b494aacb.tar.xz
Move adblock manager to use multiple text files for rules and
separate adblock settings from rekonq ones. We now have 60 adblock rules list sites stored to be enabled "on click"
Diffstat (limited to 'src/adblock/adblockwidget.cpp')
-rw-r--r--src/adblock/adblockwidget.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/adblock/adblockwidget.cpp b/src/adblock/adblockwidget.cpp
index c26e31f4..8e6a81ae 100644
--- a/src/adblock/adblockwidget.cpp
+++ b/src/adblock/adblockwidget.cpp
@@ -108,36 +108,36 @@ void AdBlockWidget::removeRule()
void AdBlockWidget::load()
{
- const bool isAdBlockEnabled = ReKonfig::adBlockEnabled();
- checkEnableAdblock->setChecked(isAdBlockEnabled);
- // update enabled status
- checkHideAds->setEnabled(checkEnableAdblock->isChecked());
- tabWidget->setEnabled(checkEnableAdblock->isChecked());
-
- const bool areImageFiltered = ReKonfig::hideAdsEnabled();
- checkHideAds->setChecked(areImageFiltered);
-
- const int days = ReKonfig::updateInterval();
- spinBox->setValue(days);
-
- const QStringList subscriptions = ReKonfig::subscriptionTitles();
-
- // load automatic rules
- Q_FOREACH(const QString & sub, subscriptions)
- {
- QTreeWidgetItem *subItem = new QTreeWidgetItem(treeWidget);
- subItem->setText(0, sub);
- loadRules(subItem);
- }
-
- // load local rules
- KSharedConfig::Ptr config = KSharedConfig::openConfig("adblock", KConfig::SimpleConfig, "appdata");
- KConfigGroup localGroup(config, "rules");
- const QStringList rules = localGroup.readEntry("local-rules" , QStringList());
- Q_FOREACH(const QString & rule, rules)
- {
- listWidget->addItem(rule);
- }
+// const bool isAdBlockEnabled = ReKonfig::adBlockEnabled();
+// checkEnableAdblock->setChecked(isAdBlockEnabled);
+// // update enabled status
+// checkHideAds->setEnabled(checkEnableAdblock->isChecked());
+// tabWidget->setEnabled(checkEnableAdblock->isChecked());
+//
+// const bool areImageFiltered = ReKonfig::hideAdsEnabled();
+// checkHideAds->setChecked(areImageFiltered);
+//
+// const int days = ReKonfig::updateInterval();
+// spinBox->setValue(days);
+//
+// const QStringList subscriptions = ReKonfig::subscriptionTitles();
+//
+// // load automatic rules
+// Q_FOREACH(const QString & sub, subscriptions)
+// {
+// QTreeWidgetItem *subItem = new QTreeWidgetItem(treeWidget);
+// subItem->setText(0, sub);
+// loadRules(subItem);
+// }
+//
+// // load local rules
+// KSharedConfig::Ptr config = KSharedConfig::openConfig("adblock", KConfig::SimpleConfig, "appdata");
+// KConfigGroup localGroup(config, "rules");
+// const QStringList rules = localGroup.readEntry("local-rules" , QStringList());
+// Q_FOREACH(const QString & rule, rules)
+// {
+// listWidget->addItem(rule);
+// }
}
@@ -176,9 +176,9 @@ void AdBlockWidget::save()
}
localGroup.writeEntry("local-rules" , localRules);
- ReKonfig::setAdBlockEnabled(checkEnableAdblock->isChecked());
- ReKonfig::setHideAdsEnabled(checkHideAds->isChecked());
- ReKonfig::setUpdateInterval(spinBox->value());
+// ReKonfig::setAdBlockEnabled(checkEnableAdblock->isChecked());
+// ReKonfig::setHideAdsEnabled(checkHideAds->isChecked());
+// ReKonfig::setUpdateInterval(spinBox->value());
_changed = false;
emit changed(false);