diff options
Diffstat (limited to 'src/tabwindow/tabwindow.cpp')
-rw-r--r-- | src/tabwindow/tabwindow.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/tabwindow/tabwindow.cpp b/src/tabwindow/tabwindow.cpp index a0f43fa1..cd4ec8ce 100644 --- a/src/tabwindow/tabwindow.cpp +++ b/src/tabwindow/tabwindow.cpp @@ -29,6 +29,7 @@ #include "tabwindow.moc" // Local Includes +#include "application.h" #include "webpage.h" #include "webwindow.h" #include "tabbar.h" @@ -59,10 +60,11 @@ #include <QWebSettings> -TabWindow::TabWindow(bool withTab, QWidget *parent) +TabWindow::TabWindow(bool withTab, bool PrivateBrowsingMode, QWidget *parent) : RekonqWindow(parent) , _addTabButton(new QToolButton(this)) , _openedTabsCounter(0) + , _isPrivateBrowsing(PrivateBrowsingMode) { setContentsMargins(0, 0, 0, 0); @@ -140,6 +142,9 @@ WebWindow *TabWindow::prepareNewTab(WebPage *page) { WebWindow *tab = new WebWindow(this, page); + if (_isPrivateBrowsing) + tab->setPrivateBrowsing(true); + connect(tab, SIGNAL(titleChanged(QString)), this, SLOT(tabTitleChanged(QString))); connect(tab, SIGNAL(loadStarted()), this, SLOT(tabLoadStarted())); @@ -171,8 +176,8 @@ void TabWindow::loadUrl(const KUrl &url, Rekonq::OpenType type, TabHistory *hist break; case Rekonq::NewWindow: - // TODO -// emit loadUrlInNewWindow(url); + case Rekonq::NewPrivateWindow: + rApp->loadUrl(url, type); return; case Rekonq::CurrentTab: @@ -500,3 +505,9 @@ void TabWindow::setFullScreen(bool makeFullScreen) _addTabButton->setVisible(!makeFullScreen); KToggleFullScreenAction::setFullScreen(this, makeFullScreen); } + + +bool TabWindow::isPrivateBrowsingWindowMode() +{ + return _isPrivateBrowsing; +} |