Juick, Url image preview. Use gajim.thread_interface
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
[info]
|
||||
name: Juick
|
||||
short_name: Juick
|
||||
version: 0.5
|
||||
version: 0.6
|
||||
description: Clickable juick links , juick nics, preview juick picturs.
|
||||
The key combination alt + up in the textbox allow insert the number of last message (comment or topic).
|
||||
authors: Denis Fomin <fominde@gmail.com>, evgen <drujebober@gmail.com>
|
||||
|
||||
@@ -10,7 +10,6 @@ from string import upper
|
||||
from string import rstrip
|
||||
import locale
|
||||
import sqlite3
|
||||
import gobject
|
||||
|
||||
from common import helpers
|
||||
from common import gajim
|
||||
@@ -376,7 +375,8 @@ class Base(object):
|
||||
buffer_.insert_with_tags(iter_, special_text, tag)
|
||||
uid = special_text.split('/')[-1]
|
||||
url = "http://i.juick.com/photos-512/%s" % uid
|
||||
gobject.idle_add(self.insert_pic_preview, mark, special_text, url)
|
||||
gajim.thread_interface(self.insert_pic_preview, [mark, special_text,
|
||||
url])
|
||||
|
||||
def insert_pic_preview(self, mark, special_text, url):
|
||||
pixbuf = self.get_pixbuf_from_url( url, self.plugin.config[
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[info]
|
||||
name: Url image preview
|
||||
short_name: url_image_preview
|
||||
version: 0.1
|
||||
version: 0.2
|
||||
description: Url image preview in chatbox.
|
||||
Based on patch in ticket #5300:
|
||||
http://trac.gajim.org/attachment/ticket/5300.
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
import gtk
|
||||
import re
|
||||
import os
|
||||
|
||||
import urllib
|
||||
import gobject
|
||||
|
||||
from common import gajim
|
||||
from plugins import GajimPlugin
|
||||
@@ -84,7 +82,8 @@ class Base(object):
|
||||
buffer_ = self.textview.tv.get_buffer()
|
||||
iter_ = buffer_.get_end_iter()
|
||||
mark = buffer_.create_mark(None, iter_, True)
|
||||
gobject.idle_add(self.insert_pic_preview, mark, special_text, special_text)
|
||||
gajim.thread_interface(self.insert_pic_preview, [mark, special_text,
|
||||
special_text])
|
||||
|
||||
def insert_pic_preview(self, mark, special_text, url):
|
||||
pixbuf = self.get_pixbuf_from_url( url, self.plugin.config[
|
||||
|
||||
Reference in New Issue
Block a user