summaryrefslogtreecommitdiff
path: root/src/mainview.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-05-01 03:20:42 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-05-01 03:20:42 +0200
commit55816b45e681f10c9b45675dba65575d01d9efe3 (patch)
tree9469fd723a8166e2764614c70b2953f7e7a9036a /src/mainview.cpp
parentOpen tabs in brackground. Step 1 (diff)
downloadrekonq-55816b45e681f10c9b45675dba65575d01d9efe3.tar.xz
Managing user tab open settings. Step 2
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r--src/mainview.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp
index d8375ab8..9dbf800b 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -296,7 +296,7 @@ WebView *MainView::webView(int index) const
}
-WebView *MainView::newWebView(bool makeCurrent)
+WebView *MainView::newWebView(Rekonq::OpenType type)
{
// line edit
UrlBar *urlBar = new UrlBar; // Ownership of widget is passed on to the QStackedWidget (addWidget method).
@@ -338,11 +338,22 @@ WebView *MainView::newWebView(bool makeCurrent)
addTab(webView, i18n("(Untitled)"));
- if (makeCurrent)
+ switch(type)
{
+ case Rekonq::Default:
+ if (makeTabCurrent)
+ {
+ setCurrentWidget(webView); // this method does NOT take ownership of webView
+ urlBar->setFocus();
+ }
+ break;
+ case Rekonq::New:
setCurrentWidget(webView); // this method does NOT take ownership of webView
urlBar->setFocus();
- }
+ break;
+ case Rekonq::Background:
+ break;
+ };
emit tabsChanged();
@@ -698,7 +709,7 @@ void MainView::mouseDoubleClickEvent(QMouseEvent *event)
{
if (!childAt(event->pos()))
{
- newWebView(true);
+ newWebView(Rekonq::New);
return;
}
KTabWidget::mouseDoubleClickEvent(event);