From 7862a2683f6358e7b04c3a94a14e9abebe0570be Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Wed, 30 May 2012 13:39:18 +0800 Subject: [PATCH] fixes compile --- src/PYEngine.cc | 12 +----------- src/PYMain.cc | 7 +++---- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/src/PYEngine.cc b/src/PYEngine.cc index 2563b9a..a221ce7 100644 --- a/src/PYEngine.cc +++ b/src/PYEngine.cc @@ -21,8 +21,6 @@ #include #include "PYEngine.h" -#include "PYPinyinEngine.h" -#include "PYBopomofoEngine.h" #include "PYPPinyinEngine.h" #include "PYPBopomofoEngine.h" @@ -158,14 +156,6 @@ ibus_pinyin_engine_constructor (GType type, name = ibus_engine_get_name ((IBusEngine *) engine); if (name) { - if (std::strcmp (name, "pinyin") == 0 || - std::strcmp (name, "pinyin-debug") == 0) { - engine->engine = new PinyinEngine (IBUS_ENGINE (engine)); - } - if (std::strcmp (name, "bopomofo") == 0 || - std::strcmp (name, "bopomofo-debug") == 0) { - engine->engine = new BopomofoEngine (IBUS_ENGINE (engine)); - } #ifdef IBUS_BUILD_LIBPINYIN if (std::strcmp (name, "libpinyin") == 0 || std::strcmp (name, "libpinyin-debug") == 0) { @@ -177,7 +167,7 @@ ibus_pinyin_engine_constructor (GType type, } #endif } else { - engine->engine = new PinyinEngine (IBUS_ENGINE (engine)); + engine->engine = new LibPinyinPinyinEngine (IBUS_ENGINE (engine)); } return (GObject *) engine; } diff --git a/src/PYMain.cc b/src/PYMain.cc index 9eb20c8..7908c42 100644 --- a/src/PYMain.cc +++ b/src/PYMain.cc @@ -30,7 +30,6 @@ #include "PYBus.h" #include "PYConfig.h" #include "PYPConfig.h" -#include "PYDatabase.h" #ifdef IBUS_BUILD_LIBPINYIN #include "PYLibPinyin.h" #endif @@ -89,7 +88,6 @@ start_component (void) exit (0); } - Database::init (); #ifdef IBUS_BUILD_LIBPINYIN LibPinyinBackEnd::init (); #endif @@ -187,7 +185,9 @@ start_component (void) static void sigterm_cb (int sig) { - PY::Database::finalize (); +#ifdef IBUS_BUILD_LIBPINYIN + LibPinyinBackEnd::finalize (); +#endif ::exit (EXIT_FAILURE); } @@ -197,7 +197,6 @@ atexit_cb (void) #ifdef IBUS_BUILD_LIBPINYIN LibPinyinBackEnd::finalize (); #endif - PY::Database::finalize (); } int -- 2.7.4