From 5767ba24d8f790ffa1c27ea19d9eefdf9a975df1 Mon Sep 17 00:00:00 2001 From: Pravin Satpute Date: Jun 11 2010 05:28:59 +0000 Subject: - added auxiliary text support, for space hit - fixed bug 602942 --- diff --git a/bug-602942.patch b/bug-602942.patch new file mode 100644 index 0000000..98dcebe --- /dev/null +++ b/bug-602942.patch @@ -0,0 +1,72 @@ +diff -rup ibus-rawcode-1.3.0.20100421/src/engine.c ibus-rawcode-1.3.0.20100421_mod/src/engine.c +--- ibus-rawcode-1.3.0.20100421/src/engine.c 2010-04-21 12:29:55.000000000 +0530 ++++ ibus-rawcode-1.3.0.20100421_mod/src/engine.c 2010-06-09 17:14:13.200330436 +0530 +@@ -298,6 +298,7 @@ ibus_rawcode_engine_process_key_event (I + ibus_engine_commit_text ((IBusEngine *)rawcode, text); + ibus_lookup_table_clear (rawcode->table); + ibus_engine_hide_lookup_table((IBusEngine *)rawcode); ++ ibus_engine_hide_auxiliary_text((IBusEngine *)rawcode); + + g_string_assign (rawcode->buffer, ""); + text = ibus_text_new_from_static_string (""); +@@ -322,6 +323,8 @@ ibus_rawcode_engine_flush (IBusRawcodeEn + + text = ibus_text_new_from_static_string (""); + ibus_engine_update_preedit_text ((IBusEngine *)rawcode, text, 0, FALSE); ++ if(rawcode->table) ++ ibus_lookup_table_clear (rawcode->table); + + // ibus_engine_hide_preedit_text ((IBusEngine *) rawcode); + +@@ -363,6 +366,7 @@ ibus_rawcode_engine_reset (IBusEngine *e + + ibus_rawcode_engine_flush (rawcode); + ibus_engine_hide_lookup_table((IBusEngine *)rawcode); ++ ibus_engine_hide_auxiliary_text((IBusEngine *)rawcode); + parent_class->reset (engine); + } + +@@ -426,6 +430,10 @@ ibus_rawcode_engine_process_preedit_text + } else if(rawcode->buffer->len==MAXLEN){ + commit_buffer_to_ibus(rawcode); + } ++ else if(rawcode->buffer->len<3){ ++ ibus_engine_hide_lookup_table((IBusEngine *)rawcode); ++ ibus_engine_hide_auxiliary_text((IBusEngine *)rawcode); ++ } + + + } +@@ -473,7 +481,7 @@ IBusText *text; + // ibus_lookup_table_set_page_size(rawcode->table,10); + // adding space key character in lookuptable + /* c = rawcode_get_unicode_value (rawcode->buffer); +- if (c >0x0 && c < 0x10FFFF){ ++ if (c >0x0 && c < 0x10FFFF && g_unichar_validate (c)){ + text = ibus_text_new_from_unichar(c); + ibus_lookup_table_append_candidate (rawcode->table, text); + ibus_engine_update_lookup_table ((IBusEngine *)rawcode, rawcode->table, TRUE); +@@ -514,10 +522,11 @@ IBusText *text; + } + + +- +-// ibus_engine_hide_lookup_table((IBusEngine *)rawcode); +-// text = ibus_text_new_from_string (rawcode->table->candidates->data); +-// ibus_engine_update_auxiliray_text((IBusEngine *)rawcode, text, TRUE) ; ++ c = rawcode_get_unicode_value (rawcode->buffer); ++ if ((c >0x0 && c < 0x10FFFF) && g_unichar_validate (c)){ ++ text = ibus_text_new_from_unichar(c); ++ ibus_engine_update_auxiliary_text ((IBusEngine *)rawcode, text, TRUE); ++ } + + + return rawcode->table->candidates->len; +@@ -540,6 +549,7 @@ static void commit_buffer_to_ibus(IBusRa + if(rawcode->table){ + ibus_lookup_table_clear (rawcode->table); + ibus_engine_hide_lookup_table((IBusEngine *)rawcode); ++ ibus_engine_hide_auxiliary_text((IBusEngine *)rawcode); + } + + } diff --git a/ibus-rawcode.spec b/ibus-rawcode.spec index 466ab45..c1d8af1 100644 --- a/ibus-rawcode.spec +++ b/ibus-rawcode.spec @@ -1,6 +1,6 @@ Name: ibus-rawcode Version: 1.3.0.20100421 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Rawcode engine for IBus input platform License: GPLv2+ Group: System Environment/Libraries @@ -15,12 +15,14 @@ BuildRequires: pkgconfig BuildRequires: ibus-devel Requires: ibus +Patch1: bug-602942.patch %description The Rawcode engine for IBus platform. %prep %setup -q +%patch1 -p1 -b .1-auxiliary-text-for-space %build %configure --disable-static @@ -45,6 +47,10 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/ibus/component/* %changelog +* Fri Jun 11 2010 Pravin Satpute - 1.3.0.20100421-2 +- added auxiliary text support, for space hit +- fixed bug 602942 + * Wed Apr 21 2010 Pravin Satpute - 1.3.0.20100421-1 - upstream new release - fixed bug 584233, 584240