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

Icons and send via mail menu entry in Audio/Video elements

This commit is contained in:
Mladen Pejaković 2012-01-22 01:24:35 +01:00
parent f8fea1f32e
commit 532d7e2816

View File

@ -380,11 +380,12 @@ QMenu *WebView::createMediaContextMenu(const QWebHitTestResult &hitTest)
bool muted = m_mediaElement.evaluateJavaScript("this.muted").toBool(); bool muted = m_mediaElement.evaluateJavaScript("this.muted").toBool();
QUrl videoUrl = m_mediaElement.evaluateJavaScript("this.currentSrc").toUrl(); QUrl videoUrl = m_mediaElement.evaluateJavaScript("this.currentSrc").toUrl();
menu->addAction(paused ? tr("Un&pause") : tr("&Pause"), this, SLOT(pauseMedia())); 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())); menu->addAction(muted ? tr("Un&mute") : tr("&Mute"), this, SLOT(muteMedia()))->setIcon(QIcon::fromTheme(muted ? "audio-volume-high" : "audio-volume-high"));
menu->addSeparator(); menu->addSeparator();
menu->addAction(tr("Copy Media &Address"), this, SLOT(copyLinkToClipboard()))->setData(videoUrl); menu->addAction(QIcon::fromTheme("edit-copy"), tr("&Copy Media Address"), this, SLOT(copyLinkToClipboard()))->setData(videoUrl);
menu->addAction(tr("&Download Media To Disk"), this, SLOT(downloadLinkToDisk()))->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; return menu;
} }