summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-08-05 17:33:47 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-08-05 17:33:47 +0200
commit76be05134f84bc9e2bea9307528b73c085f2b830 (patch)
treea8d287ede67c8fba9fd4098fc43ed7714136a10a
parentRemoved old unuseful files.. (diff)
downloadrekonq-76be05134f84bc9e2bea9307528b73c085f2b830.tar.xz
Fixed Setting Interface
-rw-r--r--src/settings.cpp47
-rw-r--r--src/settings.h2
-rw-r--r--src/settings_privacy.ui81
3 files changed, 14 insertions, 116 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index 3144dec6..05180474 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -36,8 +36,6 @@
// Local Includes
#include "application.h"
#include "mainwindow.h"
-// #include "cookiedialog.h"
-// #include "cookieexceptiondialog.h"
#include "history.h"
#include "networkaccessmanager.h"
#include "webview.h"
@@ -71,7 +69,8 @@ private:
Ui::proxy proxyUi;
Ui::webkit webkitUi;
KCModuleProxy *ebrowsingModule;
-
+ KCModuleProxy *cookiesModule;
+
Private(SettingsDialog *parent);
friend class SettingsDialog;
@@ -101,6 +100,11 @@ Private::Private(SettingsDialog *parent)
pageItem = parent->addPage(widget , i18n("Privacy"));
pageItem->setIcon(KIcon("preferences-desktop-personal"));
+ KCModuleInfo cookiesInfo("cookies.desktop");
+ cookiesModule = new KCModuleProxy(cookiesInfo,parent);
+ pageItem = parent->addPage(cookiesModule, i18n(cookiesInfo.moduleName().toLocal8Bit()));
+ pageItem->setIcon(KIcon(cookiesInfo.icon()));
+
widget = new QWidget;
proxyUi.setupUi(widget);
widget->layout()->setMargin(0);
@@ -144,10 +148,10 @@ SettingsDialog::SettingsDialog(QWidget *parent)
readConfig();
connect(d->generalUi.setHomeToCurrentPageButton, SIGNAL(clicked()), this, SLOT(setHomeToCurrentPage()));
- connect(d->privacyUi.exceptionsButton, SIGNAL(clicked()), this, SLOT(showExceptions()));
- connect(d->privacyUi.cookiesButton, SIGNAL(clicked()), this, SLOT(showCookies()));
connect(d->ebrowsingModule, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
+ connect(d->cookiesModule, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
+
connect(this, SIGNAL(applyClicked()), this, SLOT(saveSettings()));
setWebSettingsToolTips();
@@ -180,11 +184,6 @@ void SettingsDialog::setWebSettingsToolTips()
// we need this function to UPDATE the config widget data..
void SettingsDialog::readConfig()
{
- // ======= General
-// d->generalUi.downloadDirUrlRequester->setMode(KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly);
-// d->generalUi.downloadDirUrlRequester->setUrl(ReKonfig::downloadDir());
-// connect(d->generalUi.downloadDirUrlRequester, SIGNAL(textChanged(QString)), this, SLOT(saveSettings()));
-
// ======= Fonts
d->fontsUi.kcfg_fixedFont->setOnlyFixed(true);
@@ -198,35 +197,17 @@ void SettingsDialog::readConfig()
// we need this function to SAVE settings in rc file..
void SettingsDialog::saveSettings()
{
- // General
-// ReKonfig::setDownloadDir(d->generalUi.downloadDirUrlRequester->url().prettyUrl());
-
- // Save
ReKonfig::self()->writeConfig();
d->ebrowsingModule->save();
+ d->cookiesModule->save();
}
bool SettingsDialog::hasChanged()
{
- return KConfigDialog::hasChanged() || d->ebrowsingModule->changed();
-}
-
-// ----------------------------------------------------------------------------------------------
-
-
-void SettingsDialog::showCookies()
-{
-// QPointer<CookiesDialog> dialog = new CookiesDialog(Application::cookieJar(), this);
-// dialog->exec();
-// delete dialog;
-}
-
-
-void SettingsDialog::showExceptions()
-{
-// QPointer<CookiesExceptionsDialog> dialog = new CookiesExceptionsDialog(Application::cookieJar(), this);
-// dialog->exec();
-// delete dialog;
+ return KConfigDialog::hasChanged()
+ || d->ebrowsingModule->changed()
+ || d->cookiesModule->changed()
+ ;
}
diff --git a/src/settings.h b/src/settings.h
index 42e6e965..3b476ec1 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -54,8 +54,6 @@ private slots:
void saveSettings();
void setHomeToCurrentPage();
- void showCookies();
- void showExceptions();
};
#endif // SETTINGS_H
diff --git a/src/settings_privacy.ui b/src/settings_privacy.ui
index 114743dd..e9e98c52 100644
--- a/src/settings_privacy.ui
+++ b/src/settings_privacy.ui
@@ -68,87 +68,6 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="cookiesGroupBox">
- <property name="title">
- <string>Cookies</string>
- </property>
- <layout class="QGridLayout" name="_2">
- <item row="0" column="0">
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Accept cookies:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QComboBox" name="kcfg_acceptCookies">
- <item>
- <property name="text">
- <string>Always</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Never</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Only from sites you visit</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="0" column="2">
- <widget class="QPushButton" name="exceptionsButton">
- <property name="text">
- <string>Exceptions...</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Keep until:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QComboBox" name="kcfg_keepCookiesUntil">
- <item>
- <property name="text">
- <string>They expire</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>I exit the application</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>At most 90 days</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="1" column="2">
- <widget class="QPushButton" name="cookiesButton">
- <property name="text">
- <string>Cookies...</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>