[packages/ibus-m17n] - updated to 1.3.4 - updated xkb-options patch - updated xx-icon-symbol patch (only hotkeys support

qboosh qboosh at pld-linux.org
Sun Sep 16 10:22:34 CEST 2012


commit fd7a42858a47afa05401bcfe5851da3cf5bde3f7
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Sep 16 10:23:19 2012 +0200

    - updated to 1.3.4
    - updated xkb-options patch
    - updated xx-icon-symbol patch (only hotkeys support left - symbol is upstream now)
    - removed obsolete HEAD patch

 ibus-m17n-HEAD.patch           | 281 -----------------------------------------
 ibus-m17n-xkb-options.patch    |  90 +++++--------
 ibus-m17n-xx-icon-symbol.patch |  65 ++++------
 ibus-m17n.spec                 |  41 ++++--
 4 files changed, 88 insertions(+), 389 deletions(-)
---
diff --git a/ibus-m17n.spec b/ibus-m17n.spec
index fe92a91..80f335f 100644
--- a/ibus-m17n.spec
+++ b/ibus-m17n.spec
@@ -3,27 +3,31 @@
 %bcond_with	bridge_hotkey		# enable the engine hotkeys
 #
 Summary:	The M17N engine for IBus platform
+Summary(pl.UTF-8):	Silnik M17N dla platformy IBus
 Name:		ibus-m17n
-Version:	1.3.2
+Version:	1.3.4
 Release:	1
 License:	GPL v2+
 Group:		Libraries
-URL:		http://code.google.com/p/ibus/
+#Source0Download: http://code.google.com/p/ibus/downloads/list
 Source0:	http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz
-# Source0-md5:	4c406147318f94e5e805c408c4be075e
-Patch0:		%{name}-HEAD.patch
-Patch1:		%{name}-iok.patch
-Patch2:		%{name}-xkb-options.patch
-Patch3:		%{name}-xx-icon-symbol.patch
-BuildRequires:	gettext-devel
+# Source0-md5:	6f644b73c5943e3c7fb2e02b9e259804
+Patch0:		%{name}-iok.patch
+Patch1:		%{name}-xkb-options.patch
+Patch2:		%{name}-xx-icon-symbol.patch
+URL:		http://code.google.com/p/ibus/
+BuildRequires:	autoconf
+BuildRequires:	automake >= 1:1.10
+BuildRequires:	gettext-devel >= 0.16.1
 BuildRequires:	gnome-common
 BuildRequires:	libtool
 BuildRequires:	m17n-lib-devel
 BuildRequires:	pkgconfig
-BuildRequires:	gtk+3-devel
-BuildRequires:	ibus-devel >= 1.3.0
+BuildRequires:	gtk+3-devel >= 3.0
+BuildRequires:	ibus-devel >= 1.4.0
 BuildRequires:	libxklavier-devel
-Requires:	ibus >= 1.3.0
+BuildRequires:	xorg-lib-libX11-devel
+Requires:	ibus >= 1.4.0
 Requires:	iok > 1.3.1
 Requires:	m17n-lib
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -34,17 +38,25 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 M17N engine for IBus input platform. It allows input of many languages
 using the input table maps from m17n-db.
 
+%description -l pl.UTF-8
+Silnik M17N dla platformy wprowadzania znaków IBus. Pozwala na
+wprowadzanie znaków z wielu języków przy użyciu map tablic wejściowych
+z m17n-db.
+
 %prep
 %setup -q
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
-%patch3 -p1
 
 %build
+%{__libtoolize}
 %{__aclocal} -I m4
 %{__autoconf}
+%{__autoheader}
+%{__automake}
 %configure \
+	--disable-silent-rules \
 	%{?with_bridge_hotkey:--with-hotkeys} \
 	--with-gtk=3.0
 
@@ -55,6 +67,9 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+# not yet - only single, empty file exists
+#find_lang %{name}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -64,4 +79,4 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libexecdir}/ibus-engine-m17n
 %attr(755,root,root) %{_libexecdir}/ibus-setup-m17n
 %{_datadir}/ibus-m17n
-%{_datadir}/ibus/component/*
+%{_datadir}/ibus/component/m17n.xml
diff --git a/ibus-m17n-HEAD.patch b/ibus-m17n-HEAD.patch
deleted file mode 100644
index 9c3f6bd..0000000
--- a/ibus-m17n-HEAD.patch
+++ /dev/null
@@ -1,281 +0,0 @@
-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);
-     }
- }
diff --git a/ibus-m17n-xkb-options.patch b/ibus-m17n-xkb-options.patch
index 551f1c8..bc0e50a 100644
--- a/ibus-m17n-xkb-options.patch
+++ b/ibus-m17n-xkb-options.patch
@@ -18,11 +18,9 @@ Index: ibus-m17n-1.3.2/configure.ac
  # 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 = \
+--- ibus-m17n-1.3.4/src/Makefile.am.orig	2012-09-16 08:11:40.210367056 +0200
++++ ibus-m17n-1.3.4/src/Makefile.am	2012-09-16 08:18:31.153691826 +0200
+@@ -65,10 +65,15 @@
  	engine.c \
  	engine.h \
  	$(NULL)
@@ -31,130 +29,112 @@ Index: ibus-m17n-1.3.2/src/Makefile.am
 +	$(AM_CFLAGS) \
 +	$(NULL)
  ibus_engine_m17n_LDADD = \
- 	libm17ncommon.a \
+ 	libm17ncommon.la \
  	@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>
+--- ibus-m17n-1.3.4/src/default.xml.in.in.orig	2012-09-16 08:11:40.210367056 +0200
++++ ibus-m17n-1.3.4/src/default.xml.in.in	2012-09-16 08:25:48.153682716 +0200
+@@ -73,6 +73,7 @@
+ 	<engine>
+ 		<name>m17n:si:*</name>
+ 		<rank>1</rank>
++		<xkb-options>lv3:ralt_switch</xkb-options>
+ 	</engine>
+ 	<engine>
+ 		<name>m17n:ta:*</name>
+@@ -89,16 +90,19 @@
+ 		<rank>2</rank>
  	</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>
+@@ -109,48 +113,56 @@
+ 		<rank>2</rank>
  	</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>
+ 		<rank>2</rank>
  	</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>
+ 		<rank>2</rank>
  	</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>
+ 		<rank>2</rank>
  	</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
+ 	<!-- Assign lower rank to Sinhala Samanala since it is a
+ 	     non-keyboard input method in Sinhala. -->
+--- ibus-m17n-1.3.4/src/engine.c.orig	2012-09-16 08:11:40.203700392 +0200
++++ ibus-m17n-1.3.4/src/engine.c	2012-09-16 08:42:36.946995034 +0200
 @@ -6,6 +6,10 @@
  #include <ibus.h>
  #include <m17n.h>
@@ -166,7 +146,7 @@ Index: ibus-m17n-1.3.2/src/engine.c
  #include "m17nutil.h"
  #include "engine.h"
  
-@@ -38,6 +42,10 @@ struct _IBusM17NEngineClass {
+@@ -39,6 +43,10 @@ struct _IBusM17NEngineClass {
      gboolean use_iok;
  
      MInputMethod *im;
@@ -177,7 +157,7 @@ Index: ibus-m17n-1.3.2/src/engine.c
  };
  
  /* functions prototype */
-@@ -105,12 +113,90 @@ static IBusEngineClass *parent_class = N
+@@ -102,12 +110,90 @@ static IBusEngineClass *parent_class = N
  
  static IBusConfig      *config = NULL;
  
@@ -268,7 +248,7 @@ Index: ibus-m17n-1.3.2/src/engine.c
      ibus_m17n_init_common ();
  }
  
-@@ -299,6 +385,25 @@ ibus_m17n_engine_class_init (IBusM17NEng
+@@ -316,6 +402,25 @@ ibus_m17n_engine_class_init (IBusM17NEng
                        G_CALLBACK(ibus_m17n_config_value_changed),
                        klass);
  
@@ -294,7 +274,7 @@ Index: ibus-m17n-1.3.2/src/engine.c
      klass->im = NULL;
  }
  
-@@ -412,6 +517,9 @@ ibus_m17n_engine_constructor (GType     
+@@ -417,6 +522,9 @@ ibus_m17n_engine_constructor (GType
      IBusM17NEngine *m17n;
      GObjectClass *object_class;
      IBusM17NEngineClass *klass;
@@ -304,7 +284,7 @@ Index: ibus-m17n-1.3.2/src/engine.c
  
      m17n = (IBusM17NEngine *) G_OBJECT_CLASS (parent_class)->constructor (type,
                                                         n_construct_params,
-@@ -499,6 +607,11 @@ ibus_m17n_engine_destroy (IBusM17NEngine
+@@ -504,6 +612,11 @@ ibus_m17n_engine_destroy (IBusM17NEngine
          m17n->context = NULL;
      }
  
@@ -316,10 +296,10 @@ Index: ibus-m17n-1.3.2/src/engine.c
      IBUS_OBJECT_CLASS (parent_class)->destroy ((IBusObject *)m17n);
  }
  
-@@ -735,6 +848,19 @@ ibus_m17n_engine_enable (IBusEngine *eng
-     ibus_engine_get_surrounding_text (engine, &text, &cursor_pos);
-     g_object_unref (text);
- #endif  /* HAVE_IBUS_ENGINE_GET_SURROUNDING_TEXT */
+@@ -739,6 +852,19 @@ ibus_m17n_engine_enable (IBusEngine *eng
+     /* Issue a dummy ibus_engine_get_surrounding_text() call to tell
+        input context that we will use surrounding-text. */
+     ibus_engine_get_surrounding_text (engine, NULL, NULL, NULL);
 +
 +#if HAVE_LIBXKLAVIER
 +    GObjectClass *object_class;
@@ -336,7 +316,7 @@ Index: ibus-m17n-1.3.2/src/engine.c
  }
  
  static void
-@@ -744,6 +870,17 @@ ibus_m17n_engine_disable (IBusEngine *en
+@@ -748,6 +874,17 @@ ibus_m17n_engine_disable (IBusEngine *en
  
      ibus_m17n_engine_focus_out (engine);
      parent_class->disable (engine);
diff --git a/ibus-m17n-xx-icon-symbol.patch b/ibus-m17n-xx-icon-symbol.patch
index 43dac05..03d73dd 100644
--- a/ibus-m17n-xx-icon-symbol.patch
+++ b/ibus-m17n-xx-icon-symbol.patch
@@ -3,13 +3,12 @@ Index: ibus-m17n-1.3.2/configure.ac
 ===================================================================
 --- ibus-m17n-1.3.2.orig/configure.ac
 +++ ibus-m17n-1.3.2/configure.ac
-@@ -122,6 +122,10 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GET
+@@ -122,6 +122,9 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GET
  AM_GNU_GETTEXT([external])
  AM_GNU_GETTEXT_VERSION(0.16.1)
  
 +# hotkeys in component xml
 +IBUS_WITH_HOTKEYS
-+IBUS_SET_SYMBOL([?])
 +
  
  # OUTPUT files
@@ -71,60 +70,46 @@ Index: ibus-m17n-1.3.2/m4/ibus.m4
 +  fi
 +  AC_SUBST(IBUS_SYMBOL_XML)
 +])
-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
-@@ -254,5 +254,7 @@
- 		<name>m17n:*</name>
+--- ibus-m17n-1.3.4/src/default.xml.in.in.orig	2012-09-16 08:53:48.583647692 +0200
++++ ibus-m17n-1.3.4/src/default.xml.in.in	2012-09-16 09:00:43.100305721 +0200
+@@ -11,6 +11,7 @@
  		<rank>0</rank>
  		<preedit-highlight>FALSE</preedit-highlight>
+ 		<symbol></symbol>
 +		@IBUS_HOTKEYS_XML@
-+		@IBUS_SYMBOL_XML@
  	</engine>
- </engines>
-Index: ibus-m17n-1.3.2/src/m17nutil.c
-===================================================================
---- ibus-m17n-1.3.2.orig/src/m17nutil.c
-+++ ibus-m17n-1.3.2/src/m17nutil.c
-@@ -122,6 +122,8 @@ ibus_m17n_engine_new (MSymbol  lang,
-                                            "icon",        engine_icon ? engine_icon : "",
+ 	<!-- Indic engines should be selected by default:
+ 	     https://bugzilla.redhat.com/show_bug.cgi?id=640896 -->
+--- ibus-m17n-1.3.4/src/m17nutil.c.orig	2012-09-16 08:53:48.576981023 +0200
++++ ibus-m17n-1.3.4/src/m17nutil.c	2012-09-16 10:01:33.243562973 +0200
+@@ -136,6 +136,7 @@ ibus_m17n_engine_new (MSymbol  lang,
                                             "layout",      "us",
                                             "rank",        config->rank,
+                                            "symbol",      config->symbol ? config->symbol : "",
 +                                           "hotkeys",     config->hotkeys ? config->hotkeys : "",
-+                                           "symbol",      config->symbol ? config->symbol : "",
+                                            "setup",       engine_setup,
                                             NULL);
- #else
-     engine = ibus_engine_desc_new (engine_name,
-@@ -282,6 +284,14 @@ ibus_m17n_engine_config_parse_xml_node (
-             cnode->config.rank = atoi (sub_node->text);
+ 
+@@ -310,6 +311,10 @@ ibus_m17n_engine_config_parse_xml_node (
+             cnode->mask |= ENGINE_CONFIG_SYMBOL_MASK;
              continue;
          }
 +        if (g_strcmp0 (sub_node->name , "hotkeys") == 0) {
 +            cnode->config.hotkeys = g_strdup (sub_node->text);
 +            continue;
 +        }
-+        if (g_strcmp0 (sub_node->name , "symbol") == 0) {
-+            cnode->config.symbol = g_strdup (sub_node->text);
-+            continue;
-+        }
-         if (g_strcmp0 (sub_node->name , "preedit-highlight") == 0) {
-             if (g_ascii_strcasecmp ("TRUE", sub_node->text) == 0)
-                 cnode->config.preedit_highlight = TRUE;
-Index: ibus-m17n-1.3.2/src/m17nutil.h
-===================================================================
---- ibus-m17n-1.3.2.orig/src/m17nutil.h
-+++ ibus-m17n-1.3.2/src/m17nutil.h
-@@ -14,6 +14,12 @@ struct _IBusM17NEngineConfig {
-     /* engine rank */
-     gint rank;
+         if (g_strcmp0 (sub_node->name , "longname") == 0) {
+             cnode->config.longname = g_strdup (sub_node->text);
+             cnode->mask |= ENGINE_CONFIG_LONGNAME_MASK;
+--- ibus-m17n-1.3.4/src/m17nutil.h.orig	2012-09-16 08:53:48.580314357 +0200
++++ ibus-m17n-1.3.4/src/m17nutil.h	2012-09-16 09:06:33.490298415 +0200
+@@ -17,6 +17,9 @@ struct _IBusM17NEngineConfig {
+     /* symbol */
+     gchar *symbol;
  
 +    /* hotkeys */
 +    gchar *hotkeys;
 +
-+    /* symbol */
-+    gchar *symbol;
-+
-     /* whether to highlight preedit */
-     gboolean preedit_highlight;
+     /* overridding longname shown on panel */
+     gchar *longname;
  
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ibus-m17n.git/commitdiff/fd7a42858a47afa05401bcfe5851da3cf5bde3f7



More information about the pld-cvs-commit mailing list