summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-07-19 18:31:46 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-07-19 22:22:12 +0200
commit52a2d821885a247c82a4a5b676249c6000e947b5 (patch)
tree998d3a1e2a7059ffe4b63cd4f9316b890267f319 /src
parenttypo (settins --> settings) (diff)
downloadrekonq-52a2d821885a247c82a4a5b676249c6000e947b5.tar.xz
Added UI option to configure the "Do Not Track" feature
Diffstat (limited to 'src')
-rw-r--r--src/settings/generalwidget.cpp12
-rw-r--r--src/settings/settings_general.ui9
2 files changed, 20 insertions, 1 deletions
diff --git a/src/settings/generalwidget.cpp b/src/settings/generalwidget.cpp
index 9f6de0d5..0b11c3f5 100644
--- a/src/settings/generalwidget.cpp
+++ b/src/settings/generalwidget.cpp
@@ -52,11 +52,20 @@ GeneralWidget::GeneralWidget(QWidget *parent)
connect(kcfg_useNewTabPage, SIGNAL(toggled(bool)), this, SLOT(disableHomeSettings(bool)));
checkKGetPresence();
+
+ KConfigGroup cg = KConfigGroup(KSharedConfig::openConfig("kioslaverc", KConfig::NoGlobals), QString());
+ doNotTrackCheckBox->setChecked( cg.readEntry("DoNotTrack", false) );
+
+ connect(doNotTrackCheckBox, SIGNAL(clicked()), this, SLOT(hasChanged()));
}
void GeneralWidget::save()
{
+ KConfigGroup cg = KConfigGroup(KSharedConfig::openConfig("kioslaverc", KConfig::NoGlobals), QString());
+ cg.writeEntry("DoNotTrack", doNotTrackCheckBox->isChecked());
+ cg.sync();
+ kDebug() << "-------------------------------------" << doNotTrackCheckBox->isChecked();
}
@@ -68,6 +77,8 @@ bool GeneralWidget::changed()
void GeneralWidget::hasChanged()
{
+ _changed = true;
+ emit changed(true);
}
@@ -88,6 +99,7 @@ void GeneralWidget::disableHomeSettings(bool b)
setHomeToCurrentPageButton->setEnabled(!b);
}
+
void GeneralWidget::checkKGetPresence()
{
if(KStandardDirs::findExe("kget").isNull())
diff --git a/src/settings/settings_general.ui b/src/settings/settings_general.ui
index 0b27dab2..d0c31655 100644
--- a/src/settings/settings_general.ui
+++ b/src/settings/settings_general.ui
@@ -177,7 +177,7 @@
<item>
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
- <string>Navigation</string>
+ <string>Misc</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
@@ -187,6 +187,13 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QCheckBox" name="doNotTrackCheckBox">
+ <property name="text">
+ <string>Send DNT headers to tell websites you don't want to be tracked</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>