diff options
author | Peng Wu <alexepico@gmail.com> | 2011-09-05 17:13:31 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2011-12-22 12:23:11 +0800 |
commit | e9f90e33c992e4c463235862acd20a5329381f8e (patch) | |
tree | b71c6e7db33d51edf580f65d087565df86373567 /src | |
parent | 3799224a7f951a40b47f202e428d1d390b53fd25 (diff) | |
download | ibus-libpinyin-e9f90e33c992e4c463235862acd20a5329381f8e.tar.gz ibus-libpinyin-e9f90e33c992e4c463235862acd20a5329381f8e.tar.xz ibus-libpinyin-e9f90e33c992e4c463235862acd20a5329381f8e.zip |
fixes compile
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/PYPBopomofoEditor.cc | 9 | ||||
-rw-r--r-- | src/PYPBopomofoEditor.h | 2 |
3 files changed, 8 insertions, 5 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index ddebb04..3065410 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -66,6 +66,7 @@ ibus_engine_pinyin_c_sources = \ PYSpecialPhraseTable.cc \ PYPPhoneticEditor.cc \ PYPPinyinEditor.cc \ + PYPBopomofoEditor.cc \ $(NULL) ibus_engine_pinyin_h_sources = \ PYBopomofo.h \ @@ -111,6 +112,7 @@ ibus_engine_pinyin_h_sources = \ PYLibPinyin.h \ PYPPhoneticEditor.h \ PYPPinyinEditor.h \ + PYPBopomofoEditor.h \ $(NULL) if IBUS_BUILD_LUA_EXTENSION diff --git a/src/PYPBopomofoEditor.cc b/src/PYPBopomofoEditor.cc index 75c8ddc..cb64abd 100644 --- a/src/PYPBopomofoEditor.cc +++ b/src/PYPBopomofoEditor.cc @@ -274,7 +274,7 @@ LibPinyinBopomofoEditor::processSelectKey (guint keyval, guint keycode, const gchar * pos = NULL; const gchar * keys = bopomofo_select_keys[m_config.selectKeys ()]; - for ( const gchar * p = keys; *p != NULL; ++p ) { + for ( const gchar * p = keys; *p; ++p ) { if ( *p == keyval ) pos = p; } @@ -362,12 +362,11 @@ gint LibPinyinBopomofoEditor::keyvalToBopomofo(gint ch) { const gint keyboard = m_config.bopomofoKeyboardMapping (); - const guint8 & keys[41][2] = bopomofo_keyboard[keyboard]; gint len = G_N_ELEMENTS (bopomofo_keyboard[keyboard]); - for ( size_t i = 0; i < len; ++i ) { - if ( keys[i][0] == ch ) - return keys[i][1]; + for ( gint i = 0; i < len; ++i ) { + if ( bopomofo_keyboard[keyboard][i][0] == ch ) + return bopomofo_keyboard[keyboard][i][1]; } return BOPOMOFO_ZERO; diff --git a/src/PYPBopomofoEditor.h b/src/PYPBopomofoEditor.h index bcbf85d..f78375f 100644 --- a/src/PYPBopomofoEditor.h +++ b/src/PYPBopomofoEditor.h @@ -46,12 +46,14 @@ protected: gboolean processBopomofo (guint keyval, guint keycode, guint modifiers); gboolean processKeyEvent (guint keyval, guint keycode, guint modifiers); +#if 0 void updateAuxiliaryText (); void updateLookupTable (); void updatePreeditText (); void update (); void commit (); +#endif void reset (); gboolean insert (gint ch); |