From 09567d9fbf6e034319bbdf7820f4bceac42cee12 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 13 Sep 2009 03:14:55 +0200 Subject: Modified rekonq behaviour: HomePage has 2 choices: usual home page vs new tab page new tab has 3: new tabp page, home page, blank page --- src/mainwindow.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index da51ac2a..099a463e 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -45,6 +45,7 @@ #include "findbar.h" #include "sidepanel.h" #include "urlbar.h" +#include "homepage.h" // Ui Includes #include "ui_cleardata.h" @@ -260,7 +261,7 @@ void MainWindow::setupActions() a = KStandardAction::fullScreen(this, SLOT(slotViewFullScreen(bool)), this, actionCollection()); a->setShortcut(KShortcut(Qt::Key_F11, Qt::CTRL + Qt::SHIFT + Qt::Key_F)); - KStandardAction::home(m_view, SLOT(slotHome()), actionCollection()); + KStandardAction::home(this, SLOT(slotHome()), actionCollection()); KStandardAction::preferences(this, SLOT(slotPreferences()), actionCollection()); // WEB Actions (NO KStandardActions..) @@ -736,6 +737,22 @@ void MainWindow::slotViewPageSource() } +void MainWindow::slotHome() +{ + WebView *w = currentTab(); + + if(ReKonfig::useNewTabPage()) + { + HomePage p; + w->setHtml( p.rekonqHomePage(), QUrl()); + } + else + { + w->load( QUrl(ReKonfig::homePage()) ); + } +} + + void MainWindow::slotToggleInspector(bool enable) { QWebSettings::globalSettings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, enable); -- cgit v1.2.1