1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Improved context menu WebView actions.

- all functions related to craeting context menu are now
  in base WebView class, not in subclasses
- it is now also possible to do actions on selected text
  in input and textarea elements
- fixed bug in QtWebKit 2.2 when Direction menu was displayed
  twice in context menu on input and textarea elements
This commit is contained in:
nowrep 2012-01-22 11:49:58 +01:00
parent eb00897025
commit f7fa01519b
39 changed files with 7178 additions and 7126 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,12 +1,13 @@
#include "popupwebview.h"
#include "popupwebpage.h"
#include "mainapplication.h"
#include "qupzilla.h"
#include "tabwidget.h"
#include "iconprovider.h"
PopupWebView::PopupWebView(QWidget* parent)
: WebView(parent)
, m_page(0)
, m_clickedFrame(0)
, m_menu(new QMenu(this))
{
}
@ -45,131 +46,22 @@ void PopupWebView::closeView()
parentWidget()->close();
}
void PopupWebView::openUrlInNewTab(const QUrl &url)
{
QupZilla* window = mApp->getWindow();
if (window) {
window->tabWidget()->addView(url, Qz::NT_NotSelectedTab);
}
}
void PopupWebView::contextMenuEvent(QContextMenuEvent* event)
{
m_menu->clear();
m_clickedFrame = 0;
QWebFrame* frameAtPos = page()->frameAt(event->pos());
QWebHitTestResult r = page()->mainFrame()->hitTestContent(event->pos());
QWebHitTestResult hitTest = page()->mainFrame()->hitTestContent(event->pos());
if (!r.linkUrl().isEmpty() && r.linkUrl().scheme() != "javascript") {
if (page()->selectedText() == r.linkText()) {
findText("");
}
m_menu->addAction(tr("Open link in new &window"), this, SLOT(openUrlInNewWindow()))->setData(r.linkUrl());
m_menu->addSeparator();
m_menu->addAction(QIcon::fromTheme("document-save"), tr("&Save link as..."), this, SLOT(downloadLinkToDisk()))->setData(r.linkUrl());
m_menu->addAction(QIcon::fromTheme("mail-message-new"), tr("Send link..."), this, SLOT(sendLinkByMail()))->setData(r.linkUrl());
m_menu->addAction(QIcon::fromTheme("edit-copy"), tr("&Copy link address"), this, SLOT(copyLinkToClipboard()))->setData(r.linkUrl());
m_menu->addSeparator();
if (!selectedText().isEmpty()) {
m_menu->addAction(pageAction(QWebPage::Copy));
}
}
if (!r.imageUrl().isEmpty()) {
if (!m_menu->isEmpty()) {
m_menu->addSeparator();
}
m_menu->addAction(tr("Show i&mage"), this, SLOT(openActionUrl()))->setData(r.imageUrl());
m_menu->addAction(tr("Copy im&age"), this, SLOT(copyImageToClipboard()))->setData(r.imageUrl());
m_menu->addAction(QIcon::fromTheme("edit-copy"), tr("Copy image ad&dress"), this, SLOT(copyLinkToClipboard()))->setData(r.imageUrl());
m_menu->addSeparator();
m_menu->addAction(QIcon::fromTheme("document-save"), tr("&Save image as..."), this, SLOT(downloadLinkToDisk()))->setData(r.imageUrl());
m_menu->addAction(QIcon::fromTheme("mail-message-new"), tr("Send image..."), this, SLOT(sendLinkByMail()))->setData(r.imageUrl());
m_menu->addSeparator();
//menu->addAction(tr("Block image"), this, SLOT(blockImage()))->setData(r.imageUrl().toString());
if (!selectedText().isEmpty()) {
m_menu->addAction(pageAction(QWebPage::Copy));
}
}
QWebElement element = r.element();
if (!element.isNull() && (element.tagName().toLower() == "input" || element.tagName().toLower() == "textarea" ||
element.tagName().toLower() == "video" || element.tagName().toLower() == "audio")) {
if (m_menu->isEmpty()) {
page()->createStandardContextMenu()->popup(QCursor::pos());
return;
}
}
if (m_menu->isEmpty() && selectedText().isEmpty()) {
QAction* action = m_menu->addAction(tr("&Back"), this, SLOT(back()));
action->setIcon(IconProvider::standardIcon(QStyle::SP_ArrowBack));
action->setEnabled(history()->canGoBack());
action = m_menu->addAction(tr("&Forward"), this, SLOT(forward()));
action->setIcon(IconProvider::standardIcon(QStyle::SP_ArrowForward));
action->setEnabled(history()->canGoForward());
m_menu->addAction(IconProvider::standardIcon(QStyle::SP_BrowserReload), tr("&Reload"), this, SLOT(reload()));
action = m_menu->addAction(IconProvider::standardIcon(QStyle::SP_BrowserStop), tr("S&top"), this, SLOT(stop()));
action->setEnabled(isLoading());
m_menu->addSeparator();
if (frameAtPos && page()->mainFrame() != frameAtPos) {
m_clickedFrame = frameAtPos;
QMenu* menu = new QMenu(tr("This frame"));
menu->addAction(tr("Show &only this frame"), this, SLOT(loadClickedFrame()));
menu->addSeparator();
menu->addAction(IconProvider::standardIcon(QStyle::SP_BrowserReload), tr("&Reload"), this, SLOT(reloadClickedFrame()));
menu->addAction(QIcon::fromTheme("document-print"), tr("Print frame"), this, SLOT(printClickedFrame()));
menu->addSeparator();
menu->addAction(QIcon::fromTheme("zoom-in"), tr("Zoom &in"), this, SLOT(clickedFrameZoomIn()));
menu->addAction(QIcon::fromTheme("zoom-out"), tr("&Zoom out"), this, SLOT(clickedFrameZoomOut()));
menu->addAction(QIcon::fromTheme("zoom-original"), tr("Reset"), this, SLOT(clickedFrameZoomReset()));
menu->addSeparator();
menu->addAction(QIcon::fromTheme("text-html"), tr("Show so&urce of frame"), this, SLOT(showClickedFrameSource()));
m_menu->addMenu(menu);
}
m_menu->addSeparator();
m_menu->addAction(QIcon::fromTheme("document-save"), tr("&Save page as..."), this, SLOT(downloadLinkToDisk()))->setData(url());
m_menu->addAction(QIcon::fromTheme("edit-copy"), tr("&Copy page link"), this, SLOT(copyLinkToClipboard()))->setData(url());
m_menu->addAction(QIcon::fromTheme("mail-message-new"), tr("Send page link..."), this, SLOT(sendLinkByMail()))->setData(url());
m_menu->addAction(QIcon::fromTheme("document-print"), tr("&Print page"), this, SLOT(printPage()));
m_menu->addSeparator();
m_menu->addAction(QIcon::fromTheme("edit-select-all"), tr("Select &all"), this, SLOT(selectAll()));
m_menu->addSeparator();
m_menu->addAction(QIcon::fromTheme("text-html"), tr("Show so&urce code"), this, SLOT(showSource()));
m_menu->addSeparator();
m_menu->addAction(QIcon::fromTheme("dialog-information"), tr("Show info ab&out site"), this, SLOT(showSiteInfo()));
}
if (!selectedText().isEmpty()) {
QString selectedText = page()->selectedText();
m_menu->addAction(pageAction(QWebPage::Copy));
m_menu->addAction(QIcon::fromTheme("mail-message-new"), tr("Send text..."), this, SLOT(sendLinkByMail()))->setData(selectedText);
m_menu->addSeparator();
QString langCode = mApp->getActiveLanguage().left(2);
QUrl googleTranslateUrl = QUrl(QString("http://translate.google.com/#auto|%1|%2").arg(langCode, selectedText));
m_menu->addAction(QIcon(":icons/menu/translate.png"), tr("Google Translate"), this, SLOT(openActionUrl()))->setData(googleTranslateUrl);
m_menu->addAction(tr("Dictionary"), this, SLOT(openActionUrl()))->setData("http://" + (langCode != "" ? langCode + "." : langCode) + "wiktionary.org/wiki/Special:Search?search=" + selectedText);
m_menu->addSeparator();
QString selectedString = selectedText.trimmed();
if (!selectedString.contains(".")) {
// Try to add .com
selectedString.append(".com");
}
QUrl guessedUrl = QUrl::fromUserInput(selectedString);
if (isUrlValid(guessedUrl)) {
m_menu->addAction(QIcon(":/icons/menu/popup.png"), tr("Go to &web address"), this, SLOT(openActionUrl()))->setData(guessedUrl);
}
}
#if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 2, 0))
// still bugged? in 4.8 RC (it shows selection of webkit's internal source, not html from page)
// it may or may not be bug, but this implementation is useless for us
//
// if (!selectedHtml().isEmpty())
// menu->addAction(tr("Show source of selection"), this, SLOT(showSourceOfSelection()));
#endif
createContextMenu(m_menu, hitTest, event->pos());
if (!m_menu->isEmpty()) {
//Prevent choosing first option with double rightclick

View File

@ -23,12 +23,12 @@ public slots:
void closeView();
private slots:
void openUrlInNewTab(const QUrl &url = QUrl());
private:
void contextMenuEvent(QContextMenuEvent* event);
PopupWebPage* m_page;
QWebFrame* m_clickedFrame;
QMenu* m_menu;
};

View File

@ -37,7 +37,6 @@ TabbedWebView::TabbedWebView(QupZilla* mainClass, WebTab* webTab)
, m_page(0)
, m_webTab(webTab)
, m_menu(new QMenu(this))
, m_clickedFrame(0)
, m_mouseTrack(false)
, m_navigationVisible(false)
, m_hasRss(false)
@ -95,6 +94,12 @@ void TabbedWebView::slotIconChanged()
showIcon();
}
void TabbedWebView::inspectElement()
{
p_QupZilla->showWebInspector();
triggerPageAction(QWebPage::InspectElement);
}
WebPage* TabbedWebView::webPage() const
{
return m_page;
@ -304,155 +309,15 @@ void TabbedWebView::checkRss()
void TabbedWebView::contextMenuEvent(QContextMenuEvent* event)
{
m_menu->clear();
m_clickedFrame = 0;
QWebFrame* frameAtPos = page()->frameAt(event->pos());
QWebHitTestResult r = page()->mainFrame()->hitTestContent(event->pos());
QWebHitTestResult hitTest = page()->mainFrame()->hitTestContent(event->pos());
if (!r.linkUrl().isEmpty() && r.linkUrl().scheme() != "javascript") {
if (page()->selectedText() == r.linkText()) {
findText("");
}
m_menu->addAction(QIcon(":/icons/menu/popup.png"), tr("Open link in new &tab"), this, SLOT(openUrlInNewTab()))->setData(r.linkUrl());
m_menu->addAction(QIcon::fromTheme("window-new"), tr("Open link in new &window"), this, SLOT(openUrlInNewWindow()))->setData(r.linkUrl());
m_menu->addSeparator();
m_menu->addAction(IconProvider::fromTheme("user-bookmarks"), tr("B&ookmark link"), this, SLOT(bookmarkLink()))->setData(r.linkUrl());
m_menu->addAction(QIcon::fromTheme("document-save"), tr("&Save link as..."), this, SLOT(downloadLinkToDisk()))->setData(r.linkUrl());
m_menu->addAction(QIcon::fromTheme("mail-message-new"), tr("Send link..."), this, SLOT(sendLinkByMail()))->setData(r.linkUrl());
m_menu->addAction(QIcon::fromTheme("edit-copy"), tr("&Copy link address"), this, SLOT(copyLinkToClipboard()))->setData(r.linkUrl());
m_menu->addSeparator();
if (!selectedText().isEmpty()) {
pageAction(QWebPage::Copy)->setIcon(QIcon::fromTheme("edit-copy"));
m_menu->addAction(pageAction(QWebPage::Copy));
}
}
createContextMenu(m_menu, hitTest, event->pos());
if (!r.imageUrl().isEmpty()) {
if (!m_menu->isEmpty()) {
m_menu->addSeparator();
}
m_menu->addAction(tr("Show i&mage"), this, SLOT(openActionUrl()))->setData(r.imageUrl());
m_menu->addAction(tr("Copy im&age"), this, SLOT(copyImageToClipboard()))->setData(r.imageUrl());
m_menu->addAction(QIcon::fromTheme("edit-copy"), tr("Copy image ad&dress"), this, SLOT(copyLinkToClipboard()))->setData(r.imageUrl());
m_menu->addSeparator();
m_menu->addAction(QIcon::fromTheme("document-save"), tr("&Save image as..."), this, SLOT(downloadLinkToDisk()))->setData(r.imageUrl());
m_menu->addAction(QIcon::fromTheme("mail-message-new"), tr("Send image..."), this, SLOT(sendLinkByMail()))->setData(r.imageUrl());
m_menu->addSeparator();
//menu->addAction(tr("Block image"), this, SLOT(blockImage()))->setData(r.imageUrl().toString());
if (!selectedText().isEmpty()) {
pageAction(QWebPage::Copy)->setIcon(QIcon::fromTheme("edit-copy"));
m_menu->addAction(pageAction(QWebPage::Copy));
}
}
QWebElement element = r.element();
if (!element.isNull() && (element.tagName().toLower() == "input" || element.tagName().toLower() == "textarea")) {
if (m_menu->isEmpty()) {
page()->createStandardContextMenu()->popup(QCursor::pos());
return;
}
}
if (isMediaElement(element)) {
if (m_menu->isEmpty()) {
createMediaContextMenu(r)->popup(QCursor::pos());
return;
}
}
if (m_menu->isEmpty() && selectedText().isEmpty()) {
QAction* action = m_menu->addAction(tr("&Back"), this, SLOT(back()));
action->setIcon(IconProvider::standardIcon(QStyle::SP_ArrowBack));
action->setEnabled(history()->canGoBack());
action = m_menu->addAction(tr("&Forward"), this, SLOT(forward()));
action->setIcon(IconProvider::standardIcon(QStyle::SP_ArrowForward));
action->setEnabled(history()->canGoForward());
m_menu->addAction(IconProvider::standardIcon(QStyle::SP_BrowserReload), tr("&Reload"), this, SLOT(reload()));
action = m_menu->addAction(IconProvider::standardIcon(QStyle::SP_BrowserStop), tr("S&top"), this, SLOT(stop()));
action->setEnabled(isLoading());
m_menu->addSeparator();
if (frameAtPos && page()->mainFrame() != frameAtPos) {
m_clickedFrame = frameAtPos;
QMenu* menu = new QMenu(tr("This frame"));
menu->addAction(tr("Show &only this frame"), this, SLOT(loadClickedFrame()));
menu->addAction(QIcon(":/icons/menu/popup.png"), tr("Show this frame in new &tab"), this, SLOT(loadClickedFrameInNewTab()));
menu->addSeparator();
menu->addAction(IconProvider::standardIcon(QStyle::SP_BrowserReload), tr("&Reload"), this, SLOT(reloadClickedFrame()));
menu->addAction(QIcon::fromTheme("document-print"), tr("Print frame"), this, SLOT(printClickedFrame()));
menu->addSeparator();
menu->addAction(QIcon::fromTheme("zoom-in"), tr("Zoom &in"), this, SLOT(clickedFrameZoomIn()));
menu->addAction(QIcon::fromTheme("zoom-out"), tr("&Zoom out"), this, SLOT(clickedFrameZoomOut()));
menu->addAction(QIcon::fromTheme("zoom-original"), tr("Reset"), this, SLOT(clickedFrameZoomReset()));
menu->addSeparator();
menu->addAction(QIcon::fromTheme("text-html"), tr("Show so&urce of frame"), this, SLOT(showClickedFrameSource()));
m_menu->addMenu(menu);
}
mApp->plugins()->populateWebViewMenu(m_menu, this, hitTest);
m_menu->addSeparator();
m_menu->addAction(IconProvider::fromTheme("user-bookmarks"), tr("Book&mark page"), this, SLOT(bookmarkLink()));
m_menu->addAction(QIcon::fromTheme("document-save"), tr("&Save page as..."), this, SLOT(downloadLinkToDisk()))->setData(url());
m_menu->addAction(QIcon::fromTheme("edit-copy"), tr("&Copy page link"), this, SLOT(copyLinkToClipboard()))->setData(url());
m_menu->addAction(QIcon::fromTheme("mail-message-new"), tr("Send page link..."), this, SLOT(sendLinkByMail()))->setData(url());
m_menu->addAction(QIcon::fromTheme("document-print"), tr("&Print page"), this, SLOT(printPage()));
m_menu->addSeparator();
m_menu->addAction(QIcon::fromTheme("edit-select-all"), tr("Select &all"), this, SLOT(selectAll()));
m_menu->addSeparator();
if (url().scheme() == "http" || url().scheme() == "https") {
// bool result = validateConfirm(tr("Do you want to upload this page to an online source code validator?"));
// if (result)
m_menu->addAction(tr("Validate page"), this, SLOT(openUrlInNewTab()))->setData("http://validator.w3.org/check?uri=" + url().toString());
}
m_menu->addAction(QIcon::fromTheme("text-html"), tr("Show so&urce code"), this, SLOT(showSource()));
m_menu->addAction(tr("Show Web &Inspector"), this, SLOT(showInspector()));
m_menu->addSeparator();
m_menu->addAction(QIcon::fromTheme("dialog-information"), tr("Show info ab&out site"), this, SLOT(showSiteInfo()));
}
mApp->plugins()->populateWebViewMenu(m_menu, this, r);
if (!selectedText().isEmpty()) {
QString selectedText = page()->selectedText();
pageAction(QWebPage::Copy)->setIcon(QIcon::fromTheme("edit-copy"));
m_menu->addAction(pageAction(QWebPage::Copy));
m_menu->addAction(QIcon::fromTheme("mail-message-new"), tr("Send text..."), this, SLOT(sendLinkByMail()))->setData(selectedText);
m_menu->addSeparator();
QString langCode = mApp->getActiveLanguage().left(2);
QUrl googleTranslateUrl = QUrl(QString("http://translate.google.com/#auto|%1|%2").arg(langCode, selectedText));
m_menu->addAction(QIcon(":icons/menu/translate.png"), tr("Google Translate"), this, SLOT(openUrlInNewTab()))->setData(googleTranslateUrl);
m_menu->addAction(QIcon::fromTheme("accessories-dictionary"), tr("Dictionary"), this, SLOT(openUrlInNewTab()))->setData("http://" + (langCode != "" ? langCode + "." : langCode) + "wiktionary.org/wiki/Special:Search?search=" + selectedText);
m_menu->addSeparator();
QString selectedString = selectedText.trimmed();
if (!selectedString.contains(".")) {
// Try to add .com
selectedString.append(".com");
}
QUrl guessedUrl = QUrl::fromUserInput(selectedString);
if (isUrlValid(guessedUrl)) {
m_menu->addAction(QIcon(":/icons/menu/popup.png"), tr("Go to &web address"), this, SLOT(openUrlInNewTab()))->setData(guessedUrl);
}
selectedText.truncate(20);
SearchEngine engine = mApp->searchEnginesManager()->activeEngine();
m_menu->addAction(engine.icon, tr("Search \"%1 ..\" with %2").arg(selectedText, engine.name), this, SLOT(searchSelectedText()));
}
#if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 2, 0))
// still bugged? in 4.8 RC (it shows selection of webkit's internal source, not html from page)
// it may or may not be bug, but this implementation is useless for us
//
// if (!selectedHtml().isEmpty())
// menu->addAction(tr("Show source of selection"), this, SLOT(showSourceOfSelection()));
#endif
m_menu->addAction(tr("Inspect Element"), this, SLOT(inspectElement()));
if (!m_menu->isEmpty()) {
//Prevent choosing first option with double rightclick
@ -467,45 +332,22 @@ void TabbedWebView::contextMenuEvent(QContextMenuEvent* event)
void TabbedWebView::stop()
{
m_page->triggerAction(QWebPage::Stop);
triggerPageAction(QWebPage::Stop);
slotLoadFinished();
}
void TabbedWebView::openUrlInNewTab()
void TabbedWebView::openUrlInNewTab(const QUrl &url)
{
if (QAction* action = qobject_cast<QAction*>(sender())) {
m_tabWidget->addView(action->data().toUrl(), Qz::NT_NotSelectedTab);
QUrl urlToLoad;
if (!url.isEmpty()) {
urlToLoad = url;
}
else if (QAction* action = qobject_cast<QAction*>(sender())) {
urlToLoad = action->data().toUrl();
}
void TabbedWebView::searchSelectedText()
{
SearchEngine engine = mApp->searchEnginesManager()->activeEngine();
m_tabWidget->addView(engine.url.replace("%s", selectedText()), Qz::NT_NotSelectedTab);
}
void TabbedWebView::bookmarkLink()
{
if (QAction* action = qobject_cast<QAction*>(sender())) {
if (action->data().isNull()) {
p_QupZilla->bookmarkPage();
}
else {
p_QupZilla->addBookmark(action->data().toUrl(), title(), icon());
}
}
}
void TabbedWebView::showSourceOfSelection()
{
#if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 2, 0))
showSource(m_page->mainFrame(), selectedHtml());
#endif
}
void TabbedWebView::showInspector()
{
p_QupZilla->showWebInspector();
m_tabWidget->addView(urlToLoad, Qz::NT_NotSelectedTab);
}
void TabbedWebView::getFocus(const QUrl &urla)
@ -515,73 +357,6 @@ void TabbedWebView::getFocus(const QUrl &urla)
}
}
// ClickedFrame slots
void TabbedWebView::loadClickedFrame()
{
QUrl frameUrl = m_clickedFrame->url();
if (frameUrl.isEmpty()) {
frameUrl = m_clickedFrame->requestedUrl();
}
load(frameUrl);
}
void TabbedWebView::loadClickedFrameInNewTab()
{
QUrl frameUrl = m_clickedFrame->url();
if (frameUrl.isEmpty()) {
frameUrl = m_clickedFrame->requestedUrl();
}
m_tabWidget->addView(frameUrl);
}
void TabbedWebView::reloadClickedFrame()
{
QUrl frameUrl = m_clickedFrame->url();
if (frameUrl.isEmpty()) {
frameUrl = m_clickedFrame->requestedUrl();
}
m_clickedFrame->load(frameUrl);
}
void TabbedWebView::printClickedFrame()
{
printPage(m_clickedFrame);
}
void TabbedWebView::clickedFrameZoomIn()
{
qreal zFactor = m_clickedFrame->zoomFactor() + 0.1;
if (zFactor > 2.5) {
zFactor = 2.5;
}
m_clickedFrame->setZoomFactor(zFactor);
}
void TabbedWebView::clickedFrameZoomOut()
{
qreal zFactor = m_clickedFrame->zoomFactor() - 0.1;
if (zFactor < 0.5) {
zFactor = 0.5;
}
m_clickedFrame->setZoomFactor(zFactor);
}
void TabbedWebView::clickedFrameZoomReset()
{
m_clickedFrame->setZoomFactor(zoomFactor());
}
void TabbedWebView::showClickedFrameSource()
{
showSource(m_clickedFrame);
}
void TabbedWebView::mousePressEvent(QMouseEvent* event)
{
switch (event->button()) {

View File

@ -71,29 +71,17 @@ public slots:
private slots:
void trackMouse(bool state) { m_mouseTrack = state; }
void searchSelectedText();
void slotLoadFinished();
void urlChanged(const QUrl &url);
void linkHovered(const QString &link, const QString &title, const QString &content);
void openUrlInNewTab();
void bookmarkLink();
void showSourceOfSelection();
void getFocus(const QUrl &urla);
void showInspector();
void stopAnimation();
void setIp(const QHostInfo &info);
void checkRss();
void slotIconChanged();
// ClickedFrame
void loadClickedFrame();
void loadClickedFrameInNewTab();
void reloadClickedFrame();
void printClickedFrame();
void clickedFrameZoomIn();
void clickedFrameZoomOut();
void clickedFrameZoomReset();
void showClickedFrameSource();
void inspectElement();
void openUrlInNewTab(const QUrl &url = QUrl());
private:
void mousePressEvent(QMouseEvent* event);
@ -111,7 +99,6 @@ private:
WebPage* m_page;
WebTab* m_webTab;
QMenu* m_menu;
QWebFrame* m_clickedFrame;
bool m_mouseTrack;
bool m_navigationVisible;

View File

@ -243,7 +243,7 @@ bool WebPage::acceptNavigationRequest(QWebFrame* frame, const QNetworkRequest &r
if (type == QWebPage::NavigationTypeFormResubmitted) {
QString message = tr("To show this page, QupZilla must resend request which do it again \n"
"(like searching on making an shoping, which has been already done.)");
bool result = (QMessageBox::question(view(), tr("Resend request confirmation"),
bool result = (QMessageBox::question(view(), tr("Confirm form resubmission"),
message, QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes);
if (!result) {
return false;

View File

@ -27,12 +27,16 @@
#include "sourceviewer.h"
#include "siteinfo.h"
#include "searchenginesmanager.h"
#include "browsinglibrary.h"
#include "bookmarksmanager.h"
WebView::WebView(QWidget* parent)
: QWebView(parent)
, m_currentZoom(100)
, m_isLoading(false)
, m_progress(0)
, m_clickedFrame(0)
, m_actionsHaveImages(false)
{
connect(this, SIGNAL(loadStarted()), this, SLOT(slotLoadStarted()));
connect(this, SIGNAL(loadProgress(int)), this, SLOT(slotLoadProgress(int)));
@ -338,6 +342,97 @@ void WebView::showSiteInfo()
s->show();
}
void WebView::searchSelectedText()
{
QUrl urlToLoad = mApp->searchEnginesManager()->searchUrl(selectedText());
openUrlInNewTab(urlToLoad);
}
void WebView::bookmarkLink()
{
if (QAction* action = qobject_cast<QAction*>(sender())) {
if (action->data().isNull()) {
mApp->browsingLibrary()->bookmarksManager()->addBookmark(this);
}
else {
mApp->browsingLibrary()->bookmarksManager()->insertBookmark(action->data().toUrl(), title(), icon());
}
}
}
void WebView::showSourceOfSelection()
{
#if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 2, 0))
showSource(page()->mainFrame(), selectedHtml());
#endif
}
void WebView::loadClickedFrame()
{
QUrl frameUrl = m_clickedFrame->url();
if (frameUrl.isEmpty()) {
frameUrl = m_clickedFrame->requestedUrl();
}
load(frameUrl);
}
void WebView::loadClickedFrameInNewTab()
{
QUrl frameUrl = m_clickedFrame->url();
if (frameUrl.isEmpty()) {
frameUrl = m_clickedFrame->requestedUrl();
}
openUrlInNewTab(frameUrl);
}
void WebView::reloadClickedFrame()
{
QUrl frameUrl = m_clickedFrame->url();
if (frameUrl.isEmpty()) {
frameUrl = m_clickedFrame->requestedUrl();
}
m_clickedFrame->load(frameUrl);
}
void WebView::printClickedFrame()
{
printPage(m_clickedFrame);
}
void WebView::clickedFrameZoomIn()
{
qreal zFactor = m_clickedFrame->zoomFactor() + 0.1;
if (zFactor > 2.5) {
zFactor = 2.5;
}
m_clickedFrame->setZoomFactor(zFactor);
}
void WebView::clickedFrameZoomOut()
{
qreal zFactor = m_clickedFrame->zoomFactor() - 0.1;
if (zFactor < 0.5) {
zFactor = 0.5;
}
m_clickedFrame->setZoomFactor(zFactor);
}
void WebView::clickedFrameZoomReset()
{
m_clickedFrame->setZoomFactor(zoomFactor());
}
void WebView::showClickedFrameSource()
{
showSource(m_clickedFrame);
}
void WebView::printPage(QWebFrame* frame)
{
QPrintPreviewDialog* dialog = new QPrintPreviewDialog(this);
@ -371,23 +466,230 @@ bool WebView::isMediaElement(const QWebElement &element)
return (element.tagName().toLower() == "video" || element.tagName().toLower() == "audio");
}
QMenu *WebView::createMediaContextMenu(const QWebHitTestResult &hitTest)
void WebView::createContextMenu(QMenu* menu, const QWebHitTestResult &hitTest, const QPoint &pos)
{
if (!m_actionsHaveImages) {
m_actionsHaveImages = true;
pageAction(QWebPage::Cut)->setIcon(QIcon::fromTheme("edit-cut"));
pageAction(QWebPage::Copy)->setIcon(QIcon::fromTheme("edit-copy"));
pageAction(QWebPage::Paste)->setIcon(QIcon::fromTheme("edit-paste"));
pageAction(QWebPage::SelectAll)->setIcon(QIcon::fromTheme("edit-select-all"));
}
if (!hitTest.linkUrl().isEmpty() && hitTest.linkUrl().scheme() != "javascript") {
createLinkContextMenu(menu, hitTest);
}
if (!hitTest.imageUrl().isEmpty()) {
createImageContextMenu(menu, hitTest);
}
if (isMediaElement(hitTest.element())) {
createMediaContextMenu(menu, hitTest);
}
QWebElement element = hitTest.element();
if (!element.isNull() && (element.tagName().toLower() == "input" || element.tagName().toLower() == "textarea")) {
if (menu->isEmpty()) {
QMenu* pageMenu = page()->createStandardContextMenu();
int i = 0;
foreach(QAction* act, pageMenu->actions()) {
if (act->isSeparator()) {
menu->addSeparator();
continue;
}
// Hiding double Direction menu (bug in QtWebKit 2.2)
if (i == 0 && act->menu()) {
act->setVisible(false);
}
menu->addAction(act);
++i;
}
if (menu->actions().last() == pageAction(QWebPage::InspectElement)) {
// We have own Inspect Element action
menu->actions().last()->setVisible(false);
}
delete pageMenu;
}
}
if (!selectedText().isEmpty()) {
createSelectedTextContextMenu(menu, hitTest);
}
if (menu->isEmpty() && selectedText().isEmpty()) {
createPageContextMenu(menu, pos);
}
#if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 2, 0))
// still bugged? in 4.8 RC (it shows selection of webkit's internal source, not html from page)
// it may or may not be bug, but this implementation is useless for us
//
// if (!selectedHtml().isEmpty())
// menu->addAction(tr("Show source of selection"), this, SLOT(showSourceOfSelection()));
#endif
// mApp->plugins()->populateWebViewMenu(m_menu, this, hitTest);
}
void WebView::createPageContextMenu(QMenu* menu, const QPoint &pos)
{
QWebFrame* frameAtPos = page()->frameAt(pos);
QAction* action = menu->addAction(tr("&Back"), this, SLOT(back()));
action->setIcon(IconProvider::standardIcon(QStyle::SP_ArrowBack));
action->setEnabled(history()->canGoBack());
action = menu->addAction(tr("&Forward"), this, SLOT(forward()));
action->setIcon(IconProvider::standardIcon(QStyle::SP_ArrowForward));
action->setEnabled(history()->canGoForward());
menu->addAction(IconProvider::standardIcon(QStyle::SP_BrowserReload), tr("&Reload"), this, SLOT(reload()));
action = menu->addAction(IconProvider::standardIcon(QStyle::SP_BrowserStop), tr("S&top"), this, SLOT(stop()));
action->setEnabled(isLoading());
menu->addSeparator();
if (frameAtPos && page()->mainFrame() != frameAtPos) {
m_clickedFrame = frameAtPos;
QMenu* frameMenu = new QMenu(tr("This frame"));
frameMenu->addAction(tr("Show &only this frame"), this, SLOT(loadClickedFrame()));
frameMenu->addAction(QIcon(":/icons/menu/popup.png"), tr("Show this frame in new &tab"), this, SLOT(loadClickedFrameInNewTab()));
frameMenu->addSeparator();
frameMenu->addAction(IconProvider::standardIcon(QStyle::SP_BrowserReload), tr("&Reload"), this, SLOT(reloadClickedFrame()));
frameMenu->addAction(QIcon::fromTheme("document-print"), tr("Print frame"), this, SLOT(printClickedFrame()));
frameMenu->addSeparator();
frameMenu->addAction(QIcon::fromTheme("zoom-in"), tr("Zoom &in"), this, SLOT(clickedFrameZoomIn()));
frameMenu->addAction(QIcon::fromTheme("zoom-out"), tr("&Zoom out"), this, SLOT(clickedFrameZoomOut()));
frameMenu->addAction(QIcon::fromTheme("zoom-original"), tr("Reset"), this, SLOT(clickedFrameZoomReset()));
frameMenu->addSeparator();
frameMenu->addAction(QIcon::fromTheme("text-html"), tr("Show so&urce of frame"), this, SLOT(showClickedFrameSource()));
menu->addMenu(frameMenu);
}
menu->addSeparator();
menu->addAction(IconProvider::fromTheme("user-bookmarks"), tr("Book&mark page"), this, SLOT(bookmarkLink()));
menu->addAction(QIcon::fromTheme("document-save"), tr("&Save page as..."), this, SLOT(downloadLinkToDisk()))->setData(url());
menu->addAction(QIcon::fromTheme("edit-copy"), tr("&Copy page link"), this, SLOT(copyLinkToClipboard()))->setData(url());
menu->addAction(QIcon::fromTheme("mail-message-new"), tr("Send page link..."), this, SLOT(sendLinkByMail()))->setData(url());
menu->addAction(QIcon::fromTheme("document-print"), tr("&Print page"), this, SLOT(printPage()));
menu->addSeparator();
menu->addAction(QIcon::fromTheme("edit-select-all"), tr("Select &all"), this, SLOT(selectAll()));
menu->addSeparator();
if (url().scheme() == "http" || url().scheme() == "https") {
// bool result = validateConfirm(tr("Do you want to upload this page to an online source code validator?"));
// if (result)
menu->addAction(tr("Validate page"), this, SLOT(openUrlInNewTab()))->setData("http://validator.w3.org/check?uri=" + url().toString());
}
menu->addAction(QIcon::fromTheme("text-html"), tr("Show so&urce code"), this, SLOT(showSource()));
menu->addAction(QIcon::fromTheme("dialog-information"), tr("Show info ab&out site"), this, SLOT(showSiteInfo()));
}
void WebView::createLinkContextMenu(QMenu* menu, const QWebHitTestResult &hitTest)
{
// Workaround for QtWebKit <= 2.0 when selecting link text on right click
if (page()->selectedText() == hitTest.linkText()) {
findText("");
}
menu->addSeparator();
menu->addAction(QIcon(":/icons/menu/popup.png"), tr("Open link in new &tab"), this, SLOT(openUrlInNewTab()))->setData(hitTest.linkUrl());
menu->addAction(QIcon::fromTheme("window-new"), tr("Open link in new &window"), this, SLOT(openUrlInNewWindow()))->setData(hitTest.linkUrl());
menu->addSeparator();
menu->addAction(IconProvider::fromTheme("user-bookmarks"), tr("B&ookmark link"), this, SLOT(bookmarkLink()))->setData(hitTest.linkUrl());
menu->addAction(QIcon::fromTheme("document-save"), tr("&Save link as..."), this, SLOT(downloadLinkToDisk()))->setData(hitTest.linkUrl());
menu->addAction(QIcon::fromTheme("mail-message-new"), tr("Send link..."), this, SLOT(sendLinkByMail()))->setData(hitTest.linkUrl());
menu->addAction(QIcon::fromTheme("edit-copy"), tr("&Copy link address"), this, SLOT(copyLinkToClipboard()))->setData(hitTest.linkUrl());
menu->addSeparator();
if (!selectedText().isEmpty()) {
pageAction(QWebPage::Copy)->setIcon(QIcon::fromTheme("edit-copy"));
menu->addAction(pageAction(QWebPage::Copy));
}
}
void WebView::createImageContextMenu(QMenu* menu, const QWebHitTestResult &hitTest)
{
menu->addSeparator();
menu->addAction(tr("Show i&mage"), this, SLOT(openActionUrl()))->setData(hitTest.imageUrl());
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());
menu->addSeparator();
menu->addAction(QIcon::fromTheme("document-save"), tr("&Save image as..."), this, SLOT(downloadLinkToDisk()))->setData(hitTest.imageUrl());
menu->addAction(QIcon::fromTheme("mail-message-new"), tr("Send image..."), this, SLOT(sendLinkByMail()))->setData(hitTest.imageUrl());
menu->addSeparator();
if (!selectedText().isEmpty()) {
pageAction(QWebPage::Copy)->setIcon(QIcon::fromTheme("edit-copy"));
menu->addAction(pageAction(QWebPage::Copy));
}
}
void WebView::createSelectedTextContextMenu(QMenu* menu, const QWebHitTestResult &hitTest)
{
Q_UNUSED(hitTest)
QString selectedText = page()->selectedText();
menu->addSeparator();
if (!menu->actions().contains(pageAction(QWebPage::Copy))) {
menu->addAction(pageAction(QWebPage::Copy));
}
menu->addAction(QIcon::fromTheme("mail-message-new"), tr("Send text..."), this, SLOT(sendLinkByMail()))->setData(selectedText);
menu->addSeparator();
QString langCode = mApp->getActiveLanguage().left(2);
QUrl googleTranslateUrl = QUrl(QString("http://translate.google.com/#auto|%1|%2").arg(langCode, selectedText));
menu->addAction(QIcon(":icons/menu/translate.png"), tr("Google Translate"), this, SLOT(openUrlInNewTab()))->setData(googleTranslateUrl);
menu->addAction(QIcon::fromTheme("accessories-dictionary"), tr("Dictionary"), this, SLOT(openUrlInNewTab()))->setData("http://" + (langCode != "" ? langCode + "." : langCode) + "wiktionary.org/wiki/Special:Search?search=" + selectedText);
menu->addSeparator();
QString selectedString = selectedText.trimmed();
if (!selectedString.contains(".")) {
// Try to add .com
selectedString.append(".com");
}
QUrl guessedUrl = QUrl::fromUserInput(selectedString);
if (isUrlValid(guessedUrl)) {
menu->addAction(QIcon(":/icons/menu/popup.png"), tr("Go to &web address"), this, SLOT(openUrlInNewTab()))->setData(guessedUrl);
}
selectedText.truncate(20);
SearchEngine engine = mApp->searchEnginesManager()->activeEngine();
menu->addAction(engine.icon, tr("Search \"%1 ..\" with %2").arg(selectedText, engine.name), this, SLOT(searchSelectedText()));
}
void WebView::createMediaContextMenu(QMenu* menu, const QWebHitTestResult &hitTest)
{
QMenu* menu = new QMenu(this);
m_mediaElement = hitTest.element();
if (m_mediaElement.isNull()) {
return;
}
bool paused = m_mediaElement.evaluateJavaScript("this.paused").toBool();
bool muted = m_mediaElement.evaluateJavaScript("this.muted").toBool();
QUrl videoUrl = m_mediaElement.evaluateJavaScript("this.currentSrc").toUrl();
menu->addSeparator();
menu->addAction(paused ? tr("&Play") : tr("&Pause"), this, SLOT(pauseMedia()))->setIcon(QIcon::fromTheme(paused ? "media-playback-start" : "media-playback-pause"));
menu->addAction(muted ? tr("Un&mute") : tr("&Mute"), this, SLOT(muteMedia()))->setIcon(QIcon::fromTheme(muted ? "audio-volume-muted" : "audio-volume-high"));
menu->addSeparator();
menu->addAction(QIcon::fromTheme("edit-copy"), tr("&Copy Media Address"), this, SLOT(copyLinkToClipboard()))->setData(videoUrl);
menu->addAction(QIcon::fromTheme("mail-message-new"), tr("&Send Media Address"), this, SLOT(sendLinkByMail()))->setData(videoUrl);
menu->addAction(QIcon::fromTheme("download"), tr("&Download Media To Disk"), this, SLOT(downloadLinkToDisk()))->setData(videoUrl);
return menu;
menu->addAction(QIcon::fromTheme("document-save"), tr("Save Media To &Disk"), this, SLOT(downloadLinkToDisk()))->setData(videoUrl);
}
void WebView::pauseMedia()
@ -414,18 +716,6 @@ void WebView::muteMedia()
}
}
void WebView::controlsMedia()
{
bool controls= m_mediaElement.evaluateJavaScript("this.controls").toBool();
if (controls) {
m_mediaElement.evaluateJavaScript("this.controls = false");
}
else {
m_mediaElement.evaluateJavaScript("this.controls = true");
}
}
void WebView::wheelEvent(QWheelEvent* event)
{
if (event->modifiers() & Qt::ControlModifier) {

View File

@ -83,6 +83,22 @@ protected slots:
void openActionUrl();
void showSource(QWebFrame* frame = 0, const QString &selectedHtml = QString());
void showSiteInfo();
void searchSelectedText();
void bookmarkLink();
void showSourceOfSelection();
// Clicked frame actions
void loadClickedFrame();
void loadClickedFrameInNewTab();
void reloadClickedFrame();
void printClickedFrame();
void clickedFrameZoomIn();
void clickedFrameZoomOut();
void clickedFrameZoomReset();
void showClickedFrameSource();
virtual void openUrlInNewTab(const QUrl &url = QUrl()) = 0;
protected:
void wheelEvent(QWheelEvent* event);
@ -97,12 +113,16 @@ protected:
bool isMediaElement(const QWebElement &element);
QMenu* createMediaContextMenu(const QWebHitTestResult &hitTest);
void createContextMenu(QMenu* menu, const QWebHitTestResult &hitTest, const QPoint &pos);
void createPageContextMenu(QMenu* menu, const QPoint &pos);
void createLinkContextMenu(QMenu* menu, const QWebHitTestResult &hitTest);
void createImageContextMenu(QMenu* menu, const QWebHitTestResult &hitTest);
void createSelectedTextContextMenu(QMenu* menu, const QWebHitTestResult &hitTest);
void createMediaContextMenu(QMenu* menu, const QWebHitTestResult &hitTest);
private slots:
void pauseMedia();
void muteMedia();
void controlsMedia();
private:
QList<int> m_zoomLevels;
@ -117,6 +137,8 @@ private:
QUrl m_lastUrl;
QWebElement m_mediaElement;
QWebFrame* m_clickedFrame;
bool m_actionsHaveImages;
QList<QTouchEvent::TouchPoint> m_touchPoints;
};

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1558,127 +1558,99 @@
<name>PopupWebView</name>
<message>
<source>Open link in new &amp;window</source>
<translation type="unfinished">Otvoriť odkaz v novom &amp;okne</translation>
<translation type="obsolete">Otvoriť odkaz v novom &amp;okne</translation>
</message>
<message>
<source>&amp;Save link as...</source>
<translation type="unfinished">&amp;Uložiť odkaz ako...</translation>
<translation type="obsolete">&amp;Uložiť odkaz ako...</translation>
</message>
<message>
<source>Send link...</source>
<translation type="unfinished">Odoslať odkaz...</translation>
<translation type="obsolete">Odoslať odkaz...</translation>
</message>
<message>
<source>&amp;Copy link address</source>
<translation type="unfinished">&amp;Kopírovať adresu odkazu</translation>
<translation type="obsolete">&amp;Kopírovať adresu odkazu</translation>
</message>
<message>
<source>Show i&amp;mage</source>
<translation type="unfinished">Zobraziť o&amp;brázok</translation>
<translation type="obsolete">Zobraziť o&amp;brázok</translation>
</message>
<message>
<source>Copy im&amp;age</source>
<translation type="unfinished">Kopírov&amp; obrázok</translation>
<translation type="obsolete">Kopírov&amp; obrázok</translation>
</message>
<message>
<source>Copy image ad&amp;dress</source>
<translation type="unfinished">Kopírovať a&amp;dresu obrázku</translation>
<translation type="obsolete">Kopírovať a&amp;dresu obrázku</translation>
</message>
<message>
<source>&amp;Save image as...</source>
<translation type="unfinished">&amp;Uložiť obrázok ako...</translation>
<translation type="obsolete">&amp;Uložiť obrázok ako...</translation>
</message>
<message>
<source>Send image...</source>
<translation type="unfinished">Odoslať obrázok...</translation>
<translation type="obsolete">Odoslať obrázok...</translation>
</message>
<message>
<source>&amp;Back</source>
<translation type="unfinished">&amp;Späť</translation>
<translation type="obsolete">&amp;Späť</translation>
</message>
<message>
<source>&amp;Forward</source>
<translation type="unfinished">&amp;Dopredu</translation>
<translation type="obsolete">&amp;Dopredu</translation>
</message>
<message>
<source>&amp;Reload</source>
<translation type="unfinished">&amp;Obnoviť</translation>
<translation type="obsolete">&amp;Obnoviť</translation>
</message>
<message>
<source>S&amp;top</source>
<translation type="unfinished">Zas&amp;taviť</translation>
<translation type="obsolete">Zas&amp;taviť</translation>
</message>
<message>
<source>This frame</source>
<translation type="unfinished">Tento rám</translation>
<translation type="obsolete">Tento rám</translation>
</message>
<message>
<source>Show &amp;only this frame</source>
<translation type="unfinished">Zobraziť &amp;len tento rám</translation>
<translation type="obsolete">Zobraziť &amp;len tento rám</translation>
</message>
<message>
<source>Print frame</source>
<translation type="unfinished">Vytlačiť rám</translation>
<translation type="obsolete">Vytlačiť rám</translation>
</message>
<message>
<source>Zoom &amp;in</source>
<translation type="unfinished">Zoo&amp;m +</translation>
<translation type="obsolete">Zoo&amp;m +</translation>
</message>
<message>
<source>&amp;Zoom out</source>
<translation type="unfinished">Z&amp;oom -</translation>
<translation type="obsolete">Z&amp;oom -</translation>
</message>
<message>
<source>Reset</source>
<translation type="unfinished">Resetovať</translation>
<translation type="obsolete">Resetovať</translation>
</message>
<message>
<source>Show so&amp;urce of frame</source>
<translation type="unfinished">Zobraziť &amp;zdrojový kód rámu</translation>
<translation type="obsolete">Zobraziť &amp;zdrojový kód rámu</translation>
</message>
<message>
<source>&amp;Save page as...</source>
<translation type="unfinished">Uložiť &amp;stránku ako...</translation>
</message>
<message>
<source>&amp;Copy page link</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Send page link...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Print page</source>
<translation type="unfinished"></translation>
<translation type="obsolete">Uložiť &amp;stránku ako...</translation>
</message>
<message>
<source>Select &amp;all</source>
<translation type="unfinished">Vybr&amp; všetko</translation>
<translation type="obsolete">Vybr&amp; všetko</translation>
</message>
<message>
<source>Show so&amp;urce code</source>
<translation type="unfinished">Zobraziť zdro&amp;jový kód</translation>
<translation type="obsolete">Zobraziť zdro&amp;jový kód</translation>
</message>
<message>
<source>Show info ab&amp;out site</source>
<translation type="unfinished">Z&amp;obraziť informácie o stránke</translation>
</message>
<message>
<source>Send text...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Google Translate</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Dictionary</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Go to &amp;web address</source>
<translation type="unfinished"></translation>
<translation type="obsolete">Z&amp;obraziť informácie o stránke</translation>
</message>
</context>
<context>
@ -3594,155 +3566,127 @@ Po pridaní či odobratí ciest k certifikátom je nutné reštartovať prehliad
</message>
<message>
<source>Open link in new &amp;tab</source>
<translation type="unfinished">Otvoriť odkaz na &amp;novej karte</translation>
<translation type="obsolete">Otvoriť odkaz na &amp;novej karte</translation>
</message>
<message>
<source>Open link in new &amp;window</source>
<translation type="unfinished">Otvoriť odkaz v novom &amp;okne</translation>
<translation type="obsolete">Otvoriť odkaz v novom &amp;okne</translation>
</message>
<message>
<source>B&amp;ookmark link</source>
<translation type="unfinished">Pridať &amp;odkaz do záložiek</translation>
<translation type="obsolete">Pridať &amp;odkaz do záložiek</translation>
</message>
<message>
<source>&amp;Save link as...</source>
<translation type="unfinished">&amp;Uložiť odkaz ako...</translation>
<translation type="obsolete">&amp;Uložiť odkaz ako...</translation>
</message>
<message>
<source>Send link...</source>
<translation type="unfinished">Odoslať odkaz...</translation>
<translation type="obsolete">Odoslať odkaz...</translation>
</message>
<message>
<source>&amp;Copy link address</source>
<translation type="unfinished">&amp;Kopírovať adresu odkazu</translation>
<translation type="obsolete">&amp;Kopírovať adresu odkazu</translation>
</message>
<message>
<source>Show i&amp;mage</source>
<translation type="unfinished">Zobraziť o&amp;brázok</translation>
<translation type="obsolete">Zobraziť o&amp;brázok</translation>
</message>
<message>
<source>Copy im&amp;age</source>
<translation type="unfinished">Kopírov&amp; obrázok</translation>
<translation type="obsolete">Kopírov&amp; obrázok</translation>
</message>
<message>
<source>Copy image ad&amp;dress</source>
<translation type="unfinished">Kopírovať a&amp;dresu obrázku</translation>
<translation type="obsolete">Kopírovať a&amp;dresu obrázku</translation>
</message>
<message>
<source>&amp;Save image as...</source>
<translation type="unfinished">&amp;Uložiť obrázok ako...</translation>
<translation type="obsolete">&amp;Uložiť obrázok ako...</translation>
</message>
<message>
<source>Send image...</source>
<translation type="unfinished">Odoslať obrázok...</translation>
<translation type="obsolete">Odoslať obrázok...</translation>
</message>
<message>
<source>&amp;Back</source>
<translation type="unfinished">&amp;Späť</translation>
<translation type="obsolete">&amp;Späť</translation>
</message>
<message>
<source>&amp;Forward</source>
<translation type="unfinished">&amp;Dopredu</translation>
<translation type="obsolete">&amp;Dopredu</translation>
</message>
<message>
<source>&amp;Reload</source>
<translation type="unfinished">&amp;Obnoviť</translation>
<translation type="obsolete">&amp;Obnoviť</translation>
</message>
<message>
<source>S&amp;top</source>
<translation type="unfinished">Zas&amp;taviť</translation>
<translation type="obsolete">Zas&amp;taviť</translation>
</message>
<message>
<source>This frame</source>
<translation type="unfinished">Tento rám</translation>
<translation type="obsolete">Tento rám</translation>
</message>
<message>
<source>Show &amp;only this frame</source>
<translation type="unfinished">Zobraziť &amp;len tento rám</translation>
<translation type="obsolete">Zobraziť &amp;len tento rám</translation>
</message>
<message>
<source>Show this frame in new &amp;tab</source>
<translation type="unfinished">Zobraziť tento rám na &amp;novom panely</translation>
<translation type="obsolete">Zobraziť tento rám na &amp;novom panely</translation>
</message>
<message>
<source>Print frame</source>
<translation type="unfinished">Vytlačiť rám</translation>
<translation type="obsolete">Vytlačiť rám</translation>
</message>
<message>
<source>Zoom &amp;in</source>
<translation type="unfinished">Zoo&amp;m +</translation>
<translation type="obsolete">Zoo&amp;m +</translation>
</message>
<message>
<source>&amp;Zoom out</source>
<translation type="unfinished">Z&amp;oom -</translation>
<translation type="obsolete">Z&amp;oom -</translation>
</message>
<message>
<source>Reset</source>
<translation type="unfinished">Resetovať</translation>
<translation type="obsolete">Resetovať</translation>
</message>
<message>
<source>Show so&amp;urce of frame</source>
<translation type="unfinished">Zobraziť &amp;zdrojový kód rámu</translation>
<translation type="obsolete">Zobraziť &amp;zdrojový kód rámu</translation>
</message>
<message>
<source>Book&amp;mark page</source>
<translation type="unfinished">Pridať s&amp;tránku do záložiek</translation>
<translation type="obsolete">Pridať s&amp;tránku do záložiek</translation>
</message>
<message>
<source>&amp;Save page as...</source>
<translation type="unfinished">Uložiť &amp;stránku ako...</translation>
</message>
<message>
<source>&amp;Copy page link</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Send page link...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Print page</source>
<translation type="unfinished"></translation>
<translation type="obsolete">Uložiť &amp;stránku ako...</translation>
</message>
<message>
<source>Select &amp;all</source>
<translation type="unfinished">Vybr&amp; všetko</translation>
</message>
<message>
<source>Validate page</source>
<translation type="unfinished"></translation>
<translation type="obsolete">Vybr&amp; všetko</translation>
</message>
<message>
<source>Show so&amp;urce code</source>
<translation type="unfinished">Zobraziť zdro&amp;jový kód</translation>
<translation type="obsolete">Zobraziť zdro&amp;jový kód</translation>
</message>
<message>
<source>Show Web &amp;Inspector</source>
<translation type="unfinished">Zobraziť Web &amp;inšpektora</translation>
<translation type="obsolete">Zobraziť Web &amp;inšpektora</translation>
</message>
<message>
<source>Show info ab&amp;out site</source>
<translation type="unfinished">Z&amp;obraziť informácie o stránke</translation>
</message>
<message>
<source>Send text...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Google Translate</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Dictionary</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Go to &amp;web address</source>
<translation type="unfinished"></translation>
<translation type="obsolete">Z&amp;obraziť informácie o stránke</translation>
</message>
<message>
<source>Search &quot;%1 ..&quot; with %2</source>
<translation type="unfinished">Hľadať &quot;%1 ..&quot; s %2</translation>
<translation type="obsolete">Hľadať &quot;%1 ..&quot; s %2</translation>
</message>
<message>
<source>Inspect Element</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
@ -3905,10 +3849,6 @@ Po pridaní či odobratí ciest k certifikátom je nutné reštartovať prehliad
<source>Select files to upload...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Resend request confirmation</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Prevent this page from creating additional dialogs</source>
<translation type="unfinished">Zabrániť tejto stránke vo vytváraní ďalších dialógov</translation>
@ -3917,6 +3857,10 @@ Po pridaní či odobratí ciest k certifikátom je nutné reštartovať prehliad
<source>JavaScript alert - %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Confirm form resubmission</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>WebSearchBar</name>
@ -3933,23 +3877,23 @@ Po pridaní či odobratí ciest k certifikátom je nutné reštartovať prehliad
<name>WebView</name>
<message>
<source>&amp;Back</source>
<translation type="obsolete">&amp;Späť</translation>
<translation type="unfinished">&amp;Späť</translation>
</message>
<message>
<source>&amp;Save image as...</source>
<translation type="obsolete">&amp;Uložiť obrázok ako...</translation>
<translation type="unfinished">&amp;Uložiť obrázok ako...</translation>
</message>
<message>
<source>S&amp;top</source>
<translation type="obsolete">Zas&amp;taviť</translation>
<translation type="unfinished">Zas&amp;taviť</translation>
</message>
<message>
<source>&amp;Save link as...</source>
<translation type="obsolete">&amp;Uložiť odkaz ako...</translation>
<translation type="unfinished">&amp;Uložiť odkaz ako...</translation>
</message>
<message>
<source>&amp;Copy link address</source>
<translation type="obsolete">&amp;Kopírovať adresu odkazu</translation>
<translation type="unfinished">&amp;Kopírovať adresu odkazu</translation>
</message>
<message>
<source>Send page...</source>
@ -3961,23 +3905,23 @@ Po pridaní či odobratí ciest k certifikátom je nutné reštartovať prehliad
</message>
<message>
<source>B&amp;ookmark link</source>
<translation type="obsolete">Pridať &amp;odkaz do záložiek</translation>
<translation type="unfinished">Pridať &amp;odkaz do záložiek</translation>
</message>
<message>
<source>Copy im&amp;age</source>
<translation type="obsolete">Kopírov&amp; obrázok</translation>
<translation type="unfinished">Kopírov&amp; obrázok</translation>
</message>
<message>
<source>Show i&amp;mage</source>
<translation type="obsolete">Zobraziť o&amp;brázok</translation>
<translation type="unfinished">Zobraziť o&amp;brázok</translation>
</message>
<message>
<source>Send link...</source>
<translation type="obsolete">Odoslať odkaz...</translation>
<translation type="unfinished">Odoslať odkaz...</translation>
</message>
<message>
<source>Search &quot;%1 ..&quot; with %2</source>
<translation type="obsolete">Hľadať &quot;%1 ..&quot; s %2</translation>
<translation type="unfinished">Hľadať &quot;%1 ..&quot; s %2</translation>
</message>
<message>
<source>Show Web &amp;Inspector</source>
@ -3985,15 +3929,15 @@ Po pridaní či odobratí ciest k certifikátom je nutné reštartovať prehliad
</message>
<message>
<source>Open link in new &amp;window</source>
<translation type="obsolete">Otvoriť odkaz v novom &amp;okne</translation>
<translation type="unfinished">Otvoriť odkaz v novom &amp;okne</translation>
</message>
<message>
<source>Select &amp;all</source>
<translation type="obsolete">Vybr&amp; všetko</translation>
<translation type="unfinished">Vybr&amp; všetko</translation>
</message>
<message>
<source>Send image...</source>
<translation type="obsolete">Odoslať obrázok...</translation>
<translation type="unfinished">Odoslať obrázok...</translation>
</message>
<message>
<source>Loading...</source>
@ -4001,23 +3945,23 @@ Po pridaní či odobratí ciest k certifikátom je nutné reštartovať prehliad
</message>
<message>
<source>&amp;Save page as...</source>
<translation type="obsolete">Uložiť &amp;stránku ako...</translation>
<translation type="unfinished">Uložiť &amp;stránku ako...</translation>
</message>
<message>
<source>&amp;Reload</source>
<translation type="obsolete">&amp;Obnoviť</translation>
<translation type="unfinished">&amp;Obnoviť</translation>
</message>
<message>
<source>Show info ab&amp;out site</source>
<translation type="obsolete">Z&amp;obraziť informácie o stránke</translation>
<translation type="unfinished">Z&amp;obraziť informácie o stránke</translation>
</message>
<message>
<source>&amp;Forward</source>
<translation type="obsolete">&amp;Dopredu</translation>
<translation type="unfinished">&amp;Dopredu</translation>
</message>
<message>
<source>Open link in new &amp;tab</source>
<translation type="obsolete">Otvoriť odkaz na &amp;novej karte</translation>
<translation type="unfinished">Otvoriť odkaz na &amp;novej karte</translation>
</message>
<message>
<source>No Named Page</source>
@ -4025,11 +3969,11 @@ Po pridaní či odobratí ciest k certifikátom je nutné reštartovať prehliad
</message>
<message>
<source>Book&amp;mark page</source>
<translation type="obsolete">Pridať s&amp;tránku do záložiek</translation>
<translation type="unfinished">Pridať s&amp;tránku do záložiek</translation>
</message>
<message>
<source>Show so&amp;urce code</source>
<translation type="obsolete">Zobraziť zdro&amp;jový kód</translation>
<translation type="unfinished">Zobraziť zdro&amp;jový kód</translation>
</message>
<message>
<source>Failed loading page</source>
@ -4037,39 +3981,99 @@ Po pridaní či odobratí ciest k certifikátom je nutné reštartovať prehliad
</message>
<message>
<source>Copy image ad&amp;dress</source>
<translation type="obsolete">Kopírovať a&amp;dresu obrázku</translation>
<translation type="unfinished">Kopírovať a&amp;dresu obrázku</translation>
</message>
<message>
<source>This frame</source>
<translation type="obsolete">Tento rám</translation>
<translation type="unfinished">Tento rám</translation>
</message>
<message>
<source>Show &amp;only this frame</source>
<translation type="obsolete">Zobraziť &amp;len tento rám</translation>
<translation type="unfinished">Zobraziť &amp;len tento rám</translation>
</message>
<message>
<source>Show this frame in new &amp;tab</source>
<translation type="obsolete">Zobraziť tento rám na &amp;novom panely</translation>
<translation type="unfinished">Zobraziť tento rám na &amp;novom panely</translation>
</message>
<message>
<source>Print frame</source>
<translation type="obsolete">Vytlačiť rám</translation>
<translation type="unfinished">Vytlačiť rám</translation>
</message>
<message>
<source>Zoom &amp;in</source>
<translation type="obsolete">Zoo&amp;m +</translation>
<translation type="unfinished">Zoo&amp;m +</translation>
</message>
<message>
<source>&amp;Zoom out</source>
<translation type="obsolete">Z&amp;oom -</translation>
<translation type="unfinished">Z&amp;oom -</translation>
</message>
<message>
<source>Reset</source>
<translation type="obsolete">Resetovať</translation>
<translation type="unfinished">Resetovať</translation>
</message>
<message>
<source>Show so&amp;urce of frame</source>
<translation type="obsolete">Zobraziť &amp;zdrojový kód rámu</translation>
<translation type="unfinished">Zobraziť &amp;zdrojový kód rámu</translation>
</message>
<message>
<source>&amp;Copy page link</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Send page link...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Print page</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Validate page</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Send text...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Google Translate</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Dictionary</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Go to &amp;web address</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Play</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Pause</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Un&amp;mute</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Mute</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Copy Media Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Send Media Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Save Media To &amp;Disk</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff