diff options
author | Peng Huang <shawn.p.huang@gmail.com> | 2009-06-12 11:03:32 +0800 |
---|---|---|
committer | Peng Huang <shawn.p.huang@gmail.com> | 2009-06-12 11:03:32 +0800 |
commit | 78860e65cdd46152cc576db01597d8d01db03504 (patch) | |
tree | 15bcea2e57d6e79a81a309ead322ac51adb1e525 /engine | |
parent | 98e56a85635cdbe2d02c681c2e3b04c06f8a2027 (diff) | |
download | ibus-anthy-78860e65cdd46152cc576db01597d8d01db03504.tar.gz |
implemented candidate_clicked method.
Diffstat (limited to 'engine')
-rw-r--r-- | engine/engine.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/engine/engine.py b/engine/engine.py index 258cfa2..61e28a8 100644 --- a/engine/engine.py +++ b/engine/engine.py @@ -218,7 +218,7 @@ class Engine(ibus.EngineBase): def cursor_up(self): # only process cursor down in convert mode -# if self.__convert_mode != CONV_MODE_ANTHY: + # if self.__convert_mode != CONV_MODE_ANTHY: if self.__convert_mode != CONV_MODE_ANTHY and self.__convert_mode != CONV_MODE_PREDICTION: return False @@ -233,7 +233,7 @@ class Engine(ibus.EngineBase): def cursor_down(self): # only process cursor down in convert mode -# if self.__convert_mode != CONV_MODE_ANTHY: + # if self.__convert_mode != CONV_MODE_ANTHY: if self.__convert_mode != CONV_MODE_ANTHY and self.__convert_mode != CONV_MODE_PREDICTION: return False @@ -246,6 +246,13 @@ class Engine(ibus.EngineBase): self.__invalidate() return True + def candidate_clicked(self, index, button, state): + if index == 9: + keyval = keysyms._0 + else: + keyval = keysyms._1 + index + self.__on_key_number(keyval) + def __commit_string(self, text): self.__reset() self.commit_text(ibus.Text(text)) |