summaryrefslogtreecommitdiff
path: root/src/application.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/application.cpp')
-rw-r--r--src/application.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/application.cpp b/src/application.cpp
index c36ea441..831df323 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -305,7 +305,12 @@ void Application::loadUrl(const KUrl& url, const Rekonq::OpenType& type)
newType = Rekonq::CurrentTab;
TabWindow *w = 0;
- if (newType == Rekonq::NewWindow
+ if (newType == Rekonq::NewPrivateWindow)
+ {
+ w = newTabWindow(true, true);
+ newType = Rekonq::CurrentTab;
+ }
+ else if (newType == Rekonq::NewWindow
|| (newType == Rekonq::NewTab && ReKonfig::openLinksInNewWindow()))
{
w = newTabWindow();
@@ -320,9 +325,9 @@ void Application::loadUrl(const KUrl& url, const Rekonq::OpenType& type)
}
-TabWindow *Application::newTabWindow()
+TabWindow *Application::newTabWindow(bool withTab, bool PrivateBrowsingMode)
{
- TabWindow *w = new TabWindow;
+ TabWindow *w = new TabWindow(withTab, PrivateBrowsingMode);
// set object name
int n = m_tabWindows.count() + 1;
@@ -719,3 +724,9 @@ void Application::newTab()
{
tabWindow()->newCleanTab();
}
+
+
+void Application::newPrivateBrowsingWindow()
+{
+ loadUrl(KUrl("about:incognito"), Rekonq::NewPrivateWindow);
+}