changeset 3c625f96aafb in /home/hg/repos/gajim-plugins
author: Denis Fomin fominde@gmail.com branches: details:gajim-plugins?cmd=changeset;node=3c625f96aafb description: JuickPlugin.UrlImagePreviewPlugin.UrlShortenerPlugin support latest gajim
diffstat:
juick/manifest.ini | 3 ++- juick/plugin.py | 21 ++++++++++++--------- url_image_preview/manifest.ini | 3 ++- url_image_preview/url_image_preview.py | 9 ++++++--- url_shortener/manifest.ini | 3 ++- url_shortener/url_shortener.py | 8 +++++--- 6 файлов изменено, 29 вставок(+), 18 удалений(-)
различия (170 строк):
diff -r a3d4f980696b -r 3c625f96aafb juick/manifest.ini --- a/juick/manifest.ini Mon Sep 16 15:04:37 2013 +0400 +++ b/juick/manifest.ini Mon Sep 16 21:46:41 2013 +0400 @@ -1,10 +1,11 @@ [info] name: Juick short_name: Juick -version: 0.9.5 +version: 0.9.6 description: Clickable Juick links , Juick nicks, preview Juick picturs.<br/> 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 homepage: http://trac-plugins.gajim.org/wiki/JuickPlugin +min_gajim_version: 0.16 max_gajim_version: 0.16.9 diff -r a3d4f980696b -r 3c625f96aafb juick/plugin.py --- a/juick/plugin.py Mon Sep 16 15:04:37 2013 +0400 +++ b/juick/plugin.py Mon Sep 16 21:46:41 2013 +0400 @@ -88,14 +88,16 @@ if self.conn: self.conn.close()
- def print_special_text(self, tv, special_text, other_tags, graphics=True): + def print_special_text(self, tv, special_text, other_tags, graphics=True, + iter_=None): for control in self.controls: if control.chat_control.conv_textview != tv: continue - control.print_special_text(special_text, other_tags, graphics=True) + control.print_special_text(special_text, other_tags, graphics, + iter_)
def print_special_text1(self, chat_control, special_text, other_tags=None, - graphics=True): + graphics=True, iter_=None): for control in self.controls: if control.chat_control == chat_control: control.disconnect_from_chat_control() @@ -327,20 +329,21 @@ if kind == 'juick_nick': self.on_insert(widget, 'PM %s' % word.rstrip(':'))
- def print_special_text(self, special_text, other_tags, graphics=True): + def print_special_text(self, special_text, other_tags, graphics=True, + iter__=None): if gajim.interface.sharp_slash_re.match(special_text): # insert post num #123456// buffer_, iter_, tag = self.get_iter_and_tag('sharp_slash') - buffer_.insert_with_tags(iter_, special_text, tag) + buffer_.insert_with_tags(iter__, special_text, tag) self.last_juick_num = special_text self.textview.plugin_modified = True return if gajim.interface.juick_nick_re.match(special_text): # insert juick nick @nickname//// buffer_, iter_, tag = self.get_iter_and_tag('juick_nick') - mark = buffer_.create_mark(None, iter_, True) + mark = buffer_.create_mark(None, iter__, True) nick = special_text[1:].rstrip(':') - buffer_.insert_with_tags(iter_, special_text, tag) + buffer_.insert_with_tags(iter__, special_text, tag) # insert avatars if not self.plugin.config['SHOW_AVATARS']: self.textview.plugin_modified = True @@ -391,8 +394,8 @@ self.plugin.config['SHOW_PREVIEW']: # show pics preview buffer_, iter_, tag = self.get_iter_and_tag('url') - mark = buffer_.create_mark(None, iter_, True) - buffer_.insert_with_tags(iter_, special_text, tag) + mark = buffer_.create_mark(None, iter__, True) + buffer_.insert_with_tags(iter__, special_text, tag) uid = special_text.split('/')[-1] url = "http://i.juick.com/photos-512/%s" % uid gajim.thread_interface(self.insert_pic_preview, [mark, special_text, diff -r a3d4f980696b -r 3c625f96aafb url_image_preview/manifest.ini --- a/url_image_preview/manifest.ini Mon Sep 16 15:04:37 2013 +0400 +++ b/url_image_preview/manifest.ini Mon Sep 16 21:46:41 2013 +0400 @@ -1,10 +1,11 @@ [info] name: Url image preview short_name: url_image_preview -version: 0.5.3 +version: 0.5.4 description: Url image preview in chatbox.<br/> Based on patch in <a href="http://trac.gajim.org/attachment/ticket/5300">ticket #5300</a>. authors = Denis Fomin fominde@gmail.com Yann Leboulanger asterix@lagaule.org homepage = http://trac-plugins.gajim.org/wiki/UrlImagePreviewPlugin +min_gajim_version: 0.16 max_gajim_version: 0.16.9 diff -r a3d4f980696b -r 3c625f96aafb url_image_preview/url_image_preview.py --- a/url_image_preview/url_image_preview.py Mon Sep 16 15:04:37 2013 +0400 +++ b/url_image_preview/url_image_preview.py Mon Sep 16 21:46:41 2013 +0400 @@ -41,11 +41,13 @@ control.disconnect_from_chat_control() self.controls = []
- def print_special_text(self, tv, special_text, other_tags, graphics=True): + def print_special_text(self, tv, special_text, other_tags, graphics=True, + iter_=None): for control in self.controls: if control.chat_control.conv_textview != tv: continue - control.print_special_text(special_text, other_tags, graphics=True) + control.print_special_text(special_text, other_tags, graphics=True, + iter_=None)
def print_special_text1(self, chat_control, special_text, other_tags=None, graphics=True): @@ -60,7 +62,8 @@ self.chat_control = chat_control self.textview = self.chat_control.conv_textview
- def print_special_text(self, special_text, other_tags, graphics=True): + def print_special_text(self, special_text, other_tags, graphics=True, + iter_=None): if not gajim.interface.basic_pattern_re.match(special_text): return # remove qip bbcode diff -r a3d4f980696b -r 3c625f96aafb url_shortener/manifest.ini --- a/url_shortener/manifest.ini Mon Sep 16 15:04:37 2013 +0400 +++ b/url_shortener/manifest.ini Mon Sep 16 21:46:41 2013 +0400 @@ -1,7 +1,7 @@ [info] name: Url Shortener short_name: url_shortener -version: 0.3.4 +version: 0.3.5 description: Plugin that allows users to shorten a long URL in messages.<br/> For example, you can turn this link:<br/> <a href="http://maps.google.com/maps?f=d&saddr=New+York+Penn+Station&daddr=9th+Ave+%26+14th+St,+New+York,+NY&hl=en&geocode=&mra=ls&dirflg=r&date=11%2F12%2F08&time=4:13pm&ttype=dep&noexp=0&noal=0&sort=&sll=40.746175,-73.998395&sspn=0.014468,0.036392&ie=UTF8&z=14">http://maps.google.com/maps?f=d&saddr=New+York+Penn+Station&daddr=9th+Ave+%26+14th+St,+New+York,+NY&hl=en&geocode=&mra=ls&dirflg=r&date=11%2F12%2F08&time=4:13pm&ttype=dep&noexp=0&noal=0&sort=&sll=40.746175,-73.998395&sspn=0.014468,0.036392&ie=UTF8&z=14</a><br/> @@ -9,4 +9,5 @@ <a href="http://bit.ly/CUjV">http://bit.ly/CUjV</a> authors: Denis Fomin fominde@gmail.com homepage: http://trac-plugins.gajim.org/wiki/UrlShortenerPlugin +min_gajim_version: 0.16 max_gajim_version: 0.16.9 diff -r a3d4f980696b -r 3c625f96aafb url_shortener/url_shortener.py --- a/url_shortener/url_shortener.py Mon Sep 16 15:04:37 2013 +0400 +++ b/url_shortener/url_shortener.py Mon Sep 16 21:46:41 2013 +0400 @@ -79,14 +79,15 @@ control.disconnect_from_chat_control() self.controls = []
- def print_special_text(self, tv, special_text, other_tags, graphics=True): + def print_special_text(self, tv, special_text, other_tags, graphics=True, + iter_=None): for control in self.controls: if control.chat_control.conv_textview != tv: continue control.print_special_text(special_text, other_tags, graphics=True)
def print_special_text1(self, chat_control, special_text, other_tags=None, - graphics=True): + graphics=True, iter_=None): for control in self.controls: if control.chat_control == chat_control: control.disconnect_from_chat_control() @@ -103,7 +104,8 @@ self.on_textview_motion_notify_event) self.chat_control.handlers[self.id_] = self.textview.tv
- def print_special_text(self, special_text, other_tags, graphics=True): + def print_special_text(self, special_text, other_tags, graphics=True, + iter_=None): if not self.plugin.active: return is_xhtml_link = None