summaryrefslogtreecommitdiff
path: root/src/webtab
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-11-26 19:15:24 +0100
committerAndrea Diamantini <adjam7@gmail.com>2012-12-10 02:48:06 +0100
commit06b43a83c432ae50fbc1e01e277aa4caf98df72e (patch)
tree8be2765e6bd2ce47550eceaa5bedfd6c70011419 /src/webtab
parentFix tabs moves when some of them are pinned (diff)
downloadrekonq-06b43a83c432ae50fbc1e01e277aa4caf98df72e.tar.xz
Open focused link when launched from web app
Diffstat (limited to 'src/webtab')
-rw-r--r--src/webtab/webview.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/webtab/webview.cpp b/src/webtab/webview.cpp
index 48c35615..0cc09574 100644
--- a/src/webtab/webview.cpp
+++ b/src/webtab/webview.cpp
@@ -764,7 +764,13 @@ void WebView::openLinkInNewTab()
KAction *a = qobject_cast<KAction*>(sender());
KUrl url(a->data().toUrl());
- emit loadUrl(url, Rekonq::NewTab);
+ WebTab *tab = qobject_cast<WebTab *>(parent());
+ WebWindow *webwin = tab->webWindow();
+
+ if (webwin)
+ emit loadUrl(url, Rekonq::NewTab);
+ else
+ emit loadUrl(url, Rekonq::NewFocusedTab);
}
void WebView::openLinkInPrivateWindow()