summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-09-10 22:49:52 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-09-10 22:49:52 +0200
commit5b0de25722655673fcfc11a5c92fdfee188e55a5 (patch)
treea49471395e068e1549a711d8807470bf0b4e6df4
parentAdded support for bookmark icons. Not yet working.. (diff)
downloadrekonq-5b0de25722655673fcfc11a5c92fdfee188e55a5.tar.xz
Removed "home" scheme
-rw-r--r--src/application.cpp8
-rw-r--r--src/mainview.cpp34
-rw-r--r--src/mainview.h2
-rw-r--r--src/mainwindow.cpp22
-rw-r--r--src/mainwindow.h1
-rw-r--r--src/webpage.cpp9
6 files changed, 27 insertions, 49 deletions
diff --git a/src/application.cpp b/src/application.cpp
index f2a6c554..3ca6b0fd 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -122,7 +122,7 @@ int Application::newInstance()
{
// creating new window
MainWindow *w = newMainWindow();
- w->slotHome();
+ w->mainView()->slotHome();
}
return 0;
@@ -309,12 +309,6 @@ void Application::loadUrl(const KUrl& url, const Rekonq::OpenType& type)
return;
}
- if(url.scheme() == QLatin1String("home"))
- {
- mainWindow()->slotHome();
- return;
- }
-
KUrl loadingUrl(url);
if (loadingUrl.isRelative())
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 <KUrl>
@@ -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;
+ }
+}
diff --git a/src/mainview.h b/src/mainview.h
index c59cca1a..783068f9 100644
--- a/src/mainview.h
+++ b/src/mainview.h
@@ -110,6 +110,8 @@ public slots:
*/
void newTab();
+ void slotHome();
+
void slotCloneTab(int index = -1);
void slotCloseTab(int index = -1);
void slotCloseOtherTabs(int index);
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);
diff --git a/src/mainwindow.h b/src/mainwindow.h
index 24e9a58e..c3976109 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -79,7 +79,6 @@ private:
SidePanel *sidePanel();
public slots:
- void slotHome();
void slotUpdateBrowser();
/**
diff --git a/src/webpage.cpp b/src/webpage.cpp
index cc7f7f10..274f8d60 100644
--- a/src/webpage.cpp
+++ b/src/webpage.cpp
@@ -97,14 +97,7 @@ bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &r
KToolInvocation::invokeMailer(m_requestedUrl);
return false;
}
-
- if(m_requestedUrl.scheme() == QLatin1String("home"))
- {
- Application::instance()->mainWindow()->slotHome();
- return false;
- }
-
-
+
if (m_keyboardModifiers & Qt::ControlModifier || m_pressedButtons == Qt::MidButton)
{
Application::instance()->loadUrl(request.url(), Rekonq::SettingOpenTab);