Commit 2e2cf945 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

[preview] Dont use chatcontrol parent for transient

- In minimized MUCs we dont have a parent window
- use Gtks get_active_window() instead
parent b175d47e
......@@ -89,8 +89,7 @@ class UrlImagePreviewPlugin(GajimPlugin):
jid =
if account not in self.controls:
self.controls[account] = {}
self.controls[account][jid] = Base(self, chat_control.conv_textview,
self.controls[account][jid] = Base(self, chat_control)
def disconnect_from_chat_control(self, chat_control):
......@@ -130,11 +129,11 @@ class UrlImagePreviewPlugin(GajimPlugin):
class Base(object):
def __init__(self, plugin, textview, parent_win=None):
def __init__(self, plugin, chatcontrol):
self.plugin = plugin
self.parent_win = parent_win
self.textview = textview
self.textview = chatcontrol.conv_textview
self.handlers = {}
self.chatcontrol = chatcontrol = os.path.join(configpaths.gajimpaths['MY_DATA'],
......@@ -298,7 +297,7 @@ class Base(object):
_('Exception raised while saving thumbnail '
'for image file (see error log for more '
return (mem, alt)
......@@ -426,7 +425,7 @@ class Base(object):
_('Could not save file'),
_('Exception raised while saving image file'
' (see error log for more information)'),
# Create thumbnail, write it to harddisk and return it
......@@ -587,7 +586,7 @@ class Base(object):
_('You cannot open encrypted files in your '
'browser directly. Try "Open Downloaded File '
'in Browser" instead.'),
helpers.launch_browser_mailer('url', url)
......@@ -602,7 +601,7 @@ class Base(object):
_('Cannot open downloaded file in browser'),
_('You have to set a custom browser executable '
'in your gajim settings for this to work.'),
command = app.config.get('custombrowser')
command = helpers.build_command(command, 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