diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/settings/generalwidget.cpp | 12 | ||||
-rw-r--r-- | src/settings/settings_general.ui | 9 |
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> |