diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-09-08 02:38:18 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-09-10 22:15:10 +0200 |
commit | 667bd0a8450835f9b95b8ce83fb4f04a7df6d4ca (patch) | |
tree | a202cb184a88313c24c407d94d5c3147d144a57e /src/mainwindow.cpp | |
parent | rekonq 0.2.56 with session management (recover on crash) (diff) | |
download | rekonq-667bd0a8450835f9b95b8ce83fb4f04a7df6d4ca.tar.xz |
HUGE HUGE HUGE COMMIT!
First implementation of "rekonq home page"
- Added icons && htmls for it
- fixed pics places && CMakeLists.txt
- Added a HomePage class to create the "rekonq home Page"
- Modified setting to load on new tab start
1) rekonq home page (default)
2) blank page
3) an url (to set)
- removed home page button
- fixed WebPage && loadUrl slot to load "home:" scheme
- Added a toolbar method in BookmarksProvider to load bookmarks in the homepage
The page needs a lot of love, but I think this is a really good starting point for.
Hope you like it :)
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 7f5c5996..513b7d73 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" @@ -169,7 +170,6 @@ void MainWindow::setupToolbar() m_mainBar->addAction( actionByName(KStandardAction::name(KStandardAction::Forward)) ); m_mainBar->addSeparator(); m_mainBar->addAction( actionByName("stop_reload") ); - m_mainBar->addAction( actionByName(KStandardAction::name(KStandardAction::Home)) ); m_mainBar->addAction( actionByName("url_bar") ); m_mainBar->addAction( actionByName("bookmarksActionMenu") ); m_mainBar->addAction( actionByName("rekonq_tools") ); @@ -256,7 +256,6 @@ 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(this, SLOT(slotHome()), actionCollection()); KStandardAction::preferences(this, SLOT(slotPreferences()), actionCollection()); // WEB Actions (NO KStandardActions..) @@ -422,7 +421,6 @@ void MainWindow::setupSidePanel() void MainWindow::slotUpdateConfiguration() { // ============== General ================== - m_homePage = ReKonfig::homePage(); mainView()->showTabBar(); // "status bar" messages (new notifyMessage system) @@ -752,7 +750,20 @@ void MainWindow::slotViewPageSource() void MainWindow::slotHome() { - Application::instance()->loadUrl(KUrl(m_homePage)); + WebView *w = Application::instance()->mainWindow()->mainView()->currentWebView(); + HomePage p; + + switch(ReKonfig::newTabsBehaviour()) + { + case 0: + w->setHtml( p.rekonqHomePage(), QUrl("home:/")); + break; + case 2: + w->load( QUrl(ReKonfig::homePage()) ); + break; + default: + break; + } } |