summaryrefslogtreecommitdiffstats
path: root/src/PYPBopomofoEngine.cc
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2014-02-17 16:45:14 +0800
committerPeng Wu <alexepico@gmail.com>2014-02-17 16:45:14 +0800
commit4982c9f9095d53c0c7537b6b852ee41ae8fe0e71 (patch)
tree0375c7d286c663c646777f9b1b81bf165593cb23 /src/PYPBopomofoEngine.cc
parenta8dbbd654f6eb34df4176cb873399b4c02b536ee (diff)
downloadibus-libpinyin-4982c9f9095d53c0c7537b6b852ee41ae8fe0e71.tar.gz
ibus-libpinyin-4982c9f9095d53c0c7537b6b852ee41ae8fe0e71.tar.xz
ibus-libpinyin-4982c9f9095d53c0c7537b6b852ee41ae8fe0e71.zip
move logics to class PYEngine
Diffstat (limited to 'src/PYPBopomofoEngine.cc')
-rw-r--r--src/PYPBopomofoEngine.cc21
1 files changed, 2 insertions, 19 deletions
diff --git a/src/PYPBopomofoEngine.cc b/src/PYPBopomofoEngine.cc
index 9d2666f..75b8b57 100644
--- a/src/PYPBopomofoEngine.cc
+++ b/src/PYPBopomofoEngine.cc
@@ -40,10 +40,6 @@ LibPinyinBopomofoEngine::LibPinyinBopomofoEngine (IBusEngine *engine)
{
gint i;
-#if IBUS_CHECK_VERSION (1, 5, 4)
- m_input_purpose = IBUS_INPUT_PURPOSE_FREE_FORM;
-#endif
-
/* create editors */
m_editors[MODE_INIT].reset (new LibPinyinBopomofoEditor (m_props, LibPinyinBopomofoConfig::instance ()));
m_editors[MODE_PUNCT].reset (new PunctEditor (m_props, LibPinyinBopomofoConfig::instance ()));
@@ -68,10 +64,8 @@ LibPinyinBopomofoEngine::processKeyEvent (guint keyval, guint keycode, guint mod
{
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 */
@@ -149,22 +143,11 @@ LibPinyinBopomofoEngine::focusIn (void)
void
LibPinyinBopomofoEngine::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
-LibPinyinBopomofoEngine::setContentType (guint purpose, guint hints)
-{
- m_input_purpose = (IBusInputPurpose) purpose;
-}
-#endif
-
void
LibPinyinBopomofoEngine::reset (void)
{