diff options
author | Peng Wu <alexepico@gmail.com> | 2014-09-22 15:06:54 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2014-09-22 15:06:54 +0800 |
commit | 91e2dbca77121840393ee991f2e9cbd0d432d906 (patch) | |
tree | 5f68067bb31e2a0c8951d95fcb895945a1e9980a /src/ZYZPhoneticEditor.cc | |
parent | bdec4e805455af2a47debb5fb2eeb32de452710f (diff) | |
download | ibus-libzhuyin-91e2dbca77121840393ee991f2e9cbd0d432d906.tar.gz ibus-libzhuyin-91e2dbca77121840393ee991f2e9cbd0d432d906.tar.xz ibus-libzhuyin-91e2dbca77121840393ee991f2e9cbd0d432d906.zip |
fixes class String
Diffstat (limited to 'src/ZYZPhoneticEditor.cc')
-rw-r--r-- | src/ZYZPhoneticEditor.cc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/ZYZPhoneticEditor.cc b/src/ZYZPhoneticEditor.cc index 6dc1dcd..9e67981 100644 --- a/src/ZYZPhoneticEditor.cc +++ b/src/ZYZPhoneticEditor.cc @@ -87,7 +87,6 @@ PhoneticEditor::~PhoneticEditor (void) gboolean PhoneticEditor::loadEasySymbolFile(const gchar * filename) { - printf ("load %s.\n", filename); gboolean retval = m_easy_symbols.loadFromFile (filename); return retval; } @@ -297,8 +296,7 @@ PhoneticEditor::processEasySymbolKey (guint keyval, guint keycode, if (! ('A' <= keyval && keyval <= 'Z')) return FALSE; - String index; - index.append (1, keyval); + String index = (gchar) keyval; String symbol = m_easy_symbols.find (index); if ("" == symbol) @@ -307,7 +305,7 @@ PhoneticEditor::processEasySymbolKey (guint keyval, guint keycode, String lookup; int ch = find_lookup_key (symbol); if (ch != 0) - lookup = ch; + lookup = (gchar) ch; insert_symbol (m_text, m_cursor++, BUILTIN_SYMBOL_TYPE, lookup, symbol); @@ -784,12 +782,12 @@ PhoneticEditor::insertPunct (guint ch) String lookup; int ch = find_lookup_key (choice); if (ch != 0) - lookup = ch; + lookup = (gchar) ch; insert_symbol (m_text, m_cursor++, BUILTIN_SYMBOL_TYPE, lookup, choice); } else { - String choice = ch; + String choice = (gchar)ch; insert_symbol (m_text, m_cursor++, BUILTIN_SYMBOL_TYPE, "", choice); } @@ -812,12 +810,12 @@ PhoneticEditor::insertEnglish (guint ch) String lookup; int ch = find_lookup_key (choice); if (ch != 0) - lookup = ch; + lookup = (gchar) ch; insert_symbol (m_text, m_cursor++, BUILTIN_SYMBOL_TYPE, lookup, choice); } else { - String choice = ch; + String choice = (gchar) ch; insert_symbol (m_text, m_cursor++, BUILTIN_SYMBOL_TYPE, "", choice); } |