summaryrefslogtreecommitdiff
path: root/src/mainview.cpp
diff options
context:
space:
mode:
authorDomrachev Alexandr <alexandr.domrachev@gmail.com>2009-09-13 21:52:45 +0400
committerDomrachev Alexandr <alexandr.domrachev@gmail.com>2009-09-13 21:52:45 +0400
commit15fa02f9fe0c2043ba229b7a8e265e8b74dd1410 (patch)
tree38564f66fe23ddba40aff62a91466c3d5bf577cc /src/mainview.cpp
parentBugfix: when trying to open link in new tab & network request fails (no (diff)
downloadrekonq-15fa02f9fe0c2043ba229b7a8e265e8b74dd1410.tar.xz
Open links in new tab located near currently active tab
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r--src/mainview.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp
index 7c91b992..c28953d7 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -256,7 +256,7 @@ WebView *MainView::webView(int index) const
}
-WebView *MainView::newWebView(bool focused)
+WebView *MainView::newWebView(bool focused, bool nearParent)
{
WebView *webView = new WebView; // should be deleted on tab close?
@@ -274,7 +274,10 @@ WebView *MainView::newWebView(bool focused)
connect(webView->page(), SIGNAL(windowCloseRequested()), this, SLOT(windowCloseRequested()));
connect(webView->page(), SIGNAL(printRequested(QWebFrame *)), this, SIGNAL(printRequested(QWebFrame *)));
- addTab(webView, i18n("(Untitled)"));
+ if (nearParent)
+ insertTab(currentIndex() + 1, webView, i18n("(Untitled)"));
+ else
+ addTab(webView, i18n("(Untitled)"));
if (focused)
{