changeset 70290e2cb9a3 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=70290e2cb9a3 description: fix acronyms expander plugin
diffstat:
plugins/acronyms_expander.py | 17 +++++++---------- 1 files changed, 7 insertions(+), 10 deletions(-)
diffs (43 lines):
diff -r 76cf197892e5 -r 70290e2cb9a3 plugins/acronyms_expander.py --- a/plugins/acronyms_expander.py Fri Feb 12 09:14:47 2010 +0100 +++ b/plugins/acronyms_expander.py Fri Feb 12 20:41:21 2010 +0100 @@ -27,6 +27,7 @@ import sys
import gtk +import gobject
from plugins import GajimPlugin from plugins.helpers import log, log_calls @@ -70,19 +71,15 @@ t = tb.get_text(tb.get_start_iter(), tb.get_end_iter()) #log.debug('%s %d'%(t, len(t))) if t and t[-1] == INVOKER: - #log.debug("changing msg text") + #log.debug('changing msg text') base,sep,head=t[:-1].rpartition(INVOKER) - #log.debug('%s | %s | %s'%(base, sep, head)) + log.debug('%s | %s | %s'%(base, sep, head)) if head in ACRONYMS: head = ACRONYMS[head] - log.debug("head: %s"%(head)) - t = "".join((base, sep, head, INVOKER)) - #log.debug("turning off notify") - tb.freeze_notify() + #log.debug('head: %s'%(head)) + t = ''.join((base, sep, head, INVOKER)) #log.debug("setting text: '%s'"%(t)) - tb.set_text(t) - #log.debug("turning on notify") - tb.thaw_notify() + gobject.idle_add(tb.set_text, t) @log_calls('AcronymsExpanderPlugin') def connect_with_chat_control_base(self, chat_control): @@ -101,4 +98,4 @@ d = chat_control.acronyms_expander_plugin_data tv = chat_control.msg_textview tv.get_buffer().disconnect(d['h_id']) - \ No newline at end of file +