|
|
|
|
@ -933,7 +933,7 @@ void WebView::createPageContextMenu(QMenu* menu, const QPoint &pos) |
|
|
|
|
frameMenu->addAction(tr("Show &only this frame"), this, SLOT(loadClickedFrame())); |
|
|
|
|
Action* act = new Action(QIcon::fromTheme("tab-new", QIcon(":/icons/menu/tab-new.png")), tr("Show this frame in new &tab")); |
|
|
|
|
connect(act, SIGNAL(triggered()), this, SLOT(loadClickedFrameInNewTab())); |
|
|
|
|
connect(act, SIGNAL(middleClicked()), this, SLOT(loadClickedFrameInBgTab())); |
|
|
|
|
connect(act, SIGNAL(ctrlTriggered()), this, SLOT(loadClickedFrameInBgTab())); |
|
|
|
|
frameMenu->addAction(act); |
|
|
|
|
frameMenu->addSeparator(); |
|
|
|
|
frameMenu->addAction(qIconProvider->standardIcon(QStyle::SP_BrowserReload), tr("&Reload"), this, SLOT(reloadClickedFrame())); |
|
|
|
|
@ -990,7 +990,7 @@ void WebView::createLinkContextMenu(QMenu* menu, const QWebHitTestResult &hitTes |
|
|
|
|
Action* act = new Action(QIcon::fromTheme("tab-new", QIcon(":/icons/menu/tab-new.png")), tr("Open link in new &tab")); |
|
|
|
|
act->setData(hitTest.linkUrl()); |
|
|
|
|
connect(act, SIGNAL(triggered()), this, SLOT(userDefinedOpenUrlInNewTab())); |
|
|
|
|
connect(act, SIGNAL(middleClicked()), this, SLOT(userDefinedOpenUrlInBgTab())); |
|
|
|
|
connect(act, SIGNAL(ctrlTriggered()), this, SLOT(userDefinedOpenUrlInBgTab())); |
|
|
|
|
menu->addAction(act); |
|
|
|
|
menu->addAction(QIcon::fromTheme("window-new"), tr("Open link in new &window"), this, SLOT(openUrlInNewWindow()))->setData(hitTest.linkUrl()); |
|
|
|
|
menu->addSeparator(); |
|
|
|
|
@ -1016,7 +1016,7 @@ void WebView::createImageContextMenu(QMenu* menu, const QWebHitTestResult &hitTe |
|
|
|
|
Action* act = new Action(tr("Show i&mage")); |
|
|
|
|
act->setData(hitTest.imageUrl()); |
|
|
|
|
connect(act, SIGNAL(triggered()), this, SLOT(openActionUrl())); |
|
|
|
|
connect(act, SIGNAL(middleClicked()), this, SLOT(userDefinedOpenUrlInNewTab())); |
|
|
|
|
connect(act, SIGNAL(ctrlTriggered()), this, SLOT(userDefinedOpenUrlInNewTab())); |
|
|
|
|
menu->addAction(act); |
|
|
|
|
menu->addAction(tr("Copy im&age"), this, SLOT(copyImageToClipboard()))->setData(hitTest.imageUrl()); |
|
|
|
|
menu->addAction(QIcon::fromTheme("edit-copy"), tr("Copy image ad&dress"), this, SLOT(copyLinkToClipboard()))->setData(hitTest.imageUrl()); |
|
|
|
|
@ -1049,13 +1049,13 @@ void WebView::createSelectedTextContextMenu(QMenu* menu, const QWebHitTestResult |
|
|
|
|
Action* gtwact = new Action(QIcon(":icons/sites/translate.png"), tr("Google Translate")); |
|
|
|
|
gtwact->setData(googleTranslateUrl); |
|
|
|
|
connect(gtwact, SIGNAL(triggered()), this, SLOT(openUrlInSelectedTab())); |
|
|
|
|
connect(gtwact, SIGNAL(middleClicked()), this, SLOT(openUrlInBackgroundTab())); |
|
|
|
|
connect(gtwact, SIGNAL(ctrlTriggered()), this, SLOT(openUrlInBackgroundTab())); |
|
|
|
|
menu->addAction(gtwact); |
|
|
|
|
|
|
|
|
|
Action* dictact = new Action(QIcon::fromTheme("accessories-dictionary"), tr("Dictionary")); |
|
|
|
|
dictact->setData(QUrl("http://" + (!langCode.isEmpty() ? langCode + "." : langCode) + "wiktionary.org/wiki/Special:Search?search=" + selectedText)); |
|
|
|
|
connect(dictact, SIGNAL(triggered()), this, SLOT(openUrlInSelectedTab())); |
|
|
|
|
connect(dictact, SIGNAL(middleClicked()), this, SLOT(openUrlInBackgroundTab())); |
|
|
|
|
connect(dictact, SIGNAL(ctrlTriggered()), this, SLOT(openUrlInBackgroundTab())); |
|
|
|
|
menu->addAction(dictact); |
|
|
|
|
|
|
|
|
|
// #379: Remove newlines
|
|
|
|
|
@ -1071,7 +1071,7 @@ void WebView::createSelectedTextContextMenu(QMenu* menu, const QWebHitTestResult |
|
|
|
|
act->setData(guessedUrl); |
|
|
|
|
|
|
|
|
|
connect(act, SIGNAL(triggered()), this, SLOT(openActionUrl())); |
|
|
|
|
connect(act, SIGNAL(middleClicked()), this, SLOT(userDefinedOpenUrlInNewTab())); |
|
|
|
|
connect(act, SIGNAL(ctrlTriggered()), this, SLOT(userDefinedOpenUrlInNewTab())); |
|
|
|
|
menu->addAction(act); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -1083,7 +1083,7 @@ void WebView::createSelectedTextContextMenu(QMenu* menu, const QWebHitTestResult |
|
|
|
|
SearchEngine engine = mApp->searchEnginesManager()->activeEngine(); |
|
|
|
|
Action* act = new Action(engine.icon, tr("Search \"%1 ..\" with %2").arg(selectedText, engine.name)); |
|
|
|
|
connect(act, SIGNAL(triggered()), this, SLOT(searchSelectedText())); |
|
|
|
|
connect(act, SIGNAL(middleClicked()), this, SLOT(searchSelectedTextInBackgroundTab())); |
|
|
|
|
connect(act, SIGNAL(ctrlTriggered()), this, SLOT(searchSelectedTextInBackgroundTab())); |
|
|
|
|
menu->addAction(act); |
|
|
|
|
|
|
|
|
|
// Search with ...
|
|
|
|
|
@ -1094,7 +1094,7 @@ void WebView::createSelectedTextContextMenu(QMenu* menu, const QWebHitTestResult |
|
|
|
|
act->setData(QVariant::fromValue(en)); |
|
|
|
|
|
|
|
|
|
connect(act, SIGNAL(triggered()), this, SLOT(searchSelectedText())); |
|
|
|
|
connect(act, SIGNAL(middleClicked()), this, SLOT(searchSelectedTextInBackgroundTab())); |
|
|
|
|
connect(act, SIGNAL(ctrlTriggered()), this, SLOT(searchSelectedTextInBackgroundTab())); |
|
|
|
|
swMenu->addAction(act); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|