summaryrefslogtreecommitdiff
path: root/src/mainview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r--src/mainview.cpp34
1 files changed, 22 insertions, 12 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp
index 61122ad9..07f209b7 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -41,6 +41,7 @@
#include "urlbar.h"
#include "webview.h"
#include "sessionmanager.h"
+#include "homepage.h"
// KDE Includes
#include <KUrl>
@@ -294,18 +295,8 @@ void MainView::newTab()
urlBar()->setUrl(KUrl(""));
urlBar()->setFocus();
-
- switch(ReKonfig::newTabsBehaviour())
- {
- case 0:
- w->load(QUrl("home:/"));
- break;
- case 2:
- w->load( QUrl(ReKonfig::homePage()) );
- break;
- default:
- break;
- }
+
+ slotHome();
}
@@ -579,3 +570,22 @@ void MainView::resizeEvent(QResizeEvent *event)
{
KTabWidget::resizeEvent(event);
}
+
+
+void MainView::slotHome()
+{
+ WebView *w = currentWebView();
+ HomePage p;
+
+ switch(ReKonfig::newTabsBehaviour())
+ {
+ case 0:
+ w->setHtml( p.rekonqHomePage(), QUrl());
+ break;
+ case 2:
+ w->load( QUrl(ReKonfig::homePage()) );
+ break;
+ default:
+ break;
+ }
+}