From 532d7e281652ef26be33451ca6e1b830b912dadc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mladen=20Pejakovi=C4=87?= Date: Sun, 22 Jan 2012 01:24:35 +0100 Subject: [PATCH 1/7] Icons and send via mail menu entry in Audio/Video elements --- src/webview/webview.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/webview/webview.cpp b/src/webview/webview.cpp index 5f22994aa..d2838aa99 100644 --- a/src/webview/webview.cpp +++ b/src/webview/webview.cpp @@ -380,11 +380,12 @@ QMenu *WebView::createMediaContextMenu(const QWebHitTestResult &hitTest) bool muted = m_mediaElement.evaluateJavaScript("this.muted").toBool(); QUrl videoUrl = m_mediaElement.evaluateJavaScript("this.currentSrc").toUrl(); - menu->addAction(paused ? tr("Un&pause") : tr("&Pause"), this, SLOT(pauseMedia())); - menu->addAction(muted ? tr("Un&mute") : tr("&Mute"), this, SLOT(muteMedia())); + 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-high" : "audio-volume-high")); menu->addSeparator(); - menu->addAction(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("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; } From 9a4c8f8a2be081bda89eab12b8ffc62ce57064be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mladen=20Pejakovi=C4=87?= Date: Sun, 22 Jan 2012 01:43:09 +0100 Subject: [PATCH 2/7] Muted icon in Audio/Video element fixed --- src/webview/webview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webview/webview.cpp b/src/webview/webview.cpp index d2838aa99..421a53d0a 100644 --- a/src/webview/webview.cpp +++ b/src/webview/webview.cpp @@ -381,7 +381,7 @@ QMenu *WebView::createMediaContextMenu(const QWebHitTestResult &hitTest) QUrl videoUrl = m_mediaElement.evaluateJavaScript("this.currentSrc").toUrl(); 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-high" : "audio-volume-high")); + 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); From f74da6aa0ce5534ae5fae0e5e23c26a9b89bbcfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mladen=20Pejakovi=C4=87?= Date: Sun, 22 Jan 2012 02:33:05 +0100 Subject: [PATCH 3/7] Eye candy: icon for Open in new window in webview (the same as it is in File menu) --- src/webview/tabbedwebview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webview/tabbedwebview.cpp b/src/webview/tabbedwebview.cpp index a8d5b7e35..948761969 100644 --- a/src/webview/tabbedwebview.cpp +++ b/src/webview/tabbedwebview.cpp @@ -314,7 +314,7 @@ void TabbedWebView::contextMenuEvent(QContextMenuEvent* event) findText(""); } m_menu->addAction(QIcon(":/icons/menu/popup.png"), tr("Open link in new &tab"), this, SLOT(openUrlInNewTab()))->setData(r.linkUrl()); - m_menu->addAction(tr("Open link in new &window"), this, SLOT(openUrlInNewWindow()))->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()); From 18ab37e5cd3b3c4b6ed716be1584923e6328878c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mladen=20Pejakovi=C4=87?= Date: Sun, 22 Jan 2012 02:34:05 +0100 Subject: [PATCH 4/7] Eye candy: icon for Send link in File menu (the same as in webview) --- src/app/qupzilla.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/qupzilla.cpp b/src/app/qupzilla.cpp index a7ac6143d..ee607f64d 100644 --- a/src/app/qupzilla.cpp +++ b/src/app/qupzilla.cpp @@ -350,7 +350,7 @@ void QupZilla::setupMenu() m_menuFile->addSeparator(); m_menuFile->addAction(QIcon::fromTheme("document-save"), tr("&Save Page As..."), this, SLOT(savePage()))->setShortcut(QKeySequence("Ctrl+S")); m_menuFile->addAction(tr("Save Page Screen"), this, SLOT(savePageScreen())); - m_menuFile->addAction(tr("Send Link..."), this, SLOT(sendLink())); + m_menuFile->addAction(QIcon::fromTheme("mail-message-new"), tr("Send Link..."), this, SLOT(sendLink())); m_menuFile->addAction(QIcon::fromTheme("document-print"), tr("&Print"), this, SLOT(printPage())); m_menuFile->addSeparator(); m_menuFile->addSeparator(); From 8364ac7e18723d8cbc0528294952b896e7a51b36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mladen=20Pejakovi=C4=87?= Date: Sun, 22 Jan 2012 02:34:55 +0100 Subject: [PATCH 5/7] Eye candy: icon for Dictionary menu entry --- src/webview/tabbedwebview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webview/tabbedwebview.cpp b/src/webview/tabbedwebview.cpp index 948761969..4969421a1 100644 --- a/src/webview/tabbedwebview.cpp +++ b/src/webview/tabbedwebview.cpp @@ -423,7 +423,7 @@ void TabbedWebView::contextMenuEvent(QContextMenuEvent* event) 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(tr("Dictionary"), this, SLOT(openUrlInNewTab()))->setData("http://" + (langCode != "" ? langCode + "." : langCode) + "wiktionary.org/wiki/Special:Search?search=" + selectedText); + 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(); From 16334a72c79cac58912130b69a358aa954fc4697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mladen=20Pejakovi=C4=87?= Date: Sun, 22 Jan 2012 02:35:39 +0100 Subject: [PATCH 6/7] Eye candy: icons for Copy (in webview) --- src/webview/tabbedwebview.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/webview/tabbedwebview.cpp b/src/webview/tabbedwebview.cpp index 4969421a1..8f32f0462 100644 --- a/src/webview/tabbedwebview.cpp +++ b/src/webview/tabbedwebview.cpp @@ -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->addSeparator(); if (!selectedText().isEmpty()) { + pageAction(QWebPage::Copy)->setIcon(QIcon::fromTheme("edit-copy")); m_menu->addAction(pageAction(QWebPage::Copy)); } } @@ -339,6 +340,7 @@ void TabbedWebView::contextMenuEvent(QContextMenuEvent* event) 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)); } } @@ -416,6 +418,7 @@ void TabbedWebView::contextMenuEvent(QContextMenuEvent* event) 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(); From dcd3615d812e3f76afecc5f0b8262824bd53c40c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mladen=20Pejakovi=C4=87?= Date: Sun, 22 Jan 2012 02:49:25 +0100 Subject: [PATCH 7/7] Eye candy: icon for Open location in File menu --- src/app/qupzilla.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/qupzilla.cpp b/src/app/qupzilla.cpp index ee607f64d..b1ee9ccf8 100644 --- a/src/app/qupzilla.cpp +++ b/src/app/qupzilla.cpp @@ -342,7 +342,7 @@ void QupZilla::setupMenu() m_menuFile = new QMenu(tr("&File")); m_menuFile->addAction(QIcon::fromTheme("window-new"), tr("&New Window"), this, SLOT(newWindow()))->setShortcut(QKeySequence("Ctrl+N")); m_menuFile->addAction(QIcon(":/icons/menu/popup.png"), tr("New Tab"), this, SLOT(addTab()))->setShortcut(QKeySequence("Ctrl+T")); - m_menuFile->addAction(tr("Open Location"), this, SLOT(openLocation()))->setShortcut(QKeySequence("Ctrl+L")); + m_menuFile->addAction(QIcon::fromTheme("document-open-remote"), tr("Open Location"), this, SLOT(openLocation()))->setShortcut(QKeySequence("Ctrl+L")); m_menuFile->addAction(QIcon::fromTheme("document-open"), tr("Open &File"), this, SLOT(openFile()))->setShortcut(QKeySequence("Ctrl+O")); m_menuFile->addAction(tr("Close Tab"), m_tabWidget, SLOT(closeTab()))->setShortcut(QKeySequence("Ctrl+W")); m_actionCloseWindow = m_menuFile->addAction(QIcon::fromTheme("window-close"), tr("Close Window"), this, SLOT(close()));