packages: ibus-m17n/ibus-m17n-HEAD.patch (NEW), ibus-m17n/ibus-m17n-iok.pat...

baggins baggins at pld-linux.org
Wed Jul 20 13:08:42 CEST 2011


Author: baggins                      Date: Wed Jul 20 11:08:42 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- initial revision

---- Files affected:
packages/ibus-m17n:
   ibus-m17n-HEAD.patch (NONE -> 1.1)  (NEW), ibus-m17n-iok.patch (NONE -> 1.1)  (NEW), ibus-m17n-xkb-options.patch (NONE -> 1.1)  (NEW), ibus-m17n-xx-icon-symbol.patch (NONE -> 1.1)  (NEW), ibus-m17n.spec (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/ibus-m17n/ibus-m17n-HEAD.patch
diff -u /dev/null packages/ibus-m17n/ibus-m17n-HEAD.patch:1.1
--- /dev/null	Wed Jul 20 13:08:42 2011
+++ packages/ibus-m17n/ibus-m17n-HEAD.patch	Wed Jul 20 13:08:37 2011
@@ -0,0 +1,281 @@
+Patch to synch with the git master 65cc1bc1.
+Index: ibus-m17n-1.3.2/Makefile.am
+===================================================================
+--- ibus-m17n-1.3.2.orig/Makefile.am
++++ ibus-m17n-1.3.2/Makefile.am
+@@ -69,7 +69,7 @@ debian/changelog:
+ 		version=@VERSION@; \
+ 		serie=$(serie); \
+ 		if test -z "$$serie"; then \
+-		  serie=lucid; \
++		  serie=maverick; \
+ 		fi; \
+ 		if test -z "$$release"; then \
+ 		  release=1; \
+Index: ibus-m17n-1.3.2/configure.ac
+===================================================================
+--- ibus-m17n-1.3.2.orig/configure.ac
++++ ibus-m17n-1.3.2/configure.ac
+@@ -89,7 +89,22 @@ fi
+ AM_CONDITIONAL([HAVE_GTK],[test x$with_gtk != xno])
+ 
+ # check if minput_list, which is available in m17n-lib 1.6.2+ (CVS)
++save_CFLAGS="$CFLAGS"
++save_LIBS="$LIBS"
++CFLAGS="$CFLAGS $M17N_CFLAGS"
++LIBS="$LIBS $M17N_LIBS"
+ AC_REPLACE_FUNCS([minput_list])
++CFLAGS="$save_CFLAGS"
++LIBS="$save_LIBS"
++
++# check if ibus_engine_get_surrounding_text, which is available in ibus-1.3.99+ (git master)
++save_CFLAGS="$CFLAGS"
++save_LIBS="$LIBS"
++CFLAGS="$CFLAGS $IBUS_CFLAGS"
++LIBS="$LIBS $IBUS_LIBS"
++AC_CHECK_FUNCS([ibus_engine_get_surrounding_text])
++CFLAGS="$save_CFLAGS"
++LIBS="$save_LIBS"
+ 
+ # define GETTEXT_* variables
+ GETTEXT_PACKAGE=ibus-m17n
+Index: ibus-m17n-1.3.2/src/engine.c
+===================================================================
+--- ibus-m17n-1.3.2.orig/src/engine.c
++++ ibus-m17n-1.3.2/src/engine.c
+@@ -1,4 +1,7 @@
+ /* vim:set et sts=4: */
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
+ 
+ #include <ibus.h>
+ #include <m17n.h>
+@@ -6,23 +9,6 @@
+ #include "m17nutil.h"
+ #include "engine.h"
+ 
+-/* type module to assign different GType to each engine */
+-#define IBUS_TYPE_M17N_TYPE_MODULE (ibus_m17n_type_module_get_type ())
+-#define IBUS_M17N_TYPE_MODULE (module) (G_TYPE_CHECK_INSTANCE_CAST (module, IBUS_TYPE_M17N_TYPE_MODULE, IBusM17NTypeModule)
+-
+-typedef struct _IBusM17NTypeModule IBusM17NTypeModule;
+-typedef struct _IBusM17NTypeModuleClass IBusM17NTypeModuleClass;
+-
+-struct _IBusM17NTypeModule
+-{
+-    GTypeModule parent_instance;
+-};
+-
+-struct _IBusM17NTypeModuleClass
+-{
+-    GTypeModuleClass parent_class;
+-};
+-
+ typedef struct _IBusM17NEngine IBusM17NEngine;
+ typedef struct _IBusM17NEngineClass IBusM17NEngineClass;
+ 
+@@ -53,10 +39,7 @@ struct _IBusM17NEngineClass {
+ };
+ 
+ /* functions prototype */
+-static GType
+-            ibus_m17n_type_module_get_type  (void);
+ static void ibus_m17n_engine_class_init     (IBusM17NEngineClass    *klass);
+-static void ibus_m17n_engine_class_finalize (IBusM17NEngineClass    *klass);
+ static void ibus_m17n_config_value_changed  (IBusConfig             *config,
+                                              const gchar            *section,
+                                              const gchar            *name,
+@@ -119,7 +102,6 @@ static void ibus_m17n_engine_update_look
+ static IBusEngineClass *parent_class = NULL;
+ 
+ static IBusConfig      *config = NULL;
+-static IBusM17NTypeModule *module = NULL;
+ 
+ void
+ ibus_m17n_init (IBusBus *bus)
+@@ -128,55 +110,6 @@ ibus_m17n_init (IBusBus *bus)
+     if (config)
+         g_object_ref_sink (config);
+     ibus_m17n_init_common ();
+-
+-    module = g_object_new (IBUS_TYPE_M17N_TYPE_MODULE, NULL);
+-}
+-
+-static gboolean
+-ibus_m17n_type_module_load (GTypeModule *module)
+-{
+-    return TRUE;
+-}
+-
+-static void
+-ibus_m17n_type_module_unload (GTypeModule *module)
+-{
+-}
+-
+-static void
+-ibus_m17n_type_module_class_init (IBusM17NTypeModuleClass *klass)
+-{
+-    GTypeModuleClass *module_class = G_TYPE_MODULE_CLASS (klass);
+-
+-    module_class->load = ibus_m17n_type_module_load;
+-    module_class->unload = ibus_m17n_type_module_unload;
+-}
+-
+-static GType
+-ibus_m17n_type_module_get_type (void)
+-{
+-    static GType type = 0;
+-
+-    static const GTypeInfo type_info = {
+-        sizeof (IBusM17NTypeModuleClass),
+-        (GBaseInitFunc) NULL,
+-        (GBaseFinalizeFunc) NULL,
+-        (GClassInitFunc) ibus_m17n_type_module_class_init,
+-        (GClassFinalizeFunc) NULL,
+-        NULL,
+-        sizeof (IBusM17NTypeModule),
+-        0,
+-        (GInstanceInitFunc) NULL,
+-    };
+-
+-    if (type == 0) {
+-        type = g_type_register_static (G_TYPE_TYPE_MODULE,
+-                                       "IBusM17NTypeModule",
+-                                       &type_info,
+-                                       (GTypeFlags) 0);
+-    }
+-
+-    return type;
+ }
+ 
+ static gboolean
+@@ -239,14 +172,14 @@ ibus_m17n_engine_get_type_for_name (cons
+ 
+     GTypeInfo type_info = {
+         sizeof (IBusM17NEngineClass),
+-        (GBaseInitFunc)        NULL,
+-        (GBaseFinalizeFunc) NULL,
+-        (GClassInitFunc)    ibus_m17n_engine_class_init,
+-        (GClassFinalizeFunc)ibus_m17n_engine_class_finalize,
++        (GBaseInitFunc)      NULL,
++        (GBaseFinalizeFunc)  NULL,
++        (GClassInitFunc)     ibus_m17n_engine_class_init,
++        (GClassFinalizeFunc) NULL,
+         NULL,
+         sizeof (IBusM17NEngine),
+         0,
+-        (GInstanceInitFunc)    ibus_m17n_engine_init,
++        (GInstanceInitFunc)  ibus_m17n_engine_init,
+     };
+ 
+     if (!ibus_m17n_scan_engine_name (engine_name, &lang, &name)) {
+@@ -264,11 +197,10 @@ ibus_m17n_engine_get_type_for_name (cons
+     g_assert (type == 0 || g_type_is_a (type, IBUS_TYPE_ENGINE));
+ 
+     if (type == 0) {
+-        type = g_type_module_register_type (G_TYPE_MODULE (module),
+-                                            IBUS_TYPE_ENGINE,
+-                                            type_name,
+-                                            &type_info,
+-                                            (GTypeFlags) 0);
++        type = g_type_register_static (IBUS_TYPE_ENGINE,
++                                       type_name,
++                                       &type_info,
++                                       (GTypeFlags) 0);
+     }
+     g_free (type_name);
+ 
+@@ -408,14 +340,6 @@ ibus_m17n_config_value_changed (IBusConf
+ }
+ 
+ static void
+-ibus_m17n_engine_class_finalize (IBusM17NEngineClass *klass)
+-{
+-    if (klass->im)
+-        minput_close_im (klass->im);
+-    g_free (klass->config_section);
+-}
+-
+-static void
+ ibus_m17n_engine_init (IBusM17NEngine *m17n)
+ {
+     IBusText* label;
+@@ -773,6 +697,16 @@ ibus_m17n_engine_enable (IBusEngine *eng
+     IBusM17NEngine *m17n = (IBusM17NEngine *) engine;
+ 
+     parent_class->enable (engine);
++
++#ifdef HAVE_IBUS_ENGINE_GET_SURROUNDING_TEXT
++    /* Issue a dummy ibus_engine_get_surrounding_text() call to tell
++       input context that we will use surrounding-text. */
++    IBusText *text;
++    guint cursor_pos;
++
++    ibus_engine_get_surrounding_text (engine, &text, &cursor_pos);
++    g_object_unref (text);
++#endif  /* HAVE_IBUS_ENGINE_GET_SURROUNDING_TEXT */
+ }
+ 
+ static void
+@@ -986,8 +920,57 @@ ibus_m17n_engine_callback (MInputContext
+     }
+     else if (command == Minput_reset) {
+     }
+-    else if (command == Minput_get_surrounding_text) {
+-    }
+-    else if (command == Minput_delete_surrounding_text) {
++    /* ibus_engine_get_surrounding_text is only available in the current
++       git master (1.3.99+) */
++#ifdef HAVE_IBUS_ENGINE_GET_SURROUNDING_TEXT
++    else if (command == Minput_get_surrounding_text &&
++             (((IBusEngine *) m17n)->client_capabilities &
++              IBUS_CAP_SURROUNDING_TEXT) != 0) {
++        IBusText *text;
++        guint cursor_pos, nchars, nbytes;
++        MText *mt, *surround;
++        int len, pos;
++
++        ibus_engine_get_surrounding_text ((IBusEngine *) m17n,
++                                          &text,
++                                          &cursor_pos);
++        nchars = ibus_text_get_length (text);
++        nbytes = g_utf8_offset_to_pointer (text->text, nchars) - text->text;
++        mt = mconv_decode_buffer (Mcoding_utf_8, text->text, nbytes);
++        g_object_unref (text);
++
++        len = (long) mplist_value (m17n->context->plist);
++        if (len < 0) {
++            pos = cursor_pos + len;
++            if (pos < 0)
++                pos = 0;
++            surround = mtext_duplicate (mt, pos, cursor_pos);
++        }
++        else if (len > 0) {
++            pos = cursor_pos + len;
++            if (pos > nchars)
++                pos = nchars;
++            surround = mtext_duplicate (mt, cursor_pos, pos);
++        }
++        else {
++            surround = mtext ();
++        }
++        m17n_object_unref (mt);
++        mplist_set (m17n->context->plist, Mtext, surround);
++        m17n_object_unref (surround);
++    }
++#endif  /* !HAVE_IBUS_ENGINE_GET_SURROUNDING_TEXT */
++    else if (command == Minput_delete_surrounding_text &&
++             (((IBusEngine *) m17n)->client_capabilities &
++              IBUS_CAP_SURROUNDING_TEXT) != 0) {
++        int len;
++
++        len = (long) mplist_value (m17n->context->plist);
++        if (len < 0)
++            ibus_engine_delete_surrounding_text ((IBusEngine *) m17n,
++                                                 len, -len);
++        else if (len > 0)
++            ibus_engine_delete_surrounding_text ((IBusEngine *) m17n,
++                                                 0, len);
+     }
+ }

================================================================
Index: packages/ibus-m17n/ibus-m17n-iok.patch
diff -u /dev/null packages/ibus-m17n/ibus-m17n-iok.patch:1.1
--- /dev/null	Wed Jul 20 13:08:42 2011
+++ packages/ibus-m17n/ibus-m17n-iok.patch	Wed Jul 20 13:08:37 2011
@@ -0,0 +1,100 @@
+Patch to support iok (Indic Onscreen Keyboard).
+Index: ibus-m17n-1.3.2/src/engine.c
+===================================================================
+--- ibus-m17n-1.3.2.orig/src/engine.c
++++ ibus-m17n-1.3.2/src/engine.c
+@@ -23,6 +23,7 @@ struct _IBusM17NEngine {
+     IBusProperty    *setup_prop;
+ #endif  /* HAVE_SETUP */
+     IBusPropList    *prop_list;
++    IBusProperty    *show_iok_prop;
+ };
+ 
+ struct _IBusM17NEngineClass {
+@@ -34,6 +35,7 @@ struct _IBusM17NEngineClass {
+     guint preedit_background;
+     gint preedit_underline;
+     gint lookup_table_orientation;
++    gboolean use_iok;
+ 
+     MInputMethod *im;
+ };
+@@ -248,6 +250,9 @@ ibus_m17n_engine_class_init (IBusM17NEng
+     }
+     engine_name = g_strdup_printf ("m17n:%s:%s", lang, name);
+     klass->config_section = g_strdup_printf ("engine/M17N/%s/%s", lang, name);
++    /* whether to use iok - maybe good to move this to default.xml */
++    klass->use_iok = g_strcmp0 (name, "inscript") == 0 ||
++        g_strcmp0 (name, "inscript2") == 0;
+     g_free (lang);
+     g_free (name);
+ 
+@@ -344,6 +349,7 @@ ibus_m17n_engine_init (IBusM17NEngine *m
+ {
+     IBusText* label;
+     IBusText* tooltip;
++    IBusM17NEngineClass *klass = (IBusM17NEngineClass *) G_OBJECT_GET_CLASS (m17n);
+ 
+     m17n->prop_list = ibus_prop_list_new ();
+     g_object_ref_sink (m17n->prop_list);
+@@ -376,6 +382,23 @@ ibus_m17n_engine_init (IBusM17NEngine *m
+     ibus_prop_list_append (m17n->prop_list, m17n->setup_prop);
+ #endif  /* HAVE_SETUP */
+ 
++    label = ibus_text_new_from_string ("iok");
++    m17n->show_iok_prop = ibus_property_new ("iok",
++                                             PROP_TYPE_NORMAL,
++                                             label,
++                                             "/usr/share/pixmaps/iok.xpm",
++                                             label,
++                                             TRUE,
++                                             FALSE,
++                                             0,
++                                             NULL);
++    g_object_ref_sink (m17n->show_iok_prop);
++
++    if (klass->use_iok)
++        ibus_property_set_visible (m17n->show_iok_prop, TRUE);
++
++    ibus_prop_list_append (m17n->prop_list,  m17n->show_iok_prop);
++
+     m17n->table = ibus_lookup_table_new (9, 0, TRUE, TRUE);
+     g_object_ref_sink (m17n->table);
+     m17n->context = NULL;
+@@ -461,6 +484,11 @@ ibus_m17n_engine_destroy (IBusM17NEngine
+     }
+ #endif  /* HAVE_SETUP */
+ 
++    if (m17n->show_iok_prop) {
++        g_object_unref (m17n->show_iok_prop);
++        m17n->show_iok_prop = NULL;
++    }
++
+     if (m17n->table) {
+         g_object_unref (m17n->table);
+         m17n->table = NULL;
+@@ -778,6 +806,24 @@ ibus_m17n_engine_property_activate (IBus
+     }
+ #endif  /* HAVE_SETUP */
+ 
++    if (g_strcmp0 (prop_name, "iok") == 0) {
++        const gchar *engine_name;
++        gchar *lang = NULL, *name = NULL;
++
++        engine_name = ibus_engine_get_name ((IBusEngine *) m17n);
++        if (ibus_m17n_scan_engine_name (engine_name, &lang, &name)) {
++            gchar *iok;
++
++            iok = g_strdup_printf ("/usr/bin/iok -n %s", lang);
++            g_debug ("keymap name = %s,prop_name=%s, prop_state=%d",
++                     engine_name, prop_name, prop_state);
++            g_spawn_command_line_async(iok, NULL);
++            g_free (iok);
++        }
++        g_free (lang);
++        g_free (name);
++    }
++
+     parent_class->property_activate (engine, prop_name, prop_state);
+ }
+ 

================================================================
Index: packages/ibus-m17n/ibus-m17n-xkb-options.patch
diff -u /dev/null packages/ibus-m17n/ibus-m17n-xkb-options.patch:1.1
--- /dev/null	Wed Jul 20 13:08:42 2011
+++ packages/ibus-m17n/ibus-m17n-xkb-options.patch	Wed Jul 20 13:08:37 2011
@@ -0,0 +1,386 @@
+Patch to set certain XKB options when an m17n IME is set.
+Index: ibus-m17n-1.3.2/configure.ac
+===================================================================
+--- ibus-m17n-1.3.2.orig/configure.ac
++++ ibus-m17n-1.3.2/configure.ac
+@@ -106,6 +106,14 @@ AC_CHECK_FUNCS([ibus_engine_get_surround
+ CFLAGS="$save_CFLAGS"
+ LIBS="$save_LIBS"
+ 
++# check libxklavier
++have_libxklavier=no
++PKG_CHECK_MODULES([LIBXKLAVIER], [libxklavier gdk-3.0 x11],
++  have_libxklavier=yes)
++if test x$have_libxklavier != xno; then
++  AC_DEFINE([HAVE_LIBXKLAVIER], [1], [Define if libxklavier is found])
++fi
++
+ # define GETTEXT_* variables
+ GETTEXT_PACKAGE=ibus-m17n
+ AC_SUBST(GETTEXT_PACKAGE)
+Index: ibus-m17n-1.3.2/src/Makefile.am
+===================================================================
+--- ibus-m17n-1.3.2.orig/src/Makefile.am
++++ ibus-m17n-1.3.2/src/Makefile.am
+@@ -66,10 +66,15 @@ ibus_engine_m17n_SOURCES = \
+ 	engine.c \
+ 	engine.h \
+ 	$(NULL)
++ibus_engine_m17n_CFLAGS = \
++	@LIBXKLAVIER_CFLAGS@ \
++	$(AM_CFLAGS) \
++	$(NULL)
+ ibus_engine_m17n_LDADD = \
+ 	libm17ncommon.a \
+ 	@IBUS_LIBS@ \
+ 	@M17N_LIBS@ \
++	@LIBXKLAVIER_LIBS@ \
+ 	$(NULL)
+ 
+ if HAVE_GTK
+Index: ibus-m17n-1.3.2/src/default.xml.in.in
+===================================================================
+--- ibus-m17n-1.3.2.orig/src/default.xml.in.in
++++ ibus-m17n-1.3.2/src/default.xml.in.in
+@@ -12,19 +12,22 @@
+ 		<preedit-highlight>FALSE</preedit-highlight>
+ 	</engine>
+ 	<engine>
+-		<name>m17n:bn:inscript</name>
++		<name>m17n:bn:inscript*</name>
+ 		<rank>2</rank>
+ 		<preedit-highlight>FALSE</preedit-highlight>
++		<xkb-options>lv3:ralt_switch</xkb-options>
+ 	</engine>
+ 	<engine>
+-		<name>m17n:gu:inscript</name>
++		<name>m17n:gu:inscript*</name>
+ 		<rank>2</rank>
+ 		<preedit-highlight>FALSE</preedit-highlight>
++		<xkb-options>lv3:ralt_switch</xkb-options>
+ 	</engine>
+ 	<engine>
+-		<name>m17n:hi:inscript</name>
++		<name>m17n:hi:inscript*</name>
+ 		<rank>2</rank>
+ 		<preedit-highlight>FALSE</preedit-highlight>
++		<xkb-options>lv3:ralt_switch</xkb-options>
+ 	</engine>
+ 	<engine>
+ 		<name>m17n:kn:kgp</name>
+@@ -37,19 +40,22 @@
+ 		<preedit-highlight>FALSE</preedit-highlight>
+ 	</engine>
+ 	<engine>
+-		<name>m17n:mai:inscript</name>
++		<name>m17n:mai:inscript*</name>
+ 		<rank>2</rank>
+ 		<preedit-highlight>FALSE</preedit-highlight>
++		<xkb-options>lv3:ralt_switch</xkb-options>
+ 	</engine>
+ 	<engine>
+-		<name>m17n:ml:inscript</name>
++		<name>m17n:ml:inscript*</name>
+ 		<rank>2</rank>
+ 		<preedit-highlight>FALSE</preedit-highlight>
++		<xkb-options>lv3:ralt_switch</xkb-options>
+ 	</engine>
+ 	<engine>
+-		<name>m17n:mr:inscript</name>
++		<name>m17n:mr:inscript*</name>
+ 		<rank>2</rank>
+ 		<preedit-highlight>FALSE</preedit-highlight>
++		<xkb-options>lv3:ralt_switch</xkb-options>
+ 	</engine>
+ 	<engine>
+ 		<name>m17n:ne:rom</name>
+@@ -57,14 +63,16 @@
+ 		<preedit-highlight>FALSE</preedit-highlight>
+ 	</engine>
+ 	<engine>
+-		<name>m17n:or:inscript</name>
++		<name>m17n:or:inscript*</name>
+ 		<rank>2</rank>
+ 		<preedit-highlight>FALSE</preedit-highlight>
++		<xkb-options>lv3:ralt_switch</xkb-options>
+ 	</engine>
+ 	<engine>
+-		<name>m17n:pa:inscript</name>
++		<name>m17n:pa:inscript*</name>
+ 		<rank>2</rank>
+ 		<preedit-highlight>FALSE</preedit-highlight>
++		<xkb-options>lv3:ralt_switch</xkb-options>
+ 	</engine>
+ 	<engine>
+ 		<name>m17n:sa:harvard-kyoto</name>
+@@ -72,14 +80,16 @@
+ 		<preedit-highlight>FALSE</preedit-highlight>
+ 	</engine>
+ 	<engine>
+-		<name>m17n:sd:inscript</name>
++		<name>m17n:sd:inscript*</name>
+ 		<rank>2</rank>
+ 		<preedit-highlight>FALSE</preedit-highlight>
++		<xkb-options>lv3:ralt_switch</xkb-options>
+ 	</engine>
+ 	<engine>
+ 		<name>m17n:si:wijesekera</name>
+ 		<rank>2</rank>
+ 		<preedit-highlight>FALSE</preedit-highlight>
++		<xkb-options>lv3:ralt_switch</xkb-options>
+ 	</engine>
+ 	<engine>
+ 		<name>m17n:ta:tamil99</name>
+@@ -87,9 +97,10 @@
+ 		<preedit-highlight>FALSE</preedit-highlight>
+ 	</engine>
+ 	<engine>
+-		<name>m17n:te:inscript</name>
++		<name>m17n:te:inscript*</name>
+ 		<rank>2</rank>
+ 		<preedit-highlight>FALSE</preedit-highlight>
++		<xkb-options>lv3:ralt_switch</xkb-options>
+ 	</engine>
+ 	<!-- Samanala should have lower rank than other Sinhala
+ 	     engines since it is the only non-keyboard input method in
+@@ -226,6 +237,7 @@
+ 		<name>m17n:si:*</name>
+ 		<rank>1</rank>
+ 		<preedit-highlight>FALSE</preedit-highlight>
++		<xkb-options>lv3:ralt_switch</xkb-options>
+ 	</engine>
+ 	<engine>
+ 		<name>m17n:ta:*</name>
+Index: ibus-m17n-1.3.2/src/engine.c
+===================================================================
+--- ibus-m17n-1.3.2.orig/src/engine.c
++++ ibus-m17n-1.3.2/src/engine.c
+@@ -6,6 +6,10 @@
+ #include <ibus.h>
+ #include <m17n.h>
+ #include <string.h>
++#ifdef HAVE_LIBXKLAVIER
++#include <gdk/gdkx.h>
++#include <libxklavier/xklavier.h>
++#endif  /* HAVE_LIBXKLAVIER */
+ #include "m17nutil.h"
+ #include "engine.h"
+ 
+@@ -38,6 +42,10 @@ struct _IBusM17NEngineClass {
+     gboolean use_iok;
+ 
+     MInputMethod *im;
++
++#if HAVE_LIBXKLAVIER
++    XklConfigRec *xkl_config_rec;
++#endif  /* HAVE_LIBXKLAVIER */
+ };
+ 
+ /* functions prototype */
+@@ -105,12 +113,90 @@ static IBusEngineClass *parent_class = N
+ 
+ static IBusConfig      *config = NULL;
+ 
++#if HAVE_LIBXKLAVIER
++static XklEngine       *xkl_engine = NULL;
++static XklConfigRec    *xkl_system_config_rec = NULL;
++
++static gboolean
++parse_xkb_options (XklConfigRec *config_rec, const gchar *xkb_options)
++{
++    gchar **strv;
++
++    strv = g_strsplit (xkb_options, ",", -1);
++    if (g_strv_length (strv) < 1) {
++        g_strfreev (strv);
++        return FALSE;
++    }
++
<<Diff was trimmed, longer than 597 lines>>


More information about the pld-cvs-commit mailing list