From 8067811130022f2024558bda7be4a6760d2b9189 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 1 Aug 2013 19:39:04 +0200 Subject: Contextual menu work Group inspect action alone as requested and reorganized action as proposed. Now we have --- OPEN ACTION --- open here open there open everywhere --- SAVE --- save link as.. --- LINK RELATED copy link bookmark link share link ---- inspect . "Save link" is the text chosen in KDE, webkit, chrom* && firefox. I don't want to change it. BUG: 322987 BUG: 322988 --- src/webtab/webview.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/webtab') diff --git a/src/webtab/webview.cpp b/src/webtab/webview.cpp index 3e7390e6..6b8416fe 100644 --- a/src/webtab/webview.cpp +++ b/src/webtab/webview.cpp @@ -355,7 +355,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event) menu.addSeparator(); - //Frame + // Frame KActionMenu *frameMenu = new KActionMenu(i18n("Current Frame"), &menu); frameMenu->addAction(pageAction(KWebPage::OpenFrameInNewWindow)); @@ -394,7 +394,6 @@ void WebView::contextMenuEvent(QContextMenuEvent *event) sendByMailAction->setData(m_contextMenuHitResult.linkUrl()); sendByMailAction->setText(i18n("Share link")); - a = new KAction(KIcon("tab-new"), i18n("Open in New &Tab"), &menu); a->setData(m_contextMenuHitResult.linkUrl()); connect(a, SIGNAL(triggered(bool)), this, SLOT(openLinkInNewTab())); @@ -431,7 +430,6 @@ void WebView::contextMenuEvent(QContextMenuEvent *event) a->setText(i18n("Save Link")); menu.addAction(a); - menu.addAction(pageAction(KWebPage::CopyLinkToClipboard)); } // IMAGE ACTIONS ------------------------------------------------------------------ @@ -564,7 +562,9 @@ void WebView::contextMenuEvent(QContextMenuEvent *event) // DEFAULT ACTIONs (on the bottom) ------------------------------------------------ menu.addSeparator(); if (resultHit & WebView::LinkSelection) - { + { + menu.addAction(pageAction(KWebPage::CopyLinkToClipboard)); + a = new KAction(KIcon("bookmark-new"), i18n("&Bookmark link"), &menu); a->setData(m_contextMenuHitResult.linkUrl()); connect(a, SIGNAL(triggered(bool)), this, SLOT(bookmarkLink())); @@ -580,6 +580,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event) } menu.addAction(sendByMailAction); + menu.addSeparator(); if (webwin) menu.addAction(webwin->actionByName("web_inspector")); -- cgit v1.2.1