summaryrefslogtreecommitdiff
path: root/src/webview.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-09-06 11:04:03 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-09-06 11:04:03 +0200
commit42e6065c5519a0cc78e9d66345d6786d5ad15874 (patch)
treeb412a328f341c93bd07ccfc833b9befb5838e0af /src/webview.cpp
parentSimplified CookieJar management (diff)
downloadrekonq-42e6065c5519a0cc78e9d66345d6786d5ad15874.tar.xz
Fixing rekonq Multi Windows behaviour and
Added options about tabbed (or not) browsing..
Diffstat (limited to 'src/webview.cpp')
-rw-r--r--src/webview.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/webview.cpp b/src/webview.cpp
index 13eeead5..292fd307 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -114,9 +114,9 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
if (!result.linkUrl().isEmpty())
{
// link actions
- a = pageAction(QWebPage::OpenLinkInNewWindow);
- a->setText(i18n("Open in New &Tab"));
- a->setIcon(KIcon("tab-new"));
+ a = new KAction(KIcon("tab-new"), i18n("Open in New &Tab"), this);
+ a->setData(result.linkUrl());
+ connect(a, SIGNAL(triggered(bool)), this, SLOT(openLinkInNewTab()));
menu.addAction(a);
a = new KAction(KIcon("window-new"), i18n("Open in New &Window"), this);
@@ -364,3 +364,11 @@ void WebView::openLinkInNewWindow()
KUrl url(a->data().toUrl());
Application::instance()->loadUrl(url, Rekonq::NewWindow);
}
+
+
+void WebView::openLinkInNewTab()
+{
+ KAction *a = qobject_cast<KAction*>(sender());
+ KUrl url(a->data().toUrl());
+ Application::instance()->loadUrl(url, Rekonq::SettingOpenTab);
+}