From 9ce1c5b96120b412e5fbbe25bb03b9ab245a4221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Mon, 17 Jul 2017 01:42:50 +0200 Subject: Use absolute imports on all plugins This is necessary because Gajim is with 0.16.11 a python package --- url_image_preview/manifest.ini | 4 ++-- url_image_preview/url_image_preview.py | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'url_image_preview') diff --git a/url_image_preview/manifest.ini b/url_image_preview/manifest.ini index 4bc90b0..da78a9b 100644 --- a/url_image_preview/manifest.ini +++ b/url_image_preview/manifest.ini @@ -1,9 +1,9 @@ [info] name: Url image preview short_name: url_image_preview -version: 0.5.5 +version: 0.5.6 description: Url image preview in chatbox. authors = Denis Fomin Yann Leboulanger homepage = http://trac-plugins.gajim.org/wiki/UrlImagePreviewPlugin -min_gajim_version: 0.16.10 +min_gajim_version: 0.16.11 diff --git a/url_image_preview/url_image_preview.py b/url_image_preview/url_image_preview.py index 0169e4e..5db72a6 100644 --- a/url_image_preview/url_image_preview.py +++ b/url_image_preview/url_image_preview.py @@ -5,12 +5,12 @@ from gi.repository import GdkPixbuf import re import os -from common import gajim -from common import helpers -from plugins import GajimPlugin -from plugins.helpers import log_calls -from plugins.gui import GajimPluginConfigDialog -from conversation_textview import TextViewImage +from gajim.common import app +from gajim.common import helpers +from gajim.plugins import GajimPlugin +from gajim.plugins.helpers import log_calls +from gajim.plugins.gui import GajimPluginConfigDialog +from gajim.conversation_textview import TextViewImage EXTENSIONS = ('.png','.jpg','.jpeg','.gif','.raw','.svg') @@ -66,7 +66,7 @@ class Base(object): self.textview = self.chat_control.conv_textview def print_special_text(self, special_text, other_tags, graphics=True): - if not gajim.interface.basic_pattern_re.match(special_text): + if not app.interface.basic_pattern_re.match(special_text): return # remove qip bbcode special_text = special_text.rsplit('[/img]')[0] @@ -86,7 +86,7 @@ class Base(object): iter_ = buffer_.get_end_iter() mark = buffer_.create_mark(None, iter_, True) # start downloading image - gajim.thread_interface(helpers.download_image, [ + app.thread_interface(helpers.download_image, [ self.textview.account, {'src': special_text}], self._update_img, [mark]) -- cgit v1.2.3