summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-05-30 13:39:18 +0800
committerPeng Wu <alexepico@gmail.com>2012-05-30 13:39:18 +0800
commit7862a2683f6358e7b04c3a94a14e9abebe0570be (patch)
tree3d46b00fe90b448ac8d0b8cd81c5ac45693d8038 /src
parent692728d5de414766be9faf81d298facec4cc94b2 (diff)
downloadibus-libpinyin-7862a2683f6358e7b04c3a94a14e9abebe0570be.tar.gz
ibus-libpinyin-7862a2683f6358e7b04c3a94a14e9abebe0570be.tar.xz
ibus-libpinyin-7862a2683f6358e7b04c3a94a14e9abebe0570be.zip
fixes compile
Diffstat (limited to 'src')
-rw-r--r--src/PYEngine.cc12
-rw-r--r--src/PYMain.cc7
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 <cstring>
#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