diff options
author | Huang Peng <shawn.p.huang@gmail.com> | 2009-02-05 10:39:56 +0800 |
---|---|---|
committer | Huang Peng <shawn.p.huang@gmail.com> | 2009-02-05 10:39:56 +0800 |
commit | aedad1ea0a7fef604aa27f4b58433fd8f2ece29e (patch) | |
tree | ffcb531d8474bde18b90341bcd4eb639edd74525 /client/gtk2/ibusim.c | |
parent | 41ad46305a88637dd99f00a2d2a3f455505d357b (diff) | |
download | ibus-aedad1ea0a7fef604aa27f4b58433fd8f2ece29e.tar.gz ibus-aedad1ea0a7fef604aa27f4b58433fd8f2ece29e.tar.xz ibus-aedad1ea0a7fef604aa27f4b58433fd8f2ece29e.zip |
re-implement ibus in c language.
Diffstat (limited to 'client/gtk2/ibusim.c')
-rw-r--r-- | client/gtk2/ibusim.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/client/gtk2/ibusim.c b/client/gtk2/ibusim.c index 30d84b8..c2951ca 100644 --- a/client/gtk2/ibusim.c +++ b/client/gtk2/ibusim.c @@ -21,7 +21,7 @@ #include <glib/gprintf.h> #include <gtk/gtk.h> #include <gtk/gtkimmodule.h> -#include "ibusimclient.h" +#include <ibus.h> #include "ibusimcontext.h" #define IBUS_LOCALDIR "" @@ -38,19 +38,22 @@ static const GtkIMContextInfo * info_list[] = { }; +G_MODULE_EXPORT const gchar* g_module_check_init (GModule *module); +const gchar* +g_module_check_init (GModule *module) +{ + return glib_check_version (GLIB_MAJOR_VERSION, + GLIB_MINOR_VERSION, + GLIB_MICRO_VERSION); +} + void im_module_init (GTypeModule *type_module) { - ibus_im_client_register_type(type_module); - ibus_im_context_register_type(type_module); -#if 0 - gchar **p = environ; - extern gchar **environ; - while (*p != NULL) { - g_fprintf (stderr, "%s\n", *p); - p ++; - } -#endif + /* make module resident */ + g_type_module_use (type_module); + + ibus_im_context_register_type (type_module); } void |