summaryrefslogtreecommitdiff
path: root/src/settings/generalwidget.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-11-27 10:39:33 +0100
committerAndrea Diamantini <adjam7@gmail.com>2011-11-29 00:09:11 +0100
commit8d873c915fd5fae554b1656715157cb5a87cbaf1 (patch)
treea6dc0acbc7f55b632fb565524a8c2facc0563751 /src/settings/generalwidget.cpp
parentGCI Task : Don't open useless tabs or windows for actions in the new tab page (diff)
downloadrekonq-8d873c915fd5fae554b1656715157cb5a87cbaf1.tar.xz
Add settings for fixed download path
Diffstat (limited to 'src/settings/generalwidget.cpp')
-rw-r--r--src/settings/generalwidget.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/settings/generalwidget.cpp b/src/settings/generalwidget.cpp
index fee6b841..cdadbd81 100644
--- a/src/settings/generalwidget.cpp
+++ b/src/settings/generalwidget.cpp
@@ -38,6 +38,8 @@
//KDE Includes
#include <kstandarddirs.h>
+#include <KUrlRequester>
+
GeneralWidget::GeneralWidget(QWidget *parent)
: QWidget(parent)
@@ -58,11 +60,21 @@ GeneralWidget::GeneralWidget(QWidget *parent)
connect(doNotTrackCheckBox, SIGNAL(clicked()), this, SLOT(hasChanged()));
connect(kcfg_homePage, SIGNAL(editingFinished()), this, SLOT(fixHomePageURL()));
+
+ kcfg_downloadPath->setMode(KFile::Directory);
+
+ askDownloadYes->setChecked(ReKonfig::askDownloadPath());
+ askDownloadNo->setChecked(!ReKonfig::askDownloadPath());
+
+ kcfg_downloadPath->setEnabled(!ReKonfig::askDownloadPath());
+ connect(askDownloadNo, SIGNAL(toggled(bool)), kcfg_downloadPath, SLOT(setEnabled(bool)));
}
void GeneralWidget::save()
{
+ ReKonfig::setAskDownloadPath(askDownloadYes->isChecked());
+
KConfigGroup cg = KConfigGroup(KSharedConfig::openConfig("kioslaverc", KConfig::NoGlobals), QString());
cg.writeEntry("DoNotTrack", doNotTrackCheckBox->isChecked());
cg.sync();