diff options
author | matgic78 <matgic78@gmail.com> | 2009-12-17 18:22:23 +0100 |
---|---|---|
committer | matgic78 <matgic78@gmail.com> | 2010-02-06 11:22:46 +0100 |
commit | 8343d45f3dfd631a3f5ac4213918f285930eb446 (patch) | |
tree | 8ec95f3f7b2c97ca6bf02ae70d8654011b72a99a /src/webpage.cpp | |
parent | QPointers --> QWeakPointers (diff) | |
download | rekonq-8343d45f3dfd631a3f5ac4213918f285930eb446.tar.xz |
Re-implemented previews in homepage without using plugins. Not finished yet :
Little things that change:
-nice buttons appearing on hover
-transitions on hover
TODO:
-when a preview is empty or when loading, it is very ugly
-for now there's no way to choose the page you want to preview
-port "closed Tabs" to this new architecture
-totally remove PreviewImage classes
-eventually, specific contextmenu for previews
Diffstat (limited to 'src/webpage.cpp')
-rw-r--r-- | src/webpage.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/webpage.cpp b/src/webpage.cpp index b2bedffc..59df13e7 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -72,6 +72,7 @@ WebPage::WebPage(QObject *parent) : KWebPage(parent, KWalletIntegration) + , m_newTabPage(0) { setForwardUnsupportedContent(true); @@ -114,10 +115,19 @@ bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &r if(risp == KMessageBox::Cancel) return false; } + + if (request.url().scheme() == QLatin1String("about")) + { + if(m_newTabPage == 0) + m_newTabPage = new NewTabPage(frame); + m_newTabPage->generate(request.url()); + return false; + } if (frame && m_protHandler.preHandling( request, frame )) { return false; + } m_requestedUrl = request.url(); |