From 52a2d821885a247c82a4a5b676249c6000e947b5 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 19 Jul 2011 18:31:46 +0200 Subject: Added UI option to configure the "Do Not Track" feature --- src/settings/generalwidget.cpp | 12 ++++++++++++ src/settings/settings_general.ui | 9 ++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'src/settings') 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 @@ - Navigation + Misc @@ -187,6 +187,13 @@ + + + + Send DNT headers to tell websites you don't want to be tracked + + + -- cgit v1.2.1