summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFurkan Uzumcu <furkanuzumcu@gmail.com>2011-01-17 12:39:35 +0100
committerAndrea Diamantini <adjam7@gmail.com>2011-01-17 12:39:35 +0100
commit6f8cdd0052ee5cdab6a2c4b22efce3637ed57a57 (patch)
treecdc4b244c46b6bb01bb4a6f83ec6f862adad8c37 /src
parentFix a typo. (diff)
downloadrekonq-6f8cdd0052ee5cdab6a2c4b22efce3637ed57a57.tar.xz
Remember selections in the "clear private data" dialog.
Reviewed (and merged) by me :)
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.cpp15
-rw-r--r--src/rekonq.kcfg18
2 files changed, 32 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 13660eb9..59fff832 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1172,12 +1172,26 @@ void MainWindow::clearPrivateData()
Ui::ClearDataWidget clearWidget;
QWidget widget;
clearWidget.setupUi(&widget);
+ clearWidget.clearHistory->setChecked(ReKonfig::clearHistory());
+ clearWidget.clearDownloads->setChecked(ReKonfig::clearDownloads());
+ clearWidget.clearCookies->setChecked(ReKonfig::clearCookies());
+ clearWidget.clearCachedPages->setChecked(ReKonfig::clearCachedPages());
+ clearWidget.clearWebIcons->setChecked(ReKonfig::clearWebIcons());
+ clearWidget.homePageThumbs->setChecked(ReKonfig::clearHomePageThumbs());
dialog->setMainWidget(&widget);
dialog->exec();
if (dialog->result() == QDialog::Accepted)
{
+ //Save current state
+ ReKonfig::setClearHistory(clearWidget.clearHistory->isChecked());
+ ReKonfig::setClearDownloads(clearWidget.clearDownloads->isChecked());
+ ReKonfig::setClearCookies(clearWidget.clearDownloads->isChecked());
+ ReKonfig::setClearCachedPages(clearWidget.clearCachedPages->isChecked());
+ ReKonfig::setClearWebIcons(clearWidget.clearWebIcons->isChecked());
+ ReKonfig::setClearHomePageThumbs(clearWidget.homePageThumbs->isChecked());
+
if (clearWidget.clearHistory->isChecked())
{
Application::historyManager()->clear();
@@ -1222,7 +1236,6 @@ void MainWindow::clearPrivateData()
dialog->deleteLater();
}
-
void MainWindow::aboutToShowBackMenu()
{
m_historyBackMenu->clear();
diff --git a/src/rekonq.kcfg b/src/rekonq.kcfg
index c655d359..d7d496f0 100644
--- a/src/rekonq.kcfg
+++ b/src/rekonq.kcfg
@@ -82,6 +82,24 @@
<entry name="hScrollWheelHistory" type="Bool">
<default>false</default>
</entry>
+ <entry name="clearHistory" type="Bool">
+ <default>true</default>
+ </entry>
+ <entry name="clearDownloads" type="Bool">
+ <default>true</default>
+ </entry>
+ <entry name="clearCookies" type="Bool">
+ <default>true</default>
+ </entry>
+ <entry name="clearCachedPages" type="Bool">
+ <default>true</default>
+ </entry>
+ <entry name="clearWebIcons" type="Bool">
+ <default>true</default>
+ </entry>
+ <entry name="clearHomePageThumbs" type="Bool">
+ <default>true</default>
+ </entry>
</group>