summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-05-18 10:24:57 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-06-03 00:02:06 +0200
commite990840b71a0d122627125a6223f576816d8ecda (patch)
treef0af1d9380b787b8b0f7219d7df2a83f9ed20c50
parentupdating .gitignore (diff)
downloadrekonq-e990840b71a0d122627125a6223f576816d8ecda.tar.xz
1st commit on cookie branch. Refactoring Ui classes
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/cookiedialogs.cpp187
-rw-r--r--src/cookiedialogs.h78
-rw-r--r--src/cookiejar.cpp150
-rw-r--r--src/cookiejar.h55
-rw-r--r--src/cookies.ui92
-rw-r--r--src/cookiesexceptions.ui171
-rw-r--r--src/settings.cpp2
8 files changed, 404 insertions, 332 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6b9af51f..16494f41 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -24,6 +24,7 @@ SET( rekonq_SRCS
lineedit.cpp
stackedurlbar.cpp
webpage.cpp
+ cookiedialogs.cpp
)
KDE4_ADD_UI_FILES( rekonq_SRCS
diff --git a/src/cookiedialogs.cpp b/src/cookiedialogs.cpp
new file mode 100644
index 00000000..9b768f6a
--- /dev/null
+++ b/src/cookiedialogs.cpp
@@ -0,0 +1,187 @@
+/* ============================================================
+*
+* This file is a part of the rekonq project
+*
+* Copyright (C) 2009 by Andrea Diamantini <adjam7 at gmail dot com>
+*
+*
+* This program is free software; you can redistribute it
+* and/or modify it under the terms of the GNU General
+* Public License as published by the Free Software Foundation;
+* either version 2, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* ============================================================ */
+
+
+// Local Includes
+#include "cookiedialogs.h"
+#include "cookiejar.h"
+
+#include "ui_cookies.h"
+
+#include <QCompleter>
+
+CookiesDialog::CookiesDialog(CookieJar *cookieJar, QWidget *parent)
+ : KDialog(parent)
+{
+ Ui::CookiesWidget cookieWidget;
+ QWidget widget;
+ cookieWidget.setupUi(&widget);
+ setMainWidget(&widget);
+
+ setWindowFlags(Qt::Sheet);
+
+ CookieModel *model = new CookieModel(cookieJar, this);
+ m_proxyModel = new QSortFilterProxyModel(this);
+
+ // connecting signals and slots
+ connect(cookieWidget.search, SIGNAL(textChanged(QString)), m_proxyModel, SLOT(setFilterFixedString(QString)));
+ connect(cookieWidget.removeButton, SIGNAL(clicked()), cookieWidget.cookiesTable, SLOT(removeOne()));
+ connect(cookieWidget.removeAllButton, SIGNAL(clicked()), cookieWidget.cookiesTable, SLOT(removeAll()));
+
+ m_proxyModel->setSourceModel(model);
+
+ cookieWidget.cookiesTable->verticalHeader()->hide();
+ cookieWidget.cookiesTable->setSelectionBehavior(QAbstractItemView::SelectRows);
+ cookieWidget.cookiesTable->setModel(m_proxyModel);
+ cookieWidget.cookiesTable->setAlternatingRowColors(true);
+ cookieWidget.cookiesTable->setTextElideMode(Qt::ElideMiddle);
+ cookieWidget.cookiesTable->setShowGrid(false);
+ cookieWidget.cookiesTable->setSortingEnabled(true);
+
+ QFont f = font();
+ f.setPointSize(10);
+ QFontMetrics fm(f);
+ int height = fm.height() + fm.height() / 3;
+ cookieWidget.cookiesTable->verticalHeader()->setDefaultSectionSize(height);
+ cookieWidget.cookiesTable->verticalHeader()->setMinimumSectionSize(-1);
+
+ for (int i = 0; i < model->columnCount(); ++i)
+ {
+ int header = cookieWidget.cookiesTable->horizontalHeader()->sectionSizeHint(i);
+ switch (i)
+ {
+ case 0:
+ header = fm.width(QLatin1String("averagehost.domain.com"));
+ break;
+ case 1:
+ header = fm.width(QLatin1String("_session_id"));
+ break;
+ case 4:
+ header = fm.width(QDateTime::currentDateTime().toString(Qt::LocalDate));
+ break;
+ }
+ int buffer = fm.width(QLatin1String("xx"));
+ header += buffer;
+ cookieWidget.cookiesTable->horizontalHeader()->resizeSection(i, header);
+ }
+ cookieWidget.cookiesTable->horizontalHeader()->setStretchLastSection(true);
+}
+
+
+// ----------------------------------------------------------------------------------------------------------------
+
+
+CookiesExceptionsDialog::CookiesExceptionsDialog(CookieJar *cookieJar, QWidget *parent)
+ : KDialog(parent)
+ , m_cookieJar(cookieJar)
+ , exceptionsWidget(new Ui::CookiesExceptionsWidget)
+{
+ QWidget widget;
+ exceptionsWidget->setupUi(&widget);
+ setMainWidget(&widget);
+
+ setWindowFlags(Qt::Sheet);
+
+ connect(exceptionsWidget->removeButton, SIGNAL(clicked()), exceptionsWidget->exceptionTable, SLOT(removeOne()));
+ connect(exceptionsWidget->removeAllButton, SIGNAL(clicked()), exceptionsWidget->exceptionTable, SLOT(removeAll()));
+
+ exceptionsWidget->exceptionTable->verticalHeader()->hide();
+ exceptionsWidget->exceptionTable->setSelectionBehavior(QAbstractItemView::SelectRows);
+ exceptionsWidget->exceptionTable->setAlternatingRowColors(true);
+ exceptionsWidget->exceptionTable->setTextElideMode(Qt::ElideMiddle);
+ exceptionsWidget->exceptionTable->setShowGrid(false);
+ exceptionsWidget->exceptionTable->setSortingEnabled(true);
+ m_exceptionsModel = new CookieExceptionsModel(cookieJar, this);
+ m_proxyModel = new QSortFilterProxyModel(this);
+ m_proxyModel->setSourceModel(m_exceptionsModel);
+
+ connect(exceptionsWidget->search, SIGNAL(textChanged(QString)), m_proxyModel, SLOT(setFilterFixedString(QString)));
+
+ exceptionsWidget->exceptionTable->setModel(m_proxyModel);
+
+ CookieModel *cookieModel = new CookieModel(cookieJar, this);
+ exceptionsWidget->domainLineEdit->setCompleter(new QCompleter(cookieModel, exceptionsWidget->domainLineEdit));
+
+ connect(exceptionsWidget->domainLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(textChanged(const QString &)));
+ connect(exceptionsWidget->blockButton, SIGNAL(clicked()), this, SLOT(block()));
+ connect(exceptionsWidget->allowButton, SIGNAL(clicked()), this, SLOT(allow()));
+ connect(exceptionsWidget->allowForSessionButton, SIGNAL(clicked()), this, SLOT(allowForSession()));
+
+ QFont f = font();
+ f.setPointSize(10);
+ QFontMetrics fm(f);
+ int height = fm.height() + fm.height() / 3;
+ exceptionsWidget->exceptionTable->verticalHeader()->setDefaultSectionSize(height);
+ exceptionsWidget->exceptionTable->verticalHeader()->setMinimumSectionSize(-1);
+ for (int i = 0; i < m_exceptionsModel->columnCount(); ++i)
+ {
+ int header = exceptionsWidget->exceptionTable->horizontalHeader()->sectionSizeHint(i);
+ switch (i)
+ {
+ case 0:
+ header = fm.width(QLatin1String("averagebiglonghost.domain.com"));
+ break;
+ case 1:
+ header = fm.width(QLatin1String("Allow For Session"));
+ break;
+ }
+ int buffer = fm.width(QLatin1String("xx"));
+ header += buffer;
+ exceptionsWidget->exceptionTable->horizontalHeader()->resizeSection(i, header);
+ }
+}
+
+
+void CookiesExceptionsDialog::textChanged(const QString &text)
+{
+ bool enabled = !text.isEmpty();
+ exceptionsWidget->blockButton->setEnabled(enabled);
+ exceptionsWidget->allowButton->setEnabled(enabled);
+ exceptionsWidget->allowForSessionButton->setEnabled(enabled);
+}
+
+
+void CookiesExceptionsDialog::block()
+{
+ if (exceptionsWidget->domainLineEdit->text().isEmpty())
+ return;
+ m_exceptionsModel->m_blockedCookies.append(exceptionsWidget->domainLineEdit->text());
+ m_cookieJar->setBlockedCookies(m_exceptionsModel->m_blockedCookies);
+ m_exceptionsModel->reset();
+}
+
+
+void CookiesExceptionsDialog::allow()
+{
+ if (exceptionsWidget->domainLineEdit->text().isEmpty())
+ return;
+ m_exceptionsModel->m_allowedCookies.append(exceptionsWidget->domainLineEdit->text());
+ m_cookieJar->setAllowedCookies(m_exceptionsModel->m_allowedCookies);
+ m_exceptionsModel->reset();
+}
+
+
+void CookiesExceptionsDialog::allowForSession()
+{
+ if (exceptionsWidget->domainLineEdit->text().isEmpty())
+ return;
+ m_exceptionsModel->m_sessionCookies.append(exceptionsWidget->domainLineEdit->text());
+ m_cookieJar->setAllowForSessionCookies(m_exceptionsModel->m_sessionCookies);
+ m_exceptionsModel->reset();
+}
diff --git a/src/cookiedialogs.h b/src/cookiedialogs.h
new file mode 100644
index 00000000..0f7b8036
--- /dev/null
+++ b/src/cookiedialogs.h
@@ -0,0 +1,78 @@
+/* ============================================================
+*
+* This file is a part of the rekonq project
+*
+* Copyright (C) 2009 by Andrea Diamantini <adjam7 at gmail dot com>
+*
+*
+* This program is free software; you can redistribute it
+* and/or modify it under the terms of the GNU General
+* Public License as published by the Free Software Foundation;
+* either version 2, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* ============================================================ */
+
+
+
+#ifndef COOKIEDIALOGS_H
+#define COOKIEDIALOGS_H
+
+
+#include <KDialog>
+
+// Qt Includes
+#include <QtCore/QStringList>
+#include <QtCore/QAbstractItemModel>
+#include <QtGui/QTableView>
+#include <QtNetwork/QNetworkCookieJar>
+#include <QtGui/QSortFilterProxyModel>
+
+class CookieJar;
+class CookieExceptionsModel;
+
+class CookiesDialog : public KDialog
+{
+ Q_OBJECT
+
+public:
+ explicit CookiesDialog(CookieJar *cookieJar, QWidget *parent = 0);
+
+private:
+ QSortFilterProxyModel *m_proxyModel;
+};
+
+
+// -----------------------------------------------------------------------------------------------------------------
+
+
+#include "ui_cookiesexceptions.h"
+
+
+class CookiesExceptionsDialog : public KDialog
+{
+ Q_OBJECT
+
+public:
+ explicit CookiesExceptionsDialog(CookieJar *cookieJar, QWidget *parent = 0);
+
+private slots:
+ void block();
+ void allow();
+ void allowForSession();
+ void textChanged(const QString &text);
+
+private:
+ CookieExceptionsModel *m_exceptionsModel;
+ QSortFilterProxyModel *m_proxyModel;
+ CookieJar *m_cookieJar;
+
+ Ui::CookiesExceptionsWidget *exceptionsWidget;
+};
+
+
+#endif
diff --git a/src/cookiejar.cpp b/src/cookiejar.cpp
index fd823553..99399471 100644
--- a/src/cookiejar.cpp
+++ b/src/cookiejar.cpp
@@ -79,7 +79,7 @@ QDataStream &operator>>(QDataStream &stream, QList<QNetworkCookie> &list)
QList<QNetworkCookie> newCookies = QNetworkCookie::parseCookies(value);
if (newCookies.count() == 0 && value.length() != 0)
{
- kWarning() << "CookieJar: Unable to parse saved cookie:" << value;
+ kDebug() << "CookieJar: Unable to parse saved cookie:" << value;
}
for (int j = 0; j < newCookies.count(); ++j)
list.append(newCookies.at(j));
@@ -559,57 +559,6 @@ void CookieModel::cookiesChanged()
// ------------------------------------------------------------------------------------------------
-CookiesDialog::CookiesDialog(CookieJar *cookieJar, QWidget *parent)
- : QDialog(parent)
-{
- setupUi(this);
- setWindowFlags(Qt::Sheet);
- CookieModel *model = new CookieModel(cookieJar, this);
- m_proxyModel = new QSortFilterProxyModel(this);
- connect(search, SIGNAL(textChanged(QString)),
- m_proxyModel, SLOT(setFilterFixedString(QString)));
- connect(removeButton, SIGNAL(clicked()), cookiesTable, SLOT(removeOne()));
- connect(removeAllButton, SIGNAL(clicked()), cookiesTable, SLOT(removeAll()));
- m_proxyModel->setSourceModel(model);
- cookiesTable->verticalHeader()->hide();
- cookiesTable->setSelectionBehavior(QAbstractItemView::SelectRows);
- cookiesTable->setModel(m_proxyModel);
- cookiesTable->setAlternatingRowColors(true);
- cookiesTable->setTextElideMode(Qt::ElideMiddle);
- cookiesTable->setShowGrid(false);
- cookiesTable->setSortingEnabled(true);
- QFont f = font();
- f.setPointSize(10);
- QFontMetrics fm(f);
- int height = fm.height() + fm.height() / 3;
- cookiesTable->verticalHeader()->setDefaultSectionSize(height);
- cookiesTable->verticalHeader()->setMinimumSectionSize(-1);
- for (int i = 0; i < model->columnCount(); ++i)
- {
- int header = cookiesTable->horizontalHeader()->sectionSizeHint(i);
- switch (i)
- {
- case 0:
- header = fm.width(QLatin1String("averagehost.domain.com"));
- break;
- case 1:
- header = fm.width(QLatin1String("_session_id"));
- break;
- case 4:
- header = fm.width(QDateTime::currentDateTime().toString(Qt::LocalDate));
- break;
- }
- int buffer = fm.width(QLatin1String("xx"));
- header += buffer;
- cookiesTable->horizontalHeader()->resizeSection(i, header);
- }
- cookiesTable->horizontalHeader()->setStretchLastSection(true);
-}
-
-
-// ---------------------------------------------------------------------------------------------------
-
-
CookieExceptionsModel::CookieExceptionsModel(CookieJar *cookiejar, QObject *parent)
: QAbstractTableModel(parent)
, m_cookieJar(cookiejar)
@@ -747,100 +696,3 @@ bool CookieExceptionsModel::removeRows(int row, int count, const QModelIndex &pa
endRemoveRows();
return true;
}
-
-
-// ----------------------------------------------------------------------------------------------------------------
-
-
-CookiesExceptionsDialog::CookiesExceptionsDialog(CookieJar *cookieJar, QWidget *parent)
- : QDialog(parent)
- , m_cookieJar(cookieJar)
-{
- setupUi(this);
- setWindowFlags(Qt::Sheet);
- connect(removeButton, SIGNAL(clicked()), exceptionTable, SLOT(removeOne()));
- connect(removeAllButton, SIGNAL(clicked()), exceptionTable, SLOT(removeAll()));
- exceptionTable->verticalHeader()->hide();
- exceptionTable->setSelectionBehavior(QAbstractItemView::SelectRows);
- exceptionTable->setAlternatingRowColors(true);
- exceptionTable->setTextElideMode(Qt::ElideMiddle);
- exceptionTable->setShowGrid(false);
- exceptionTable->setSortingEnabled(true);
- m_exceptionsModel = new CookieExceptionsModel(cookieJar, this);
- m_proxyModel = new QSortFilterProxyModel(this);
- m_proxyModel->setSourceModel(m_exceptionsModel);
- connect(search, SIGNAL(textChanged(QString)),
- m_proxyModel, SLOT(setFilterFixedString(QString)));
- exceptionTable->setModel(m_proxyModel);
-
- CookieModel *cookieModel = new CookieModel(cookieJar, this);
- domainLineEdit->setCompleter(new QCompleter(cookieModel, domainLineEdit));
-
- connect(domainLineEdit, SIGNAL(textChanged(const QString &)),
- this, SLOT(textChanged(const QString &)));
- connect(blockButton, SIGNAL(clicked()), this, SLOT(block()));
- connect(allowButton, SIGNAL(clicked()), this, SLOT(allow()));
- connect(allowForSessionButton, SIGNAL(clicked()), this, SLOT(allowForSession()));
-
- QFont f = font();
- f.setPointSize(10);
- QFontMetrics fm(f);
- int height = fm.height() + fm.height() / 3;
- exceptionTable->verticalHeader()->setDefaultSectionSize(height);
- exceptionTable->verticalHeader()->setMinimumSectionSize(-1);
- for (int i = 0; i < m_exceptionsModel->columnCount(); ++i)
- {
- int header = exceptionTable->horizontalHeader()->sectionSizeHint(i);
- switch (i)
- {
- case 0:
- header = fm.width(QLatin1String("averagebiglonghost.domain.com"));
- break;
- case 1:
- header = fm.width(QLatin1String("Allow For Session"));
- break;
- }
- int buffer = fm.width(QLatin1String("xx"));
- header += buffer;
- exceptionTable->horizontalHeader()->resizeSection(i, header);
- }
-}
-
-
-void CookiesExceptionsDialog::textChanged(const QString &text)
-{
- bool enabled = !text.isEmpty();
- blockButton->setEnabled(enabled);
- allowButton->setEnabled(enabled);
- allowForSessionButton->setEnabled(enabled);
-}
-
-
-void CookiesExceptionsDialog::block()
-{
- if (domainLineEdit->text().isEmpty())
- return;
- m_exceptionsModel->m_blockedCookies.append(domainLineEdit->text());
- m_cookieJar->setBlockedCookies(m_exceptionsModel->m_blockedCookies);
- m_exceptionsModel->reset();
-}
-
-
-void CookiesExceptionsDialog::allow()
-{
- if (domainLineEdit->text().isEmpty())
- return;
- m_exceptionsModel->m_allowedCookies.append(domainLineEdit->text());
- m_cookieJar->setAllowedCookies(m_exceptionsModel->m_allowedCookies);
- m_exceptionsModel->reset();
-}
-
-
-void CookiesExceptionsDialog::allowForSession()
-{
- if (domainLineEdit->text().isEmpty())
- return;
- m_exceptionsModel->m_sessionCookies.append(domainLineEdit->text());
- m_cookieJar->setAllowForSessionCookies(m_exceptionsModel->m_sessionCookies);
- m_exceptionsModel->reset();
-}
diff --git a/src/cookiejar.h b/src/cookiejar.h
index 03802df1..81d3ce64 100644
--- a/src/cookiejar.h
+++ b/src/cookiejar.h
@@ -24,11 +24,16 @@
#define COOKIEJAR_H
+// Local Includes
+#include "cookiedialogs.h"
+
// Qt Includes
-#include <QNetworkCookieJar>
-#include <QAbstractItemModel>
-#include <QStringList>
-#include <QTableView>
+#include <QtCore/QStringList>
+#include <QtCore/QAbstractItemModel>
+#include <QtGui/QTableView>
+#include <QtNetwork/QNetworkCookieJar>
+
+
// Forward Declarations
class QSortFilterProxyModel;
@@ -136,23 +141,6 @@ private:
// ----------------------------------------------------------------------------------------------------------------------
-#include "ui_cookies.h"
-
-class CookiesDialog : public QDialog, public Ui_CookiesDialog
-{
- Q_OBJECT
-
-public:
- explicit CookiesDialog(CookieJar *cookieJar, QWidget *parent = 0);
-
-private:
- QSortFilterProxyModel *m_proxyModel;
-};
-
-
-// ----------------------------------------------------------------------------------------------------------------------
-
-
class CookieExceptionsModel : public QAbstractTableModel
{
Q_OBJECT
@@ -177,29 +165,4 @@ private:
};
-// -----------------------------------------------------------------------------------------------------------------
-
-
-#include "ui_cookiesexceptions.h"
-
-class CookiesExceptionsDialog : public QDialog, public Ui_CookiesExceptionsDialog
-{
- Q_OBJECT
-
-public:
- explicit CookiesExceptionsDialog(CookieJar *cookieJar, QWidget *parent = 0);
-
-private slots:
- void block();
- void allow();
- void allowForSession();
- void textChanged(const QString &text);
-
-private:
- CookieExceptionsModel *m_exceptionsModel;
- QSortFilterProxyModel *m_proxyModel;
- CookieJar *m_cookieJar;
-};
-
#endif // COOKIEJAR_H
-
diff --git a/src/cookies.ui b/src/cookies.ui
index 49ad3a96..8c9abc55 100644
--- a/src/cookies.ui
+++ b/src/cookies.ui
@@ -1,39 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>CookiesDialog</class>
- <widget class="QDialog" name="CookiesDialog">
+ <class>CookiesWidget</class>
+ <widget class="QWidget" name="Cookies">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>550</width>
- <height>370</height>
+ <width>499</width>
+ <height>400</height>
</rect>
</property>
<property name="windowTitle">
- <string>Cookies</string>
+ <string>Form</string>
</property>
- <layout class="QGridLayout">
- <item row="0" column="0">
- <spacer>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>252</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="0" column="1">
- <widget class="KLineEdit" name="search"/>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <spacer>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Minimum</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>252</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Search:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="KLineEdit" name="search"/>
+ </item>
+ </layout>
</item>
- <item row="1" column="0" colspan="2">
+ <item>
<widget class="EditTableView" name="cookiesTable"/>
</item>
- <item row="2" column="0" colspan="2">
+ <item>
<layout class="QHBoxLayout">
<item>
<widget class="QPushButton" name="removeButton">
@@ -62,13 +82,6 @@
</property>
</spacer>
</item>
- <item>
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="standardButtons">
- <set>QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
</layout>
</item>
</layout>
@@ -86,22 +99,5 @@
</customwidget>
</customwidgets>
<resources/>
- <connections>
- <connection>
- <sender>buttonBox</sender>
- <signal>accepted()</signal>
- <receiver>CookiesDialog</receiver>
- <slot>accept()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>472</x>
- <y>329</y>
- </hint>
- <hint type="destinationlabel">
- <x>461</x>
- <y>356</y>
- </hint>
- </hints>
- </connection>
- </connections>
+ <connections/>
</ui>
diff --git a/src/cookiesexceptions.ui b/src/cookiesexceptions.ui
index de59eee0..ef8d0705 100644
--- a/src/cookiesexceptions.ui
+++ b/src/cookiesexceptions.ui
@@ -1,46 +1,47 @@
-<ui version="4.0" >
- <class>CookiesExceptionsDialog</class>
- <widget class="QDialog" name="CookiesExceptionsDialog" >
- <property name="geometry" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>CookiesExceptionsWidget</class>
+ <widget class="QWidget" name="Form">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>466</width>
- <height>446</height>
+ <width>457</width>
+ <height>495</height>
</rect>
</property>
- <property name="windowTitle" >
- <string>Cookie Exceptions</string>
+ <property name="windowTitle">
+ <string>Form</string>
</property>
- <layout class="QVBoxLayout" >
+ <layout class="QVBoxLayout" name="verticalLayout">
<item>
- <widget class="QGroupBox" name="newExceptionGroupBox" >
- <property name="title" >
+ <widget class="QGroupBox" name="CookiesExceptionWidget">
+ <property name="title">
<string>New Exception</string>
</property>
- <layout class="QGridLayout" >
- <item row="0" column="0" >
- <layout class="QHBoxLayout" >
+ <layout class="QGridLayout">
+ <item row="0" column="0">
+ <layout class="QHBoxLayout" name="_2">
<item>
- <widget class="QLabel" name="label" >
- <property name="text" >
+ <widget class="QLabel" name="label">
+ <property name="text">
<string>Domain:</string>
</property>
</widget>
</item>
<item>
- <widget class="KLineEdit" name="domainLineEdit" />
+ <widget class="KLineEdit" name="domainLineEdit"/>
</item>
</layout>
</item>
- <item row="1" column="0" >
- <layout class="QHBoxLayout" >
+ <item row="1" column="0">
+ <layout class="QHBoxLayout" name="_3">
<item>
<spacer>
- <property name="orientation" >
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>81</width>
<height>25</height>
@@ -49,31 +50,31 @@
</spacer>
</item>
<item>
- <widget class="QPushButton" name="blockButton" >
- <property name="enabled" >
+ <widget class="QPushButton" name="blockButton">
+ <property name="enabled">
<bool>false</bool>
</property>
- <property name="text" >
+ <property name="text">
<string>Block</string>
</property>
</widget>
</item>
<item>
- <widget class="QPushButton" name="allowForSessionButton" >
- <property name="enabled" >
+ <widget class="QPushButton" name="allowForSessionButton">
+ <property name="enabled">
<bool>false</bool>
</property>
- <property name="text" >
+ <property name="text">
<string>Allow For Session</string>
</property>
</widget>
</item>
<item>
- <widget class="QPushButton" name="allowButton" >
- <property name="enabled" >
+ <widget class="QPushButton" name="allowButton">
+ <property name="enabled">
<bool>false</bool>
</property>
- <property name="text" >
+ <property name="text">
<string>Allow</string>
</property>
</widget>
@@ -84,50 +85,50 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="ExceptionsGroupBox" >
- <property name="title" >
+ <widget class="QGroupBox" name="ExceptionsGroupBox">
+ <property name="title">
<string>Exceptions</string>
</property>
- <layout class="QGridLayout" >
- <item row="0" column="0" colspan="3" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>252</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
+ <layout class="QGridLayout" name="_4">
+ <item row="1" column="0" colspan="5">
+ <widget class="EditTableView" name="exceptionTable"/>
</item>
- <item row="0" column="3" >
- <widget class="KLineEdit" name="search" />
- </item>
- <item row="1" column="0" colspan="4" >
- <widget class="EditTableView" name="exceptionTable" />
- </item>
- <item row="2" column="0" >
- <widget class="QPushButton" name="removeButton" >
- <property name="text" >
+ <item row="2" column="0">
+ <widget class="QPushButton" name="removeButton">
+ <property name="text">
<string>&amp;Remove</string>
</property>
</widget>
</item>
- <item row="2" column="1" >
- <widget class="QPushButton" name="removeAllButton" >
- <property name="text" >
+ <item row="2" column="1">
+ <widget class="QPushButton" name="removeAllButton">
+ <property name="text">
<string>Remove &amp;All</string>
</property>
</widget>
</item>
- <item row="2" column="2" colspan="2" >
+ <item row="2" column="2" colspan="3">
<spacer>
- <property name="orientation" >
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="0">
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeType">
+ <enum>QSizePolicy::Minimum</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
@@ -135,45 +136,39 @@
</property>
</spacer>
</item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="label_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Search:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="4">
+ <widget class="KLineEdit" name="search"/>
+ </item>
</layout>
</widget>
</item>
- <item>
- <widget class="QDialogButtonBox" name="buttonBox" >
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="standardButtons" >
- <set>QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
</layout>
</widget>
<customwidgets>
<customwidget>
+ <class>KLineEdit</class>
+ <extends>QLineEdit</extends>
+ <header>klineedit.h</header>
+ </customwidget>
+ <customwidget>
<class>EditTableView</class>
<extends>QTableView</extends>
<header>edittableview.h</header>
</customwidget>
</customwidgets>
<resources/>
- <connections>
- <connection>
- <sender>buttonBox</sender>
- <signal>accepted()</signal>
- <receiver>CookiesExceptionsDialog</receiver>
- <slot>accept()</slot>
- <hints>
- <hint type="sourcelabel" >
- <x>381</x>
- <y>428</y>
- </hint>
- <hint type="destinationlabel" >
- <x>336</x>
- <y>443</y>
- </hint>
- </hints>
- </connection>
- </connections>
+ <connections/>
</ui>
diff --git a/src/settings.cpp b/src/settings.cpp
index fb68fb64..9ec5ad7a 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -30,7 +30,7 @@
// Local Includes
#include "application.h"
#include "mainwindow.h"
-#include "cookiejar.h"
+#include "cookiedialogs.h"
#include "history.h"
#include "networkaccessmanager.h"
#include "webview.h"