Repository :
http://git.fedorahosted.org/git/?p=ibus-typing-booster.git
On branch : libyokan_port_20130711
---------------------------------------------------------------
commit dcc0c8429cc203f775babfdf1596cad41658ba50
Author: anish <apatil(a)redhat.com>
Date: Tue Jul 9 11:42:56 2013 +0530
Added signal handling for commit signal
---------------------------------------------------------------
ibus-typing-booster/engine/hunspell_table.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/ibus-typing-booster/engine/hunspell_table.py
b/ibus-typing-booster/engine/hunspell_table.py
index 61b82ae..e59c46a 100644
--- a/ibus-typing-booster/engine/hunspell_table.py
+++ b/ibus-typing-booster/engine/hunspell_table.py
@@ -546,11 +546,15 @@ class tabengine (IBus.Engine):
self._tab_enable = self.db.ime_properties.get('tab_enable').lower()
== u'true'
self._commit_happened_after_focus_in = False
self._editor.yokan.connect("commit-signal",self.commit_signal_cb)
+ self._editor.yokan.connect("preedit-signal",self.preedit_signal_cb)
self.reset ()
def commit_signal_cb(self,arg):
commit_phrase = self._editor.yokan.get_commit()
+ super(tabengine,
self).update_preedit_text(IBus.Text.new_from_string(u''), 0, False)
self.commit_string(commit_phrase)
+
+ def preedit_signal_cb(self,arg):
self._update_ui ()
def reset (self):
@@ -573,8 +577,6 @@ class tabengine (IBus.Engine):
# editor.get_caret() should also use NFC!
_str = unicodedata.normalize('NFC',
self._editor.get_transliterated_string())
_str = self._editor.yokan.get_preedit()
- print "update preedit"
- print _str
if _str == u'' or _str == None:
super(tabengine,
self).update_preedit_text(IBus.Text.new_from_string(u''), 0, False)
else:
@@ -657,7 +659,6 @@ class tabengine (IBus.Engine):
self._update_aux ()
def commit_string (self, commit_phrase, input_phrase=u''):
- print "commit_string"
if self._tab_enable:
# After each commit, disable a tab enabled lookup
# table again, i.e. one needs to press tab again
@@ -745,7 +746,7 @@ class tabengine (IBus.Engine):
result = self._editor.yokan.process_key_event(keyevent)
if result == False:
return result
- self._update_ui ()
+ #self._update_ui ()
#result = self._process_key_event (key)
return result