summaryrefslogtreecommitdiff
path: root/src/mainview.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-05-02 02:32:43 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-05-02 02:32:43 +0200
commite6f5870d05b6d938476a790b0a65f2322c34d22c (patch)
treed5bfed17bea201a961d512d84e6da837e6a9635a /src/mainview.cpp
parentother i18n fix from Kristol (diff)
parentOpen Back/Forward tabs fixed (diff)
downloadrekonq-e6f5870d05b6d938476a790b0a65f2322c34d22c.tar.xz
Merge branch 'develop'
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..d4edeb19 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 (!m_makeBackTab)
+ {
+ 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);