summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/application.cpp7
-rw-r--r--src/application.h4
-rw-r--r--src/mainwindow.cpp2
3 files changed, 10 insertions, 3 deletions
diff --git a/src/application.cpp b/src/application.cpp
index a5b4e759..e5b76745 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -396,3 +396,10 @@ void Application::loadResolvedUrl(ThreadWeaver::Job *job)
historyManager()->addHistoryEntry( url.prettyUrl() );
}
}
+
+
+void Application::newWindow()
+{
+ loadUrl( KUrl("about:home"), Rekonq::NewWindow );
+ mainWindow()->mainView()->urlBar()->setFocus();
+}
diff --git a/src/application.h b/src/application.h
index f20f537b..30ec4839 100644
--- a/src/application.h
+++ b/src/application.h
@@ -100,6 +100,7 @@ public:
static Application *instance();
MainWindow *mainWindow();
+ MainWindow *newMainWindow();
MainWindowList mainWindowList();
static KIcon icon(const KUrl &url);
@@ -117,8 +118,6 @@ public slots:
*/
void saveConfiguration() const;
- MainWindow *newMainWindow();
-
void loadUrl( const KUrl& url,
const Rekonq::OpenType& type = Rekonq::CurrentTab
);
@@ -127,6 +126,7 @@ public slots:
const Rekonq::OpenType& type = Rekonq::CurrentTab
);
+ void newWindow();
void removeMainWindow(MainWindow *window);
private slots:
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index a4df5756..4c24440c 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -265,7 +265,7 @@ void MainWindow::setupActions()
a = new KAction(KIcon("window-new"), i18n("&New Window"), this);
a->setShortcut(KShortcut(Qt::CTRL | Qt::Key_N));
actionCollection()->addAction(QLatin1String("new_window"), a);
- connect(a, SIGNAL(triggered(bool)), Application::instance(), SLOT(newMainWindow()));
+ connect(a, SIGNAL(triggered(bool)), Application::instance(), SLOT(newWindow()));
// Standard Actions
KStandardAction::open(this, SLOT(fileOpen()), actionCollection());