diff options
author | Peng Wu <alexepico@gmail.com> | 2013-12-12 12:38:21 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2013-12-12 12:38:27 +0800 |
commit | e6ea82938c6f06d03109da94da6f313c399737e6 (patch) | |
tree | 941f0fcfaa4baef41bb1fd7fd061c0c73404eac9 /src/PYMain.cc | |
parent | 5e6708be79ff90cf483bfc66e30437d5019404a0 (diff) | |
download | ibus-libpinyin-e6ea82938c6f06d03109da94da6f313c399737e6.tar.gz ibus-libpinyin-e6ea82938c6f06d03109da94da6f313c399737e6.tar.xz ibus-libpinyin-e6ea82938c6f06d03109da94da6f313c399737e6.zip |
drop IBUS_BUILD_LIBPINYIN macro
Diffstat (limited to 'src/PYMain.cc')
-rw-r--r-- | src/PYMain.cc | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/PYMain.cc b/src/PYMain.cc index 0830b2c..b761c65 100644 --- a/src/PYMain.cc +++ b/src/PYMain.cc @@ -30,9 +30,7 @@ #include "PYBus.h" #include "PYConfig.h" #include "PYPConfig.h" -#ifdef IBUS_BUILD_LIBPINYIN #include "PYLibPinyin.h" -#endif using namespace PY; @@ -88,14 +86,10 @@ start_component (void) exit (0); } -#ifdef IBUS_BUILD_LIBPINYIN LibPinyinBackEnd::init (); -#endif -#ifdef IBUS_BUILD_LIBPINYIN LibPinyinPinyinConfig::init (bus); LibPinyinBopomofoConfig::init (bus); -#endif g_signal_connect ((IBusBus *)bus, "disconnected", G_CALLBACK (ibus_disconnected_cb), NULL); @@ -107,7 +101,7 @@ start_component (void) "https://github.com/libpinyin/ibus-libpinyin", "", "ibus-libpinyin"); -#ifdef IBUS_BUILD_LIBPINYIN + ibus_component_add_engine (component, ibus_engine_desc_new ("libpinyin-debug", N_("Intelligent Pinyin (debug)"), @@ -130,22 +124,17 @@ start_component (void) "Peng Huang <shawn.p.huang@gmail.com>", PKGDATADIR "/icons/ibus-bopomofo.svg", "us")); -#endif factory = ibus_factory_new (ibus_bus_get_connection (bus)); if (ibus) { -#ifdef IBUS_BUILD_LIBPINYIN ibus_factory_add_engine (factory, "libpinyin", IBUS_TYPE_PINYIN_ENGINE); ibus_factory_add_engine (factory, "libbopomofo", IBUS_TYPE_PINYIN_ENGINE); -#endif ibus_bus_request_name (bus, "org.freedesktop.IBus.Libpinyin", 0); } else { -#ifdef IBUS_BUILD_LIBPINYIN ibus_factory_add_engine (factory, "libpinyin-debug", IBUS_TYPE_PINYIN_ENGINE); ibus_factory_add_engine (factory, "libbopomofo-debug", IBUS_TYPE_PINYIN_ENGINE); -#endif ibus_bus_register_component (bus, component); } @@ -157,18 +146,15 @@ start_component (void) static void sigterm_cb (int sig) { -#ifdef IBUS_BUILD_LIBPINYIN LibPinyinBackEnd::finalize (); -#endif + ::exit (EXIT_FAILURE); } static void atexit_cb (void) { -#ifdef IBUS_BUILD_LIBPINYIN LibPinyinBackEnd::finalize (); -#endif } int |