1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-14 02:52:12 +01:00

Eye candy: icons for Copy (in webview)

This commit is contained in:
Mladen Pejaković 2012-01-22 02:35:39 +01:00
parent 8364ac7e18
commit 16334a72c7

View File

@ -322,6 +322,7 @@ void TabbedWebView::contextMenuEvent(QContextMenuEvent* event)
m_menu->addAction(QIcon::fromTheme("edit-copy"), tr("&Copy link address"), this, SLOT(copyLinkToClipboard()))->setData(r.linkUrl()); m_menu->addAction(QIcon::fromTheme("edit-copy"), tr("&Copy link address"), this, SLOT(copyLinkToClipboard()))->setData(r.linkUrl());
m_menu->addSeparator(); m_menu->addSeparator();
if (!selectedText().isEmpty()) { if (!selectedText().isEmpty()) {
pageAction(QWebPage::Copy)->setIcon(QIcon::fromTheme("edit-copy"));
m_menu->addAction(pageAction(QWebPage::Copy)); m_menu->addAction(pageAction(QWebPage::Copy));
} }
} }
@ -339,6 +340,7 @@ void TabbedWebView::contextMenuEvent(QContextMenuEvent* event)
m_menu->addSeparator(); m_menu->addSeparator();
//menu->addAction(tr("Block image"), this, SLOT(blockImage()))->setData(r.imageUrl().toString()); //menu->addAction(tr("Block image"), this, SLOT(blockImage()))->setData(r.imageUrl().toString());
if (!selectedText().isEmpty()) { if (!selectedText().isEmpty()) {
pageAction(QWebPage::Copy)->setIcon(QIcon::fromTheme("edit-copy"));
m_menu->addAction(pageAction(QWebPage::Copy)); m_menu->addAction(pageAction(QWebPage::Copy));
} }
} }
@ -416,6 +418,7 @@ void TabbedWebView::contextMenuEvent(QContextMenuEvent* event)
if (!selectedText().isEmpty()) { if (!selectedText().isEmpty()) {
QString selectedText = page()->selectedText(); QString selectedText = page()->selectedText();
pageAction(QWebPage::Copy)->setIcon(QIcon::fromTheme("edit-copy"));
m_menu->addAction(pageAction(QWebPage::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->addAction(QIcon::fromTheme("mail-message-new"), tr("Send text..."), this, SLOT(sendLinkByMail()))->setData(selectedText);
m_menu->addSeparator(); m_menu->addSeparator();