diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-09-06 11:04:03 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-09-06 11:04:03 +0200 |
commit | 42e6065c5519a0cc78e9d66345d6786d5ad15874 (patch) | |
tree | b412a328f341c93bd07ccfc833b9befb5838e0af /src/webview.cpp | |
parent | Simplified CookieJar management (diff) | |
download | rekonq-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.cpp | 14 |
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); +} |