summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/application.cpp2
-rw-r--r--src/webtab/webview.cpp8
2 files changed, 8 insertions, 2 deletions
diff --git a/src/application.cpp b/src/application.cpp
index 06f9fd82..84418b4b 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -393,7 +393,7 @@ void Application::loadUrl(const KUrl& url, const Rekonq::OpenType& type)
}
else if (newType == Rekonq::NewWindow
|| (newType == Rekonq::NewTab && ReKonfig::openLinksInNewWindow())
- || (newType == Rekonq::NewTab && tabWindowList().count() == 0))
+ || ((newType == Rekonq::NewTab || newType == Rekonq::NewFocusedTab) && tabWindowList().count() == 0))
{
w = newTabWindow();
newType = Rekonq::CurrentTab;
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()