summaryrefslogtreecommitdiffstats
path: root/src/PYPBopomofoEngine.cc
diff options
context:
space:
mode:
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)
{