From f02f8f72b459a30169d3016463147f662dca7491 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 22 Oct 2009 16:43:56 +0200 Subject: (LAST hopefully) BIG change (before 0.3) A strange bug on new window loading, calling from .desktop file (krunner & friends). So I had to change the homePage launch mechanism. Working on that I started playing with startup settings and implemented this. I hope Pano like this very much: 0.3 gift :D Waiting for someone comments and reviews to merge.. --- src/mainwindow.cpp | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 02102ae1..6ec6a3a6 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -46,6 +46,7 @@ #include "sidepanel.h" #include "urlbar.h" #include "tabbar.h" +#include "homepage.h" // Ui Includes #include "ui_cleardata.h" @@ -767,14 +768,7 @@ void MainWindow::slotViewPageSource() void MainWindow::slotHome() { - if(ReKonfig::newTabHomePage()) - { - Application::instance()->homePage(); - } - else - { - currentTab()->load( QUrl(ReKonfig::homePage()) ); - } + currentTab()->load( QUrl(ReKonfig::homePage()) ); } @@ -1095,3 +1089,22 @@ void MainWindow::slotOpenActionUrl(QAction *action) } } + + +bool MainWindow::homePage(const KUrl &url) +{ + if ( url == KUrl("rekonq:closedTabs") + || url == KUrl("rekonq:history") + || url == KUrl("rekonq:bookmarks") + || url == KUrl("rekonq:favorites") + || url == KUrl("rekonq:home") + ) + { + kDebug() << "loading home: " << url; + WebView *w = currentTab(); + HomePage p(w); + w->setHtml( p.rekonqHomePage(url), url); + return true; + } + return false; +} \ No newline at end of file -- cgit v1.2.1