rpms/ibus-m17n/F-10 ibus-m17n-HEAD.patch, NONE, 1.1 ibus-m17n-iok.patch, NONE, 1.1 .cvsignore, 1.8, 1.9 ibus-m17n.spec, 1.9, 1.10 sources, 1.8, 1.9
Huang Peng
phuang at fedoraproject.org
Mon Apr 27 07:01:02 UTC 2009
- Previous message: rpms/ibus-chewing/F-10 .cvsignore, 1.9, 1.10 ibus-chewing.spec, 1.9, 1.10 sources, 1.10, 1.11
- Next message: rpms/ibus-table/F-10 ibus-table-1.1.0.20090316-1.bz490396.no_speedmeter.patch, NONE, 1.1 ibus-table-pkgconfig-noarch.patch, NONE, 1.1 .cvsignore, 1.5, 1.6 ibus-table.spec, 1.4, 1.5 sources, 1.5, 1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: phuang
Update of /cvs/pkgs/rpms/ibus-m17n/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29942
Modified Files:
.cvsignore ibus-m17n.spec sources
Added Files:
ibus-m17n-HEAD.patch ibus-m17n-iok.patch
Log Message:
Port F-11 branch to F-10
ibus-m17n-HEAD.patch:
--- NEW FILE ibus-m17n-HEAD.patch ---
diff --git a/src/engine.c b/src/engine.c
index 5c5f56f..06501bb 100644
--- a/src/engine.c
+++ b/src/engine.c
@@ -53,9 +53,10 @@ static void ibus_m17n_engine_page_up (IBusEngine *engine);
static void ibus_m17n_engine_page_down (IBusEngine *engine);
static void ibus_m17n_engine_cursor_up (IBusEngine *engine);
static void ibus_m17n_engine_cursor_down (IBusEngine *engine);
-static void ibus_m17n_property_activate (IBusEngine *engine,
+static void ibus_m17n_engine_property_activate
+ (IBusEngine *engine,
const gchar *prop_name,
- gint prop_state);
+ guint prop_state);
static void ibus_m17n_engine_property_show
(IBusEngine *engine,
const gchar *prop_name);
@@ -126,6 +127,7 @@ 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;
}
static void
@@ -277,47 +279,67 @@ MSymbol
ibus_m17n_key_event_to_symbol (guint keyval,
guint modifiers)
{
- GString *key;
- MSymbol mkey = Mnil;
+ GString *keysym;
+ MSymbol mkeysym = Mnil;
guint mask = 0;
+ if (keyval >= IBUS_Shift_L && keyval <= IBUS_Hyper_R) {
+ return Mnil;
+ }
+
+ keysym = g_string_new ("");
+
if (keyval >= IBUS_space && keyval <= IBUS_asciitilde) {
+ gint c = keyval;
if (keyval == IBUS_space && modifiers & IBUS_SHIFT_MASK)
mask |= IBUS_SHIFT_MASK;
if (modifiers & IBUS_CONTROL_MASK) {
- if (keyval >= IBUS_a && keyval <= IBUS_z)
- keyval += IBUS_A - IBUS_a;
+ if (c >= IBUS_a && c <= IBUS_z)
+ c += IBUS_A - IBUS_a;
mask |= IBUS_CONTROL_MASK;
}
+
+ g_string_append_c (keysym, c);
}
- else if (keyval >= IBUS_Shift_L && keyval <= IBUS_Hyper_R) {
- return Mnil;
+ else {
+ mask |= modifiers & (IBUS_CONTROL_MASK | IBUS_SHIFT_MASK);
+ g_string_append (keysym, ibus_keyval_name (keyval));
+ if (keysym->len == 0) {
+ g_string_free (keysym, TRUE);
+ return Mnil;
+ }
}
- mask |= modifiers & (IBUS_MOD1_MASK | IBUS_META_MASK);
+ mask |= modifiers & (IBUS_MOD1_MASK |
+ IBUS_META_MASK |
+ IBUS_SUPER_MASK |
+ IBUS_HYPER_MASK);
- key = g_string_new ("");
+ if (mask & IBUS_HYPER_MASK) {
+ g_string_prepend (keysym, "H-");
+ }
+ if (mask & IBUS_SUPER_MASK) {
+ g_string_prepend (keysym, "s-");
+ }
if (mask & IBUS_MOD1_MASK) {
- g_string_append (key, "A-");
+ g_string_prepend (keysym, "A-");
}
if (mask & IBUS_META_MASK) {
- g_string_append (key, "M-");
+ g_string_prepend (keysym, "M-");
}
if (mask & IBUS_CONTROL_MASK) {
- g_string_append (key, "C-");
+ g_string_prepend (keysym, "C-");
}
if (mask & IBUS_SHIFT_MASK) {
- g_string_append (key, "S-");
+ g_string_prepend (keysym, "S-");
}
- g_string_append (key, ibus_keyval_name (keyval));
-
- mkey = msymbol (key->str);
- g_string_free (key, TRUE);
+ mkeysym = msymbol (keysym->str);
+ g_string_free (keysym, TRUE);
- return mkey;
+ return mkeysym;
}
static gboolean
@@ -457,6 +479,15 @@ ibus_m17n_engine_cursor_down (IBusEngine *engine)
}
static void
+ibus_m17n_engine_property_activate (IBusEngine *engine,
+ const gchar *prop_name,
+ guint prop_state)
+{
+ g_debug ("prop_name=%s, prop_state=%d", prop_name, prop_state);
+ parent_class->property_activate (engine, prop_name, prop_state);
+}
+
+static void
ibus_m17n_engine_update_lookup_table (IBusM17NEngine *m17n)
{
ibus_lookup_table_clear (m17n->table);
ibus-m17n-iok.patch:
--- NEW FILE ibus-m17n-iok.patch ---
--- src/engine.c.orig 2009-03-02 10:54:14.000000000 +0530
+++ src/engine.c 2009-03-02 13:12:42.000000000 +0530
@@ -17,6 +17,8 @@
IBusLookupTable *table;
IBusProperty *status_prop;
IBusPropList *prop_list;
+ IBusProperty *show_iok_prop;
+ gchar *keymap_name;
};
struct _IBusM17NEngineClass {
@@ -127,12 +129,14 @@
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
ibus_m17n_engine_init (IBusM17NEngine *m17n)
{
+ IBusText *text;
+
m17n->status_prop = ibus_property_new ("status",
PROP_TYPE_NORMAL,
NULL,
@@ -143,8 +147,21 @@
0,
NULL);
+ text = ibus_text_new_from_string ("iok");
+ m17n->show_iok_prop = ibus_property_new ("iok",
+ PROP_TYPE_NORMAL,
+ text,
+ "/usr/share/pixmaps/iok.xpm",
+ text,
+ TRUE,
+ FALSE,
+ 0,
+ NULL);
+ g_object_unref (text);
+
m17n->prop_list = ibus_prop_list_new ();
ibus_prop_list_append (m17n->prop_list, m17n->status_prop);
+ ibus_prop_list_append (m17n->prop_list, m17n->show_iok_prop);
m17n->table = ibus_lookup_table_new (9, 0, TRUE, TRUE);
m17n->context = NULL;
@@ -165,6 +182,7 @@
engine_name = ibus_engine_get_name ((IBusEngine *) m17n);
g_assert (engine_name);
+ m17n->keymap_name = g_strdup (engine_name);
if (im_table == NULL) {
im_table = g_hash_table_new_full (g_str_hash,
@@ -185,7 +203,9 @@
lang = strv[0];
name = strv[1];
-
+
+ if(strcmp(name,"inscript")==0)
+ ibus_property_set_visible(m17n->show_iok_prop,TRUE);
im = minput_open_im (msymbol (lang), msymbol (name), NULL);
if (im != NULL) {
mplist_put (im->driver.callback_list, Minput_preedit_start, ibus_m17n_engine_callback);
@@ -247,6 +267,7 @@
m17n->prop_list = NULL;
}
+
if (m17n->status_prop) {
g_object_unref (m17n->status_prop);
m17n->status_prop = NULL;
@@ -398,6 +419,7 @@
IBusM17NEngine *m17n = (IBusM17NEngine *) engine;
ibus_engine_register_properties (engine, m17n->prop_list);
+
ibus_m17n_engine_process_key (m17n, msymbol ("input-focus-in"));
parent_class->focus_in (engine);
@@ -483,7 +505,20 @@
const gchar *prop_name,
guint prop_state)
{
- g_debug ("prop_name=%s, prop_state=%d", prop_name, prop_state);
+ gchar *langi;
+ gchar **strv;
+ gchar cmd[80];
+
+ IBusM17NEngine *m17n = (IBusM17NEngine *) engine;
+
+ strv = g_strsplit (m17n->keymap_name, ":", 2);
+ g_assert (g_strv_length (strv) == 2);
+ langi = strv[0];
+
+ sprintf(cmd,"/usr/bin/iok -n %s",langi);
+ g_debug ("keymap name = %s,prop_name=%s, prop_state=%d",m17n->keymap_name, prop_name, prop_state);
+
+ g_spawn_command_line_async(cmd, NULL );
parent_class->property_activate (engine, prop_name, prop_state);
}
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/ibus-m17n/F-10/.cvsignore,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- .cvsignore 13 Oct 2008 06:24:30 -0000 1.8
+++ .cvsignore 27 Apr 2009 07:00:32 -0000 1.9
@@ -1 +1 @@
-ibus-m17n-0.1.1.20081013.tar.gz
+ibus-m17n-1.1.0.20090211.tar.gz
Index: ibus-m17n.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ibus-m17n/F-10/ibus-m17n.spec,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ibus-m17n.spec 16 Oct 2008 04:24:37 -0000 1.9
+++ ibus-m17n.spec 27 Apr 2009 07:00:32 -0000 1.10
@@ -1,30 +1,34 @@
-%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
-%define mod_path ibus-0.1
Name: ibus-m17n
-Version: 0.1.1.20081013
-Release: 3%{?dist}
+Version: 1.1.0.20090211
+Release: 4%{?dist}
Summary: The M17N engine for IBus platform
License: GPLv2+
Group: System Environment/Libraries
URL: http://code.google.com/p/ibus/
Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz
+Patch0: ibus-m17n-HEAD.patch
+Patch1: ibus-m17n-iok.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gettext-devel
BuildRequires: libtool
-BuildRequires: python-devel
-BuildRequires: swig
BuildRequires: pkgconfig
BuildRequires: m17n-lib-devel
+BuildRequires: ibus-devel
+
Requires: ibus
Requires: m17n-lib
+Requires: iok > 1.3.1
%description
-M17N engine for IBus input platform. It allows input of many languages using
-input maps from m17n-db.
+M17N engine for IBus input platform. It allows input of many launguaes using
+the input table maps from m17n-db.
%prep
%setup -q
+%patch0 -p1
+%patch1 -p0
%build
%configure --disable-static
@@ -34,10 +38,6 @@
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=${RPM_BUILD_ROOT} install
-rm -f $RPM_BUILD_ROOT%{python_sitearch}/_m17n.la
-
-# .engine files are now in m17n-db and m17n-contrib
-rm -f $RPM_BUILD_ROOT%{_datadir}/ibus/engine/m17n-*.engine
%find_lang %{name}
@@ -47,13 +47,30 @@
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING README
-%{python_sitearch}/_m17n.so
-%{python_sitearch}/m17n.py*
-%dir %{_datadir}/ibus-m17n
-%{_datadir}/ibus-m17n/*
-%{_bindir}/ibus-engine-m17n
+%{_datadir}/ibus-m17n
+%{_libexecdir}/ibus-engine-m17n
+%{_datadir}/ibus/component/*
%changelog
+* Thu Mar 05 2009 Parag <pnemade at redhat.com> - 1.1.0.20090211-4
+- Add iok support to ibus-m17n.
+
+* Tue Feb 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.1.0.20090211-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Wed Feb 18 2009 Huang Peng <shawn.p.huang at gmail.com> - 1.1.0.20090211-2
+- Add patch ibus-m17n-HEAD.patch from upstream git tree.
+- Make Control + Alt + ... available. (#482789)
+
+* Wed Feb 11 2009 Huang Peng <shawn.p.huang at gmail.com> - 1.1.0.20090211-1
+- Update to 1.1.0.20090211.
+
+* Thu Feb 05 2009 Huang Peng <shawn.p.huang at gmail.com> - 1.1.0.20090205-1
+- Update to 1.1.0.20090205.
+
+* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm at gmail.com> - 0.1.1.20081013-4
+- Rebuild for Python 2.6
+
* Thu Oct 16 2008 Jens Petersen <petersen at redhat.com> - 0.1.1.20081013-3
- move the .engine files to m17n-db and m17n-contrib (#466410)
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/ibus-m17n/F-10/sources,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- sources 13 Oct 2008 06:24:30 -0000 1.8
+++ sources 27 Apr 2009 07:00:32 -0000 1.9
@@ -1 +1 @@
-c3a126998697322fbd115882a0f3f60d ibus-m17n-0.1.1.20081013.tar.gz
+fd3da5bcf3c58aa5266a31882040ca41 ibus-m17n-1.1.0.20090211.tar.gz
- Previous message: rpms/ibus-chewing/F-10 .cvsignore, 1.9, 1.10 ibus-chewing.spec, 1.9, 1.10 sources, 1.10, 1.11
- Next message: rpms/ibus-table/F-10 ibus-table-1.1.0.20090316-1.bz490396.no_speedmeter.patch, NONE, 1.1 ibus-table-pkgconfig-noarch.patch, NONE, 1.1 .cvsignore, 1.5, 1.6 ibus-table.spec, 1.4, 1.5 sources, 1.5, 1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list