From e4c7c446fc67ef314bcb1a8334c82b5dfd26d99f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Br=C3=B6tzmann?= Date: Thu, 25 Apr 2019 09:39:20 +0200 Subject: [PATCH] [preview] Open file directly if encrypted If Open Link in Browser is selected as default action for left clicking an image, the user would get a warning when clicking an encrypted image. Fall back to open image directly instead of issuing a warning dialog. --- url_image_preview/url_image_preview.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/url_image_preview/url_image_preview.py b/url_image_preview/url_image_preview.py index 41b8803..56e0eef 100644 --- a/url_image_preview/url_image_preview.py +++ b/url_image_preview/url_image_preview.py @@ -680,12 +680,7 @@ class Base(object): def _on_open_link_in_browser_menuitem_activate(self, menu, data): url = data["url"] if data["encrypted"]: - dialogs.ErrorDialog( - _('Encrypted file'), - _('You cannot open encrypted files in your ' - 'browser directly. Try "Open Downloaded File ' - 'in Browser" instead.'), - transient_for=app.app.get_active_window()) + self._on_open_menuitem_activate(self, data) else: helpers.open_uri(url)