fix AcronymsExpanderPlugin

This commit is contained in:
Denis Fomin 2013-01-01 14:26:25 +04:00
parent 92b50a87a6
commit 3cf957db4e
1 changed files with 4 additions and 4 deletions

View File

@ -26,8 +26,8 @@ Acronyms expander plugin.
import sys import sys
import gtk from gi.repository import Gtk
import gobject from gi.repository import GObject
from plugins import GajimPlugin from plugins import GajimPlugin
from plugins.helpers import log, log_calls from plugins.helpers import log, log_calls
@ -66,7 +66,7 @@ class AcronymsExpanderPlugin(GajimPlugin):
#assert isinstance(tb,gtk.TextBuffer) #assert isinstance(tb,gtk.TextBuffer)
ACRONYMS = self.config['ACRONYMS'] ACRONYMS = self.config['ACRONYMS']
INVOKER = self.config['INVOKER'] INVOKER = self.config['INVOKER']
t = tb.get_text(tb.get_start_iter(), tb.get_end_iter()) t = tb.get_text(tb.get_start_iter(), tb.get_end_iter(), True)
#log.debug('%s %d'%(t, len(t))) #log.debug('%s %d'%(t, len(t)))
if t and t[-1] == INVOKER: if t and t[-1] == INVOKER:
#log.debug('changing msg text') #log.debug('changing msg text')
@ -77,7 +77,7 @@ class AcronymsExpanderPlugin(GajimPlugin):
#log.debug('head: %s'%(head)) #log.debug('head: %s'%(head))
t = ''.join((base, sep, head, INVOKER)) t = ''.join((base, sep, head, INVOKER))
#log.debug("setting text: '%s'"%(t)) #log.debug("setting text: '%s'"%(t))
gobject.idle_add(tb.set_text, t) GObject.idle_add(tb.set_text, t)
@log_calls('AcronymsExpanderPlugin') @log_calls('AcronymsExpanderPlugin')
def connect_with_chat_control_base(self, chat_control): def connect_with_chat_control_base(self, chat_control):