summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index b7996a3a..ac9b83bb 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -193,6 +193,10 @@ void MainWindow::postLaunch()
connect(m_view, SIGNAL(setCurrentTitle(const QString &)), this, SLOT(slotUpdateWindowTitle(const QString &)));
connect(m_view, SIGNAL(printRequested(QWebFrame *)), this, SLOT(printRequested(QWebFrame *)));
+ // (shift +) ctrl + tab switching
+ connect(this, SIGNAL(ctrlTabPressed()), m_view, SLOT(nextTab()));
+ connect(this, SIGNAL(shiftCtrlTabPressed()), m_view, SLOT(previousTab()));
+
// update toolbar actions signals
connect(m_view, SIGNAL(tabsChanged()), this, SLOT(slotUpdateActions()));
connect(m_view, SIGNAL(currentChanged(int)), this, SLOT(slotUpdateActions()));
@@ -459,10 +463,19 @@ void MainWindow::slotUpdateConfiguration()
defaultSettings->setAttribute(QWebSettings::LinksIncludedInFocusChain, ReKonfig::linksIncludedInFocusChain());
defaultSettings->setAttribute(QWebSettings::ZoomTextOnly, ReKonfig::zoomTextOnly());
defaultSettings->setAttribute(QWebSettings::PrintElementBackgrounds, ReKonfig::printElementBackgrounds());
+
+ // ===== HTML 5 features WebKit support ======
defaultSettings->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, ReKonfig::offlineStorageDatabaseEnabled());
defaultSettings->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, ReKonfig::offlineWebApplicationCacheEnabled());
defaultSettings->setAttribute(QWebSettings::LocalStorageDatabaseEnabled, ReKonfig::localStorageDatabaseEnabled());
-
+ if(ReKonfig::localStorageDatabaseEnabled())
+ {
+ QString path = KStandardDirs::locateLocal("cache", QString("WebkitLocalStorage/rekonq"), true);
+ path.remove("rekonq");
+ QWebSettings::setOfflineStoragePath(path);
+ QWebSettings::setOfflineStorageDefaultQuota(50000);
+ }
+
// Applies user defined CSS to all open webpages. If there no longer is a
// user defined CSS removes it from all open webpages.
defaultSettings->setUserStyleSheetUrl(ReKonfig::userCSS());
@@ -872,6 +885,18 @@ void MainWindow::keyPressEvent(QKeyEvent *event)
return;
}
+ if ((event->modifiers() == Qt::ControlModifier) && (event->key() == Qt::Key_Tab))
+ {
+ emit ctrlTabPressed();
+ return;
+ }
+
+ if ((event->modifiers() == Qt::ControlModifier + Qt::ShiftModifier) && (event->key() == Qt::Key_Backtab))
+ {
+ emit shiftCtrlTabPressed();
+ return;
+ }
+
KMainWindow::keyPressEvent(event);
}