diff options
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/ZYRawEditor.cc | 53 | ||||
-rw-r--r-- | src/ZYRawEditor.h | 5 |
3 files changed, 0 insertions, 59 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index aa8a220..b749f14 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -42,7 +42,6 @@ ibus_engine_libzhuyin_c_sources = \ ZYSymbols.cc \ ZYZBuiltinSymbolSection.cc \ ZYZPhoneticSection.cc \ - ZYRawEditor.cc \ ZYEngine.cc \ ZYZZhuyinEngine.cc \ ZYMain.cc \ diff --git a/src/ZYRawEditor.cc b/src/ZYRawEditor.cc deleted file mode 100644 index 5435c13..0000000 --- a/src/ZYRawEditor.cc +++ /dev/null @@ -1,53 +0,0 @@ -/* vim:set et ts=4 sts=4: - * - * ibus-libzhuyin - New Zhuyin engine based on libzhuyin for IBus - * - * Copyright (c) 2014 Peng Wu <alexepico@gmail.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "ZYRawEditor.h" -#include "ZYText.h" - -namespace ZY { - -gboolean -RawEditor::processKeyEvent (guint keyval, guint keycode, guint modifiers) -{ - - /* skip the key press event */ - if (! (modifiers & IBUS_RELEASE_MASK) ) - return TRUE; - - modifiers &= (IBUS_CONTROL_MASK | - IBUS_MOD1_MASK | - IBUS_SUPER_MASK | - IBUS_HYPER_MASK | - IBUS_META_MASK); - /* ignore key events with some masks */ - if (modifiers != 0) - return TRUE; - - if (isprint (keyval)) { - Text text (keyval); - commitText (text); - return TRUE; - } - - return TRUE; -} - -}; diff --git a/src/ZYRawEditor.h b/src/ZYRawEditor.h index 00ce6b5..1a1fa7c 100644 --- a/src/ZYRawEditor.h +++ b/src/ZYRawEditor.h @@ -29,11 +29,6 @@ class RawEditor : public Editor { public: RawEditor (ZhuyinProperties &props, Config & config) : Editor (props, config) { } - - virtual gboolean processKeyEvent (guint keyval, - guint keycode, - guint modifiers); - }; }; |