From 8d873c915fd5fae554b1656715157cb5a87cbaf1 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 27 Nov 2011 10:39:33 +0100 Subject: Add settings for fixed download path --- src/settings/generalwidget.cpp | 12 +++++++ src/settings/settings_general.ui | 71 +++++++++++++++++++++++++++++++++++++--- 2 files changed, 78 insertions(+), 5 deletions(-) (limited to 'src/settings') 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 +#include + 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(); diff --git a/src/settings/settings_general.ui b/src/settings/settings_general.ui index 3f7c0675..7e250c47 100644 --- a/src/settings/settings_general.ui +++ b/src/settings/settings_general.ui @@ -6,8 +6,8 @@ 0 0 - 464 - 462 + 480 + 571 @@ -19,8 +19,8 @@ Startup - - + + @@ -45,7 +45,7 @@ - + @@ -154,6 +154,62 @@ Download Manager + + + + + + + 0 + 0 + + + + + 150 + 0 + + + + Save files to: + + + + + + + + 0 + 0 + + + + + + + + + + Always ask me where to save files + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 10 + + + + @@ -230,6 +286,11 @@ QLineEdit
klineedit.h
+ + KUrlRequester + QFrame +
kurlrequester.h
+
-- cgit v1.2.1