diff options
author | Peng Wu <alexepico@gmail.com> | 2014-02-17 16:45:14 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2014-02-17 16:45:14 +0800 |
commit | 4982c9f9095d53c0c7537b6b852ee41ae8fe0e71 (patch) | |
tree | 0375c7d286c663c646777f9b1b81bf165593cb23 /src/PYPPinyinEngine.cc | |
parent | a8dbbd654f6eb34df4176cb873399b4c02b536ee (diff) | |
download | ibus-libpinyin-4982c9f9095d53c0c7537b6b852ee41ae8fe0e71.tar.gz ibus-libpinyin-4982c9f9095d53c0c7537b6b852ee41ae8fe0e71.tar.xz ibus-libpinyin-4982c9f9095d53c0c7537b6b852ee41ae8fe0e71.zip |
move logics to class PYEngine
Diffstat (limited to 'src/PYPPinyinEngine.cc')
-rw-r--r-- | src/PYPPinyinEngine.cc | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/src/PYPPinyinEngine.cc b/src/PYPPinyinEngine.cc index d28dc6f..4406239 100644 --- a/src/PYPPinyinEngine.cc +++ b/src/PYPPinyinEngine.cc @@ -50,10 +50,6 @@ LibPinyinPinyinEngine::LibPinyinPinyinEngine (IBusEngine *engine) { gint i; -#if IBUS_CHECK_VERSION (1, 5, 4) - m_input_purpose = IBUS_INPUT_PURPOSE_FREE_FORM; -#endif - m_double_pinyin = LibPinyinPinyinConfig::instance ().doublePinyin (); if (m_double_pinyin) @@ -104,10 +100,8 @@ LibPinyinPinyinEngine::processKeyEvent (guint keyval, guint keycode, guint modif { gboolean retval = FALSE; -#if IBUS_CHECK_VERSION (1, 5, 4) - if (IBUS_INPUT_PURPOSE_PASSWORD == m_input_purpose) + if (contentIsPassword ()) return retval; -#endif /* check Shift or Ctrl + Release hotkey, * and then ignore other Release key event */ @@ -231,22 +225,11 @@ LibPinyinPinyinEngine::focusIn (void) void LibPinyinPinyinEngine::focusOut (void) { - -#if IBUS_CHECK_VERSION (1, 5, 4) - m_input_purpose = IBUS_INPUT_PURPOSE_FREE_FORM; -#endif + Engine::focusOut (); reset (); } -#if IBUS_CHECK_VERSION(1, 5, 4) -void -LibPinyinPinyinEngine::setContentType (guint purpose, guint hints) -{ - m_input_purpose = (IBusInputPurpose) purpose; -} -#endif - void LibPinyinPinyinEngine::reset (void) { |