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/mainwindow.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'src/mainwindow.cpp') 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; + } } -- cgit v1.2.1 From 002bfdbaf5daf0a19f8c64cb9568ce6a24c63d4f Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 9 Sep 2009 14:13:43 +0200 Subject: Restored Home Action (and button in the main toolbar) --- src/mainwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 513b7d73..171739d5 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -170,6 +170,7 @@ 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,6 +257,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(this, SLOT(slotHome()), actionCollection()); KStandardAction::preferences(this, SLOT(slotPreferences()), actionCollection()); // WEB Actions (NO KStandardActions..) -- 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/mainwindow.cpp | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 171739d5..8e7a1040 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -45,7 +45,6 @@ #include "findbar.h" #include "sidepanel.h" #include "urlbar.h" -#include "homepage.h" // Ui Includes #include "ui_cleardata.h" @@ -257,7 +256,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(this, SLOT(slotHome()), actionCollection()); + KStandardAction::home(m_view, SLOT(slotHome()), actionCollection()); KStandardAction::preferences(this, SLOT(slotPreferences()), actionCollection()); // WEB Actions (NO KStandardActions..) @@ -750,25 +749,6 @@ void MainWindow::slotViewPageSource() } -void MainWindow::slotHome() -{ - 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; - } -} - - void MainWindow::slotToggleInspector(bool enable) { QWebSettings::globalSettings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, enable); -- cgit v1.2.1 From 0609b26165cda7672b9416d94dbc161751fd6ac6 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 12 Sep 2009 23:09:08 +0200 Subject: notification system made default and no more "unsettable" --- src/mainwindow.cpp | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 8e7a1040..da51ac2a 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -188,6 +188,10 @@ void MainWindow::setupToolbar() void MainWindow::postLaunch() { + // notification system + connect(m_view, SIGNAL(showStatusBarMessage(const QString&, Rekonq::Notify)), this, SLOT(notifyMessage(const QString&, Rekonq::Notify))); + connect(m_view, SIGNAL(linkHovered(const QString&)), this, SLOT(notifyMessage(const QString&))); + // --------- connect signals and slots connect(m_view, SIGNAL(setCurrentTitle(const QString &)), this, SLOT(slotUpdateWindowTitle(const QString &))); connect(m_view, SIGNAL(printRequested(QWebFrame *)), this, SLOT(printRequested(QWebFrame *))); @@ -424,23 +428,6 @@ void MainWindow::slotUpdateConfiguration() // ============== General ================== mainView()->showTabBar(); - // "status bar" messages (new notifyMessage system) - if(ReKonfig::showUrlsPopup()) - { - connect(m_view, SIGNAL(showStatusBarMessage(const QString&, Rekonq::Notify)), - this, SLOT(notifyMessage(const QString&, Rekonq::Notify))); - connect(m_view, SIGNAL(linkHovered(const QString&)), - this, SLOT(notifyMessage(const QString&))); - } - else - { - disconnect(m_view, SIGNAL(showStatusBarMessage(const QString&, Rekonq::Notify)), - this, SLOT(notifyMessage(const QString&, Rekonq::Notify))); - disconnect(m_view, SIGNAL(linkHovered(const QString&)), - this, SLOT(notifyMessage(const QString&))); - } - - // =========== Fonts ============== QWebSettings *defaultSettings = QWebSettings::globalSettings(); -- 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/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