Port changes from F-12
This commit is contained in:
parent
6f37f589fd
commit
a08317de05
@ -1 +1 @@
|
|||||||
ibus-m17n-1.2.0.20090617.tar.gz
|
ibus-m17n-1.2.0.20091120.tar.gz
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
--- src/engine.c.orig 2009-03-02 10:54:14.000000000 +0530
|
diff --git a/src/engine.c b/src/engine.c
|
||||||
+++ src/engine.c 2009-03-02 13:12:42.000000000 +0530
|
index d6ac852..6427a55 100644
|
||||||
@@ -17,6 +17,8 @@
|
--- a/src/engine.c
|
||||||
|
+++ b/src/engine.c
|
||||||
|
@@ -17,6 +17,8 @@ struct _IBusM17NEngine {
|
||||||
IBusLookupTable *table;
|
IBusLookupTable *table;
|
||||||
IBusProperty *status_prop;
|
IBusProperty *status_prop;
|
||||||
IBusPropList *prop_list;
|
IBusPropList *prop_list;
|
||||||
@ -9,14 +11,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct _IBusM17NEngineClass {
|
struct _IBusM17NEngineClass {
|
||||||
@@ -127,12 +129,14 @@
|
@@ -134,6 +136,8 @@ ibus_m17n_engine_class_init (IBusM17NEngineClass *klass)
|
||||||
engine_class->cursor_up = ibus_m17n_engine_cursor_up;
|
|
||||||
engine_class->cursor_down = ibus_m17n_engine_cursor_down;
|
|
||||||
|
|
||||||
- // engine_class->property_activate = ibus_m17n_engine_property_activate;
|
|
||||||
+ engine_class->property_activate = ibus_m17n_engine_property_activate;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ibus_m17n_engine_init (IBusM17NEngine *m17n)
|
ibus_m17n_engine_init (IBusM17NEngine *m17n)
|
||||||
{
|
{
|
||||||
@ -25,7 +20,7 @@
|
|||||||
m17n->status_prop = ibus_property_new ("status",
|
m17n->status_prop = ibus_property_new ("status",
|
||||||
PROP_TYPE_NORMAL,
|
PROP_TYPE_NORMAL,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -143,8 +147,21 @@
|
@@ -144,8 +148,21 @@ ibus_m17n_engine_init (IBusM17NEngine *m17n)
|
||||||
0,
|
0,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
@ -47,26 +42,61 @@
|
|||||||
|
|
||||||
m17n->table = ibus_lookup_table_new (9, 0, TRUE, TRUE);
|
m17n->table = ibus_lookup_table_new (9, 0, TRUE, TRUE);
|
||||||
m17n->context = NULL;
|
m17n->context = NULL;
|
||||||
@@ -165,6 +182,7 @@
|
@@ -159,6 +176,7 @@ ibus_m17n_engine_constructor (GType type,
|
||||||
|
IBusM17NEngine *m17n;
|
||||||
|
MInputMethod *im;
|
||||||
|
const gchar *engine_name;
|
||||||
|
+ gchar **strv;
|
||||||
|
|
||||||
|
m17n = (IBusM17NEngine *) G_OBJECT_CLASS (parent_class)->constructor (type,
|
||||||
|
n_construct_params,
|
||||||
|
@@ -166,6 +184,14 @@ ibus_m17n_engine_constructor (GType type,
|
||||||
|
|
||||||
engine_name = ibus_engine_get_name ((IBusEngine *) m17n);
|
engine_name = ibus_engine_get_name ((IBusEngine *) m17n);
|
||||||
g_assert (engine_name);
|
g_assert (engine_name);
|
||||||
+ m17n->keymap_name = g_strdup (engine_name);
|
+ m17n->keymap_name = g_strdup (engine_name);
|
||||||
|
+
|
||||||
|
+ strv = g_strsplit (engine_name, ":", 2);
|
||||||
|
+ g_assert (g_strv_length (strv) == 2);
|
||||||
|
+
|
||||||
|
+ /* show iok icon for inscript */
|
||||||
|
+ if(strcmp (strv[1], "inscript") == 0 || strcmp (strv[1] , "inscript2") == 0)
|
||||||
|
+ ibus_property_set_visible (m17n->show_iok_prop,TRUE);
|
||||||
|
|
||||||
if (im_table == NULL) {
|
if (im_table == NULL) {
|
||||||
im_table = g_hash_table_new_full (g_str_hash,
|
im_table = g_hash_table_new_full (g_str_hash,
|
||||||
@@ -185,7 +203,9 @@
|
@@ -176,18 +202,7 @@ ibus_m17n_engine_constructor (GType type,
|
||||||
|
|
||||||
lang = strv[0];
|
im = (MInputMethod *) g_hash_table_lookup (im_table, engine_name);
|
||||||
name = strv[1];
|
if (im == NULL) {
|
||||||
|
- gchar *lang;
|
||||||
|
- gchar *name;
|
||||||
|
- gchar **strv;
|
||||||
-
|
-
|
||||||
+
|
- strv = g_strsplit (engine_name, ":", 2);
|
||||||
+ if(strcmp(name,"inscript")==0)
|
-
|
||||||
+ ibus_property_set_visible(m17n->show_iok_prop,TRUE);
|
- g_assert (g_strv_length (strv) == 2);
|
||||||
im = minput_open_im (msymbol (lang), msymbol (name), NULL);
|
-
|
||||||
|
- lang = strv[0];
|
||||||
|
- name = strv[1];
|
||||||
|
-
|
||||||
|
- im = minput_open_im (msymbol (lang), msymbol (name), NULL);
|
||||||
|
+ im = minput_open_im (msymbol (strv[0]), msymbol (strv[1]), NULL);
|
||||||
if (im != NULL) {
|
if (im != NULL) {
|
||||||
mplist_put (im->driver.callback_list, Minput_preedit_start, ibus_m17n_engine_callback);
|
mplist_put (im->driver.callback_list, Minput_preedit_start, ibus_m17n_engine_callback);
|
||||||
@@ -247,6 +267,7 @@
|
mplist_put (im->driver.callback_list, Minput_preedit_draw, ibus_m17n_engine_callback);
|
||||||
|
@@ -207,9 +222,9 @@ ibus_m17n_engine_constructor (GType type,
|
||||||
|
g_hash_table_insert (im_table, g_strdup (engine_name), im);
|
||||||
|
}
|
||||||
|
|
||||||
|
- g_strfreev (strv);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ g_strfreev (strv);
|
||||||
|
if (im == NULL) {
|
||||||
|
g_warning ("Can not find m17n keymap %s", engine_name);
|
||||||
|
g_object_unref (m17n);
|
||||||
|
@@ -231,6 +246,7 @@ ibus_m17n_engine_destroy (IBusM17NEngine *m17n)
|
||||||
m17n->prop_list = NULL;
|
m17n->prop_list = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,7 +104,7 @@
|
|||||||
if (m17n->status_prop) {
|
if (m17n->status_prop) {
|
||||||
g_object_unref (m17n->status_prop);
|
g_object_unref (m17n->status_prop);
|
||||||
m17n->status_prop = NULL;
|
m17n->status_prop = NULL;
|
||||||
@@ -398,6 +419,7 @@
|
@@ -383,6 +399,7 @@ ibus_m17n_engine_focus_in (IBusEngine *engine)
|
||||||
IBusM17NEngine *m17n = (IBusM17NEngine *) engine;
|
IBusM17NEngine *m17n = (IBusM17NEngine *) engine;
|
||||||
|
|
||||||
ibus_engine_register_properties (engine, m17n->prop_list);
|
ibus_engine_register_properties (engine, m17n->prop_list);
|
||||||
@ -82,12 +112,10 @@
|
|||||||
ibus_m17n_engine_process_key (m17n, msymbol ("input-focus-in"));
|
ibus_m17n_engine_process_key (m17n, msymbol ("input-focus-in"));
|
||||||
|
|
||||||
parent_class->focus_in (engine);
|
parent_class->focus_in (engine);
|
||||||
@@ -483,7 +505,20 @@
|
@@ -468,6 +485,19 @@ ibus_m17n_engine_property_activate (IBusEngine *engine,
|
||||||
const gchar *prop_name,
|
const gchar *prop_name,
|
||||||
guint prop_state)
|
guint prop_state)
|
||||||
{
|
{
|
||||||
- g_debug ("prop_name=%s, prop_state=%d", prop_name, prop_state);
|
|
||||||
+ gchar *langi;
|
|
||||||
+ gchar **strv;
|
+ gchar **strv;
|
||||||
+ gchar cmd[80];
|
+ gchar cmd[80];
|
||||||
+
|
+
|
||||||
@ -95,12 +123,12 @@
|
|||||||
+
|
+
|
||||||
+ strv = g_strsplit (m17n->keymap_name, ":", 2);
|
+ strv = g_strsplit (m17n->keymap_name, ":", 2);
|
||||||
+ g_assert (g_strv_length (strv) == 2);
|
+ g_assert (g_strv_length (strv) == 2);
|
||||||
+ langi = strv[0];
|
|
||||||
+
|
+
|
||||||
+ sprintf(cmd,"/usr/bin/iok -n %s",langi);
|
+ sprintf (cmd, "/usr/bin/iok -n %s", strv[0]);
|
||||||
+ g_debug ("keymap name = %s,prop_name=%s, prop_state=%d",m17n->keymap_name, prop_name, prop_state);
|
+ g_debug ("keymap name = %s,prop_name=%s, prop_state=%d", m17n->keymap_name, prop_name, prop_state);
|
||||||
|
+ g_strfreev (strv);
|
||||||
+
|
+
|
||||||
+ g_spawn_command_line_async(cmd, NULL );
|
+ g_spawn_command_line_async(cmd, NULL);
|
||||||
parent_class->property_activate (engine, prop_name, prop_state);
|
parent_class->property_activate (engine, prop_name, prop_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,16 +1,15 @@
|
|||||||
%define require_ibus_version 1.2.0
|
%define require_ibus_version 1.2.0
|
||||||
|
|
||||||
Name: ibus-m17n
|
Name: ibus-m17n
|
||||||
Version: 1.2.0.20090617
|
Version: 1.2.0.20091120
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: The M17N engine for IBus platform
|
Summary: The M17N engine for IBus platform
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
URL: http://code.google.com/p/ibus/
|
URL: http://code.google.com/p/ibus/
|
||||||
Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz
|
Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
# Patch0: ibus-m17n-HEAD.patch
|
Patch0: ibus-m17n-iok.patch
|
||||||
# Patch1: ibus-m17n-iok.patch
|
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: gettext-devel
|
BuildRequires: gettext-devel
|
||||||
@ -24,13 +23,12 @@ Requires: m17n-lib
|
|||||||
Requires: iok > 1.3.1
|
Requires: iok > 1.3.1
|
||||||
|
|
||||||
%description
|
%description
|
||||||
M17N engine for IBus input platform. It allows input of many lauguages using
|
M17N engine for IBus input platform. It allows input of many launguaes using
|
||||||
the input table maps from m17n-db.
|
the input table maps from m17n-db.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
# %patch0 -p1
|
%patch0 -p1
|
||||||
# %patch1 -p0
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --disable-static
|
%configure --disable-static
|
||||||
@ -54,6 +52,19 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_datadir}/ibus/component/*
|
%{_datadir}/ibus/component/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Nov 20 2009 Peng Huang <shawn.p.huang@gmail.com> - 1.2.0.20091120-1
|
||||||
|
- Update to 1.2.0.20091120.
|
||||||
|
- Fix bug 530976
|
||||||
|
|
||||||
|
* Fri Oct 23 2009 Peng Huang <shawn.p.huang@gmail.com> - 1.2.0.20090617-5
|
||||||
|
- Update iok patch to fix bug 530493.
|
||||||
|
|
||||||
|
* Wed Oct 14 2009 Peng Huang <shawn.p.huang@gmail.com> - 1.2.0.20090617-4
|
||||||
|
- Update iok patch to fix build error.
|
||||||
|
|
||||||
|
* Tue Oct 13 2009 Parag <pnemade@redhat.com> - 1.2.0.20090617-3
|
||||||
|
- Re-enable iok support to ibus-m17n.
|
||||||
|
|
||||||
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0.20090617-2
|
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0.20090617-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user