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