From 667bd0a8450835f9b95b8ce83fb4f04a7df6d4ca Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 8 Sep 2009 02:38:18 +0200 Subject: 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 :) --- src/mainview.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/mainview.cpp') diff --git a/src/mainview.cpp b/src/mainview.cpp index 76684c31..61122ad9 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -294,10 +294,17 @@ void MainView::newTab() urlBar()->setUrl(KUrl("")); urlBar()->setFocus(); - - if (ReKonfig::newTabsOpenHomePage()) + + switch(ReKonfig::newTabsBehaviour()) { - w->load(QUrl(ReKonfig::homePage())); + case 0: + w->load(QUrl("home:/")); + break; + case 2: + w->load( QUrl(ReKonfig::homePage()) ); + break; + default: + break; } } -- cgit v1.2.1 From 5b0de25722655673fcfc11a5c92fdfee188e55a5 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 10 Sep 2009 22:49:52 +0200 Subject: Removed "home" scheme --- src/mainview.cpp | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) (limited to 'src/mainview.cpp') 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 @@ -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; + } +} -- cgit v1.2.1 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/mainview.cpp | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) (limited to 'src/mainview.cpp') diff --git a/src/mainview.cpp b/src/mainview.cpp index 07f209b7..7c91b992 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -296,7 +296,19 @@ void MainView::newTab() urlBar()->setUrl(KUrl("")); urlBar()->setFocus(); - slotHome(); + HomePage p; + + switch(ReKonfig::newTabsBehaviour()) + { + case 0: + w->setHtml( p.rekonqHomePage() ); + break; + case 2: + w->load( QUrl(ReKonfig::homePage()) ); + break; + default: + break; + } } @@ -570,22 +582,3 @@ 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; - } -} -- cgit v1.2.1