Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim-plugins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <forenjunkie@chello.at>2017-11-08 00:31:09 +0300
committerPhilipp Hörist <forenjunkie@chello.at>2017-11-08 00:31:09 +0300
commite68b434d2f2a76789049d167b3cc7c59b8ebf84c (patch)
treefc83ffcb0b92527905adc0ce98c0b4d861b12b60
parent9092e2e6e1d986eb1b05cfa70036ecf7fb855f5a (diff)
[preview] Pass textview instead of chatcontrol
HistoryWindow doesnt have a ChatControl
-rw-r--r--url_image_preview/url_image_preview.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/url_image_preview/url_image_preview.py b/url_image_preview/url_image_preview.py
index 19c8248..cc402e5 100644
--- a/url_image_preview/url_image_preview.py
+++ b/url_image_preview/url_image_preview.py
@@ -89,7 +89,7 @@ class UrlImagePreviewPlugin(GajimPlugin):
jid = chat_control.contact.jid
if account not in self.controls:
self.controls[account] = {}
- self.controls[account][jid] = Base(self, chat_control)
+ self.controls[account][jid] = Base(self, chat_control.conv_textview)
@log_calls('UrlImagePreviewPlugin')
def disconnect_from_chat_control(self, chat_control):
@@ -105,7 +105,7 @@ class UrlImagePreviewPlugin(GajimPlugin):
self.history_window_control.deinit_handlers()
log.error("connect_with_history: create base")
self.history_window_control = Base(
- self, history_window.history_textview, history_window)
+ self, history_window.history_textview)
@log_calls('UrlImagePreviewPlugin')
def disconnect_from_history(self, history_window):
@@ -129,11 +129,10 @@ class UrlImagePreviewPlugin(GajimPlugin):
class Base(object):
- def __init__(self, plugin, chatcontrol):
+ def __init__(self, plugin, textview):
self.plugin = plugin
- self.textview = chatcontrol.conv_textview
+ self.textview = textview
self.handlers = {}
- self.chatcontrol = chatcontrol
self.directory = os.path.join(configpaths.gajimpaths['MY_DATA'],
'downloads')