diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-10-02 12:01:58 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-10-02 12:01:58 +0200 |
commit | 03e600a1390d61a99ac2a393c9ab1500d8972e9e (patch) | |
tree | 8b1fb8988bcebf60fac693541c4aa152eef1adcc /src/application.cpp | |
parent | Changin (again) layout and fixing last Visited page counter.. :) (diff) | |
download | rekonq-03e600a1390d61a99ac2a393c9ab1500d8972e9e.tar.xz |
Fixing Application::homePage behaviour
Diffstat (limited to 'src/application.cpp')
-rw-r--r-- | src/application.cpp | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/application.cpp b/src/application.cpp index ba456d2c..bffcb2ae 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -301,11 +301,8 @@ void Application::loadUrl(const KUrl& url, const Rekonq::OpenType& type) } // loading home pages - if (url.scheme() == QLatin1String("about")) - { - homePage(url); + if (homePage(url)) return; - } if (url.scheme() == QLatin1String("mailto")) { @@ -421,12 +418,21 @@ MainWindowList Application::mainWindowList() } -void Application::homePage(const KUrl &url) +bool Application::homePage(const KUrl &url) { - kDebug() << "loading home: " << url; - MainView *view = mainWindow()->mainView(); - WebView *w = view->currentWebView(); - HomePage p(w); - w->setHtml( p.rekonqHomePage(url), url); - return; + if ( url == KUrl("about:lastSites") + || url == KUrl("about:history") + || url == KUrl("about:bookmarks") + || url == KUrl("about:favorites") + || url == KUrl("about:home") + ) + { + kDebug() << "loading home: " << url; + MainView *view = mainWindow()->mainView(); + WebView *w = view->currentWebView(); + HomePage p(w); + w->setHtml( p.rekonqHomePage(url), url); + return true; + } + return false; } |