From 332b1df441bc4e9247a12b19dab8f7026d6364f3 Mon Sep 17 00:00:00 2001 From: Ding-Yi Chen Date: Thu, 4 Mar 2010 07:36:50 +0000 Subject: [PATCH] Fix the 4th tone in Dvorak Hsu --- import.log | 1 + libchewing-0.3.2.hsu.2.patch | 29 +++++++++++++++++++++++++++++ libchewing.spec | 6 +++--- 3 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 libchewing-0.3.2.hsu.2.patch diff --git a/import.log b/import.log index 14ab55f..89fbf03 100644 --- a/import.log +++ b/import.log @@ -18,3 +18,4 @@ libchewing-0_3_2-17_fc12:HEAD:libchewing-0.3.2-17.fc12.src.rpm:1262678096 libchewing-0_3_2-21_fc12:HEAD:libchewing-0.3.2-21.fc12.src.rpm:1265088570 libchewing-0_3_2-22_fc12:HEAD:libchewing-0.3.2-22.fc12.src.rpm:1265843616 libchewing-0_3_2-25_fc12:HEAD:libchewing-0.3.2-25.fc12.src.rpm:1267687337 +libchewing-0_3_2-26_fc12:HEAD:libchewing-0.3.2-26.fc12.src.rpm:1267687835 diff --git a/libchewing-0.3.2.hsu.2.patch b/libchewing-0.3.2.hsu.2.patch new file mode 100644 index 0000000..51e7474 --- /dev/null +++ b/libchewing-0.3.2.hsu.2.patch @@ -0,0 +1,29 @@ +diff -up ./src/zuin.c.hsu ./src/zuin.c +--- ./src/zuin.c.hsu 2008-12-02 00:29:20.000000000 +1000 ++++ ./src/zuin.c 2010-03-04 16:43:23.000000000 +1000 +@@ -183,11 +178,8 @@ static int HsuPhoInput( ZuinData *pZuin, + { + int type = 0, searchTimes = 0, inx = 0; + +- if ( +- ( IsHsuPhoEndKey( pZuin->pho_inx, key ) && +- ( pZuin->kbtype == KB_HSU ) ) || +- ( IsDvorakHsuPhoEndKey( pZuin->pho_inx, key ) && +- ( pZuin->kbtype == KB_DVORAK_HSU ) ) ) { ++ /* Dvorak Hsu key has already converted to Hsu */ ++ if ( IsHsuPhoEndKey( pZuin->pho_inx, key )){ + if ( pZuin->pho_inx[ 1 ] == 0 && pZuin->pho_inx[ 2 ] == 0 ) { + /* convert "ㄐㄑㄒ" to "ㄓㄔㄕ" */ + if ( 12 <= pZuin->pho_inx[ 0 ] && pZuin->pho_inx[ 0 ] <= 14 ) { +@@ -232,10 +224,7 @@ static int HsuPhoInput( ZuinData *pZuin, + pZuin->pho_inx[ 0 ] = 12; + } + +- if ( pZuin->kbtype == KB_HSU ) +- searchTimes = ( key == 'j' ) ? 3 : 2; +- else if ( pZuin->kbtype == KB_DVORAK_HSU ) +- searchTimes = ( key == 'h' || key == 'n' ) ? 3 : 2 ; ++ searchTimes = ( key == 'j' ) ? 3 : 2; + + return EndKeyProcess( pZuin, key, searchTimes ); + } diff --git a/libchewing.spec b/libchewing.spec index 205b8b0..6a58280 100644 --- a/libchewing.spec +++ b/libchewing.spec @@ -2,7 +2,7 @@ %define name_zh_TW %{im_name_zh_TW}函式庫 Name: libchewing Version: 0.3.2 -Release: 25%{?dist} +Release: 26%{?dist} Summary: Intelligent phonetic input method library for Traditional Chinese Summary(zh_TW): %{name_zh_TW} @@ -135,8 +135,8 @@ touch $RPM_BUILD_ROOT%{libchewing_python_dir}/__init__.py %changelog -* Wed Mar 04 2010 Ding-Yi Chen - 0.3.2-25 -- Fix Dvorak Hsu 4th tone key (ibus google issue 755 comment 11, +* Wed Mar 04 2010 Ding-Yi Chen - 0.3.2-26 +- Fix Dvorak Hsu 4th tone key (ibus google issue 755 comment 12, chewing google issue 10) - Resolves: #555192