diff options
author | Domrachev Alexandr <alexandr.domrachev@gmail.com> | 2009-09-13 21:52:45 +0400 |
---|---|---|
committer | Domrachev Alexandr <alexandr.domrachev@gmail.com> | 2009-09-13 21:52:45 +0400 |
commit | 15fa02f9fe0c2043ba229b7a8e265e8b74dd1410 (patch) | |
tree | 38564f66fe23ddba40aff62a91466c3d5bf577cc /src/mainview.cpp | |
parent | Bugfix: when trying to open link in new tab & network request fails (no (diff) | |
download | rekonq-15fa02f9fe0c2043ba229b7a8e265e8b74dd1410.tar.xz |
Open links in new tab located near currently active tab
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r-- | src/mainview.cpp | 7 |
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) { |