summaryrefslogtreecommitdiff
path: root/src/application.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/application.cpp')
-rw-r--r--src/application.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/application.cpp b/src/application.cpp
index 9bbf7792..9b7d175f 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -42,6 +42,7 @@
#include "webview.h"
#include "urlbar.h"
#include "sessionmanager.h"
+#include "homepage.h"
// KDE Includes
#include <KCmdLineArgs>
@@ -303,6 +304,13 @@ void Application::loadUrl(const KUrl& url, const Rekonq::OpenType& type)
KMessageBox::error(0, i18n("Malformed URL:\n%1", url.url()));
return;
}
+
+ // loading home pages
+ if (url.scheme() == QLatin1String("about"))
+ {
+ homePage(url);
+ return;
+ }
if (url.scheme() == QLatin1String("mailto"))
{
@@ -416,3 +424,15 @@ MainWindowList Application::mainWindowList()
{
return m_mainWindows;
}
+
+
+void 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);
+ view->urlBar()->setFocus();
+ return;
+}