From 3af1a88e05a8c2746dd0826ac6e6aecc2303628e Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Mon, 2 Sep 2024 12:58:05 -0400 Subject: [PATCH] Don't show the "Web Search" action in the media context menu All this does is try to web search for the filename of the image, which is useless. Let's hide it entirely in this case. --- src/qml/DelegateContextMenu.qml | 6 ++++++ src/qml/FileDelegateContextMenu.qml | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/qml/DelegateContextMenu.qml b/src/qml/DelegateContextMenu.qml index 953365c8a..fcab2d25b 100644 --- a/src/qml/DelegateContextMenu.qml +++ b/src/qml/DelegateContextMenu.qml @@ -70,6 +70,11 @@ Loader { */ property list actions + /** + * @brief Whether the web search menu should be shown or not. + */ + property bool enableWebSearch: true + /** * Some common actions shared between menus */ @@ -173,6 +178,7 @@ Loader { id: webshortcutmenu title: i18n("Search for '%1'", webshortcutmodel.trunkatedSearchText) property bool isVisible: webshortcutmodel.enabled + property bool isVisible: webshortcutmodel.enabled && root.enableWebSearch Component.onCompleted: { webshortcutmenu.parent.visible = isVisible; } diff --git a/src/qml/FileDelegateContextMenu.qml b/src/qml/FileDelegateContextMenu.qml index 3f4bb00dd..bb8df60f1 100644 --- a/src/qml/FileDelegateContextMenu.qml +++ b/src/qml/FileDelegateContextMenu.qml @@ -32,6 +32,9 @@ DelegateContextMenu { */ required property var progressInfo + // Web search isn't useful for images + enableWebSearch: false + /** * @brief The main list of menu item actions. *