[epiphany/carlosgc/non-downloadable-media] Check media can be downloaded before include some option in the context menu
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/carlosgc/non-downloadable-media] Check media can be downloaded before include some option in the context menu
- Date: Thu, 25 Jul 2019 09:55:38 +0000 (UTC)
commit 77c1f2e44cf9da6148b60715ac174a8c7dc46ab6
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Thu Jul 25 11:51:06 2019 +0200
Check media can be downloaded before include some option in the context menu
Do not include copy link, open in new window/tab and download options to
the context menu for non-downloadable media.
src/ephy-window.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 74796cadc..bca85479c 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1505,8 +1505,8 @@ populate_context_menu (WebKitWebView *web_view,
gboolean is_document = FALSE;
gboolean is_image = FALSE;
gboolean is_media = FALSE;
- gboolean is_video = FALSE;
- gboolean is_audio = FALSE;
+ gboolean is_downloadable_video = FALSE;
+ gboolean is_downloadable_audio = FALSE;
gboolean can_search_selection = FALSE;
char *search_selection_action_name = NULL;
const char *selected_text = NULL;
@@ -1542,14 +1542,14 @@ populate_context_menu (WebKitWebView *web_view,
toggle_loop_item = find_item_in_context_menu (context_menu,
WEBKIT_CONTEXT_MENU_ACTION_TOGGLE_MEDIA_LOOP);
fullscreen_item = find_item_in_context_menu (context_menu,
WEBKIT_CONTEXT_MENU_ACTION_ENTER_VIDEO_FULLSCREEN);
- item = find_item_in_context_menu (context_menu, WEBKIT_CONTEXT_MENU_ACTION_COPY_VIDEO_LINK_TO_CLIPBOARD);
+ item = find_item_in_context_menu (context_menu, WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_VIDEO_TO_DISK);
if (item) {
- is_video = TRUE;
+ is_downloadable_video = TRUE;
g_object_unref (item);
} else {
- item = find_item_in_context_menu (context_menu,
WEBKIT_CONTEXT_MENU_ACTION_COPY_AUDIO_LINK_TO_CLIPBOARD);
+ item = find_item_in_context_menu (context_menu, WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_AUDIO_TO_DISK);
if (item) {
- is_audio = TRUE;
+ is_downloadable_audio = TRUE;
g_object_unref (item);
}
}
@@ -1724,7 +1724,7 @@ populate_context_menu (WebKitWebView *web_view,
add_item_to_context_menu (context_menu, fullscreen_item);
webkit_context_menu_append (context_menu,
webkit_context_menu_item_new_separator ());
- if (is_video) {
+ if (is_downloadable_video) {
if (!app_mode) {
add_action_to_context_menu (context_menu, popup_action_group,
"open-video-in-new-window", window);
@@ -1735,7 +1735,7 @@ populate_context_menu (WebKitWebView *web_view,
"save-video-as", window);
add_action_to_context_menu (context_menu, popup_action_group,
"copy-video-location", window);
- } else if (is_audio) {
+ } else if (is_downloadable_audio) {
if (!app_mode) {
add_action_to_context_menu (context_menu, popup_action_group,
"open-audio-in-new-window", window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]