diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-10-22 16:43:56 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-10-22 16:43:56 +0200 |
commit | f02f8f72b459a30169d3016463147f662dca7491 (patch) | |
tree | 36adcfc14fdf2e69bd72be9440bd91f666182ebd /src/mainwindow.cpp | |
parent | changed title. (diff) | |
download | rekonq-f02f8f72b459a30169d3016463147f662dca7491.tar.xz |
(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..
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 29 |
1 files changed, 21 insertions, 8 deletions
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 |