Commit 206c2812 authored by André's avatar André
Browse files

[preview] Remove reference to unavailable setting

parent 41054309
......@@ -44,8 +44,7 @@ class UrlImagePreviewConfigDialog(SettingsDialog):
('save_as_menuitem', _('Save as')),
('open_folder_menuitem', _('Open Folder')),
('copy_link_location_menuitem', _('Copy Link Location')),
('open_link_in_browser_menuitem', _('Open Link in Browser')),
('open_file_in_browser_menuitem', _('Open File in Browser'))]
('open_link_in_browser_menuitem', _('Open Link in Browser'))]
geo_providers = [
('no_preview', _('No map preview')),
......@@ -50,19 +50,5 @@
<property name="use_underline">True</property>
<object class="GtkSeparatorMenuItem" id="extras_separator">
<property name="visible">True</property>
<property name="can_focus">False</property>
<object class="GtkMenuItem" id="open_file_in_browser_menuitem">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Open _Downloaded File in Browser</property>
<property name="use_underline">True</property>
name: Url image preview
short_name: url_image_preview
version: 2.3.38
version: 2.3.39
description: Displays a preview of links to images
authors = Denis Fomin <>
Yann Leboulanger <>
......@@ -33,7 +33,6 @@ from gi.repository import GLib
from gi.repository import GdkPixbuf
from gajim.common import app
from gajim.common import helpers
from gajim.common import configpaths
from gajim.common.helpers import open_file
from gajim.common.helpers import open_uri
......@@ -615,16 +614,9 @@ class Base:
open_link_in_browser_menuitem = xml.get_object(
open_file_in_browser_menuitem = xml.get_object(
extras_separator = xml.get_object('extras_separator')
if data['encrypted']:
if app.config.get('autodetect_browser_mailer') \
or app.config.get('custombrowser') == '':
id_ = open_menuitem.connect(
'activate', self._on_open_menuitem_activate, data)
......@@ -641,9 +633,6 @@ class Base:
id_ = open_link_in_browser_menuitem.connect(
'activate', self._on_open_link_in_browser_menuitem_activate, data)
self.handlers[id_] = open_link_in_browser_menuitem
id_ = open_file_in_browser_menuitem.connect(
'activate', self._on_open_file_in_browser_menuitem_activate, data)
self.handlers[id_] = open_file_in_browser_menuitem
return menu
......@@ -692,26 +681,6 @@ class Base:
def _on_open_file_in_browser_menuitem_activate(self, menu, data):
if == 'nt':
filepath = 'file://' + os.path.abspath(data['filepath'])
filepath = 'file://' + data['filepath']
if app.config.get('autodetect_browser_mailer') \
or app.config.get('custombrowser') == '':
_('Cannot open downloaded file in browser'),
_('You have to set a custom browser executable '
'in Gajim\'s Preferences for this to work.'),
command = app.config.get('custombrowser')
command = helpers.build_command(command, filepath)
except Exception:
def _on_button_press_event(self, eb, event, filepath, original_filename,
url, encrypted):
data = {'filepath': filepath,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment