Repository :
http://git.fedorahosted.org/git/?p=ibus-typing-booster.git
On branch : libyokan_port_20130711
---------------------------------------------------------------
commit ddc1a95398f131b6a6defa903eda21ffad109cdb
Author: anish <apatil(a)redhat.com>
Date: Wed Jul 3 18:12:23 2013 +0530
if you press space key with no preedit string in this case you should not call
_update_ui method
---------------------------------------------------------------
ibus-typing-booster/engine/hunspell_table.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/ibus-typing-booster/engine/hunspell_table.py
b/ibus-typing-booster/engine/hunspell_table.py
index acb8c3d..61b82ae 100644
--- a/ibus-typing-booster/engine/hunspell_table.py
+++ b/ibus-typing-booster/engine/hunspell_table.py
@@ -573,6 +573,8 @@ 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:
@@ -655,6 +657,7 @@ 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
@@ -667,7 +670,7 @@ class tabengine (IBus.Engine):
#commit_phrase = unicodedata.normalize('NFC', commit_phrase)
super(tabengine,self).commit_text(IBus.Text.new_from_string(commit_phrase))
self._editor.clear_input()
- self._update_ui ()
+ #self._update_ui ()
self._commit_happened_after_focus_in = True
if self.client_capabilities & IBus.Capabilite.SURROUNDING_TEXT:
# If a character ending a sentence is committed (possibly
@@ -740,6 +743,8 @@ class tabengine (IBus.Engine):
state = state & (IBus.ModifierType.SHIFT_MASK |IBus.ModifierType.CONTROL_MASK
| IBus.ModifierType.MOD1_MASK |IBus.ModifierType.MOD5_MASK |
IBus.ModifierType.RELEASE_MASK);
keyevent =
libyokan.KeyEvent.from_x_event(keyval,keycode,libyokan.ModifierType(state))
result = self._editor.yokan.process_key_event(keyevent)
+ if result == False:
+ return result
self._update_ui ()
#result = self._process_key_event (key)
return result