summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--INSTALL4
-rw-r--r--src/CMakeLists.txt6
-rw-r--r--src/adblock/adblockmanager.cpp5
-rw-r--r--src/application.cpp50
-rw-r--r--src/clicktoflash.cpp2
-rw-r--r--src/data/rekonq.desktop10
-rw-r--r--src/history/historymanager.cpp4
-rw-r--r--src/main.cpp51
-rw-r--r--src/mainwindow.cpp4
-rw-r--r--src/protocolhandler.cpp9
-rw-r--r--src/rekonq.kcfg13
-rw-r--r--src/sessionmanager.cpp47
-rw-r--r--src/settings/adblockwidget.h4
-rw-r--r--src/settings/appearancewidget.cpp61
-rw-r--r--src/settings/appearancewidget.h61
-rw-r--r--src/settings/generalwidget.cpp85
-rw-r--r--src/settings/generalwidget.h60
-rw-r--r--src/settings/settings_appearance.ui (renamed from src/settings/settings_fonts.ui)171
-rw-r--r--src/settings/settings_general.ui23
-rw-r--r--src/settings/settings_webkit.ui41
-rw-r--r--src/settings/settingsdialog.cpp149
-rw-r--r--src/settings/settingsdialog.h4
-rw-r--r--src/settings/tabswidget.cpp53
-rw-r--r--src/settings/tabswidget.h58
-rw-r--r--src/settings/webkitwidget.cpp71
-rw-r--r--src/settings/webkitwidget.h60
-rw-r--r--src/urlbar/listitem.cpp11
-rw-r--r--src/webpage.cpp15
29 files changed, 821 insertions, 313 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f46e42fb..e1c9cb0b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,7 +7,7 @@ PROJECT( rekonq )
# Informations to update before to release this package.
# rekonq info
-SET(REKONQ_VERSION "0.4.70" )
+SET(REKONQ_VERSION "0.4.71" )
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/version.h )
diff --git a/INSTALL b/INSTALL
index 85571f57..62a57536 100644
--- a/INSTALL
+++ b/INSTALL
@@ -30,4 +30,6 @@ then be found in build/src and is executed with ./rekonq.
=== Getting Help ===
-If you need help with rekonq, you can find it in the irc-channel #rekonq on freenode. \ No newline at end of file
+If you need help with rekonq, you can find it in the irc-channel #rekonq on irc.freenode.net or by viewing the Handbook that comes with rekonq.
+You can view the rekonq Handbook by pressing F1 after starting rekonq.
+Techbase page : http://techbase.kde.org/Projects/rekonq
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b79e64fa..d0e5721c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -37,6 +37,10 @@ SET( rekonq_KDEINIT_SRCS
#----------------------------------------
settings/settingsdialog.cpp
settings/adblockwidget.cpp
+ settings/appearancewidget.cpp
+ settings/generalwidget.cpp
+ settings/tabswidget.cpp
+ settings/webkitwidget.cpp
settings/networkwidget.cpp
#----------------------------------------
bookmarks/bookmarksmanager.cpp
@@ -64,7 +68,7 @@ SET( rekonq_KDEINIT_SRCS
KDE4_ADD_UI_FILES( rekonq_KDEINIT_SRCS
settings/settings_general.ui
settings/settings_tabs.ui
- settings/settings_fonts.ui
+ settings/settings_appearance.ui
settings/settings_webkit.ui
settings/settings_adblock.ui
cleardata.ui
diff --git a/src/adblock/adblockmanager.cpp b/src/adblock/adblockmanager.cpp
index 48e2369d..39432f88 100644
--- a/src/adblock/adblockmanager.cpp
+++ b/src/adblock/adblockmanager.cpp
@@ -114,6 +114,7 @@ void AdBlockManager::loadSettings(bool checkUpdateDate)
void AdBlockManager::loadRules(const QStringList &rules)
{
+ kDebug() << "LOADING RULES LIST...";
foreach(const QString &stringRule, rules)
{
// ! rules are comments
@@ -259,15 +260,14 @@ void AdBlockManager::updateNextSubscription()
void AdBlockManager::slotResult(KJob *job)
{
- kDebug() << "SLOTRESULT";
if (job->error())
return;
+ kDebug() << "SAVING RULES..";
QList<QByteArray> list = _buffer.split('\n');
QStringList ruleList;
foreach(const QByteArray &ba, list)
{
- kDebug() << ba;
ruleList << QString(ba);
}
loadRules(ruleList);
@@ -282,7 +282,6 @@ void AdBlockManager::slotResult(KJob *job)
void AdBlockManager::subscriptionData(KIO::Job* job, const QByteArray& data)
{
- kDebug() << "subscriptionData";
Q_UNUSED(job)
if (data.isEmpty())
diff --git a/src/application.cpp b/src/application.cpp
index 412999d8..6525b9af 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -415,34 +415,44 @@ void Application::newWindow()
void Application::updateConfiguration()
{
- // FIXME:
- // all things related to mainview can be
- // improved/moved/replicated in all the mainwindows
- MainView *view = mainWindow()->mainView();
-
- // ============== General ==================
- view->updateTabBar();
-
// ============== Tabs ==================
- if (ReKonfig::closeTabSelectPrevious())
- view->tabBar()->setSelectionBehaviorOnRemove(QTabBar::SelectPreviousTab);
- else
- view->tabBar()->setSelectionBehaviorOnRemove(QTabBar::SelectRightTab);
+ bool b = ReKonfig::closeTabSelectPrevious();
+ Q_FOREACH(const QWeakPointer<MainWindow> &w, m_mainWindows)
+ {
+ MainView *mv = w.data()->mainView();
+ mv->updateTabBar();
+
+ if (b)
+ mv->tabBar()->setSelectionBehaviorOnRemove(QTabBar::SelectPreviousTab);
+ else
+ mv->tabBar()->setSelectionBehaviorOnRemove(QTabBar::SelectRightTab);
+ }
+ QWebSettings *defaultSettings = QWebSettings::globalSettings();
+
// =========== Fonts ==============
- QWebSettings *defaultSettings = QWebSettings::globalSettings();
-
- int fnSize = ReKonfig::fontSize();
- int minFnSize = ReKonfig::minFontSize();
-
QFont standardFont = ReKonfig::standardFont();
defaultSettings->setFontFamily(QWebSettings::StandardFont, standardFont.family());
- defaultSettings->setFontSize(QWebSettings::DefaultFontSize, fnSize);
- defaultSettings->setFontSize(QWebSettings::MinimumFontSize, minFnSize);
+ defaultSettings->setFontSize(QWebSettings::DefaultFontSize, standardFont.pointSize());
QFont fixedFont = ReKonfig::fixedFont();
defaultSettings->setFontFamily(QWebSettings::FixedFont, fixedFont.family());
- defaultSettings->setFontSize(QWebSettings::DefaultFixedFontSize, fnSize);
+ defaultSettings->setFontSize(QWebSettings::DefaultFixedFontSize, fixedFont.pointSize());
+
+ QFont serifFont = ReKonfig::serifFont();
+ defaultSettings->setFontFamily(QWebSettings::SerifFont, serifFont.family());
+
+ QFont sansSerifFont = ReKonfig::sansSerifFont();
+ defaultSettings->setFontFamily(QWebSettings::SansSerifFont, sansSerifFont.family());
+
+ QFont cursiveFont = ReKonfig::cursiveFont();
+ defaultSettings->setFontFamily(QWebSettings::FixedFont, cursiveFont.family());
+
+ QFont fantasyFont = ReKonfig::fantasyFont();
+ defaultSettings->setFontFamily(QWebSettings::FantasyFont, fantasyFont.family());
+
+ int minimumFontSize = ReKonfig::minFontSize();
+ defaultSettings->setFontSize(QWebSettings::MinimumFontSize, minimumFontSize);
// ================ WebKit ============================
defaultSettings->setAttribute(QWebSettings::AutoLoadImages, ReKonfig::autoLoadImages());
diff --git a/src/clicktoflash.cpp b/src/clicktoflash.cpp
index e9174470..051919fd 100644
--- a/src/clicktoflash.cpp
+++ b/src/clicktoflash.cpp
@@ -93,7 +93,6 @@ void ClickToFlash::load()
{
if (checkElement(element))
{
- kDebug() << "RETURNED TRUE ...........................";
QWebElement substitute = element.clone();
emit signalLoadClickToFlash(true);
element.replace(substitute);
@@ -108,6 +107,7 @@ void ClickToFlash::load()
bool ClickToFlash::checkElement(QWebElement el)
{
+ // check these two values..
kDebug() << "src: " << QUrl(el.attribute("src"));
kDebug() << "url: " << m_url;
diff --git a/src/data/rekonq.desktop b/src/data/rekonq.desktop
index a4eb1b00..5f4291b7 100644
--- a/src/data/rekonq.desktop
+++ b/src/data/rekonq.desktop
@@ -2,16 +2,26 @@
Name=rekonq
Name[cs]=rekonq
Name[da]=rekonq
+Name[de]=rekonq
+Name[en_GB]=rekonq
+Name[es]=rekonq
+Name[fr]=rekonq
+Name[ga]=rekonq
Name[it]=rekonq
+Name[lt]=rekonq
Name[nds]=Rekonq
+Name[nl]=rekonq
+Name[pl]=rekonq
Name[pt]=rekonq
Name[pt_BR]=rekonq
Name[sv]=Rekonq
Name[uk]=rekonq
Name[x-test]=xxrekonqxx
Name[zh_CN]=rekonq
+Name[zh_TW]=rekonq
GenericName=WebKit KDE Browser
GenericName[da]=KDE-browser baseret på WebKit
+GenericName[de]=WebKit-basierter Webbrowser für KDE
GenericName[pt]=Navegador do KDE Usando o WebKit
GenericName[pt_BR]=Navegador WebKit do KDE
GenericName[sv]=Webkit webbläsare för KDE
diff --git a/src/history/historymanager.cpp b/src/history/historymanager.cpp
index 8a29aa90..c0f87935 100644
--- a/src/history/historymanager.cpp
+++ b/src/history/historymanager.cpp
@@ -468,7 +468,7 @@ void HistoryManager::addDownload(const QString &srcUrl, const QString &destUrl)
QFile downloadFile(downloadFilePath);
if (!downloadFile.open(QFile::WriteOnly | QFile::Append))
{
- kDebug() << "azz...";
+ kDebug() << "Unable to open download file (WRITE mode)..";
return;
}
QDataStream out(&downloadFile);
@@ -487,7 +487,7 @@ DownloadList HistoryManager::downloads()
QFile downloadFile(downloadFilePath);
if (!downloadFile.open(QFile::ReadOnly))
{
- kDebug() << "azz...";
+ kDebug() << "Unable to open download file (READ mode)..";
return list;
}
diff --git a/src/main.cpp b/src/main.cpp
index 5551c55a..2697c741 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -69,7 +69,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
ki18n("Developer, Ideas, Mockups. And the icon."),
"megabigbug@yahoo.fr",
"");
-
+
about.addAuthor(ki18n("Johannes Zellner"),
ki18n("Patches, suggestions, testing, bugfixing"),
"webmaster@nebulon.de",
@@ -85,15 +85,41 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
"ronny_scholz@web.de",
"");
+ about.addAuthor(ki18n("Rohan Garg"),
+ ki18n("Handbook, maintains a Kubuntu PPA with rekonq git packages"),
+ "rohan16garg@gmail.com",
+ "");
+
+ about.addAuthor(ki18n("Yoann Laissus"),
+ ki18n("Developer, history & bookmarks improvements"),
+ "yoann.laissus@gmail.com",
+ "");
+
+ about.addAuthor(ki18n("Cedric Bellegarde"),
+ ki18n("Patched code quite everywhere :)"),
+ "gnumdk@adishatz.1s.fr",
+ "");
+
+ about.addAuthor(ki18n("Jonathan Raphael Joachim Kolberg"),
+ ki18n("Handbook, maintains a Kubuntu PPA with rekonq git packages"),
+ "bulldog98@freenet.de",
+ "");
+
+
// --------------- about credits -----------------------------
- about.addCredit(ki18n("Domrachev Alexandr"),
- ki18n("Developer"),
- "alexandr.domrachev@gmail.com",
+ about.addCredit(ki18n("Lindsay Mathieson"),
+ ki18n("Provided patches & hints. Discovered bugs"),
+ "lindsay.mathieson@gmail.com",
+ "");
+
+ about.addCredit(ki18n("Abdurrahman AVCI"),
+ ki18n("Provided patches & hints"),
+ "abdurrahmanavci@gmail.com",
"");
- about.addCredit(ki18n("Henry de Valence"),
- ki18n("Promised help on multitask rekonq"),
- "hdevalence@gmail.com",
+ about.addCredit(ki18n("Domrachev Alexandr"),
+ ki18n("Former Developer"),
+ "alexandr.domrachev@gmail.com",
"");
about.addCredit(ki18n("Abuus"),
@@ -112,22 +138,17 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
"");
about.addCredit(ki18n("Pawel Prazak"),
- ki18n("Developer"),
+ ki18n("Former Developer"),
"kojots350@gmail.com",
"");
- about.addCredit(ki18n("Rohan Garg"),
- ki18n("Handbook"),
- "rohan16garg@gmail.com",
- "");
-
about.addCredit(ki18n("Dario Freddi"),
- ki18n("Patches, hints, first KWallet support implementation (not yet included)"),
+ ki18n("Patches, hints, first KWallet support implementation"),
"drf@kde.org",
"");
about.addCredit(ki18n("Jon de Andrés Frías"),
- ki18n("first awesome bar implementation (wait next version and you'll see..)"),
+ ki18n("first awesome bar implementation"),
"jondeandres@gmail.com",
"");
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 2287370c..f5be73ee 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -634,7 +634,6 @@ void MainWindow::preferences()
void MainWindow::updateActions()
{
bool rekonqPage = currentTab()->page()->isOnRekonqPage();
- kDebug() << "UPDATE ACTIONS: rekonq page = " << rekonqPage;
QAction *historyBackAction = actionByName(KStandardAction::name(KStandardAction::Back));
if( rekonqPage )
@@ -1314,7 +1313,7 @@ void MainWindow::setEncoding(QAction *qa)
{
QString currentCodec = qa->text().toLatin1();
currentCodec = currentCodec.remove('&');
- kDebug() << currentCodec;
+ kDebug() << "Setting codec: " << currentCodec;
currentTab()->page()->settings()->setDefaultTextEncoding(currentCodec);
}
@@ -1331,7 +1330,6 @@ void MainWindow::populateEncodingMenu()
codecs.sort();
QString currentCodec = currentTab()->page()->settings()->defaultTextEncoding();
- kDebug() << "Current Codec: " << currentCodec;
m_encodingMenu->clear();
KMenu *isoMenu = new KMenu( QL1S("ISO"), m_encodingMenu);
diff --git a/src/protocolhandler.cpp b/src/protocolhandler.cpp
index 3a9d61ef..568aa400 100644
--- a/src/protocolhandler.cpp
+++ b/src/protocolhandler.cpp
@@ -339,7 +339,7 @@ void ProtocolHandler::slotMostLocalUrlResult(KJob *job)
*/
void ProtocolHandler::abpHandling()
{
- kDebug() << _url;
+ kDebug() << "handling abp url: " << _url;
QString path = _url.path();
if (path != QL1S("subscribe"))
@@ -348,16 +348,9 @@ void ProtocolHandler::abpHandling()
QMap<QString, QString> map = _url.queryItems(KUrl::CaseInsensitiveKeys);
QString location = map.value(QL1S("location"));
- kDebug() << location;
-
QString title = map.value(QL1S("title"));
- kDebug() << title;
-
QString requireslocation = map.value(QL1S("requireslocation"));
- kDebug() << requireslocation;
-
QString requirestitle = map.value(QL1S("requirestitle"));
- kDebug() << requirestitle;
QString info;
if (requirestitle.isEmpty() || requireslocation.isEmpty())
diff --git a/src/rekonq.kcfg b/src/rekonq.kcfg
index 6769b4f5..07c079a5 100644
--- a/src/rekonq.kcfg
+++ b/src/rekonq.kcfg
@@ -106,8 +106,17 @@
<entry name="fixedFont" type="Font">
<default code="true">QFont(QWebSettings::globalSettings()->fontFamily(QWebSettings::FixedFont))</default>
</entry>
- <entry name="fontSize" type="Int">
- <default>16</default>
+ <entry name="serifFont" type="Font">
+ <default code="true">QFont(QWebSettings::globalSettings()->fontFamily(QWebSettings::SerifFont))</default>
+ </entry>
+ <entry name="sansSerifFont" type="Font">
+ <default code="true">QFont(QWebSettings::globalSettings()->fontFamily(QWebSettings::SansSerifFont))</default>
+ </entry>
+ <entry name="cursiveFont" type="Font">
+ <default code="true">QFont(QWebSettings::globalSettings()->fontFamily(QWebSettings::CursiveFont))</default>
+ </entry>
+ <entry name="fantasyFont" type="Font">
+ <default code="true">QFont(QWebSettings::globalSettings()->fontFamily(QWebSettings::FantasyFont))</default>
</entry>
<entry name="minFontSize" type="Int">
<default>8</default>
diff --git a/src/sessionmanager.cpp b/src/sessionmanager.cpp
index 97d9bc36..6eb0cb6c 100644
--- a/src/sessionmanager.cpp
+++ b/src/sessionmanager.cpp
@@ -110,33 +110,34 @@ bool SessionManager::restoreSession()
if (line == QString("window"))
{
line = in.readLine();
- kDebug() << "New Window line: " << line;
Application::instance()->loadUrl( KUrl(line), Rekonq::NewWindow);
}
- else if (line == QString("currenttab"))
- {
- kDebug() << "Set Current Tab Line" << endl;
- line = in.readLine();
- bool ok;
- int idx = line.toInt(&ok);
- if (ok)
- {
- kDebug() << "Setting current tab to " << idx << endl;
- // Get last mainwindow created which will be first one in mainwindow list
- MainWindowList wl = Application::instance()->mainWindowList();
- if (wl.count() > 0)
- {
- MainView *mv = wl[0].data()->mainView();
- emit mv->tabBar()->setCurrentIndex(idx);
- }
- }
- else
- kDebug() << "Failed to convert currenttab index line <" << line << "> to in value" << endl;
- }
else
{
- kDebug() << "New Current Tab line: " << line;
- Application::instance()->loadUrl( KUrl(line), Rekonq::NewCurrentTab);
+ if (line == QString("currenttab"))
+ {
+ line = in.readLine();
+ bool ok;
+ int idx = line.toInt(&ok);
+ if (ok)
+ {
+ // Get last mainwindow created which will be first one in mainwindow list
+ MainWindowList wl = Application::instance()->mainWindowList();
+ if (wl.count() > 0)
+ {
+ MainView *mv = wl[0].data()->mainView();
+ emit mv->tabBar()->setCurrentIndex(idx);
+ }
+ }
+ else
+ {
+ kDebug() << "Failed to convert currenttab index line <" << line << "> to in value" << endl;
+ }
+ }
+ else
+ {
+ Application::instance()->loadUrl( KUrl(line), Rekonq::NewCurrentTab);
+ }
}
}
while (!line.isEmpty());
diff --git a/src/settings/adblockwidget.h b/src/settings/adblockwidget.h
index 1ed9aaa6..38a02636 100644
--- a/src/settings/adblockwidget.h
+++ b/src/settings/adblockwidget.h
@@ -32,8 +32,8 @@
#include "ui_settings_adblock.h"
// Qt Includes
-#include <QWidget>
-#include <QTreeWidgetItem>
+#include <QtGui/QWidget>
+#include <QtGui/QTreeWidgetItem>
class AdBlockWidget : public QWidget, private Ui::adblock
diff --git a/src/settings/appearancewidget.cpp b/src/settings/appearancewidget.cpp
new file mode 100644
index 00000000..40f53a85
--- /dev/null
+++ b/src/settings/appearancewidget.cpp
@@ -0,0 +1,61 @@
+/* ============================================================
+*
+* This file is a part of the rekonq project
+*
+* Copyright (C) 2010 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 of
+* the License or (at your option) version 3 or any later version
+* accepted by the membership of KDE e.V. (or its successor approved
+* by the membership of KDE e.V.), which shall act as a proxy
+* defined in Section 14 of version 3 of the license.
+*
+* 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.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+* ============================================================ */
+
+
+// Self Includes
+#include "appearancewidget.h"
+#include "appearancewidget.moc"
+
+// KDE Includes
+#include <KFontRequester>
+
+
+AppearanceWidget::AppearanceWidget(QWidget *parent)
+ : QWidget(parent)
+ , _changed(false)
+{
+ setupUi(this);
+
+ KFontRequester *fixedFontRequester = new KFontRequester(this, true);
+ fixedFontRequester->setObjectName( QL1S("kcfg_fixedFont") );
+
+ gridLayout->addWidget(fixedFontRequester, 1, 1, 1, 1);
+}
+
+
+void AppearanceWidget::save()
+{
+}
+
+
+bool AppearanceWidget::changed()
+{
+ return _changed;
+}
+
+
+void AppearanceWidget::hasChanged()
+{
+}
diff --git a/src/settings/appearancewidget.h b/src/settings/appearancewidget.h
new file mode 100644
index 00000000..5c7ddc6d
--- /dev/null
+++ b/src/settings/appearancewidget.h
@@ -0,0 +1,61 @@
+/* ============================================================
+*
+* This file is a part of the rekonq project
+*
+* Copyright (C) 2010 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 of
+* the License or (at your option) version 3 or any later version
+* accepted by the membership of KDE e.V. (or its successor approved
+* by the membership of KDE e.V.), which shall act as a proxy
+* defined in Section 14 of version 3 of the license.
+*
+* 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.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+* ============================================================ */
+
+
+#ifndef APPEARANCE_WIDGET_H
+#define APPEARANCE_WIDGET_H
+
+
+// Rekonq Includes
+#include "rekonq_defines.h"
+
+// Ui Includes
+#include "ui_settings_appearance.h"
+
+// Qt Includes
+#include <QtGui/QWidget>
+
+
+class AppearanceWidget : public QWidget, private Ui::appearance
+{
+ Q_OBJECT
+
+public:
+ AppearanceWidget(QWidget *parent = 0);
+
+ void save();
+ bool changed();
+
+signals:
+ void changed(bool);
+
+private slots:
+ void hasChanged();
+
+private:
+ bool _changed;
+};
+
+#endif // APPEARANCE_WIDGET_H
diff --git a/src/settings/generalwidget.cpp b/src/settings/generalwidget.cpp
new file mode 100644
index 00000000..fc2d4d5d
--- /dev/null
+++ b/src/settings/generalwidget.cpp
@@ -0,0 +1,85 @@
+/* ============================================================
+*
+* This file is a part of the rekonq project
+*
+* Copyright (C) 2010 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 of
+* the License or (at your option) version 3 or any later version
+* accepted by the membership of KDE e.V. (or its successor approved
+* by the membership of KDE e.V.), which shall act as a proxy
+* defined in Section 14 of version 3 of the license.
+*
+* 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.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+* ============================================================ */
+
+
+// Self Includes
+#include "generalwidget.h"
+#include "generalwidget.moc"
+
+// Auto Includes
+#include "rekonq.h"
+
+// Local Includes
+#include "application.h"
+#include "mainwindow.h"
+#include "webtab.h"
+
+
+GeneralWidget::GeneralWidget(QWidget *parent)
+ : QWidget(parent)
+ , _changed(false)
+{
+ setupUi(this);
+
+ connect(setHomeToCurrentPageButton, SIGNAL(clicked()), this, SLOT(setHomeToCurrentPage()));
+
+ disableHomeSettings(ReKonfig::useNewTabPage());
+
+ connect(kcfg_useNewTabPage, SIGNAL(toggled(bool)), this, SLOT(disableHomeSettings(bool)));
+}
+
+
+void GeneralWidget::save()
+{
+}
+
+
+bool GeneralWidget::changed()
+{
+ return _changed;
+}
+
+
+void GeneralWidget::hasChanged()
+{
+}
+
+
+void GeneralWidget::setHomeToCurrentPage()
+{
+ MainWindow *mw = qobject_cast<MainWindow*>(parent());
+ WebTab *webTab = mw->currentTab();
+ if (webTab)
+ {
+ kcfg_homePage->setText(webTab->url().prettyUrl());
+ }
+}
+
+
+void GeneralWidget::disableHomeSettings(bool b)
+{
+ kcfg_homePage->setEnabled(!b);
+ setHomeToCurrentPageButton->setEnabled(!b);
+}
diff --git a/src/settings/generalwidget.h b/src/settings/generalwidget.h
new file mode 100644
index 00000000..d669fd04
--- /dev/null
+++ b/src/settings/generalwidget.h
@@ -0,0 +1,60 @@
+/* ============================================================
+*
+* This file is a part of the rekonq project
+*
+* Copyright (C) 2010 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 of
+* the License or (at your option) version 3 or any later version
+* accepted by the membership of KDE e.V. (or its successor approved
+* by the membership of KDE e.V.), which shall act as a proxy
+* defined in Section 14 of version 3 of the license.
+*
+* 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.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+* ============================================================ */
+
+
+#ifndef GENERAL_WIDGET_H
+#define GENERAL_WIDGET_H
+
+
+// Ui Includes
+#include "ui_settings_general.h"
+
+// Qt Includes
+#include <QtGui/QWidget>
+
+
+class GeneralWidget : public QWidget, private Ui::general
+{
+ Q_OBJECT
+
+public:
+ GeneralWidget(QWidget *parent = 0);
+
+ void save();
+ bool changed();
+
+signals:
+ void changed(bool);
+
+private slots:
+ void hasChanged();
+ void setHomeToCurrentPage();
+ void disableHomeSettings(bool);
+
+private:
+ bool _changed;
+};
+
+#endif // GENERAL_WIDGET_H
diff --git a/src/settings/settings_fonts.ui b/src/settings/settings_appearance.ui
index 52c7872e..92d15cc6 100644
--- a/src/settings/settings_fonts.ui
+++ b/src/settings/settings_appearance.ui
@@ -1,25 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>fonts</class>
- <widget class="QWidget" name="fonts">
+ <class>appearance</class>
+ <widget class="QWidget" name="appearance">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>414</width>
- <height>298</height>
+ <width>529</width>
+ <height>429</height>
</rect>
</property>
<property name="windowTitle">
<string>Appearance</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_3">
+ <layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Fonts</string>
</property>
- <layout class="QFormLayout" name="formLayout">
+ <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="sizePolicy">
@@ -43,14 +43,7 @@
</widget>
</item>
<item row="0" column="1">
- <widget class="KFontComboBox" name="kcfg_standardFont">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
+ <widget class="KFontRequester" name="kcfg_standardFont"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
@@ -74,27 +67,8 @@
</property>
</widget>
</item>
- <item row="1" column="1">
- <widget class="KFontComboBox" name="kcfg_fixedFont">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_2">
- <property name="title">
- <string>Dimension</string>
- </property>
- <layout class="QFormLayout" name="formLayout_2">
- <item row="0" column="0">
- <widget class="QLabel" name="label_3">
+ <item row="6" column="0">
+ <widget class="QLabel" name="label_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
@@ -108,31 +82,79 @@
</size>
</property>
<property name="text">
- <string>Font size:</string>
+ <string>Minimal font size:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="0" column="1">
- <widget class="QSpinBox" name="kcfg_fontSize">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <item row="6" column="1">
+ <widget class="KIntNumInput" name="kcfg_minFontSize"/>
+ </item>
+ <item row="2" column="1">
+ <widget class="KFontRequester" name="kcfg_serifFont"/>
+ </item>
+ <item row="3" column="1">
+ <widget class="KFontRequester" name="kcfg_sansSerifFont"/>
+ </item>
+ <item row="4" column="1">
+ <widget class="KFontRequester" name="kcfg_cursiveFont"/>
+ </item>
+ <item row="5" column="1">
+ <widget class="KFontRequester" name="kcfg_fantasyFont"/>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Serif font:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_4">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_6">
+ <property name="text">
+ <string>Sans Serif font:</string>
</property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="label_7">
+ <property name="text">
+ <string>Cursive font:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0">
+ <widget class="QLabel" name="label_8">
+ <property name="text">
+ <string>Fantasy font:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_3">
+ <property name="title">
+ <string>User Style Sheet</string>
+ </property>
+ <layout class="QFormLayout" name="formLayout_3">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_5">
<property name="minimumSize">
<size>
<width>150</width>
@@ -140,20 +162,36 @@
</size>
</property>
<property name="text">
- <string>Minimal font size:</string>
+ <string>User CSS path:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="1" column="1">
- <widget class="QSpinBox" name="kcfg_minFontSize">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <item row="0" column="1">
+ <widget class="KUrlRequester" name="kcfg_userCSS">
+ <property name="filter">
+ <string>*.css</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_5">
+ <property name="title">
+ <string>Misc</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QCheckBox" name="kcfg_disableAutoScroll">
+ <property name="toolTip">
+ <string>Disable automatic scrolling on middle click in a web page</string>
+ </property>
+ <property name="text">
+ <string>Disable auto scrolling</string>
</property>
</widget>
</item>
@@ -177,14 +215,19 @@
</widget>
<customwidgets>
<customwidget>
- <class>KFontComboBox</class>
- <extends>KComboBox</extends>
- <header>kfontcombobox.h</header>
+ <class>KUrlRequester</class>
+ <extends>QFrame</extends>
+ <header>kurlrequester.h</header>
+ </customwidget>
+ <customwidget>
+ <class>KFontRequester</class>
+ <extends>QWidget</extends>
+ <header>kfontrequester.h</header>
</customwidget>
<customwidget>
- <class>KComboBox</class>
- <extends>QComboBox</extends>
- <header>kcombobox.h</header>
+ <class>KIntNumInput</class>
+ <extends>QWidget</extends>
+ <header>knuminput.h</header>
</customwidget>
</customwidgets>
<resources/>
diff --git a/src/settings/settings_general.ui b/src/settings/settings_general.ui
index c0060d76..63ab933c 100644
--- a/src/settings/settings_general.ui
+++ b/src/settings/settings_general.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>552</width>
- <height>512</height>
+ <width>464</width>
+ <height>462</height>
</rect>
</property>
<property name="windowTitle">
@@ -244,25 +244,6 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="groupBox_5">
- <property name="title">
- <string>Navigation</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QCheckBox" name="kcfg_disableAutoScroll">
- <property name="toolTip">
- <string>Disable automatic scrolling on middle click in a web page</string>
- </property>
- <property name="text">
- <string>Disable auto scrolling</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
diff --git a/src/settings/settings_webkit.ui b/src/settings/settings_webkit.ui
index e87e3fec..58fbe459 100644
--- a/src/settings/settings_webkit.ui
+++ b/src/settings/settings_webkit.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>643</width>
- <height>560</height>
+ <width>480</width>
+ <height>377</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
@@ -192,38 +192,6 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="groupBox_2">
- <property name="title">
- <string>User Style Sheet</string>
- </property>
- <layout class="QFormLayout" name="formLayout_2">
- <item row="0" column="0">
- <widget class="QLabel" name="label">
- <property name="minimumSize">
- <size>
- <width>150</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>User CSS path:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="KUrlRequester" name="kcfg_userCSS">
- <property name="filter">
- <string>*.css</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -240,11 +208,6 @@
</widget>
<customwidgets>
<customwidget>
- <class>KUrlRequester</class>
- <extends>QFrame</extends>
- <header>kurlrequester.h</header>
- </customwidget>
- <customwidget>
<class>KComboBox</class>
<extends>QComboBox</extends>
<header>kcombobox.h</header>
diff --git a/src/settings/settingsdialog.cpp b/src/settings/settingsdialog.cpp
index 3f701c5b..27d40467 100644
--- a/src/settings/settingsdialog.cpp
+++ b/src/settings/settingsdialog.cpp
@@ -36,15 +36,15 @@
#include "application.h"
#include "mainwindow.h"
#include "webtab.h"
-#include "adblockwidget.h"
-#include "networkwidget.h"
#include "searchengine.h"
-//Ui Includes
-#include "ui_settings_general.h"
-#include "ui_settings_tabs.h"
-#include "ui_settings_fonts.h"
-#include "ui_settings_webkit.h"
+// Widget Includes
+#include "adblockwidget.h"
+#include "networkwidget.h"
+#include "generalwidget.h"
+#include "appearancewidget.h"
+#include "webkitwidget.h"
+#include "tabswidget.h"
// KDE Includes
#include <KConfig>
@@ -61,76 +61,79 @@
class Private
{
private:
+ Private(SettingsDialog *parent);
- Ui::general generalUi;
- Ui::tabs tabsUi;
- Ui::fonts fontsUi;
- Ui::webkit webkitUi;
-
- AdBlockWidget *adBlockWidg;
+private:
+ GeneralWidget *generalWidg;
+ TabsWidget *tabsWidg;
+ AppearanceWidget *appearanceWidg;
+ WebKitWidget *webkitWidg;
NetworkWidget *networkWidg;
-
+ AdBlockWidget *adBlockWidg;
+
KCModuleProxy *ebrowsingModule;
KShortcutsEditor *shortcutsEditor;
- Private(SettingsDialog *parent);
-
friend class SettingsDialog;
};
Private::Private(SettingsDialog *parent)
{
- QWidget *widget;
KPageWidgetItem *pageItem;
- widget = new QWidget;
- generalUi.setupUi(widget);
- widget->layout()->setMargin(0);
- pageItem = parent->addPage(widget , i18n("General"));
+ // -- 1
+ generalWidg = new GeneralWidget(parent);
+ generalWidg->layout()->setMargin(0);
+ pageItem = parent->addPage(generalWidg, i18n("General"));
pageItem->setIcon(KIcon("rekonq"));
- widget = new QWidget;
- tabsUi.setupUi(widget);
- widget->layout()->setMargin(0);
- pageItem = parent->addPage(widget , i18n("Tabs"));
+ // -- 2
+ tabsWidg = new TabsWidget(parent);
+ tabsWidg->layout()->setMargin(0);
+ pageItem = parent->addPage(tabsWidg, i18n("Tabs"));
pageItem->setIcon(KIcon("tab-duplicate"));
-
- widget = new QWidget;
- fontsUi.setupUi(widget);
- widget->layout()->setMargin(0);
- pageItem = parent->addPage(widget , i18n("Fonts"));
+
+ // -- 3
+ appearanceWidg = new AppearanceWidget(parent);
+ appearanceWidg->layout()->setMargin(0);
+ pageItem = parent->addPage(appearanceWidg, i18n("Appearance"));
pageItem->setIcon(KIcon("preferences-desktop-font"));
-
- widget = new QWidget;
- webkitUi.setupUi(widget);
- widget->layout()->setMargin(0);
- pageItem = parent->addPage(widget , i18n("WebKit"));
+
+ // -- 4
+ webkitWidg = new WebKitWidget(parent);
+ webkitWidg->layout()->setMargin(0);
+ pageItem = parent->addPage(webkitWidg, i18n("WebKit"));
QString webkitIconPath = KStandardDirs::locate("appdata", "pics/webkit-icon.png");
KIcon webkitIcon = KIcon(QIcon(webkitIconPath));
pageItem->setIcon(webkitIcon);
-
+
+ // -- 5
networkWidg = new NetworkWidget(parent);
networkWidg->layout()->setMargin(0);
pageItem = parent->addPage(networkWidg , i18n("Network"));
pageItem->setIcon(KIcon("preferences-system-network"));
+ // -- 6
adBlockWidg = new AdBlockWidget(parent);
adBlockWidg->layout()->setMargin(0);
pageItem = parent->addPage(adBlockWidg , i18n("Ad Block"));
pageItem->setIcon(KIcon("preferences-web-browser-adblock"));
+ // -- 7
shortcutsEditor = new KShortcutsEditor(Application::instance()->mainWindow()->actionCollection(), parent);
pageItem = parent->addPage(shortcutsEditor , i18n("Shortcuts"));
pageItem->setIcon(KIcon("configure-shortcuts"));
+ // -- 8
KCModuleInfo ebrowsingInfo("ebrowsing.desktop");
ebrowsingModule = new KCModuleProxy(ebrowsingInfo, parent);
pageItem = parent->addPage(ebrowsingModule, i18n(ebrowsingInfo.moduleName().toLocal8Bit()));
pageItem->setIcon(KIcon(ebrowsingInfo.icon()));
- // WARNING remember wheh changing here that the smallest netbooks
+ // WARNING
+ // remember wheh changing here that the smallest netbooks
// have a 1024x576 resolution. So DON'T bother that limits!!
parent->setMinimumSize(700, 525);
}
@@ -148,25 +151,20 @@ SettingsDialog::SettingsDialog(QWidget *parent)
setModal(true);
readConfig();
-
- connect(d->generalUi.setHomeToCurrentPageButton, SIGNAL(clicked()), this, SLOT(setHomeToCurrentPage()));
-
- // new tab page
- disableHomeSettings(ReKonfig::useNewTabPage());
- connect(d->generalUi.kcfg_useNewTabPage, SIGNAL(toggled(bool)), this, SLOT(disableHomeSettings(bool)));
// update buttons
- connect(d->adBlockWidg, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
+ connect(d->generalWidg, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
+ connect(d->tabsWidg, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
+ connect(d->appearanceWidg, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
+ connect(d->webkitWidg, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
connect(d->networkWidg, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
+ connect(d->adBlockWidg, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
connect(d->ebrowsingModule, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
-
connect(d->shortcutsEditor, SIGNAL(keyChange()), this, SLOT(updateButtons()));
// save settings
connect(this, SIGNAL(applyClicked()), this, SLOT(saveSettings()));
connect(this, SIGNAL(okClicked()), this, SLOT(saveSettings()));
-
- setWebSettingsToolTips();
}
@@ -176,29 +174,9 @@ SettingsDialog::~SettingsDialog()
}
-void SettingsDialog::setWebSettingsToolTips()
-{
- d->webkitUi.kcfg_autoLoadImages->setToolTip(i18n("Specifies whether images are automatically loaded in web pages."));
- d->webkitUi.kcfg_dnsPrefetch->setToolTip(i18n("Specifies whether WebKit will try to prefetch DNS entries to speed up browsing."));
- d->webkitUi.kcfg_javascriptEnabled->setToolTip(i18n("Enables the execution of JavaScript programs."));
- d->webkitUi.kcfg_javaEnabled->setToolTip(i18n("Enables support for Java applets."));
- d->webkitUi.kcfg_pluginsEnabled->setToolTip(i18n("Enables support for plugins in web pages."));
- d->webkitUi.kcfg_javascriptCanOpenWindows->setToolTip(i18n("If enabled, JavaScript programs are allowed to open new windows."));
- d->webkitUi.kcfg_javascriptCanAccessClipboard->setToolTip(i18n("If enabled, JavaScript programs are allowed to read from and to write to the clipboard."));
- d->webkitUi.kcfg_linksIncludedInFocusChain->setToolTip(i18n("If enabled, hyperlinks are included in the keyboard focus chain."));
- d->webkitUi.kcfg_zoomTextOnly->setToolTip(i18n("If enabled, the zoom factor on a frame is only applied to the text."));
- d->webkitUi.kcfg_printElementBackgrounds->setToolTip(i18n("If enabled, background colors and images are also drawn when the page is printed."));
- d->webkitUi.kcfg_offlineStorageDatabaseEnabled->setToolTip(i18n("Enables support for the HTML 5 offline storage feature."));
- d->webkitUi.kcfg_offlineWebApplicationCacheEnabled->setToolTip(i18n("Enables support for the HTML 5 web application cache feature."));
- d->webkitUi.kcfg_localStorageEnabled->setToolTip(i18n("Enables support for the HTML 5 local storage feature."));
-}
-
-
// we need this function to UPDATE the config widget data..
void SettingsDialog::readConfig()
{
- // ======= Fonts
- d->fontsUi.kcfg_fixedFont->setOnlyFixed(true);
}
@@ -209,15 +187,20 @@ void SettingsDialog::saveSettings()
return;
ReKonfig::self()->writeConfig();
- d->ebrowsingModule->save();
- d->shortcutsEditor->save();
- d->adBlockWidg->save();
+
+ d->generalWidg->save();
+ d->tabsWidg->save();
+ d->appearanceWidg->save();
+ d->webkitWidg->save();
d->networkWidg->save();
+ d->adBlockWidg->save();
+ d->shortcutsEditor->save();
+ d->ebrowsingModule->save();
+
SearchEngine::loadDefaultWS();
SearchEngine::loadDelimiter();
SearchEngine::loadFavorites();
-
updateButtons();
emit settingsChanged("ReKonfig");
}
@@ -226,27 +209,13 @@ void SettingsDialog::saveSettings()
bool SettingsDialog::hasChanged()
{
return KConfigDialog::hasChanged()
- || d->adBlockWidg->changed()
+ || d->generalWidg->changed()
+ || d->tabsWidg->changed()
+ || d->appearanceWidg->changed()
+ || d->webkitWidg->changed()
|| d->networkWidg->changed()
+ || d->adBlockWidg->changed()
|| d->ebrowsingModule->changed()
|| d->shortcutsEditor->isModified();
;
}
-
-
-void SettingsDialog::setHomeToCurrentPage()
-{
- MainWindow *mw = static_cast<MainWindow*>(parent());
- WebTab *webTab = mw->currentTab();
- if (webTab)
- {
- d->generalUi.kcfg_homePage->setText(webTab->url().prettyUrl());
- }
-}
-
-
-void SettingsDialog::disableHomeSettings(bool b)
-{
- d->generalUi.kcfg_homePage->setEnabled(!b);
- d->generalUi.setHomeToCurrentPageButton->setEnabled(!b);
-}
diff --git a/src/settings/settingsdialog.h b/src/settings/settingsdialog.h
index cade78e3..c25db74b 100644
--- a/src/settings/settingsdialog.h
+++ b/src/settings/settingsdialog.h
@@ -52,14 +52,10 @@ public:
private:
Private* const d;
- void setWebSettingsToolTips();
private slots:
void readConfig();
void saveSettings();
-
- void setHomeToCurrentPage();
- void disableHomeSettings(bool);
};
#endif // SETTINGS_DIALOG_H
diff --git a/src/settings/tabswidget.cpp b/src/settings/tabswidget.cpp
new file mode 100644
index 00000000..aa555339
--- /dev/null
+++ b/src/settings/tabswidget.cpp
@@ -0,0 +1,53 @@
+/* ============================================================
+*
+* This file is a part of the rekonq project
+*
+* Copyright (C) 2010 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 of
+* the License or (at your option) version 3 or any later version
+* accepted by the membership of KDE e.V. (or its successor approved
+* by the membership of KDE e.V.), which shall act as a proxy
+* defined in Section 14 of version 3 of the license.
+*
+* 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.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+* ============================================================ */
+
+
+// Local Includes
+#include "tabswidget.h"
+#include "tabswidget.moc"
+
+
+TabsWidget::TabsWidget(QWidget *parent)
+ : QWidget(parent)
+ , _changed(false)
+{
+ setupUi(this);
+}
+
+
+void TabsWidget::save()
+{
+}
+
+
+bool TabsWidget::changed()
+{
+ return _changed;
+}
+
+
+void TabsWidget::hasChanged()
+{
+}
diff --git a/src/settings/tabswidget.h b/src/settings/tabswidget.h
new file mode 100644
index 00000000..f1ff8a52
--- /dev/null
+++ b/src/settings/tabswidget.h
@@ -0,0 +1,58 @@
+/* ============================================================
+*
+* This file is a part of the rekonq project
+*
+* Copyright (C) 2010 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 of
+* the License or (at your option) version 3 or any later version
+* accepted by the membership of KDE e.V. (or its successor approved
+* by the membership of KDE e.V.), which shall act as a proxy
+* defined in Section 14 of version 3 of the license.
+*
+* 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.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+* ============================================================ */
+
+
+#ifndef TABS_WIDGET_H
+#define TABS_WIDGET_H
+
+
+// Ui Includes
+#include "ui_settings_tabs.h"
+
+// Qt Includes
+#include <QtGui/QWidget>
+
+
+class TabsWidget : public QWidget, private Ui::tabs
+{
+ Q_OBJECT
+
+public:
+ TabsWidget(QWidget *parent = 0);
+
+ void save();
+ bool changed();
+
+signals:
+ void changed(bool);
+
+private slots:
+ void hasChanged();
+
+private:
+ bool _changed;
+};
+
+#endif // TABS_WIDGET_H
diff --git a/src/settings/webkitwidget.cpp b/src/settings/webkitwidget.cpp
new file mode 100644
index 00000000..f9d94d76
--- /dev/null
+++ b/src/settings/webkitwidget.cpp
@@ -0,0 +1,71 @@
+/* ============================================================
+*
+* This file is a part of the rekonq project
+*
+* Copyright (C) 2010 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 of
+* the License or (at your option) version 3 or any later version
+* accepted by the membership of KDE e.V. (or its successor approved
+* by the membership of KDE e.V.), which shall act as a proxy
+* defined in Section 14 of version 3 of the license.
+*
+* 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.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+* ============================================================ */
+
+
+// Local Includes
+#include "webkitwidget.h"
+#include "webkitwidget.moc"
+
+
+WebKitWidget::WebKitWidget(QWidget *parent)
+ : QWidget(parent)
+ , _changed(false)
+{
+ setupUi(this);
+}
+
+
+void WebKitWidget::save()
+{
+}
+
+
+bool WebKitWidget::changed()
+{
+ return _changed;
+}
+
+
+void WebKitWidget::hasChanged()
+{
+}
+
+
+void WebKitWidget::setWebSettingsToolTips()
+{
+ kcfg_autoLoadImages->setToolTip(i18n("Specifies whether images are automatically loaded in web pages."));
+ kcfg_dnsPrefetch->setToolTip(i18n("Specifies whether WebKit will try to prefetch DNS entries to speed up browsing."));
+ kcfg_javascriptEnabled->setToolTip(i18n("Enables the execution of JavaScript programs."));
+ kcfg_javaEnabled->setToolTip(i18n("Enables support for Java applets."));
+ kcfg_pluginsEnabled->setToolTip(i18n("Enables support for plugins in web pages."));
+ kcfg_javascriptCanOpenWindows->setToolTip(i18n("If enabled, JavaScript programs are allowed to open new windows."));
+ kcfg_javascriptCanAccessClipboard->setToolTip(i18n("If enabled, JavaScript programs are allowed to read from and to write to the clipboard."));
+ kcfg_linksIncludedInFocusChain->setToolTip(i18n("If enabled, hyperlinks are included in the keyboard focus chain."));
+ kcfg_zoomTextOnly->setToolTip(i18n("If enabled, the zoom factor on a frame is only applied to the text."));
+ kcfg_printElementBackgrounds->setToolTip(i18n("If enabled, background colors and images are also drawn when the page is printed."));
+ kcfg_offlineStorageDatabaseEnabled->setToolTip(i18n("Enables support for the HTML 5 offline storage feature."));
+ kcfg_offlineWebApplicationCacheEnabled->setToolTip(i18n("Enables support for the HTML 5 web application cache feature."));
+ kcfg_localStorageEnabled->setToolTip(i18n("Enables support for the HTML 5 local storage feature."));
+}
diff --git a/src/settings/webkitwidget.h b/src/settings/webkitwidget.h
new file mode 100644
index 00000000..b1eb8d76
--- /dev/null
+++ b/src/settings/webkitwidget.h
@@ -0,0 +1,60 @@
+/* ============================================================
+*
+* This file is a part of the rekonq project
+*
+* Copyright (C) 2010 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 of
+* the License or (at your option) version 3 or any later version
+* accepted by the membership of KDE e.V. (or its successor approved
+* by the membership of KDE e.V.), which shall act as a proxy
+* defined in Section 14 of version 3 of the license.
+*
+* 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.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+* ============================================================ */
+
+
+#ifndef WEBKIT_WIDGET_H
+#define WEBKIT_WIDGET_H
+
+
+// Ui Includes
+#include "ui_settings_webkit.h"
+
+// Qt Includes
+#include <QtGui/QWidget>
+
+
+class WebKitWidget : public QWidget, private Ui::webkit
+{
+ Q_OBJECT
+
+public:
+ WebKitWidget(QWidget *parent = 0);
+
+ void save();
+ bool changed();
+
+signals:
+ void changed(bool);
+
+private slots:
+ void hasChanged();
+
+private:
+ void setWebSettingsToolTips();
+
+ bool _changed;
+};
+
+#endif // WEBKIT_WIDGET_H
diff --git a/src/urlbar/listitem.cpp b/src/urlbar/listitem.cpp
index f91840d2..5254c7dc 100644
--- a/src/urlbar/listitem.cpp
+++ b/src/urlbar/listitem.cpp
@@ -220,7 +220,16 @@ PreviewListItem::PreviewListItem(const UrlSearchItem &item, const QString &text,
QVBoxLayout *vLayout = new QVBoxLayout;
vLayout->setMargin(0);
- vLayout->addWidget(new TextLabel(item.title, text, this));
+
+ QString title = item.title;
+ if (title.isEmpty())
+ {
+ title = item.url.url();
+ title = title.remove("http://");
+ title.truncate(title.indexOf("/"));
+ }
+
+ vLayout->addWidget(new TextLabel(title, text, this));
vLayout->addWidget(new TextLabel("<i>" + item.url.url() + "</i>", text, this));
hLayout->addLayout(vLayout);
diff --git a/src/webpage.cpp b/src/webpage.cpp
index 9da75a91..507263cc 100644
--- a/src/webpage.cpp
+++ b/src/webpage.cpp
@@ -148,8 +148,6 @@ WebPage::~WebPage()
bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type)
{
_isOnRekonqPage = false;
- kDebug() << "ACCEPT_NAVIGATION false";
-
_loadingUrl = request.url();
KIO::AccessManager *manager = qobject_cast<KIO::AccessManager*>(networkAccessManager());
@@ -218,8 +216,6 @@ bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &r
WebPage *WebPage::createWindow(QWebPage::WebWindowType type)
{
- kDebug() << "WebPage createWindow slot";
-
// added to manage web modal dialogs
if (type == QWebPage::WebModalDialog)
kDebug() << "Modal Dialog";
@@ -261,9 +257,6 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply)
QString app = reply->header(QNetworkRequest::ContentTypeHeader).toString();
QStringList headerList = app.split( ';' );
- kDebug() << headerList;
- kDebug() << headerList.count();
-
if(headerList.count() > 0)
{
mimeType = headerList.takeFirst().trimmed();
@@ -311,7 +304,7 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply)
switch (dlg.askEmbedOrSave())
{
case KParts::BrowserOpenOrSaveQuestion::Save:
- kDebug() << "service handling: download!";
+ kDebug() << "user choice: no services, just download!";
downloadThings(reply->request(), suggestedFileName);
return;
@@ -347,7 +340,6 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply)
mainFrame()->setHtml(html);
_isOnRekonqPage = true;
- kDebug() << "EMBED true";
Application::instance()->mainWindow()->mainView()->urlBar()->setQUrl(replyUrl);
Application::instance()->mainWindow()->updateActions();
}
@@ -392,7 +384,7 @@ void WebPage::manageNetworkErrors(QNetworkReply *reply)
&& !domainSchemeMatch(reply->url(), _sslInfo.url())
)
{
- //kDebug() << "Reseting cached SSL info...";
+ // Reseting cached SSL info...
_sslInfo = WebSslInfo();
}
@@ -432,12 +424,11 @@ void WebPage::manageNetworkErrors(QNetworkReply *reply)
{
mainFrame()->setHtml(errorPage(reply));
_isOnRekonqPage = true;
- kDebug() << "ERROR true";
}
break;
default:
- kDebug() << "Nothing to do here..";
+ // Nothing to do here..
break;
}