From d04ef722f083fdd75f3dfc83a83e71e4185a8b0e Mon Sep 17 00:00:00 2001 From: yamakenz Date: Sat, 29 Mar 2008 11:28:35 +0000 Subject: [PATCH 001/136] * Branch uim 1.5 From b4630b91234b81d3867db55403afd228fb2e544e Mon Sep 17 00:00:00 2001 From: yamakenz Date: Sat, 29 Mar 2008 13:33:30 +0000 Subject: [PATCH 002/136] * branches/1.5 - Merge -r5354:5360 from trunk --- configure.ac | 3 +++ emacs/Makefile.am | 5 ----- emacs/uim-version.el.in | 2 +- notify/Makefile.am | 2 ++ notify/uim-libnotify.c | 13 ++++++++++++- po/ja.po | 12 +++++++----- qt4/immodule/Makefile.am | 6 +++--- 7 files changed, 28 insertions(+), 15 deletions(-) diff --git a/configure.ac b/configure.ac index 0dabbef39..f59162eeb 100644 --- a/configure.ac +++ b/configure.ac @@ -929,6 +929,8 @@ AC_HELP_STRING([--with-libedit[=DIR], Enable libedit support if test "x$with_libedit" != "xno"; then use_libedit="yes" libedit_path="$withval" + else + use_libedit="no" fi ], [use_libedit="yes"]) @@ -1517,6 +1519,7 @@ AC_CONFIG_FILES([Makefile xim/Makefile fep/Makefile emacs/Makefile + emacs/uim-version.el test/Makefile examples/Makefile examples/uim-custom/Makefile diff --git a/emacs/Makefile.am b/emacs/Makefile.am index 2ec8fa799..5c99c5004 100644 --- a/emacs/Makefile.am +++ b/emacs/Makefile.am @@ -27,9 +27,4 @@ uim_el_helper_agent_CPPFLAGS = -I$(top_srcdir) uim_el_helper_agent_LDADD = $(top_builddir)/uim/libuim-scm.la \ $(top_builddir)/uim/libuim.la -if MAINTAINER_MODE -uim-version.el: uim-version.el.in $(top_srcdir)/configure.ac - sed -e 's/@\(VERSION\)@/$(VERSION)/' uim-version.el.in > $@ -endif - endif diff --git a/emacs/uim-version.el.in b/emacs/uim-version.el.in index db53d8e6a..fbf39178e 100644 --- a/emacs/uim-version.el.in +++ b/emacs/uim-version.el.in @@ -34,5 +34,5 @@ ;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;; -(defconst uim-el-version "@VERSION@") +(defconst uim-el-version "@PACKAGE_VERSION@") (provide 'uim-version) diff --git a/notify/Makefile.am b/notify/Makefile.am index 20e84cf01..e9bf5312b 100644 --- a/notify/Makefile.am +++ b/notify/Makefile.am @@ -4,6 +4,8 @@ uimnotify_plugin_LTLIBRARIES = uimnotify_plugindir = $(pkglibdir)/notify if LIBNOTIFY +# XXX +CFLAGS+= -Wno-error uimnotify_plugin_LTLIBRARIES += libuimnotify-libnotify.la libuimnotify_libnotify_la_SOURCES = uim-libnotify.c libuimnotify_libnotify_la_CFLAGS = @LIBNOTIFY_CFLAGS@ diff --git a/notify/uim-libnotify.c b/notify/uim-libnotify.c index 1aa61c771..b72c38dce 100644 --- a/notify/uim-libnotify.c +++ b/notify/uim-libnotify.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include "uim.h" /* for uim_bool */ @@ -52,17 +53,26 @@ uim_libnotify_notify(int urgency, int timeout, const char *body) NotifyNotification *notification; GError *error = NULL; gboolean ret; + gchar *gmsg; + gsize read, written; strlcpy(body_short, body, sizeof(body_short)); fprintf(stderr, "libuim: %s\n", body); + gmsg = g_locale_to_utf8(body_short, -1, &read, &written, NULL); + + if (!gmsg) { + fprintf(stderr, "libnotify: cannot convert to utf8\n"); + return UIM_FALSE; + } + if (!notify_is_initted()) { fprintf(stderr, "libnotify: libnotify is not initted\n"); return UIM_FALSE; } - notification = notify_notification_new("uim", body_short, UIM_ICON, NULL); + notification = notify_notification_new("uim", gmsg, UIM_ICON, NULL); if (!notification) { fprintf(stderr, "notify_notification_new: can not create notification object\n"); @@ -79,6 +89,7 @@ uim_libnotify_notify(int urgency, int timeout, const char *body) return UIM_FALSE; } + g_free(gmsg); g_object_unref(G_OBJECT(notification)); return UIM_TRUE; diff --git a/po/ja.po b/po/ja.po index c275c7ebd..549d23561 100644 --- a/po/ja.po +++ b/po/ja.po @@ -4277,11 +4277,11 @@ msgstr "TUT-Codeの辞書設定" #: ../scm/tutcode-custom.scm:54 msgid "Mazegaki dictionary file" -msgstr "混ぜ書き辞書ファイル" +msgstr "交ぜ書き変換辞書ファイル" #: ../scm/tutcode-custom.scm:61 msgid "Personal mazegaki dictionary file" -msgstr "混ぜ書き個人辞書ファイル" +msgstr "交ぜ書き変換個人用辞書ファイル" #: ../scm/tutcode-custom.scm:68 msgid "Code table file" @@ -4292,10 +4292,12 @@ msgid "" "Code table name is 'filename-rule' when code table file name is 'filename." "scm'." msgstr "" +"コード表ファイル名がfilename.scmの場合、そのファイル内のfilename-rule変数を" +"コード表として使用する" #: ../scm/tutcode-custom.scm:74 msgid "Enable learning in mazegaki conversion" -msgstr "混ぜ書き変換の学習を有効にする" +msgstr "交ぜ書き変換の学習を有効にする" #: ../scm/tutcode-custom.scm:86 msgid "Use Dvorak keyboard" @@ -4323,11 +4325,11 @@ msgstr "[TUT-Code] ひらがな/カタカナ入力モードを反転" #: ../scm/tutcode-key-custom.scm:65 msgid "[TUT-Code] mazegaki conversion mode" -msgstr "[TUT-Code] 混ぜ書き変換モード" +msgstr "[TUT-Code] 交ぜ書き変換モード" #: ../scm/tutcode-key-custom.scm:71 msgid "[TUT-Code] bushu conversion mode" -msgstr "[TUT-Code] 部首変換モード" +msgstr "[TUT-Code] 部首合成変換モード" #: ../scm/tutcode-key-custom.scm:77 msgid "[TUT-Code] begin conversion" diff --git a/qt4/immodule/Makefile.am b/qt4/immodule/Makefile.am index 9f165b713..c365d2ed2 100644 --- a/qt4/immodule/Makefile.am +++ b/qt4/immodule/Makefile.am @@ -9,15 +9,15 @@ all clean mocclean install uninstall: distclean: $(MAKE) $(AM_MAKEFLAGS) -f Makefile.qmake $@ $(MAKE) $(AM_MAKEFLAGS) distclean-am - -rm -f Makefile + -rm -f Makefile quiminputcontextplugin.pro else distclean: - -rm -f Makefile + -rm -f Makefile quiminputcontextplugin.pro endif FORCE: -EXTRA_DIST = COPYING README.en README.ja INDENT \ +EXTRA_DIST = README.en README.ja INDENT \ quiminputcontextplugin.pro.in \ quiminputcontext_with_slave.h \ quiminputcontext_with_slave.cpp From ee5f1bb8923ef09906d8bdbc25d3225fad5e11a8 Mon Sep 17 00:00:00 2001 From: yamakenz Date: Sun, 6 Apr 2008 17:02:55 +0000 Subject: [PATCH 003/136] * Merge r5365, 5366, 5369, 5370, 5373, 5377, 5382 from trunk --- NEWS | 17 ++++ RELNOTE | 6 +- doc/COMPATIBILITY | 14 +++ fep/draw.c | 4 +- m4/wnn.m4 | 10 +- po/POTFILES.in | 1 + po/fr.po | 9 +- po/ja.po | 11 ++- po/ko.po | 242 ++++++++++++++++------------------------------ scm/uim-sh.scm | 15 +-- uim/uim.c | 1 + uim/wnnlib.c | 7 ++ 12 files changed, 165 insertions(+), 172 deletions(-) diff --git a/NEWS b/NEWS index 548d9d045..b8104c41d 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,20 @@ +Overview of changes from 1.5.0-alpha 1.5.0-beta +=============================================== +* New features + - Provide 'uim' on Scheme (See "Feature provision of 'uim'" of + doc/COMPATIBILITY for further information) + +* Fixed + - uim-wnn + * Check file existence of rcfile + * Set correct place of WNNLIBDIR when --without-wnn-libraries + + - uim-sh + * Fix falling into eval loop after script execution + + - Update translations + + Overview of changes from 1.4.x to 1.5.0-alpha ============================================= * New features diff --git a/RELNOTE b/RELNOTE index 8a3cbf51d..534bc76a3 100644 --- a/RELNOTE +++ b/RELNOTE @@ -1,10 +1,10 @@ -uim 1.5.0-alpha Release Note -============================ +uim 1.5.0-beta Release Note +=========================== About This Release ------------------ -This distribution of uim 1.5.0-alpha is a preview release for testing +This distribution of uim 1.5.0-beta is a preview release for testing purpose. Since it may contain serious unknown problems, it should not be used for important work. For such situations, use our latest stable release uim 1.4.2. diff --git a/doc/COMPATIBILITY b/doc/COMPATIBILITY index 67041b3ee..00e0490f8 100644 --- a/doc/COMPATIBILITY +++ b/doc/COMPATIBILITY @@ -57,6 +57,20 @@ Each change consist of following fields. All fields are required. The changes are described below in most recently updated order. ------------------------------------------------------------------------------ +Summary: Feature provision of 'uim' +Affects: uim developers, IM developers +Updates: +Version: 1.5.0-beta +Revision: ac5370 +Date: 2008-03-31 +Modifier: YamaKen +Related: +URL: +Changes: +Description: + To allow (provided? "uim") and (cond-expand (uim ...)), init_uim() + calls (provide "uim"). +------------------------------------------------------------------------------ Summary: Responsibility migration of gettext() invocation Affects: Helper program developers, Bridge developers Updates: Scheme API, C API diff --git a/fep/draw.c b/fep/draw.c index 6b505b679..3a6561a05 100644 --- a/fep/draw.c +++ b/fep/draw.c @@ -141,10 +141,10 @@ void update_backtick(void) char sendbuf[CANDSIZE]; if (s_candbuf[0] == '\0') { /* ⡼ɽ */ - sprintf(sendbuf, "%s%s", s_win_no, s_modebuf); + snprintf(sendbuf, sizeof(sendbuf), "%s%s", s_win_no, s_modebuf); } else { /* ɽ */ - sprintf(sendbuf, "%s", s_candbuf); + strlcpy(sendbuf, s_candbuf, sizeof(sendbuf)); } sendline(sendbuf); } diff --git a/m4/wnn.m4 b/m4/wnn.m4 index 1562d5b06..394106bc3 100644 --- a/m4/wnn.m4 +++ b/m4/wnn.m4 @@ -13,8 +13,10 @@ dnl if test "x$wnn_libraries" != "x" ; then WNN_LIBS="-L$wnn_libraries" + wnnlibdir="$wnn_libraries" elif test "x$prefix" != "xNONE"; then WNN_LIBS="-L$prefix/lib" + wnnlibdir="$prefix/lib" fi if test "x$wnn_includes" != "x" ; then @@ -48,7 +50,13 @@ dnl CPPFLAGS="$ac_save_CPPFLAGS" LIBS="$ac_save_LIBS" - AC_DEFINE_UNQUOTED(WNNLIBDIR, "$wnn_libraries", [wnn library dir]) + if test "x$wnnlibdir" != "x" ; then + AC_DEFINE_UNQUOTED(WNNLIBDIR, "$wnnlibdir", [Wnn library directory]) + else + AC_MSG_WARN([****** Cannot found path of Wnn library. Please set this option with --with-wnn-libraries]) + AC_DEFINE_UNQUOTED(WNNLIBDIR, "$ac_default_prefix/lib", [Wnn library directory]) + fi + AC_SUBST(WNN_CPPFLAGS) AC_SUBST(WNN_LIBS) AC_SUBST(WNN_LIBADD) diff --git a/po/POTFILES.in b/po/POTFILES.in index 527bf1c22..a91e5a666 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -71,3 +71,4 @@ uim/plugin.c uim/sj3.c uim/skk.c uim/uim-error.c +uim/wnnlib.c diff --git a/po/fr.po b/po/fr.po index b6a09b86c..8e7a9ea32 100644 --- a/po/fr.po +++ b/po/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: uim 1.4.0\n" "Report-Msgid-Bugs-To: uim-en@googlegroups.com\n" -"POT-Creation-Date: 2008-03-29 20:06+0900\n" +"POT-Creation-Date: 2008-03-30 06:19+0900\n" "PO-Revision-Date: 2006-05-21 11:21+0900\n" "Last-Translator: Thierry Vignaud \n" "Language-Team: fr \n" @@ -4730,6 +4730,13 @@ msgstr "" msgid "All functionality has been disabled to save user application data." msgstr "" +#: ../uim/wnnlib.c:3739 ../uim/wnnlib.c:3753 +#, c-format +msgid "" +"uim-wnn: \"%s\" is not exist. Please run uim-pref and set \"Wnn resource file" +"\" (maybe file name is \"wnnenvrc\")." +msgstr "" + #~ msgid "Spellcheck" #~ msgstr "Spellcheck" diff --git a/po/ja.po b/po/ja.po index 549d23561..9af3cf6f9 100644 --- a/po/ja.po +++ b/po/ja.po @@ -99,8 +99,8 @@ msgid "" msgstr "" "Project-Id-Version: uim 1.5.0\n" "Report-Msgid-Bugs-To: uim-en@googlegroups.com\n" -"POT-Creation-Date: 2008-03-29 20:06+0900\n" -"PO-Revision-Date: 2008-03-29 20:15+0900\n" +"POT-Creation-Date: 2008-03-30 06:19+0900\n" +"PO-Revision-Date: 2008-03-30 06:25+0900\n" "Last-Translator: YamaKen \n" "Language-Team: Japanese \n" "MIME-Version: 1.0\n" @@ -4783,6 +4783,13 @@ msgstr "" msgid "All functionality has been disabled to save user application data." msgstr "ユーザアプリケーションデータを保護するため、全機能を停止しました。" +#: ../uim/wnnlib.c:3739 ../uim/wnnlib.c:3753 +#, c-format +msgid "" +"uim-wnn: \"%s\" is not exist. Please run uim-pref and set \"Wnn resource file" +"\" (maybe file name is \"wnnenvrc\")." +msgstr "uim-wnn: \"%s\"は存在しません。uim-prefを起動して、\"Wnn設定ファイル\"を設定してください(おそらくファイル名は\"wnnenvrc\"です)。" + #~ msgid "Standard Hangul 2-beol keyboard" #~ msgstr "標準のハングル2ボル式" diff --git a/po/ko.po b/po/ko.po index 183853daf..3d8a702a8 100644 --- a/po/ko.po +++ b/po/ko.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: uim 1.4.0\n" "Report-Msgid-Bugs-To: uim-en@googlegroups.com\n" -"POT-Creation-Date: 2008-03-29 20:06+0900\n" +"POT-Creation-Date: 2008-03-30 06:19+0900\n" "PO-Revision-Date: 2007-03-27 01:28+0900\n" "Last-Translator: Jae-hyeon Park \n" "Language-Team: Korean \n" @@ -25,7 +25,6 @@ msgid "Input Method Indicator" msgstr "" #: ../helper/GNOME_UimApplet.server.in.in.h:3 -#, fuzzy msgid "Utilities" msgstr "유틸리티" @@ -330,13 +329,12 @@ msgid "Part of speech is emtpy!" msgstr "" #: ../helper/eggtrayicon.c:118 -#, fuzzy msgid "Orientation" -msgstr "주석" +msgstr "방향" #: ../helper/eggtrayicon.c:119 msgid "The orientation of the tray." -msgstr "" +msgstr "트레이의 방향" #: ../helper/im-switcher-gtk.c:283 ../qt/switcher-qt.cpp:103 msgid "InputMethodName" @@ -1418,24 +1416,22 @@ msgstr "" #. 2-beol can not be orderless. #: ../scm/byeoru-custom.scm:44 -#, fuzzy msgid "Hangul 2-beol Windows" -msgstr "두벌식" +msgstr "두벌식 (윈도우즈식)" #: ../scm/byeoru-custom.scm:45 msgid "Hangul 2-beol keyboard that maps an undefined shifted key to a jamo" -msgstr "" +msgstr "자모 표시가 하나인 키를 쉬프트키와 누르면 그 자모가 입력되는 두벌식" #. 2-beol can not be orderless. #: ../scm/byeoru-custom.scm:48 -#, fuzzy msgid "Hangul 2-beol Hanterm" -msgstr "두벌식" +msgstr "두벌식 (한텀식)" #: ../scm/byeoru-custom.scm:49 msgid "" "Hangul 2-beol keyboard that maps an undefined shifted key to an alphabet" -msgstr "" +msgstr "자모 표시가 하나인 키를 쉬프트키와 누르면 알파벳이 입력되는 두벌식" #. neither can strict 3-beol. #: ../scm/byeoru-custom.scm:52 @@ -1854,9 +1850,8 @@ msgid "Danish alternative postfix" msgstr "" #: ../scm/elatin-custom.scm:62 -#, fuzzy msgid "Danish keyboard" -msgstr "자판" +msgstr "" #: ../scm/elatin-custom.scm:65 ../scm/iso-639-1.scm:71 msgid "Dutch" @@ -1903,9 +1898,8 @@ msgid "French alternative postfix" msgstr "" #: ../scm/elatin-custom.scm:98 -#, fuzzy msgid "French keyboard" -msgstr "자판" +msgstr "" #: ../scm/elatin-custom.scm:101 msgid "French AZERTY" @@ -2124,19 +2118,16 @@ msgid "Turkish Latin-3 alternative postfix" msgstr "" #: ../scm/elatin-custom.scm:262 -#, fuzzy msgid "Latin characters keyboard layout" -msgstr "한글 자판 배열" +msgstr "" #: ../scm/elatin-custom.scm:280 -#, fuzzy msgid "ESC turns off composition mode (for vi users)" -msgstr "ESC를 누르면 영문모드로 (vi 사용자용)" +msgstr "" #: ../scm/elatin-custom.scm:285 -#, fuzzy msgid "ELatin key bindings" -msgstr "전체적인 키 설정 1" +msgstr "" #: ../scm/elatin-custom.scm:291 msgid "[ELatin] on" @@ -2147,9 +2138,8 @@ msgid "[ELatin] off" msgstr "" #: ../scm/elatin-custom.scm:303 -#, fuzzy msgid "[ELatin] backspace" -msgstr "[전체] 백스페이스" +msgstr "" #: ../scm/elatin.scm:114 msgid "ELatin mode off" @@ -3153,14 +3143,12 @@ msgid "Look" msgstr "" #: ../scm/look-custom.scm:32 ../scm/look.scm:560 -#, fuzzy msgid "Tiny predictive input method" -msgstr "두번째 입력기" +msgstr "" #: ../scm/look-custom.scm:39 -#, fuzzy msgid "Look key bindings" -msgstr "벼루 키 설정 1" +msgstr "" #: ../scm/look-custom.scm:46 msgid "[Look] Use UNIX look dictionary file" @@ -3171,9 +3159,8 @@ msgid "[Look] Personal dictionary file" msgstr "" #: ../scm/look-custom.scm:59 -#, fuzzy msgid "[Look] beginning character length of predicting" -msgstr "[전체] 편집영역의 처음으로" +msgstr "" #: ../scm/look-custom.scm:65 msgid "[Look] Prepared words for prediction" @@ -3188,38 +3175,32 @@ msgid "[Look] right fence character of candidate" msgstr "" #: ../scm/look-custom.scm:83 -#, fuzzy msgid "[Look] on" -msgstr "[벼루] 한글모드로" +msgstr "" #: ../scm/look-custom.scm:89 -#, fuzzy msgid "[Look] off" -msgstr "[벼루] 영문모드로" +msgstr "" #: ../scm/look-custom.scm:95 msgid "[Look] completion character" msgstr "" #: ../scm/look-custom.scm:101 -#, fuzzy msgid "[Look] next character" -msgstr "[벼루] 메뉴에서 아래로" +msgstr "" #: ../scm/look-custom.scm:107 -#, fuzzy msgid "[Look] previous character" -msgstr "[벼루] 메뉴에서 위로" +msgstr "" #: ../scm/look-custom.scm:113 -#, fuzzy msgid "[Look] next candidate" -msgstr "[벼루] 메뉴에서 아래로" +msgstr "" #: ../scm/look-custom.scm:119 -#, fuzzy msgid "[Look] previous candidate" -msgstr "[벼루] 메뉴에서 위로" +msgstr "" #: ../scm/look-custom.scm:125 msgid "[Look] save dictionary" @@ -3242,9 +3223,8 @@ msgid "Look Direct Input Mode" msgstr "" #: ../scm/look.scm:78 -#, fuzzy msgid "Look Input Mode" -msgstr "입력기" +msgstr "" #: ../scm/mana-custom.scm:35 msgid "Mana" @@ -3683,24 +3663,20 @@ msgid "SJ3 user name" msgstr "" #: ../scm/sj3-key-custom.scm:35 -#, fuzzy msgid "SJ3 key bindings 1" -msgstr "벼루 키 설정 1" +msgstr "" #: ../scm/sj3-key-custom.scm:39 -#, fuzzy msgid "SJ3 key bindings 2" -msgstr "벼루 키 설정 2" +msgstr "" #: ../scm/sj3-key-custom.scm:43 -#, fuzzy msgid "SJ3 key bindings 3" -msgstr "벼루 키 설정 1" +msgstr "" #: ../scm/sj3-key-custom.scm:47 -#, fuzzy msgid "SJ3 key bindings 4" -msgstr "벼루 키 설정 1" +msgstr "" #: ../scm/sj3-key-custom.scm:53 msgid "[SJ3] next segment" @@ -3751,79 +3727,64 @@ msgid "[SJ3] off" msgstr "" #: ../scm/sj3-key-custom.scm:129 -#, fuzzy msgid "[SJ3] begin conversion" -msgstr "[전체] 변환 개시" +msgstr "" #: ../scm/sj3-key-custom.scm:135 -#, fuzzy msgid "[SJ3] commit" -msgstr "[전체] 확정" +msgstr "" #: ../scm/sj3-key-custom.scm:141 -#, fuzzy msgid "[SJ3] cancel" -msgstr "[전체] 취소" +msgstr "" #: ../scm/sj3-key-custom.scm:147 -#, fuzzy msgid "[SJ3] next candidate" -msgstr "[벼루] 메뉴에서 아래로" +msgstr "" #: ../scm/sj3-key-custom.scm:153 -#, fuzzy msgid "[SJ3] previous candidate" -msgstr "[벼루] 메뉴에서 위로" +msgstr "" #: ../scm/sj3-key-custom.scm:159 -#, fuzzy msgid "[SJ3] next page of candidate window" -msgstr "[벼루] 메뉴에서 아래 페이지로" +msgstr "" #: ../scm/sj3-key-custom.scm:165 -#, fuzzy msgid "[SJ3] previous page of candidate window" -msgstr "[벼루] 메뉴에서 위 페이지로" +msgstr "" #: ../scm/sj3-key-custom.scm:174 -#, fuzzy msgid "[SJ3] beginning of preedit" -msgstr "[전체] 편집영역의 처음으로" +msgstr "" #: ../scm/sj3-key-custom.scm:180 -#, fuzzy msgid "[SJ3] end of preedit" -msgstr "[전체] 편집영역의 끝으로" +msgstr "" #: ../scm/sj3-key-custom.scm:186 -#, fuzzy msgid "[SJ3] erase after cursor" -msgstr "[전체] 커서 다음을 삭제" +msgstr "" #: ../scm/sj3-key-custom.scm:192 -#, fuzzy msgid "[SJ3] erase before cursor" -msgstr "[전체] 커서 이전을 삭제" +msgstr "" #: ../scm/sj3-key-custom.scm:198 -#, fuzzy msgid "[SJ3] backspace" -msgstr "[벼루] 백스페이스" +msgstr "" #: ../scm/sj3-key-custom.scm:204 -#, fuzzy msgid "[SJ3] delete" -msgstr "[벼루] 삭제" +msgstr "" #: ../scm/sj3-key-custom.scm:210 -#, fuzzy msgid "[SJ3] go left" -msgstr "[벼루] 단어모드에서 왼쪽으로" +msgstr "" #: ../scm/sj3-key-custom.scm:216 -#, fuzzy msgid "[SJ3] go right" -msgstr "[벼루] 단어모드에서 오른쪽으로" +msgstr "" #: ../scm/sj3-key-custom.scm:222 msgid "[SJ3] ESC keys on vi-cooperative mode" @@ -3899,9 +3860,8 @@ msgid "SKK server" msgstr "" #: ../scm/skk-custom.scm:57 -#, fuzzy msgid "Dictionary files" -msgstr "사전" +msgstr "" #: ../scm/skk-custom.scm:74 ../scm/tutcode-custom.scm:102 msgid "Commit candidate by heading label keys" @@ -3964,9 +3924,8 @@ msgid "Address family of skkserv" msgstr "" #: ../scm/skk-custom.scm:393 -#, fuzzy msgid "System dictionary file" -msgstr "일본어 사전 도구" +msgstr "" #: ../scm/skk-custom.scm:400 msgid "Personal dictionary file" @@ -4201,9 +4160,8 @@ msgid "Dictionary settings for TUT-Code" msgstr "" #: ../scm/tutcode-custom.scm:54 -#, fuzzy msgid "Mazegaki dictionary file" -msgstr "일본어 사전 도구" +msgstr "" #: ../scm/tutcode-custom.scm:61 msgid "Personal mazegaki dictionary file" @@ -4248,57 +4206,48 @@ msgid "[TUT-Code] toggle hiragana/katakana mode" msgstr "" #: ../scm/tutcode-key-custom.scm:65 -#, fuzzy msgid "[TUT-Code] mazegaki conversion mode" -msgstr "[전체] 변환 개시" +msgstr "" #: ../scm/tutcode-key-custom.scm:71 msgid "[TUT-Code] bushu conversion mode" msgstr "" #: ../scm/tutcode-key-custom.scm:77 -#, fuzzy msgid "[TUT-Code] begin conversion" -msgstr "[전체] 변환 개시" +msgstr "" #: ../scm/tutcode-key-custom.scm:83 -#, fuzzy msgid "[TUT-Code] commit" -msgstr "[전체] 확정" +msgstr "" #: ../scm/tutcode-key-custom.scm:89 -#, fuzzy msgid "[TUT-Code] cancel" -msgstr "[전체] 취소" +msgstr "" #: ../scm/tutcode-key-custom.scm:95 -#, fuzzy msgid "[TUT-Code] next candidate" -msgstr "[벼루] 메뉴에서 아래로" +msgstr "" #: ../scm/tutcode-key-custom.scm:101 -#, fuzzy msgid "[TUT-Code] previous candidate" -msgstr "[벼루] 메뉴에서 위로" +msgstr "" #: ../scm/tutcode-key-custom.scm:107 -#, fuzzy msgid "[TUT-Code] next page of candidate window" -msgstr "[벼루] 메뉴에서 아래 페이지로" +msgstr "" #: ../scm/tutcode-key-custom.scm:113 -#, fuzzy msgid "[TUT-Code] previous page of candidate window" -msgstr "[벼루] 메뉴에서 위 페이지로" +msgstr "" #: ../scm/tutcode-key-custom.scm:119 msgid "[TUT-Code] backspace" msgstr "" #: ../scm/tutcode-key-custom.scm:125 -#, fuzzy msgid "[TUT-Code] return" -msgstr "[전체] 리턴" +msgstr "" #: ../scm/tutcode-key-custom.scm:131 msgid "[TUT-Code] ESC keys on vi-cooperative mode" @@ -4337,24 +4286,20 @@ msgid "Wnn resource file" msgstr "" #: ../scm/wnn-key-custom.scm:35 -#, fuzzy msgid "Wnn key bindings 1" -msgstr "벼루 키 설정 1" +msgstr "" #: ../scm/wnn-key-custom.scm:39 -#, fuzzy msgid "Wnn key bindings 2" -msgstr "벼루 키 설정 2" +msgstr "" #: ../scm/wnn-key-custom.scm:43 -#, fuzzy msgid "Wnn key bindings 3" -msgstr "벼루 키 설정 1" +msgstr "" #: ../scm/wnn-key-custom.scm:47 -#, fuzzy msgid "Wnn key bindings 4" -msgstr "벼루 키 설정 1" +msgstr "" #: ../scm/wnn-key-custom.scm:53 msgid "[Wnn] next segment" @@ -4405,79 +4350,64 @@ msgid "[Wnn] off" msgstr "" #: ../scm/wnn-key-custom.scm:129 -#, fuzzy msgid "[Wnn] begin conversion" -msgstr "[전체] 변환 개시" +msgstr "" #: ../scm/wnn-key-custom.scm:135 -#, fuzzy msgid "[Wnn] commit" -msgstr "[전체] 확정" +msgstr "" #: ../scm/wnn-key-custom.scm:141 -#, fuzzy msgid "[Wnn] cancel" -msgstr "[전체] 취소" +msgstr "" #: ../scm/wnn-key-custom.scm:147 -#, fuzzy msgid "[Wnn] next candidate" -msgstr "[벼루] 메뉴에서 아래로" +msgstr "" #: ../scm/wnn-key-custom.scm:153 -#, fuzzy msgid "[Wnn] previous candidate" -msgstr "[벼루] 메뉴에서 위로" +msgstr "" #: ../scm/wnn-key-custom.scm:159 -#, fuzzy msgid "[Wnn] next page of candidate window" -msgstr "[벼루] 메뉴에서 아래 페이지로" +msgstr "" #: ../scm/wnn-key-custom.scm:165 -#, fuzzy msgid "[Wnn] previous page of candidate window" -msgstr "[벼루] 메뉴에서 위 페이지로" +msgstr "" #: ../scm/wnn-key-custom.scm:174 -#, fuzzy msgid "[Wnn] beginning of preedit" -msgstr "[전체] 편집영역의 처음으로" +msgstr "" #: ../scm/wnn-key-custom.scm:180 -#, fuzzy msgid "[Wnn] end of preedit" -msgstr "[전체] 편집영역의 끝으로" +msgstr "" #: ../scm/wnn-key-custom.scm:186 -#, fuzzy msgid "[Wnn] erase after cursor" -msgstr "[전체] 커서 다음을 삭제" +msgstr "" #: ../scm/wnn-key-custom.scm:192 -#, fuzzy msgid "[Wnn] erase before cursor" -msgstr "[전체] 커서 이전을 삭제" +msgstr "" #: ../scm/wnn-key-custom.scm:198 -#, fuzzy msgid "[Wnn] backspace" -msgstr "[벼루] 백스페이스" +msgstr "" #: ../scm/wnn-key-custom.scm:204 -#, fuzzy msgid "[Wnn] delete" -msgstr "[벼루] 삭제" +msgstr "" #: ../scm/wnn-key-custom.scm:210 -#, fuzzy msgid "[Wnn] go left" -msgstr "[벼루] 단어모드에서 왼쪽으로" +msgstr "" #: ../scm/wnn-key-custom.scm:216 -#, fuzzy msgid "[Wnn] go right" -msgstr "[벼루] 단어모드에서 오른쪽으로" +msgstr "" #: ../scm/wnn-key-custom.scm:222 msgid "[Wnn] ESC keys on vi-cooperative mode" @@ -4516,7 +4446,6 @@ msgid "Customize uim input method environment" msgstr "uim 환경설정" #: ../uim.desktop.in.in.h:2 -#, fuzzy msgid "Input Method" msgstr "입력기" @@ -4595,23 +4524,20 @@ msgid "Cannot open main dictionary file." msgstr "" #: ../uim/sj3.c:109 -#, fuzzy msgid "Cannot open user dictionary file." -msgstr "일본어 사전 도구" +msgstr "" #: ../uim/sj3.c:110 msgid "Cannot open study file." msgstr "" #: ../uim/sj3.c:111 -#, fuzzy msgid "Cannot make user dictionary directory." -msgstr "일본어 사전 도구" +msgstr "" #: ../uim/sj3.c:112 -#, fuzzy msgid "Cannot make user dictionary file." -msgstr "일본어 사전 도구" +msgstr "" #: ../uim/sj3.c:113 msgid "Cannot make study file." @@ -4667,14 +4593,12 @@ msgid "Buffer size is too short." msgstr "" #: ../uim/sj3.c:411 -#, fuzzy msgid "Dictionary error." -msgstr "사전" +msgstr "" #: ../uim/sj3.c:412 -#, fuzzy msgid "Dictionary is locked." -msgstr "사전" +msgstr "" #: ../uim/sj3.c:413 msgid "Invalid yomi string." @@ -4697,9 +4621,8 @@ msgid "Douon is full." msgstr "" #: ../uim/sj3.c:418 -#, fuzzy msgid "Dictionary is full." -msgstr "사전" +msgstr "" #: ../uim/sj3.c:419 msgid "Index is full." @@ -4741,6 +4664,13 @@ msgstr "" msgid "All functionality has been disabled to save user application data." msgstr "" +#: ../uim/wnnlib.c:3739 ../uim/wnnlib.c:3753 +#, c-format +msgid "" +"uim-wnn: \"%s\" is not exist. Please run uim-pref and set \"Wnn resource file" +"\" (maybe file name is \"wnnenvrc\")." +msgstr "" + # CHECK: 자판 or 배열 #~ msgid "Standard Hangul 2-beol keyboard" #~ msgstr "표준 두벌식 자판" diff --git a/scm/uim-sh.scm b/scm/uim-sh.scm index 749473fa7..d29a59e57 100644 --- a/scm/uim-sh.scm +++ b/scm/uim-sh.scm @@ -145,8 +145,6 @@ read)) (EX_OK 0) (EX_SOFTWARE 70)) - (if script - (require script)) (cond (uim-sh-opt-help (uim-sh-usage) @@ -165,11 +163,14 @@ (newline))) EX_OK)) - ((symbol-bound? 'main) - (let ((status (main file.args))) - (if (integer? status) - status - EX_SOFTWARE))) + (script + (require script) + (if (symbol-bound? 'main) + (let ((status (main file.args))) + (if (integer? status) + status + EX_SOFTWARE)) + EX_OK)) (else (let reloop () diff --git a/uim/uim.c b/uim/uim.c index fa76e69ee..31d611e4a 100644 --- a/uim/uim.c +++ b/uim/uim.c @@ -152,6 +152,7 @@ uim_init_internal(void *dummy) uim_scm_set_lib_path(scm_files); uim_scm_require_file("init.scm"); + uim_scm_callf("provide", "s", "uim"); uim_initialized = UIM_TRUE; diff --git a/uim/wnnlib.c b/uim/wnnlib.c index 2b0e4baf4..6f742acf1 100644 --- a/uim/wnnlib.c +++ b/uim/wnnlib.c @@ -613,6 +613,7 @@ #include #include #include +#include #ifndef WNNENVDIR #define WNNENVDIR WNNLIBDIR "/wnn" @@ -3734,6 +3735,9 @@ jcOpen2(char *server, char *envname, int override, char *rcfile4, char *rcfile6, rcfile = "@DEFAULT"; #else rcfile = "wnnenvrc"; + if (access(rcfile, R_OK) != 0) + uim_notify_fatal(_("uim-wnn: \"%s\" is not exist. Please run uim-pref and set \"Wnn resource file\" (maybe file name is \"wnnenvrc\")."), + rcfile); #endif } else { #if defined(WNNENVDIR) && JSERVER_VERSION > 0x4030 @@ -3745,6 +3749,9 @@ jcOpen2(char *server, char *envname, int override, char *rcfile4, char *rcfile6, #else rcfile = "wnnenvrc"; #endif + if (access(rcfile, R_OK) != 0) + uim_notify_fatal(_("uim-wnn: \"%s\" is not exist. Please run uim-pref and set \"Wnn resource file\" (maybe file name is \"wnnenvrc\")."), + rcfile); } } } From 370cfb65a4702ef844d78d36a631ebb50e23343c Mon Sep 17 00:00:00 2001 From: yamakenz Date: Sun, 6 Apr 2008 17:15:15 +0000 Subject: [PATCH 004/136] * Merge r5389 from trunk --- make-dist.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/make-dist.sh b/make-dist.sh index 88fedfd39..7f79d7761 100755 --- a/make-dist.sh +++ b/make-dist.sh @@ -7,10 +7,10 @@ SSCM_REPOSITORY="${UIM_REPOSITORY}/sigscheme-trunk" LIBGCROOTS_REPOSITORY="${UIM_REPOSITORY}/libgcroots-trunk" TAGS_REPOSITORY="${UIM_REPOSITORY}/tags" #SSCM_URL="${SSCM_REPOSITORY}" -SSCM_URL="${TAGS_REPOSITORY}/sigscheme-0.8.1" +SSCM_URL="${TAGS_REPOSITORY}/sigscheme-0.8.2" #LIBGCROOTS_URL="${LIBGCROOTS_REPOSITORY}" LIBGCROOTS_URL="${TAGS_REPOSITORY}/libgcroots-0.2.1" -RELEASE_SUFFIX="-alpha" +RELEASE_SUFFIX="-beta" CONF_COMMON="--enable-maintainer-mode --disable-warnings-into-error" CONF_NONE="$CONF_COMMON --disable-debug --disable-fep --disable-emacs --disable-gnome-applet --disable-kde-applet --disable-pref --disable-dict --without-anthy --without-canna --without-mana --without-prime --without-m17nlib --without-scim --without-gtk2 --without-gnome2 --without-qt --without-qt-immodule --disable-compat-scm --without-eb --without-libedit" From 2f8c3fa1bbbcf5366e4e84c5fefeebc8dd46de4d Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Thu, 17 Apr 2008 08:41:02 +0000 Subject: [PATCH 005/136] * Merge r5421 from trunk. --- qt4/immodule/quiminputcontext_compose.cpp | 33 +++++++++++++++++++---- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/qt4/immodule/quiminputcontext_compose.cpp b/qt4/immodule/quiminputcontext_compose.cpp index 496717e42..9d935f8c4 100644 --- a/qt4/immodule/quiminputcontext_compose.cpp +++ b/qt4/immodule/quiminputcontext_compose.cpp @@ -39,6 +39,9 @@ #include #include #include +#ifdef HAVE_LANGINFO_CODESET +#include +#endif #include "uim/uim.h" @@ -111,7 +114,7 @@ bool Compose::handle_qkey(QKeyEvent *event) xkeysym = qkey; } } else if (qkey >= Qt::Key_Dead_Grave && qkey <= Qt::Key_Dead_Horn) { - xkeysym = qkey + 0xec00; + xkeysym = qkey + 0xec00 - 0x01000000; } else { switch (qkey) { case Qt::Key_Escape: xkeysym = XK_Escape; break; @@ -582,9 +585,27 @@ QUimInputContext::TransFileName(char *name) const char * QUimInputContext::get_encoding() { - QTextCodec *codec = QTextCodec::codecForLocale(); +#if 0 + // starting from Qt 4.2.0, QTextCodec::codecForLocale()->name() + // returns "System" + QTextCodec *codec = QTextCodec::codecForLocale(); + + return codec->name(); +#else + +#ifdef HAVE_LANGINFO_CODESET + return nl_langinfo(CODESET); +#else + char *p; - return codec->name(); + p = setlocale(LC_CTYPE, NULL); + if (p) + p = strchr(p, '.'); + + return p ? p + 1 : "UTF-8"; +#endif + +#endif } char * @@ -992,7 +1013,8 @@ char *QUimInputContext::get_compose_filename() char *p = buf; int n; char *args[2], *from, *to; - while ((unsigned char)isspace(*p)) { + // isspace for tab doesn't seem to work with Qt4... + while ((unsigned char)isspace(*p) || *p == '\t') { ++p; } if (iscomment(*p)) { @@ -1035,7 +1057,8 @@ parse_line(char *line, char **argv, int argsize) char *p = line; while (argc < argsize) { - while ((unsigned char)isspace(*p)) { + // isspace for tab doesn't seem to work with Qt4... + while ((unsigned char)isspace(*p) || *p == '\t') { ++p; } if (*p == '\0') { From df426d222e4c954d37ff0ec6ec28a773b6cd4fb8 Mon Sep 17 00:00:00 2001 From: iratqq Date: Sun, 20 Apr 2008 15:43:38 +0000 Subject: [PATCH 006/136] * Merge r5394 from trunk --- uim/wnnlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uim/wnnlib.c b/uim/wnnlib.c index 6f742acf1..120ad66da 100644 --- a/uim/wnnlib.c +++ b/uim/wnnlib.c @@ -3766,7 +3766,7 @@ static int uim_wnn_confirm(char *msg) { /* XXX */ - printf("wnn confirm: %s\n", msg); + fprintf(stderr, "wnn confirm: %s\n", msg); return 1; /* return Y */ } From afe6ed6bdf7489deca64bf04f6b6504338291705 Mon Sep 17 00:00:00 2001 From: iratqq Date: Sun, 20 Apr 2008 15:51:08 +0000 Subject: [PATCH 007/136] * Merge r5390 from trunk --- uim/wnnlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uim/wnnlib.c b/uim/wnnlib.c index 120ad66da..39f73ef4b 100644 --- a/uim/wnnlib.c +++ b/uim/wnnlib.c @@ -1407,7 +1407,7 @@ doKantanSConvert(jcConvBuf *buf, int cl) /* $BJQ49J8;zNs$ND9$5$N%A%'%C%/(B */ clp = buf->clauseInfo + cl; - len = jl_kanji_len(buf->wnn, cl); + len = jl_kanji_len(buf->wnn, cl, -1); diff = len - ((clp + 1)->dispp - clp->dispp); newlen = (buf->displayEnd - buf->displayBuf) + diff; if (newlen > buf->bufferSize) { From 55bb7bd494ec2ee5edda665ee3b9092409e50843 Mon Sep 17 00:00:00 2001 From: sasugaanija Date: Sun, 20 Apr 2008 16:03:09 +0000 Subject: [PATCH 008/136] * Merge r5413 from trunk --- emacs/uim-candidate.el | 161 ++++++++++++++++++++++++++--------------- emacs/uim-var.el | 9 +++ emacs/uim.el | 6 +- 3 files changed, 114 insertions(+), 62 deletions(-) diff --git a/emacs/uim-candidate.el b/emacs/uim-candidate.el index 20284d3e7..0921a3810 100644 --- a/emacs/uim-candidate.el +++ b/emacs/uim-candidate.el @@ -289,12 +289,20 @@ (defun uim-echo-candidate (cand) ;; display candidate in minibuffer - - (let ((cands "") + (let* ((cands "") (selstart 0) (selend 0) (page-current (format "%d" (caar cand))) (page-total (format "%d" (cdar cand))) + (cand-height 0) + (displayed nil) + (echo-max-height 1) + (page-space (- (string-width page-total) + (string-width page-current))) + (page-label (concat (if (> page-space 0) + (make-string page-space 32)) + page-current "/" page-total " ")) + cands-tmp ) (setq cand (cdr cand)) @@ -321,56 +329,85 @@ ) cand) - (if (and uim-emacs + (setq cands-tmp (concat page-label cands)) + + (if (and uim-allow-resize-echo-region + uim-emacs (>= emacs-major-version 21)) ;; Emcas-21 or Emacs-22 - (let ((page-space (- (string-width page-total) - (string-width page-current))) - message-log-max) - (setq cands - (concat (if (> page-space 0) (make-string page-space 32)) - page-current "/" page-total " " cands)) - (message cands) - ) - ;; Emacs-20 or XEmacs - (let* ((page-space (- (string-width page-total) - (string-width page-current))) - (page-label (concat (if (> page-space 0) - (make-string page-space 32)) - page-current "/" page-total " ")) + (let (message-log-max) + + (save-excursion + (set-buffer (get-buffer-create uim-el-candidates-buffer-name)) + (erase-buffer) + (insert cands-tmp) + (setq cand-height (+ (uim-vertical-distance 1 (buffer-end 1)) 1)) + (let ((current-minibuf (window-buffer (minibuffer-window)))) + (set-window-buffer (minibuffer-window) + uim-el-candidates-buffer-name) + (set-buffer (window-buffer (minibuffer-window))) + ;; estimate height of candidates in mini buffer + (setq cand-height (+ (uim-vertical-distance 1 (buffer-end 1)) 1)) + (set-window-buffer (minibuffer-window) current-minibuf)) + + (message cands-tmp) + (if (= (setq echo-max-height (window-height (minibuffer-window))) + cand-height) + (setq displayed t))))) + + (if (not displayed) + ;; Emacs-20 or XEmacs or uim-allow-resize-echo-region is nil + ;; or too small frame + (let* ((trimmed "") (page-width (string-width page-label)) + (page-cands-width (string-width cands-tmp)) (cands-width (string-width cands)) - (echoreg-width (- (- (window-width) 1) page-width))) + (candreg-width (- (- (* (window-width) echo-max-height) 1) + page-width))) - (cond ((>= echoreg-width cands-width) - (setq cands - (concat page-label cands))) + (cond ((>= candreg-width cands-width) + (setq trimmed cands-tmp)) + + ((<= (window-width) page-width) + ;; this part might not be reached + (setq trimmed (truncate-string-to-width page-label + (- (window-width) 1)))) + + ((<= (window-width) (+ page-width 6)) + (setq trimmed (concat page-label + (make-string + (- (window-width) page-width 1) + + ?.)))) ((= selstart 0) ;; | 10/134 [1.xxxxx] 2.yyyyy 3.zzzzz ...| (setq cands (truncate-string-to-width cands - (if (> echoreg-width 3) - (- echoreg-width 3) + (if (> candreg-width 3) + (- candreg-width 3) 0))) - (setq cands + (setq trimmed (concat page-label cands - (make-string (- echoreg-width + (make-string (- candreg-width (string-width cands)) ?.))) ) - ((> (string-width (substring cands 0 selstart)) - (+ (- cands-width echoreg-width) 3)) + + ((<= (string-width (substring cands selstart)) + (- candreg-width 3)) ;; at least 1 dot ;; | 10/134 ...yyy [3.zzzzz] (setq cands (truncate-string-to-width cands cands-width - (+ (- cands-width echoreg-width) 3))) - (setq cands + (+ (- cands-width + candreg-width) 3))) + + (setq trimmed (concat page-label - (make-string (- echoreg-width + (make-string (- candreg-width (string-width cands)) ?.) cands))) @@ -379,21 +416,17 @@ (setq cands (concat "..." (truncate-string-to-width (substring cands selstart) - (if (> echoreg-width 6) - (- echoreg-width 6) - 0)) - )) - (setq cands + (if (> candreg-width 6) + (- candreg-width 6) + 0)))) + (setq trimmed (concat page-label cands - (make-string (- echoreg-width + (make-string (- candreg-width (string-width cands)) - ?.)))))) - + ?.))))) (let (message-log-max) - (message cands)) - ) - + (message trimmed)))) ) ) @@ -499,7 +532,6 @@ ;; (defun uim-show-candidate (candidate) - ;; separate appendix (for prime...) (setq candidate (cons (car candidate) @@ -542,7 +574,8 @@ (setq uim-candidate-original-start nil) (setq uim-candidate-original-end nil) - (let ((display-inline uim-candidate-display-inline)) + (let ((display-inline uim-candidate-display-inline) + (upward-end-line nil)) (if (>= (max (+ uim-max-candlabel 6) (+ (string-width uim-candidate-page-label) 2)) @@ -560,7 +593,9 @@ (save-excursion (goto-char uim-candidate-start) - (let ((winofs (uim-get-window-offset)) + (let ((winofs (save-excursion + (goto-char uim-candidate-cursor) + (uim-get-window-offset))) (candlines (+ 1 (length uim-candidate-line-list))) ol-down dhead dtail uhead utail) @@ -574,14 +609,16 @@ candlines)) (end-of-line) (setq dtail (point)))))) + ;; + (save-excursion + (goto-char uim-candidate-cursor) (>= (- (- (window-height) 1) (+ winofs 1)) - candlines)) + (+ candlines 1)))) (progn (setq uim-show-candidate-upward nil) (setq uim-candidate-original-start dhead) - (setq uim-candidate-original-end dtail) - ) + (setq uim-candidate-original-end dtail)) (if (and (>= winofs candlines) (not (uim-check-overlay @@ -594,27 +631,27 @@ (setq utail (point))))) ) (progn + (save-excursion + (setq upward-end-line (uim-get-window-offset))) (setq uim-show-candidate-upward t) (setq uim-candidate-original-start uhead) - (setq uim-candidate-original-end utail) - ) + (setq uim-candidate-original-end utail)) - ;; scroll anyway - (if (not ol-down) - (let* ((fspace (- (- (- (window-height) 1) winofs) 1)) - (vshift (- candlines fspace))) + ;; Scroll buffer to show all candidates + (if (and (not ol-down) + (>= (- (window-height) 1) (+ candlines 1))) + (progn (setq uim-show-candidate-upward nil) + (if (not uim-window-force-scrolled-original) + (setq uim-window-force-scrolled-original + (window-start))) (setq uim-window-force-scrolled t) - (setq uim-candidate-original-start dhead) (setq uim-candidate-original-end dtail) - (if (> vshift winofs) - (recenter 0) (save-excursion - (uim-vertical-motion (- (- (window-height) - candlines 2))) - (recenter 0)))) + (goto-char uim-candidate-cursor) + (recenter (- (- (- (window-height) 1) candlines) 1)))) ;; disable inline display (setq display-inline nil) @@ -623,7 +660,11 @@ (if display-inline ;; inline candidate display mode (let ((inhibit-read-only t)) - (uim-merge-candidate)) + (uim-merge-candidate) + (if uim-show-candidate-upward + (save-excursion + (recenter upward-end-line))) + ) ;; display in echo region (uim-echo-candidate candidate) ) diff --git a/emacs/uim-var.el b/emacs/uim-var.el index cb5fb9847..d9ca5d599 100644 --- a/emacs/uim-var.el +++ b/emacs/uim-var.el @@ -113,6 +113,11 @@ displayed at the echo area.") "If the value is non-nil, appendixes are displayed with candidates." ) +;; allow resize of echo region +(defvar uim-allow-resize-echo-region t + "If the value is nil, uim.el uses only the 1st line of the echo-region and +keeps the size of it when showing the candidates.") + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -180,6 +185,8 @@ displayed at the echo area.") (defvar uim-helper-message "" "Buffer to store message from uim-el-helper-agent.") +(defconst uim-el-candidates-buffer-name " *uim-candidates*" + "Name of the buffer used to estimate candidates size.") ;; Timeout related variables (wait output from uim-el-agent) (defvar uim-el-agent-timeout 3) @@ -405,6 +412,8 @@ displayed at the echo area.") ;; save top point of current window to lock scroll (uim-deflocalvar uim-window-force-scrolled nil) +(uim-deflocalvar uim-window-force-scrolled-original nil) + (uim-deflocalvar uim-buffer-read-only nil) ;; save current menubar temporally for XEmacs diff --git a/emacs/uim.el b/emacs/uim.el index 2e8a79d90..517ee462a 100644 --- a/emacs/uim.el +++ b/emacs/uim.el @@ -1369,8 +1369,10 @@ (not uim-candidate-displayed) uim-window-force-scrolled) (setq uim-window-force-scrolled nil) - (recenter)) - + (save-excursion + (goto-char uim-window-force-scrolled-original) + (recenter 0)) + (setq uim-window-force-scrolled-original nil)) (if (not uim-send-recv-again) (when label From 9a07d0b28a5f7df7b0469fc0a79698fb7093a812 Mon Sep 17 00:00:00 2001 From: sasugaanija Date: Sun, 20 Apr 2008 16:04:42 +0000 Subject: [PATCH 009/136] * Merge r5419 from trunk --- emacs/uim-el-agent.c | 2 +- emacs/uim-util.el | 2 -- emacs/uim.el | 7 +++---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/emacs/uim-el-agent.c b/emacs/uim-el-agent.c index d147caa56..ad7e06aa5 100644 --- a/emacs/uim-el-agent.c +++ b/emacs/uim-el-agent.c @@ -92,7 +92,7 @@ cmd_unfocused(int context_id) { uim_agent_context *ua = get_uim_agent_context(context_id); - if (ua == current) { + if (ua) { /* keep preedit if exists */ show_preedit_uim_agent_context(ua); show_candidate_uim_agent_context(ua); diff --git a/emacs/uim-util.el b/emacs/uim-util.el index 4275afe9e..4bba4bdc6 100644 --- a/emacs/uim-util.el +++ b/emacs/uim-util.el @@ -299,8 +299,6 @@ (defun uim-goto-char (pt) (set-window-point (get-buffer-window (current-buffer)) pt)) -(defun uim-point () - (window-point (get-buffer-window (current-buffer)))) (defun uim-get-vector-from-head (vec n) (if (and (<= n (length vec)) diff --git a/emacs/uim.el b/emacs/uim.el index 517ee462a..657941f57 100644 --- a/emacs/uim.el +++ b/emacs/uim.el @@ -1156,8 +1156,7 @@ (setq preedit-existed t) (let ((inhibit-read-only t)) (uim-remove-preedit)) - (setq uim-preedit-displayed nil) - (uim-goto-char uim-original-cursor)) + (setq uim-preedit-displayed nil)) ;; restore cursor point (when (and uim-preedit-keymap-enabled uim-original-cursor) @@ -1304,7 +1303,7 @@ (when buffer-undo-list-saved (uim-save-undo)))) - (setq uim-original-cursor (uim-point)) + (setq uim-original-cursor (point)) (if (or preedit candidate) @@ -1334,7 +1333,7 @@ (uim-goto-char uim-preedit-cursor) - (setq uim-candidate-cursor (uim-point)) + (setq uim-candidate-cursor (point)) ;; show candidate (when (and candidate From 54c6c87a7cbaf8c007d20e78dc108471d94e26dd Mon Sep 17 00:00:00 2001 From: jhyeon Date: Sun, 20 Apr 2008 17:25:02 +0000 Subject: [PATCH 010/136] * branches/1.5/po/ko.po - merged r5398, r5401 from trunk --- po/ko.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/po/ko.po b/po/ko.po index 3d8a702a8..167e12cde 100644 --- a/po/ko.po +++ b/po/ko.po @@ -4662,7 +4662,7 @@ msgstr "" #: ../uim/uim-error.c:57 msgid "All functionality has been disabled to save user application data." -msgstr "" +msgstr "회복할 수 없는 오류가 발생하여 uim의 모든 기능을 정지하였습니다." #: ../uim/wnnlib.c:3739 ../uim/wnnlib.c:3753 #, c-format From b22785ecfa9efc0a2a198b33854927f2e1f39ef7 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Mon, 21 Apr 2008 02:56:57 +0000 Subject: [PATCH 011/136] * Merge r5433, 5418, 5397 from trunk. --- uim/uim-notify.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/uim/uim-notify.c b/uim/uim-notify.c index a2632718a..847c43f13 100644 --- a/uim/uim-notify.c +++ b/uim/uim-notify.c @@ -228,7 +228,7 @@ notify_get_plugins(void) const uim_notify_desc *desc; void *handle; uim_notify_desc *(*desc_func)(void); - char *str; + const char *str; plen = sizeof(NOTIFY_PLUGIN_PREFIX); slen = sizeof(NOTIFY_PLUGIN_SUFFIX); @@ -243,14 +243,13 @@ notify_get_plugins(void) while ((dp = readdir(dirp)) != NULL) { size_t len = strlen(dp->d_name); char path[PATH_MAX]; - - if ((len < plen + slen) || - (PATH_MAX < (sizeof(NOTIFY_PLUGIN_PATH "/") + len + 1)) || + if ((len < plen + slen - 1) || + (PATH_MAX < (sizeof(NOTIFY_PLUGIN_PATH "/") + len)) || (strcmp(dp->d_name, NOTIFY_PLUGIN_PREFIX) <= 0) || - (strcmp(dp->d_name + len - slen, NOTIFY_PLUGIN_SUFFIX) != 0)) + (strcmp(dp->d_name + len + 1 - slen, NOTIFY_PLUGIN_SUFFIX) != 0)) continue; - snprintf(path, PATH_MAX, "%s/%s", NOTIFY_PLUGIN_PATH, dp->d_name); + snprintf(path, sizeof(path), "%s/%s", NOTIFY_PLUGIN_PATH, dp->d_name); handle = dlopen(path, RTLD_NOW); if ((str = dlerror()) != NULL) { fprintf(stderr, "load failed %s(%s)\n", path, str); From 89c2186434762cfe12b8dc972f6f2ff8c4fd6658 Mon Sep 17 00:00:00 2001 From: "deton.kih" Date: Mon, 21 Apr 2008 11:27:49 +0000 Subject: [PATCH 012/136] * configure.ac: merge r5402 from trunk --- configure.ac | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index f59162eeb..32e0fade8 100644 --- a/configure.ac +++ b/configure.ac @@ -409,7 +409,7 @@ fprint_ll(FILE *f, long long n) int main(void) { FILE *f; - long long i, llmin, llmax = 0; + long long i, llmin, llmax = 0, llmin1, llmax1; if((f = fopen(DATA,"w")) == NULL) exit(1); @@ -427,7 +427,9 @@ int main(void) { #endif /* Sanity check */ - if (llmin + 1 < llmin || llmin - 1 < llmin || llmax + 1 > llmax + llmin1 = llmin - 1; + llmax1 = llmax + 1; + if (llmin + 1 < llmin || llmin1 < llmin || llmax1 > llmax || llmax - 1 > llmax || llmin == llmax || llmin == 0 || llmax == 0 || llmax < LONG_MAX || llmin > LONG_MIN) { fprintf(f, "unknown unknown\n"); From 9eb4bc9a5cb90745acae1a1b70433b486342d052 Mon Sep 17 00:00:00 2001 From: yamakenz Date: Sun, 27 Apr 2008 04:50:10 +0000 Subject: [PATCH 013/136] * branches/1.5 - Merge r5449 from trunk --- NEWS | 38 ++++++++++++++++++++++++++++++++++++++ RELNOTE | 10 +++++----- configure.ac | 4 +++- doc/RELEASING | 2 +- make-dist.sh | 4 ++-- 5 files changed, 49 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index b8104c41d..3477325f0 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,41 @@ +Overview of changes from 1.5.0-beta 1.5.0-beta2 +=============================================== +* Enhancements + - uim.el + * Improve candidates displaying on small window + * Improve candidates displaying when resizing of the echo region + is limited + * Improve buffer scrolling + + - Update translations + +* Fixes + - uim.el + * Fix serious bug and a related problem: + When several buffers on different frames display preedits at the + same time and user switches the focus from some frame to another + frame, the buffers are crashed. + + - Qt4 bridge (experimental) + * Fix X11 compose input support + + - Build problems + * Fix stdint definitions on Debian etch and gcc4 + * Fix 'make check' failure in po caused by intltool 0.36.2 + * Update SigScheme to 0.8.3 to fix indifinite 'make check' failure + on GC tests + + - uim-wnn + * Fix misused arguments of jl_kanji_len() + * Fix inappropriate message output to stdout that confuses uim.el + + - uim-notify + * Fix buffer size calculation + + - uim-m17nlib + * Plug memleak + + Overview of changes from 1.5.0-alpha 1.5.0-beta =============================================== * New features diff --git a/RELNOTE b/RELNOTE index 534bc76a3..ca9300c58 100644 --- a/RELNOTE +++ b/RELNOTE @@ -1,12 +1,12 @@ -uim 1.5.0-beta Release Note -=========================== +uim 1.5.0-beta2 Release Note +============================ About This Release ------------------ -This distribution of uim 1.5.0-beta is a preview release for testing -purpose. Since it may contain serious unknown problems, it should not be -used for important work. For such situations, use our latest stable +This distribution of uim 1.5.0-beta2 is a preview release for testing +purpose. Since it may contain serious unknown problems, it should not +be used for important work. For such situations, use our latest stable release uim 1.4.2. This release achieved both considerable internal improvement and many diff --git a/configure.ac b/configure.ac index 32e0fade8..bb2b81299 100644 --- a/configure.ac +++ b/configure.ac @@ -1005,7 +1005,9 @@ AM_CONDITIONAL(GXX, test x$ac_cv_cxx_compiler_gnu = xyes) # To get qt/chardict/po working, 0.35.2 is required. 0.35.[01] has a hard-coded # $(top_builddir) bug. -- YamaKen 2006-12-28 -IT_PROG_INTLTOOL([0.35.2], [no-xml]) +# +# 0.36.3 or later is required to resolve a 'make check' problem ([uim-ja 87]). +IT_PROG_INTLTOOL([0.36.3], [no-xml]) IT_PO_SUBDIR([qt/chardict/po]) diff --git a/doc/RELEASING b/doc/RELEASING index 4f9f851be..f4ac1ca19 100644 --- a/doc/RELEASING +++ b/doc/RELEASING @@ -78,7 +78,7 @@ release, you have to repeat the following procedure at least three times. 11. Make the distribution. - cd x.y.z + cd uim-x.y.z ./make-dist.sh Release suffixes such as '-alpha' and '-beta' is automatically appended. diff --git a/make-dist.sh b/make-dist.sh index 7f79d7761..c3591b72e 100755 --- a/make-dist.sh +++ b/make-dist.sh @@ -7,10 +7,10 @@ SSCM_REPOSITORY="${UIM_REPOSITORY}/sigscheme-trunk" LIBGCROOTS_REPOSITORY="${UIM_REPOSITORY}/libgcroots-trunk" TAGS_REPOSITORY="${UIM_REPOSITORY}/tags" #SSCM_URL="${SSCM_REPOSITORY}" -SSCM_URL="${TAGS_REPOSITORY}/sigscheme-0.8.2" +SSCM_URL="${TAGS_REPOSITORY}/sigscheme-0.8.3" #LIBGCROOTS_URL="${LIBGCROOTS_REPOSITORY}" LIBGCROOTS_URL="${TAGS_REPOSITORY}/libgcroots-0.2.1" -RELEASE_SUFFIX="-beta" +RELEASE_SUFFIX="-beta2" CONF_COMMON="--enable-maintainer-mode --disable-warnings-into-error" CONF_NONE="$CONF_COMMON --disable-debug --disable-fep --disable-emacs --disable-gnome-applet --disable-kde-applet --disable-pref --disable-dict --without-anthy --without-canna --without-mana --without-prime --without-m17nlib --without-scim --without-gtk2 --without-gnome2 --without-qt --without-qt-immodule --disable-compat-scm --without-eb --without-libedit" From 19b1d0abe66ee0198d53440b45585300c6049d9a Mon Sep 17 00:00:00 2001 From: yamakenz Date: Tue, 29 Apr 2008 01:39:34 +0000 Subject: [PATCH 014/136] * branches/1.5 - Merge r5464, 5465 from trunk --- NEWS | 14 ++++++++++---- RELNOTE | 9 +++------ doc/COMPATIBILITY | 6 +++--- make-dist.sh | 2 +- uim/uim.c | 5 ++++- 5 files changed, 21 insertions(+), 15 deletions(-) diff --git a/NEWS b/NEWS index 3477325f0..94e57a5d1 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,11 @@ -Overview of changes from 1.5.0-beta 1.5.0-beta2 -=============================================== +Overview of changes from 1.5.0-beta2 to 1.5.0 +============================================= +* Fixes + - Fix absense of 'uim' feature provision in early initialization stages + + +Overview of changes from 1.5.0-beta to 1.5.0-beta2 +================================================== * Enhancements - uim.el * Improve candidates displaying on small window @@ -36,8 +42,8 @@ Overview of changes from 1.5.0-beta 1.5.0-beta2 * Plug memleak -Overview of changes from 1.5.0-alpha 1.5.0-beta -=============================================== +Overview of changes from 1.5.0-alpha to 1.5.0-beta +================================================== * New features - Provide 'uim' on Scheme (See "Feature provision of 'uim'" of doc/COMPATIBILITY for further information) diff --git a/RELNOTE b/RELNOTE index ca9300c58..986f78976 100644 --- a/RELNOTE +++ b/RELNOTE @@ -1,13 +1,10 @@ -uim 1.5.0-beta2 Release Note -============================ +uim 1.5.0 Release Note +====================== About This Release ------------------ -This distribution of uim 1.5.0-beta2 is a preview release for testing -purpose. Since it may contain serious unknown problems, it should not -be used for important work. For such situations, use our latest stable -release uim 1.4.2. +This distribution of uim 1.5.0 is latest stable release of uim. This release achieved both considerable internal improvement and many user-visible new feature additions. diff --git a/doc/COMPATIBILITY b/doc/COMPATIBILITY index 00e0490f8..f3f7cc51a 100644 --- a/doc/COMPATIBILITY +++ b/doc/COMPATIBILITY @@ -60,9 +60,9 @@ The changes are described below in most recently updated order. Summary: Feature provision of 'uim' Affects: uim developers, IM developers Updates: -Version: 1.5.0-beta -Revision: ac5370 -Date: 2008-03-31 +Version: 1.5.0 +Revision: ac5370, ac5464 +Date: 2008-03-31, 2008-04-29 Modifier: YamaKen Related: URL: diff --git a/make-dist.sh b/make-dist.sh index c3591b72e..633b47959 100755 --- a/make-dist.sh +++ b/make-dist.sh @@ -10,7 +10,7 @@ TAGS_REPOSITORY="${UIM_REPOSITORY}/tags" SSCM_URL="${TAGS_REPOSITORY}/sigscheme-0.8.3" #LIBGCROOTS_URL="${LIBGCROOTS_REPOSITORY}" LIBGCROOTS_URL="${TAGS_REPOSITORY}/libgcroots-0.2.1" -RELEASE_SUFFIX="-beta2" +RELEASE_SUFFIX="" CONF_COMMON="--enable-maintainer-mode --disable-warnings-into-error" CONF_NONE="$CONF_COMMON --disable-debug --disable-fep --disable-emacs --disable-gnome-applet --disable-kde-applet --disable-pref --disable-dict --without-anthy --without-canna --without-mana --without-prime --without-m17nlib --without-scim --without-gtk2 --without-gnome2 --without-qt --without-qt-immodule --disable-compat-scm --without-eb --without-libedit" diff --git a/uim/uim.c b/uim/uim.c index 31d611e4a..12187dbb2 100644 --- a/uim/uim.c +++ b/uim/uim.c @@ -125,6 +125,10 @@ uim_init_internal(void *dummy) uim_scm_gc_protect(&protected0); uim_scm_gc_protect(&protected1); + /* To allow (cond-expand (uim ...)) in early initialization stages, + * provision of the "uim" should be performed as early as possible. */ + uim_scm_callf("provide", "s", "uim"); + uim_init_im_subrs(); uim_init_intl_subrs(); uim_init_posix_subrs(); @@ -152,7 +156,6 @@ uim_init_internal(void *dummy) uim_scm_set_lib_path(scm_files); uim_scm_require_file("init.scm"); - uim_scm_callf("provide", "s", "uim"); uim_initialized = UIM_TRUE; From 05e7cc164123b99ed16b3b644bf2c429d7aeb9d5 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Tue, 29 Apr 2008 02:11:33 +0000 Subject: [PATCH 015/136] * Port r5467 from trunk. --- NEWS | 3 --- 1 file changed, 3 deletions(-) diff --git a/NEWS b/NEWS index 94e57a5d1..6fa6a0068 100644 --- a/NEWS +++ b/NEWS @@ -38,9 +38,6 @@ Overview of changes from 1.5.0-beta to 1.5.0-beta2 - uim-notify * Fix buffer size calculation - - uim-m17nlib - * Plug memleak - Overview of changes from 1.5.0-alpha to 1.5.0-beta ================================================== From 0597d8e56bdc5d2b1cf8d8b4b7b2f59f5acea764 Mon Sep 17 00:00:00 2001 From: yamakenz Date: Tue, 6 May 2008 06:25:52 +0000 Subject: [PATCH 016/136] * branches/1.5 - Merge r5476 from trunk --- doc/RELEASING | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/RELEASING b/doc/RELEASING index f4ac1ca19..dea8f1266 100644 --- a/doc/RELEASING +++ b/doc/RELEASING @@ -116,7 +116,6 @@ release, you have to repeat the following procedure at least three times. http://code.google.com/p/uim/ http://code.google.com/p/uim/wiki/FrontPage - http://code.google.com/p/uim/wiki/UimDownload Update FrontPage first and copy it into the project description (homepage). @@ -131,7 +130,7 @@ release, you have to repeat the following procedure at least three times. - http://code.google.com/p/uim/wiki/UimDownload + http://code.google.com/p/uim/downloads/ MD5 (uim-1.4.0-example.tar.gz) = cff14a6ad95a6a1303b527a86d27bff4 MD5 (uim-1.4.0-example.tar.bz2) = b2e96af101a0c51df697990f6311f6f2 From ee5292f34f8c1c9b44401c56293fa45a5e793f1a Mon Sep 17 00:00:00 2001 From: yamakenz Date: Mon, 12 May 2008 12:36:31 +0000 Subject: [PATCH 017/136] * Port r5484, 5485 from trunk --- NEWS | 8 ++++++++ RELNOTE | 23 ++++++++++++++--------- configure.ac | 2 +- scm/lazy-load.scm | 4 ++-- uim/uim.h | 2 +- 5 files changed, 26 insertions(+), 13 deletions(-) diff --git a/NEWS b/NEWS index 6fa6a0068..a0c587982 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,11 @@ +Overview of changes from 1.5.0 to 1.5.1 +======================================= +* Fixes + - uim Scheme library + * Fix unescaped strings in generated loader.scm which causes uim + initialization error on m17n-vi-han (bug #15901) + + Overview of changes from 1.5.0-beta2 to 1.5.0 ============================================= * Fixes diff --git a/RELNOTE b/RELNOTE index 986f78976..aaee36147 100644 --- a/RELNOTE +++ b/RELNOTE @@ -1,17 +1,10 @@ -uim 1.5.0 Release Note +uim 1.5.1 Release Note ====================== About This Release ------------------ -This distribution of uim 1.5.0 is latest stable release of uim. - -This release achieved both considerable internal improvement and many -user-visible new feature additions. - -The complicated legacy C part of uim which prevented extensions, design -improvements and automated input method tests have been turned into Scheme -codes or optimized out. +This distribution of uim 1.5.1 is latest stable release of uim. Please report us if you find a problem. @@ -22,6 +15,18 @@ Bug tracking system: http://bugs.freedesktop.org/ What's New ---------- +Several bug fixes against 1.5.0. See NEWS for the detailed changes. + + +What's New in 1.5.0 +------------------- + +This release achieved both considerable internal improvement and many +user-visible new feature additions. + +The complicated legacy C part of uim which prevented extensions, design +improvements and automated input method tests have been turned into Scheme +codes or optimized out. See NEWS for the fully detailed changes. diff --git a/configure.ac b/configure.ac index bb2b81299..ff1541a14 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ(2.60b) -AC_INIT([uim], [1.5.0], [uim-en@googlegroups.com]) +AC_INIT([uim], [1.5.1], [uim-en@googlegroups.com]) AC_CONFIG_SRCDIR([uim/uim.c]) AC_CONFIG_HEADERS([uim/config.h]) AM_INIT_AUTOMAKE([1.10 dist-bzip2]) diff --git a/scm/lazy-load.scm b/scm/lazy-load.scm index e031f4ae8..65d92038d 100644 --- a/scm/lazy-load.scm +++ b/scm/lazy-load.scm @@ -91,8 +91,8 @@ " (" (symbol->string name) "\n" " \"" (im-lang im) "\"\n" " \"" (im-encoding im) "\"\n" - " \"" (im-name-label im) "\"\n" - " \"" (im-short-desc im) "\"\n" + " " (string-escape (im-name-label im)) "\n" + " " (string-escape (im-short-desc im)) "\n" " \"" (im-module-name im) "\")\n" ))) im-names))) diff --git a/uim/uim.h b/uim/uim.h index df696f089..88e68789e 100644 --- a/uim/uim.h +++ b/uim/uim.h @@ -43,7 +43,7 @@ extern "C" { #define UIM_VERSION_MAJOR (1) #define UIM_VERSION_MINOR (5) -#define UIM_VERSION_PATCHLEVEL (0) +#define UIM_VERSION_PATCHLEVEL (1) #define UIM_VERSION_REQUIRE(major, minor, patchlevel) \ ((major) < UIM_VERSION_MAJOR \ || ((major) == UIM_VERSION_MAJOR && (minor) < UIM_VERSION_MINOR) \ From ba0e13e6b1d08cfec84b3267e7468894edeb50fd Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Mon, 12 May 2008 15:31:29 +0000 Subject: [PATCH 018/136] * Merge r5487 from trunk. --- qt/Makefile.am | 6 ++-- qt/immodule-plugin.cpp | 5 +-- qt/immodule-quiminputcontext.cpp | 21 ----------- qt/immodule-quiminputcontext.h | 1 - qt/pref-qt.cpp | 7 ++-- uim/Makefile.am | 4 +++ uim/counted-init.c | 62 ++++++++++++++++++++++++++++++++ uim/counted-init.h | 49 +++++++++++++++++++++++++ 8 files changed, 126 insertions(+), 29 deletions(-) create mode 100644 uim/counted-init.c create mode 100644 uim/counted-init.h diff --git a/qt/Makefile.am b/qt/Makefile.am index df7de06e1..9d26fc7f7 100644 --- a/qt/Makefile.am +++ b/qt/Makefile.am @@ -105,7 +105,8 @@ libquiminputcontextplugin_la_SOURCES = \ immodule-subwindow.cpp immodule-subwindow.h libquiminputcontextplugin_la_CXXFLAGS = $(QT_CXXFLAGS) @X_CFLAGS@ libquiminputcontextplugin_la_LDFLAGS = $(QT_LDFLAGS) -avoid-version -libquiminputcontextplugin_la_LIBADD = $(top_builddir)/uim/libuim-scm.la \ +libquiminputcontextplugin_la_LIBADD = $(top_builddir)/uim/libuim-counted-init.la \ + $(top_builddir)/uim/libuim-scm.la \ $(top_builddir)/uim/libuim.la if LIBUIM_X_UTIL libquiminputcontextplugin_la_LIBADD += $(top_builddir)/uim/libuim-x-util.la @@ -182,7 +183,8 @@ uim_pref_qt_SOURCES = \ uim_pref_qt_CXXFLAGS = $(QT_CXXFLAGS) uim_pref_qt_LDFLAGS = $(QT_LDFLAGS) -uim_pref_qt_LDADD = $(top_builddir)/uim/libuim-custom.la \ +uim_pref_qt_LDADD = $(top_builddir)/uim/libuim-counted-init.la \ + $(top_builddir)/uim/libuim-custom.la \ $(top_builddir)/uim/libuim-scm.la \ $(top_builddir)/uim/libuim.la diff --git a/qt/immodule-plugin.cpp b/qt/immodule-plugin.cpp index f3e4f9c6e..3d55d57e7 100644 --- a/qt/immodule-plugin.cpp +++ b/qt/immodule-plugin.cpp @@ -40,6 +40,7 @@ SUCH DAMAGE. #include #include "uim/uim.h" +#include "uim/counted-init.h" #include "immodule-plugin.h" #include "immodule-quiminputcontext_with_slave.h" @@ -121,7 +122,7 @@ UimInputContextPlugin::getQUimInfoManager() void UimInputContextPlugin::uimInit() { - if ( !uim_init() ) { + if ( !uim_counted_init() ) { if (!infoManager) infoManager = new QUimInfoManager(); #if UIM_QT_USE_JAPANESE_KANA_KEYBOARD_HACK @@ -136,7 +137,7 @@ UimInputContextPlugin::uimQuit() { if ( uimReady ) { - uim_quit(); + uim_counted_quit(); delete infoManager; uimReady = false; } diff --git a/qt/immodule-quiminputcontext.cpp b/qt/immodule-quiminputcontext.cpp index 3f843c6df..3eb3d6d86 100644 --- a/qt/immodule-quiminputcontext.cpp +++ b/qt/immodule-quiminputcontext.cpp @@ -375,27 +375,6 @@ QUimInputContext * QUimInputContext::focusedIC() return focusedInputContext; } -void QUimInputContext::reloadUim() -{ - QUimInputContext *ic; - QUimInfoManager *infoManager = UimInputContextPlugin::getQUimInfoManager(); - - for ( ic = contextList.first(); ic; ic = contextList.next() ) - { - ic->reset(); - uim_release_context( ic->m_uc ); - } - - uim_quit(); - uim_init(); - infoManager->initUimInfo(); - - for ( ic = contextList.first(); ic; ic = contextList.next() ) - { - ic->m_uc = ic->createUimContext( ic->m_imname ); - } -} - void QUimInputContext::setMicroFocus( int x, int y, int w, int h, QFont * /* f */) { #ifdef ENABLE_DEBUG diff --git a/qt/immodule-quiminputcontext.h b/qt/immodule-quiminputcontext.h index a37c6ad97..29727bf9e 100644 --- a/qt/immodule-quiminputcontext.h +++ b/qt/immodule-quiminputcontext.h @@ -88,7 +88,6 @@ class QUimInputContext : public QInputContext uim_context uimContext() { return m_uc; } static QUimInputContext *focusedIC(); - static void reloadUim(); void commitString( const QString& str ); diff --git a/qt/pref-qt.cpp b/qt/pref-qt.cpp index a627657cd..12744b767 100644 --- a/qt/pref-qt.cpp +++ b/qt/pref-qt.cpp @@ -59,6 +59,7 @@ #include #include +#include "uim/counted-init.h" #include "qtgettext.h" #include @@ -70,7 +71,7 @@ UimPrefDialog::UimPrefDialog( QWidget *parent, const char *name ) : QDialog( parent, name ), m_isValueChanged( false ) { - uim_init(); + uim_counted_init(); if (uim_custom_enable()) { checkDotUimFile(); setupWidgets(); @@ -78,7 +79,7 @@ UimPrefDialog::UimPrefDialog( QWidget *parent, const char *name ) #if defined(ENABLE_DEBUG) qDebug("uim_custom_enable() failed."); #endif - uim_quit(); + uim_counted_quit(); QApplication::exit( -1 ); } @@ -87,7 +88,7 @@ UimPrefDialog::UimPrefDialog( QWidget *parent, const char *name ) UimPrefDialog::~UimPrefDialog() { - uim_quit(); + uim_counted_quit(); } void UimPrefDialog::checkDotUimFile() diff --git a/uim/Makefile.am b/uim/Makefile.am index d3e5f13b8..1e2b9f996 100644 --- a/uim/Makefile.am +++ b/uim/Makefile.am @@ -18,6 +18,7 @@ noinst_LTLIBRARIES = libuim-bsdlook.la if LIBUIM_X_UTIL noinst_LTLIBRARIES += libuim-x-util.la endif +noinst_LTLIBRARIES += libuim-counted-init.la # Although uim only needs *.so for the plugins, whether *.la is # installed or not is system-dependent and uim leaves it untouched. It @@ -210,6 +211,9 @@ libuim_custom_enabler_la_LIBADD = libuim-custom.la libuim-scm.la libuim.la libuim_custom_enabler_la_LDFLAGS = -rpath $(uim_plugindir) -avoid-version -module libuim_custom_enabler_la_CPPFLAGS = -I$(top_srcdir) +libuim_counted_init_la_SOURCES = counted-init.c counted-init.h +libuim_counted_init_la_CPPFLAGS = -I$(top_srcdir) + if LIBUIM_X_UTIL libuim_x_util_la_SOURCES = uim-x-util.h uim-x-kana-input-hack.c libuim_x_util_la_CPPFLAGS = -I$(top_srcdir) diff --git a/uim/counted-init.c b/uim/counted-init.c new file mode 100644 index 000000000..fb225dfd6 --- /dev/null +++ b/uim/counted-init.c @@ -0,0 +1,62 @@ +/* + +Copyright (c) 2008 uim Project http://code.google.com/p/uim/ + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. Neither the name of authors nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +*/ +#include + +#include "uim.h" +#include "counted-init.h" + +unsigned int uim_init_count; + +int uim_counted_init() +{ + uim_init_count++; + if (uim_init_count != 1) + return 0; + + return uim_init(); +} + +void uim_counted_quit() +{ + uim_init_count--; + if (uim_init_count != 0) + return; + + uim_quit(); +} + +void uim_force_quit_regardless_of_count() +{ + uim_init_count = 0; + uim_quit(); +} diff --git a/uim/counted-init.h b/uim/counted-init.h new file mode 100644 index 000000000..994a1fa49 --- /dev/null +++ b/uim/counted-init.h @@ -0,0 +1,49 @@ +/* + +Copyright (c) 2008 uim Project http://code.google.com/p/uim/ + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. Neither the name of authors nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +*/ + +#ifndef UIM_COUNTED_INIT_H +#define UIM_COUNTED_INIT_H + +#ifdef __cplusplus +extern "C" { +#endif + +int uim_counted_init(void); +void uim_counted_quit(void); +void uim_force_quit_regardless_of_count(void); + +#ifdef __cplusplus +} +#endif + +#endif From 3f1304297c084e453b9a908be8d41981e60e80ca Mon Sep 17 00:00:00 2001 From: yamakenz Date: Sat, 17 May 2008 02:09:18 +0000 Subject: [PATCH 019/136] * Port r5489-5490 from trunk --- NEWS | 12 ++++++++++-- uim/uim-custom.c | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index a0c587982..c972b6169 100644 --- a/NEWS +++ b/NEWS @@ -2,8 +2,16 @@ Overview of changes from 1.5.0 to 1.5.1 ======================================= * Fixes - uim Scheme library - * Fix unescaped strings in generated loader.scm which causes uim - initialization error on m17n-vi-han (bug #15901) + * [CRITICAL] Fix unescaped strings in generated loader.scm which + causes uim initialization error on m17n-vi-han (bug #15901) + + - uim-custom + * [CRITICAL] Fix an unterminated string that terminates uim-pref + on keybind customization + + - uim-pref-qt + * [CRITICAL] Fix improper uim initialization which causes + uim-pref-qt unworking (bug #15853) Overview of changes from 1.5.0-beta2 to 1.5.0 diff --git a/uim/uim-custom.c b/uim/uim-custom.c index 4ec2c2b04..c8031005f 100644 --- a/uim/uim-custom.c +++ b/uim/uim-custom.c @@ -401,6 +401,7 @@ c_list_to_str(const void *const *list, char *(*mapper)(const void *elem), const free(str); } buf = (char *)malloc(buf_size); + buf[0] = '\0'; for (bufp = buf, elem = list; *elem; elem++) { if (elem != list) { From d09618a0e881c40afc97d9c7451f014ba74c899d Mon Sep 17 00:00:00 2001 From: yamakenz Date: Sat, 17 May 2008 02:43:21 +0000 Subject: [PATCH 020/136] * Revert mismerged port r5491. Thanks for the letting me know --- NEWS | 12 ++---------- uim/uim-custom.c | 1 - 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/NEWS b/NEWS index c972b6169..a0c587982 100644 --- a/NEWS +++ b/NEWS @@ -2,16 +2,8 @@ Overview of changes from 1.5.0 to 1.5.1 ======================================= * Fixes - uim Scheme library - * [CRITICAL] Fix unescaped strings in generated loader.scm which - causes uim initialization error on m17n-vi-han (bug #15901) - - - uim-custom - * [CRITICAL] Fix an unterminated string that terminates uim-pref - on keybind customization - - - uim-pref-qt - * [CRITICAL] Fix improper uim initialization which causes - uim-pref-qt unworking (bug #15853) + * Fix unescaped strings in generated loader.scm which causes uim + initialization error on m17n-vi-han (bug #15901) Overview of changes from 1.5.0-beta2 to 1.5.0 diff --git a/uim/uim-custom.c b/uim/uim-custom.c index c8031005f..4ec2c2b04 100644 --- a/uim/uim-custom.c +++ b/uim/uim-custom.c @@ -401,7 +401,6 @@ c_list_to_str(const void *const *list, char *(*mapper)(const void *elem), const free(str); } buf = (char *)malloc(buf_size); - buf[0] = '\0'; for (bufp = buf, elem = list; *elem; elem++) { if (elem != list) { From 0b7c445e259c35a0be076f573cad1b35ded1cde7 Mon Sep 17 00:00:00 2001 From: yamakenz Date: Sat, 17 May 2008 02:49:24 +0000 Subject: [PATCH 021/136] * Port r5490, 5493 from trunk --- NEWS | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index a0c587982..babd58b84 100644 --- a/NEWS +++ b/NEWS @@ -2,8 +2,12 @@ Overview of changes from 1.5.0 to 1.5.1 ======================================= * Fixes - uim Scheme library - * Fix unescaped strings in generated loader.scm which causes uim - initialization error on m17n-vi-han (bug #15901) + * [CRITICAL] Fix unescaped strings in generated loader.scm which + causes uim initialization error on m17n-vi-han (bug #15901) + + - uim-pref-qt + * [CRITICAL] Fix improper uim initialization which causes + uim-pref-qt unworking (bug #15853) Overview of changes from 1.5.0-beta2 to 1.5.0 From 896b9ab5dbc87813d90c79be57d0b5bd2a8bf3e0 Mon Sep 17 00:00:00 2001 From: yamakenz Date: Sat, 17 May 2008 03:34:50 +0000 Subject: [PATCH 022/136] * branches/1.5/po/fr.po * branches/1.5/po/ko.po * branches/1.5/po/ja.po - Update Project-Id-Version to uim 1.5.1 --- po/fr.po | 4 ++-- po/ja.po | 4 ++-- po/ko.po | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/po/fr.po b/po/fr.po index 8e7a9ea32..9871128e1 100644 --- a/po/fr.po +++ b/po/fr.po @@ -5,10 +5,10 @@ # msgid "" msgstr "" -"Project-Id-Version: uim 1.4.0\n" +"Project-Id-Version: uim 1.5.1\n" "Report-Msgid-Bugs-To: uim-en@googlegroups.com\n" "POT-Creation-Date: 2008-03-30 06:19+0900\n" -"PO-Revision-Date: 2006-05-21 11:21+0900\n" +"PO-Revision-Date: 2008-05-17 12:32+0900\n" "Last-Translator: Thierry Vignaud \n" "Language-Team: fr \n" "MIME-Version: 1.0\n" diff --git a/po/ja.po b/po/ja.po index 9af3cf6f9..d054594f5 100644 --- a/po/ja.po +++ b/po/ja.po @@ -97,10 +97,10 @@ # msgid "" msgstr "" -"Project-Id-Version: uim 1.5.0\n" +"Project-Id-Version: uim 1.5.1\n" "Report-Msgid-Bugs-To: uim-en@googlegroups.com\n" "POT-Creation-Date: 2008-03-30 06:19+0900\n" -"PO-Revision-Date: 2008-03-30 06:25+0900\n" +"PO-Revision-Date: 2008-05-17 12:32+0900\n" "Last-Translator: YamaKen \n" "Language-Team: Japanese \n" "MIME-Version: 1.0\n" diff --git a/po/ko.po b/po/ko.po index 167e12cde..b24d3046c 100644 --- a/po/ko.po +++ b/po/ko.po @@ -6,10 +6,10 @@ # msgid "" msgstr "" -"Project-Id-Version: uim 1.4.0\n" +"Project-Id-Version: uim 1.5.1\n" "Report-Msgid-Bugs-To: uim-en@googlegroups.com\n" "POT-Creation-Date: 2008-03-30 06:19+0900\n" -"PO-Revision-Date: 2007-03-27 01:28+0900\n" +"PO-Revision-Date: 2008-05-17 12:32+0900\n" "Last-Translator: Jae-hyeon Park \n" "Language-Team: Korean \n" "MIME-Version: 1.0\n" From 31df887531423168b81228df49020c3c23412b3f Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Sun, 20 Jul 2008 17:55:58 +0000 Subject: [PATCH 023/136] * merge -r5496:5508 from trunk --- emacs/uim-el-helper-agent.c | 9 ++-- emacs/uim-key.el | 7 +-- emacs/uim-keymap.el | 91 ++++++++++++++++++++++++------------- emacs/uim-util.el | 4 +- emacs/uim.el | 21 ++++++++- scm/elatin.scm | 1 + scm/im-custom.scm | 54 ++++++++++++---------- scm/im.scm | 14 +++++- scm/prime.scm | 4 +- scm/trycode.scm | 4 +- uim/canna.c | 12 +++-- xim/ximserver.cpp | 8 ++-- 12 files changed, 146 insertions(+), 83 deletions(-) diff --git a/emacs/uim-el-helper-agent.c b/emacs/uim-el-helper-agent.c index 73620655d..3e9dbaea2 100644 --- a/emacs/uim-el-helper-agent.c +++ b/emacs/uim-el-helper-agent.c @@ -206,13 +206,10 @@ read_command() debug_printf(DEBUG_NOTE, "read command\n"); do { - if ((len = read(STDIN_FILENO, rbuf, sizeof(rbuf) - 1)) == -1 || len == 0) { - rbuf[0] = '\n'; - rbuf[1] = '\0'; - len = 1; + if ((len = read(STDIN_FILENO, rbuf, sizeof(rbuf) - 1)) == -1) debug_printf(DEBUG_NOTE, "stdin has corrupted\n"); - } else - rbuf[len] = '\0'; + + rbuf[len] = '\0'; if (strlen(cmdbuf) + len + 1 > cmdbuf_len) { cmdbuf_len += DEFAULT_MESSAGE_SIZE; diff --git a/emacs/uim-key.el b/emacs/uim-key.el index b204a0c82..63640196c 100644 --- a/emacs/uim-key.el +++ b/emacs/uim-key.el @@ -212,8 +212,8 @@ (setq last-command-char (aref (uim-get-vector-from-tail uim-key-vector 1) 0)) - (setq map (cdr (assq 'uim-mode minor-mode-map-alist))) - (setcdr (assq 'uim-mode minor-mode-map-alist) uim-dummy-map) + ;; backup current keymap of uim-mode + (setq map (uim-disable-keymap)) (if (or (and bind (eq bind 'digit-argument)) @@ -236,7 +236,8 @@ (buffer-live-p buffer)) (progn (set-buffer buffer) - (setcdr (assq 'uim-mode minor-mode-map-alist) map) + ;; restore keymap of uim-mode + (uim-set-keymap map) )) ))) diff --git a/emacs/uim-keymap.el b/emacs/uim-keymap.el index c2b91faad..a7a13259f 100644 --- a/emacs/uim-keymap.el +++ b/emacs/uim-keymap.el @@ -179,34 +179,68 @@ ) +;; +;; Disable other minor-mode keymaps while preedit strings or candidates +;; are displayed. +;; +(defun uim-disable-other-minor-mode-map () + (when (not uim-minor-mode-map-alist) + (setq uim-minor-mode-map-alist minor-mode-map-alist) + (setq minor-mode-map-alist (list (assq 'uim-mode minor-mode-map-alist))) + + (when (and uim-emacs (>= emacs-major-version 22)) + (setq uim-emulation-mode-map-alists emulation-mode-map-alists) + (setq emulation-mode-map-alists nil))) + ) + +(defun uim-enable-other-minor-mode-map () + (when uim-minor-mode-map-alist + (setq minor-mode-map-alist uim-minor-mode-map-alist) + (setq uim-minor-mode-map-alist nil) + + (when (and uim-emacs (>= emacs-major-version 22)) + (setq emulation-mode-map-alists uim-emulation-mode-map-alists) + (setq uim-emulation-mode-map-alists nil))) + ) + ;; -;; Switch keymap +;; Change keymap of uim-mode ;; -(defun uim-enable-mode-keymap () +(defun uim-set-keymap (map) (setcdr (assq 'uim-mode minor-mode-map-alist) - uim-mode-map)) + map)) -(defun uim-disable-mode-keymap () - (setcdr (assq 'uim-mode minor-mode-map-alist) - nil)) - -(defun uim-enable-preedit-keymap () - (when (not uim-preedit-keymap-enabled) +;; +;; Return current keymap of uim-mode +;; +(defun uim-get-keymap () + (cdr (assq 'uim-mode minor-mode-map-alist))) - (setq uim-preedit-keymap-enabled t) +;; +;; Set normal keymap +;; +(defun uim-enable-mode-keymap () + (uim-set-keymap uim-mode-map)) - (setcdr (assq 'uim-mode minor-mode-map-alist) - uim-preedit-map) +;; +;; Disable and return current keymap +;; +(defun uim-disable-keymap () + (let (map) + (setq map (uim-get-keymap)) + (uim-set-keymap uim-dummy-map) + map) + ) - ;; disable other keymaps - (when (not uim-minor-mode-map-alist) - (setq uim-minor-mode-map-alist minor-mode-map-alist) - (setq minor-mode-map-alist (list (assq 'uim-mode minor-mode-map-alist))) +;; +;; Set preedit keymap +;; +(defun uim-enable-preedit-keymap () + (when (not uim-preedit-keymap-enabled) + (setq uim-preedit-keymap-enabled t)) - (when (and uim-emacs (>= emacs-major-version 22)) - (setq uim-emulation-mode-map-alists emulation-mode-map-alists) - (setq emulation-mode-map-alists nil))) + (uim-set-keymap uim-preedit-map) (when uim-xemacs ;; disable toolbar and menubar @@ -214,29 +248,22 @@ (setq toolbar-map uim-toolbar-map) (uim-xemacs-save-menubar)) ) - ) +;; +;; Unset preedit keymap +;; (defun uim-disable-preedit-keymap () - (when uim-preedit-keymap-enabled - (setq uim-preedit-keymap-enabled nil) - ;; enable other keymaps - (when uim-minor-mode-map-alist - (setq minor-mode-map-alist uim-minor-mode-map-alist) - (setq uim-minor-mode-map-alist nil) - - (when (and uim-emacs (>= emacs-major-version 22)) - (setq emulation-mode-map-alists uim-emulation-mode-map-alists) - (setq uim-emulation-mode-map-alists nil))) + (when uim-preedit-keymap-enabled + (setq uim-preedit-keymap-enabled nil)) + (uim-enable-other-minor-mode-map) (uim-enable-mode-keymap) (when uim-xemacs ;;enable toolbar and menubar (kill-local-variable 'toolbar-map) (uim-xemacs-restore-menubar)) - - ) ) diff --git a/emacs/uim-util.el b/emacs/uim-util.el index 4bba4bdc6..7059f852d 100644 --- a/emacs/uim-util.el +++ b/emacs/uim-util.el @@ -270,7 +270,7 @@ (save-excursion (when (and (char-after) (= (char-after) ?\t)) - (insert-char 32) + (insert-char 32 1) (setq dummy-space t) )) @@ -291,7 +291,7 @@ ) (if dummy-space - (delete-char)) + (delete-char 1)) i )) diff --git a/emacs/uim.el b/emacs/uim.el index 657941f57..5f519ff40 100644 --- a/emacs/uim.el +++ b/emacs/uim.el @@ -64,7 +64,7 @@ (if (not (assq 'uim-mode minor-mode-map-alist)) (setq minor-mode-map-alist (cons - (cons 'uim-mode uim-mode-map) + (cons 'uim-mode nil) minor-mode-map-alist)))) @@ -183,6 +183,20 @@ ;; Focused ;; (defun uim-focused () + (if uim-preedit-keymap-enabled + (progn + ;; If preedit strings and/or candidates are displayed, + ;; other keymaps of minor-mode-map-alist should be disabled. + ;; Since minor-mode-map-alist is not a buffer local variable, + ;; we must re-enable the other keymaps of minor-mode-map-alist + ;; when the focus has moved to other buffer. + ;; So, we also need to re-disable other keymaps of minor-mode-map-alist + ;; when the focus has move to a buffer which have + ;; preedit strings and/or candidates. + (uim-disable-other-minor-mode-map) + (uim-enable-preedit-keymap)) + (uim-enable-mode-keymap)) + (uim-change-process-encoding uim-decoding-code) (setq uim-focused-buffer (current-buffer)) (uim-do-send-recv-cmd (format "%d FOCUSED" uim-context-id)) @@ -196,6 +210,9 @@ ;; don't send a message to uim-el-agent if it has been dead (if uim-el-agent-process (uim-do-send-recv-cmd (format "%d UNFOCUSED" uim-context-id))) + ;; Enable other keymaps of minor-mode-map-alist. See uim-focused. + (if uim-preedit-keymap-enabled + (uim-enable-other-minor-mode-map)) ) @@ -1116,6 +1133,7 @@ (defun uim-enter-preedit-mode () ;; change keymap and freeze faces at first time (uim-enable-preedit-keymap) + (uim-disable-other-minor-mode-map) (when (= (minibuffer-depth) 0) (uim-freeze-buffer) (setq uim-buffer-read-only buffer-read-only) @@ -1431,6 +1449,7 @@ ;; initialize minor-mode (uim-init-minor-mode) + (uim-enable-mode-keymap) ;; initialize keymap (uim-init-keymap) diff --git a/scm/elatin.scm b/scm/elatin.scm index 6d2d8a0c0..7b40aa2b6 100644 --- a/scm/elatin.scm +++ b/scm/elatin.scm @@ -36,6 +36,7 @@ (require "util.scm") (require "rk.scm") (require "elatin-rules.scm") +(require-custom "generic-key-custom.scm") (require-custom "elatin-custom.scm") (define elatin-context-rec-spec diff --git a/scm/im-custom.scm b/scm/im-custom.scm index 1d2f21bf5..35e1aafaa 100644 --- a/scm/im-custom.scm +++ b/scm/im-custom.scm @@ -274,34 +274,38 @@ ;; ;; im-switching ;; +(define-custom-group 'im-switching + (N_ "Input method switching") + (N_ "long description will be here.")) -;; I think that current "im-switching by hotkey" feature is not -;; useful. So commented out them to avoid confusion of users. -;; -- YamaKen 2005-02-01 +(define-custom 'enable-im-switch #f + '(global im-switching) + '(boolean) + (N_ "Enable IM switching by hotkey") + (N_ "long description will be here.")) -;;(define-custom-group 'im-switching -;; (N_ "Input method switching") -;; (N_ "long description will be here.")) -;; -;;(define-custom 'enable-im-switch #f -;; '(global im-switching) -;; '(boolean) -;; (N_ "Enable IM switching by hotkey") -;; (N_ "long description will be here.")) -;; -;;(define-custom 'switch-im-key '("Shift_key" "Control_key") -;; '(global im-switching) -;; '(key) -;; (N_ "IM switching key") -;; (N_ "long description will be here.")) -;; -;;;; activity dependency -;;(custom-add-hook 'switch-im-key? -;; 'custom-activity-hooks -;; (lambda () -;; enable-im-switch)) +(define-custom 'switch-im-key '("Shift_key" "Control_key") + '(global im-switching) + '(key) + (N_ "IM switching key") + (N_ "long description will be here.")) -(define-key switch-im-key? '()) +(define-custom 'switch-im-skip-direct-im? #f + '(global im-switching) + '(boolean) + (N_ "Skip direct method for IM switching by hotkey") + (N_ "long description will be here.")) + +;; activity dependency +(custom-add-hook 'switch-im-key? + 'custom-activity-hooks + (lambda () + enable-im-switch)) + +(custom-add-hook 'switch-im-skip-direct-im? + 'custom-activity-hooks + (lambda () + enable-im-switch)) ;; im-toggle (define-custom-group 'im-toggle diff --git a/scm/im.scm b/scm/im.scm index 0354b3e91..a150f44da 100644 --- a/scm/im.scm +++ b/scm/im.scm @@ -246,18 +246,28 @@ (define next-im (lambda (name) - (let* ((im-names (map car im-list)) + (let* ((im-names enabled-im-list) (im-rest (memq name im-names))) (or (and im-rest (pair? (cdr im-rest)) (cadr im-rest)) (car im-names))))) +(define next-im-for-switch-im + (lambda (name) + (let ((im (next-im name))) + (or + (and + switch-im-skip-direct-im? + (eq? im 'direct) + (next-im im)) + im)))) + ;; 'switch-im' is not a API but an IM-switching method. Don't confuse with ;; im-switch-im (define switch-im (lambda (uc name) - (im-switch-im uc (next-im name)))) + (im-switch-im uc (next-im-for-switch-im name)))) ;; FIXME: Input states are kept only if the state is appeared in the ;; toolbar. diff --git a/scm/prime.scm b/scm/prime.scm index 8300a690d..88a1f51ad 100644 --- a/scm/prime.scm +++ b/scm/prime.scm @@ -59,7 +59,7 @@ (define-key prime-escape-key? '("escape" "[")) (define-key prime-space-key? '(" ")) -(define prime-app-mode-end-stroke-list #f) +(define prime-app-mode-end-stroke-list '()) ;;;; If you're a Vi user, modify the lines below. (define prime-configure-app-mode-vi (lambda () @@ -72,7 +72,7 @@ (begin ;; Default (define-key prime-app-mode-start-key? #f) - (set! prime-app-mode-end-stroke-list #f))))) + (set! prime-app-mode-end-stroke-list '()))))) (prime-configure-app-mode-vi) diff --git a/scm/trycode.scm b/scm/trycode.scm index d9c2ee7cd..c0c235919 100644 --- a/scm/trycode.scm +++ b/scm/trycode.scm @@ -27,7 +27,7 @@ ;;; OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ;;; SUCH DAMAGE. ;;;; -;; 2007-12-10 version +;; 2008-04-18 version ;; (require "generic.scm") @@ -1534,7 +1534,7 @@ ((("r" "v"))("")) (((" " "r" "v"))("")) ((("l" "v"))("")) (((" " "l" "v"))("˦")) ((("a" "v"))("")) (((" " "a" "v"))("̻")) - ((("o" "v"))("")) (((" " "o" "v"))("")) + ((("o" "v"))("")) (((" " "o" "v"))("ǣ")) ((("e" "v"))("")) (((" " "e" "v"))("")) ((("u" "v"))("")) (((" " "u" "v"))("")) ((("i" "v"))("")) (((" " "i" "v"))("")) diff --git a/uim/canna.c b/uim/canna.c index 09269c22d..608f34d5a 100644 --- a/uim/canna.c +++ b/uim/canna.c @@ -120,8 +120,10 @@ init_canna_lib(uim_lisp str_) * initialization is exist at beginning of create_context(). I don't * know why this sequence is needed at here. -- YamaKen 2007-07-21 */ if (rk_initialized == -1) { - if (RkInitialize(cannaserver) == ERR) - uim_fatal_error("RkInitialize() failed"); + if (RkInitialize(cannaserver) == ERR) { + uim_notify_fatal("RkInitialize() failed"); + return uim_scm_f(); + } RkFinalize(); } @@ -138,8 +140,10 @@ create_context(void) int buflen, i; if (rk_initialized == -1) { - if (RkInitialize(cannaserver) == ERR) - uim_fatal_error("RkInitialize() failed"); + if (RkInitialize(cannaserver) == ERR) { + uim_notify_fatal("RkInitialize() failed"); + return uim_scm_f(); + } rk_initialized = 1; } diff --git a/xim/ximserver.cpp b/xim/ximserver.cpp index 0d450eadf..110e3ee5f 100644 --- a/xim/ximserver.cpp +++ b/xim/ximserver.cpp @@ -1105,10 +1105,6 @@ void keyState::check_key(keyEventX *x) if (x->state & Mod5Mask) mModifier |= (gMod5Mask & mPreModState); -#if UIM_XIM_USE_JAPANESE_KANA_KEYBOARD_HACK - mKey = uim_x_kana_input_hack_translate_key(x->key_sym, - (KeyCode)x->ev.xkey.keycode); -#endif if (x->key_sym < 128 && x->key_sym >= 32) mKey = x->key_sym; else if (x->key_sym >= XK_F1 && x->key_sym <= XK_F35) @@ -1165,6 +1161,10 @@ void keyState::check_key(keyEventX *x) mKey = UKey_Other; } } +#if UIM_XIM_USE_JAPANESE_KANA_KEYBOARD_HACK + mKey = uim_x_kana_input_hack_translate_key(mKey, + (KeyCode)x->ev.xkey.keycode); +#endif } bool keyState::check_compose() From 4934314bef8be248f3afa39d69de12857b978980 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Sun, 20 Jul 2008 18:06:03 +0000 Subject: [PATCH 024/136] * configure.ac * NEWS * uim/uim.h - Update for 1.5.2. --- NEWS | 31 +++++++++++++++++++++++++++++++ configure.ac | 2 +- uim/uim.h | 2 +- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index babd58b84..145008606 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,34 @@ +Overview of changes from 1.5.1 to 1.5.2 +======================================= +* Enhancements + - Enable input method rotation by hotkeys + + - uim-trycode + * Updated the composition table to 2008-04-18 version + +* Fixes + - uim.el + * [CRITICAL] Fix breaking minor-mode-map-alist in some cases. + * [CRITICAL] Fix uim-el-helper-agent + * Fix displaying candidates when a right-hand neighbor + character of the cursor is a horizontal-tab + + - uim-xim + * Fix Japanese kana-keyboard input hack to distinguish 'kana_RO' + key and backslash key + + - uim-canna + * Don't disable libuim functionality even when canna server is + stopped. + + - uim-elatin + * Fix problem when only elatin IM is loaded. + + - uim-prime + * Fix crash when input mode is forced to set as app-mode by + toolbar menu while "Enable vi-cooperative mode" is off. + + Overview of changes from 1.5.0 to 1.5.1 ======================================= * Fixes diff --git a/configure.ac b/configure.ac index ff1541a14..b35714214 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ(2.60b) -AC_INIT([uim], [1.5.1], [uim-en@googlegroups.com]) +AC_INIT([uim], [1.5.2], [uim-en@googlegroups.com]) AC_CONFIG_SRCDIR([uim/uim.c]) AC_CONFIG_HEADERS([uim/config.h]) AM_INIT_AUTOMAKE([1.10 dist-bzip2]) diff --git a/uim/uim.h b/uim/uim.h index 88e68789e..f60333428 100644 --- a/uim/uim.h +++ b/uim/uim.h @@ -43,7 +43,7 @@ extern "C" { #define UIM_VERSION_MAJOR (1) #define UIM_VERSION_MINOR (5) -#define UIM_VERSION_PATCHLEVEL (1) +#define UIM_VERSION_PATCHLEVEL (2) #define UIM_VERSION_REQUIRE(major, minor, patchlevel) \ ((major) < UIM_VERSION_MAJOR \ || ((major) == UIM_VERSION_MAJOR && (minor) < UIM_VERSION_MINOR) \ From afb2b92d6e888b75a779c538deeca1529fecfcd7 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Wed, 23 Jul 2008 07:09:39 +0000 Subject: [PATCH 025/136] * Port r5511 from trunk. --- uim/canna.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/uim/canna.c b/uim/canna.c index 608f34d5a..d908b084a 100644 --- a/uim/canna.c +++ b/uim/canna.c @@ -213,7 +213,7 @@ release_context(uim_lisp cc_) free(cc); if (err) - uim_fatal_error("canna-lib-release-context failed"); + uim_notify_fatal("canna-lib-release-context failed"); return uim_scm_f(); } @@ -264,8 +264,10 @@ begin_conversion(uim_lisp cc_, uim_lisp str_) len = strlen(str); segment_num = RkBgnBun(cc->rk_context_id, (char *)str, len, mode); - if (segment_num == ERR) - uim_fatal_error("RkBgnBun() failed"); + if (segment_num == ERR) { + uim_notify_fatal("RkBgnBun() failed"); + return uim_scm_f(); + } cc->segment_num = segment_num; _update_status(cc); From a329ea32f168e4190b903a8aad4f51401bbd0787 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Wed, 23 Jul 2008 09:52:03 +0000 Subject: [PATCH 026/136] * Port r5513 from trunk. --- uim/canna.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/uim/canna.c b/uim/canna.c index d908b084a..aca0d9274 100644 --- a/uim/canna.c +++ b/uim/canna.c @@ -151,7 +151,10 @@ create_context(void) cc->rk_context_id = RkCreateContext(); if (cc->rk_context_id == ERR) { free(cc); - uim_fatal_error("RkCreateContext() failed"); + RkFinalize(); + rk_initialized = -1; + uim_notify_fatal("RkCreateContext() failed"); + return uim_scm_f(); } cc->rk_mode = (RK_XFER << RK_XFERBITS) | RK_KFER; From e6410375a604673a310d4be6297ad97c22d41ea2 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Sun, 3 Aug 2008 04:59:39 +0000 Subject: [PATCH 027/136] * RELNOTE: Update for 1.5.2. --- RELNOTE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RELNOTE b/RELNOTE index aaee36147..a7e1de2b9 100644 --- a/RELNOTE +++ b/RELNOTE @@ -1,10 +1,10 @@ -uim 1.5.1 Release Note +uim 1.5.2 Release Note ====================== About This Release ------------------ -This distribution of uim 1.5.1 is latest stable release of uim. +This distribution of uim 1.5.2 is latest stable release of uim. Please report us if you find a problem. @@ -15,7 +15,7 @@ Bug tracking system: http://bugs.freedesktop.org/ What's New ---------- -Several bug fixes against 1.5.0. See NEWS for the detailed changes. +Critial bug fixes for uim.el users and a few minor fixes against 1.5.1. See NEWS for the detailed changes. What's New in 1.5.0 From ee15ca1b5a1537bb3d2c95d060d41b6141e0f5cd Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Sun, 3 Aug 2008 05:12:22 +0000 Subject: [PATCH 028/136] * Port r5516 from trunk. --- po/fr.po | 231 +++++++++++++++++++------------------------------------ 1 file changed, 77 insertions(+), 154 deletions(-) diff --git a/po/fr.po b/po/fr.po index 9871128e1..159d65c47 100644 --- a/po/fr.po +++ b/po/fr.po @@ -20,14 +20,12 @@ msgid "Indicates and controls the state of input method (for uim)" msgstr "" #: ../helper/GNOME_UimApplet.server.in.in.h:2 -#, fuzzy msgid "Input Method Indicator" -msgstr "Nom de la méthode d'entrée" +msgstr "" #: ../helper/GNOME_UimApplet.server.in.in.h:3 -#, fuzzy msgid "Utilities" -msgstr "Utilitaire" +msgstr "" #: ../helper/GNOME_UimApplet.server.in.in.h:4 msgid "uim Applet Factory" @@ -330,9 +328,8 @@ msgid "Part of speech is emtpy!" msgstr "" #: ../helper/eggtrayicon.c:118 -#, fuzzy msgid "Orientation" -msgstr "Annotation" +msgstr "" #: ../helper/eggtrayicon.c:119 msgid "The orientation of the tray." @@ -410,9 +407,8 @@ msgid "academic" msgstr "" #: ../helper/input-pad-ja.c:537 -#, fuzzy msgid "greek" -msgstr "Grec" +msgstr "" #: ../helper/input-pad-ja.c:540 msgid "cyrillic" @@ -1813,14 +1809,12 @@ msgid "Pass through all user input without any modification" msgstr "" #: ../scm/elatin-custom.scm:34 -#, fuzzy msgid "ELatin" -msgstr "Latin" +msgstr "" #: ../scm/elatin-custom.scm:35 -#, fuzzy msgid "Emacs-style Latin characters input" -msgstr "Caractères latins" +msgstr "" #: ../scm/elatin-custom.scm:36 msgid "" @@ -1829,19 +1823,16 @@ msgid "" msgstr "" #: ../scm/elatin-custom.scm:50 -#, fuzzy msgid "British" -msgstr "Irlandais" +msgstr "" #: ../scm/elatin-custom.scm:53 -#, fuzzy msgid "Catalan prefix" -msgstr "Catalan" +msgstr "" #: ../scm/elatin-custom.scm:56 -#, fuzzy msgid "Danish postfix" -msgstr "Danois" +msgstr "" #: ../scm/elatin-custom.scm:59 msgid "Danish alternative postfix" @@ -1856,47 +1847,40 @@ msgid "Dutch" msgstr "Hollandais" #: ../scm/elatin-custom.scm:68 -#, fuzzy msgid "English Dvorak" -msgstr "Anglais" +msgstr "" #: ../scm/elatin-custom.scm:71 -#, fuzzy msgid "Esperanto prefix" -msgstr "Esperanto" +msgstr "" #: ../scm/elatin-custom.scm:74 -#, fuzzy msgid "Esperanto postfix" -msgstr "Esperanto" +msgstr "" #: ../scm/elatin-custom.scm:77 msgid "Esperanto alternative postfix" msgstr "" #: ../scm/elatin-custom.scm:80 -#, fuzzy msgid "Finnish postfix" -msgstr "Finlandais" +msgstr "" #: ../scm/elatin-custom.scm:83 msgid "Finnish alternative postfix" msgstr "" #: ../scm/elatin-custom.scm:86 -#, fuzzy msgid "Finnish keyboard" -msgstr "Finlandais" +msgstr "" #: ../scm/elatin-custom.scm:89 -#, fuzzy msgid "French prefix" -msgstr "Français" +msgstr "" #: ../scm/elatin-custom.scm:92 -#, fuzzy msgid "French postfix" -msgstr "Français" +msgstr "" #: ../scm/elatin-custom.scm:95 msgid "French alternative postfix" @@ -1907,19 +1891,16 @@ msgid "French keyboard" msgstr "" #: ../scm/elatin-custom.scm:101 -#, fuzzy msgid "French AZERTY" -msgstr "Français" +msgstr "" #: ../scm/elatin-custom.scm:104 -#, fuzzy msgid "German prefix" -msgstr "Allemand" +msgstr "" #: ../scm/elatin-custom.scm:107 -#, fuzzy msgid "German postfix" -msgstr "Allemand" +msgstr "" #: ../scm/elatin-custom.scm:110 msgid "German alternative postfix" @@ -1930,36 +1911,32 @@ msgid "German" msgstr "Allemand" #: ../scm/elatin-custom.scm:116 -#, fuzzy msgid "Icelandic postfix" -msgstr "Islandais" +msgstr "" #: ../scm/elatin-custom.scm:119 msgid "Icelandic alternative postfix" msgstr "" #: ../scm/elatin-custom.scm:122 -#, fuzzy msgid "Icelandic keyboard" -msgstr "Islandais" +msgstr "" #: ../scm/elatin-custom.scm:125 msgid "Irish prefix" msgstr "" #: ../scm/elatin-custom.scm:128 -#, fuzzy msgid "Italian postfix" -msgstr "Italien" +msgstr "" #: ../scm/elatin-custom.scm:131 msgid "Italian alternative postfix" msgstr "" #: ../scm/elatin-custom.scm:134 -#, fuzzy msgid "Italian keyboard" -msgstr "Italien" +msgstr "" #: ../scm/elatin-custom.scm:137 msgid "Latin prefix" @@ -2038,43 +2015,36 @@ msgid "Latvian keyboard" msgstr "" #: ../scm/elatin-custom.scm:194 -#, fuzzy msgid "Lithuanian keyboard" -msgstr "Lituanien" +msgstr "" #: ../scm/elatin-custom.scm:197 -#, fuzzy msgid "Lithuanian numeric" -msgstr "Lituanien" +msgstr "" #: ../scm/elatin-custom.scm:200 -#, fuzzy msgid "Norwegian postfix" -msgstr "Norvégien" +msgstr "" #: ../scm/elatin-custom.scm:203 msgid "Norwegian alternative postfix" msgstr "" #: ../scm/elatin-custom.scm:206 -#, fuzzy msgid "Norwegian keyboard" -msgstr "Norvégien" +msgstr "" #: ../scm/elatin-custom.scm:209 -#, fuzzy msgid "Polish slash" -msgstr "Polonais" +msgstr "" #: ../scm/elatin-custom.scm:212 -#, fuzzy msgid "Portuguese prefix" -msgstr "Portugais" +msgstr "" #: ../scm/elatin-custom.scm:215 -#, fuzzy msgid "Romanian prefix" -msgstr "Roumain" +msgstr "" #: ../scm/elatin-custom.scm:218 msgid "Romanian alternative prefix" @@ -2093,42 +2063,36 @@ msgid "Slovenian" msgstr "Slovène" #: ../scm/elatin-custom.scm:230 -#, fuzzy msgid "Spanish prefix" -msgstr "Espagnol" +msgstr "" #: ../scm/elatin-custom.scm:233 -#, fuzzy msgid "Spanish postfix" -msgstr "Espagnol" +msgstr "" #: ../scm/elatin-custom.scm:236 msgid "Spanish alternative postfix" msgstr "" #: ../scm/elatin-custom.scm:239 -#, fuzzy msgid "Spanish keyboard" -msgstr "Espagnol" +msgstr "" #: ../scm/elatin-custom.scm:242 -#, fuzzy msgid "Swedish postfix" -msgstr "Suédois" +msgstr "" #: ../scm/elatin-custom.scm:245 msgid "Swedish alternative postfix" msgstr "" #: ../scm/elatin-custom.scm:248 -#, fuzzy msgid "Swedish keyboard" -msgstr "Suédois" +msgstr "" #: ../scm/elatin-custom.scm:251 -#, fuzzy msgid "Turkish postfix" -msgstr "Turque" +msgstr "" #: ../scm/elatin-custom.scm:254 msgid "Turkish alternative postfix" @@ -2143,9 +2107,8 @@ msgid "Turkish Latin-3 alternative postfix" msgstr "" #: ../scm/elatin-custom.scm:262 -#, fuzzy msgid "Latin characters keyboard layout" -msgstr "Caractères latins" +msgstr "" #: ../scm/elatin-custom.scm:280 msgid "ESC turns off composition mode (for vi users)" @@ -2156,14 +2119,12 @@ msgid "ELatin key bindings" msgstr "" #: ../scm/elatin-custom.scm:291 -#, fuzzy msgid "[ELatin] on" -msgstr "Latin" +msgstr "" #: ../scm/elatin-custom.scm:297 -#, fuzzy msgid "[ELatin] off" -msgstr "[PRIME] désactivé" +msgstr "" #: ../scm/elatin-custom.scm:303 msgid "[ELatin] backspace" @@ -2178,9 +2139,8 @@ msgid "ELatin composition off" msgstr "" #: ../scm/elatin.scm:127 -#, fuzzy msgid "ELatin mode on" -msgstr "[SKK] mode latin" +msgstr "" #: ../scm/elatin.scm:128 msgid "ELatin composition on" @@ -3172,23 +3132,20 @@ msgid "Look" msgstr "" #: ../scm/look-custom.scm:32 ../scm/look.scm:560 -#, fuzzy msgid "Tiny predictive input method" -msgstr "Méthodes d'entrée activées" +msgstr "" #: ../scm/look-custom.scm:39 msgid "Look key bindings" msgstr "" #: ../scm/look-custom.scm:46 -#, fuzzy msgid "[Look] Use UNIX look dictionary file" -msgstr "Fichier du dictionnaire personnel" +msgstr "" #: ../scm/look-custom.scm:53 -#, fuzzy msgid "[Look] Personal dictionary file" -msgstr "Fichier du dictionnaire personnel" +msgstr "" #: ../scm/look-custom.scm:59 msgid "[Look] beginning character length of predicting" @@ -3215,14 +3172,12 @@ msgid "[Look] off" msgstr "" #: ../scm/look-custom.scm:95 -#, fuzzy msgid "[Look] completion character" -msgstr "Caractères latins" +msgstr "" #: ../scm/look-custom.scm:101 -#, fuzzy msgid "[Look] next character" -msgstr "Caractères latins" +msgstr "" #: ../scm/look-custom.scm:107 msgid "[Look] previous character" @@ -3237,9 +3192,8 @@ msgid "[Look] previous candidate" msgstr "" #: ../scm/look-custom.scm:125 -#, fuzzy msgid "[Look] save dictionary" -msgstr "Éditer le dictionnaire" +msgstr "" #: ../scm/look-custom.scm:131 msgid "[Look] load dictionary" @@ -3258,9 +3212,8 @@ msgid "Look Direct Input Mode" msgstr "" #: ../scm/look.scm:78 -#, fuzzy msgid "Look Input Mode" -msgstr "Nom de la méthode d'entrée" +msgstr "" #: ../scm/mana-custom.scm:35 msgid "Mana" @@ -3683,9 +3636,8 @@ msgid "SJ3 server" msgstr "" #: ../scm/sj3-custom.scm:47 -#, fuzzy msgid "SJ3 (advanced)" -msgstr "SKK (avancé)" +msgstr "" #: ../scm/sj3-custom.scm:307 msgid "Use value of use remote SJ3 server" @@ -3756,14 +3708,12 @@ msgid "[SJ3] commit as transposed kana" msgstr "" #: ../scm/sj3-key-custom.scm:116 -#, fuzzy msgid "[SJ3] on" -msgstr "[SKK] activé" +msgstr "" #: ../scm/sj3-key-custom.scm:123 -#, fuzzy msgid "[SJ3] off" -msgstr "[PRIME] désactivé" +msgstr "" #: ../scm/sj3-key-custom.scm:129 msgid "[SJ3] begin conversion" @@ -3774,9 +3724,8 @@ msgid "[SJ3] commit" msgstr "" #: ../scm/sj3-key-custom.scm:141 -#, fuzzy msgid "[SJ3] cancel" -msgstr "[SKK] annuler" +msgstr "" #: ../scm/sj3-key-custom.scm:147 msgid "[SJ3] next candidate" @@ -3815,9 +3764,8 @@ msgid "[SJ3] backspace" msgstr "" #: ../scm/sj3-key-custom.scm:204 -#, fuzzy msgid "[SJ3] delete" -msgstr "[PRIME] effacer" +msgstr "" #: ../scm/sj3-key-custom.scm:210 msgid "[SJ3] go left" @@ -3832,14 +3780,12 @@ msgid "[SJ3] ESC keys on vi-cooperative mode" msgstr "" #: ../scm/sj3-key-custom.scm:232 -#, fuzzy msgid "[SJ3] hiragana mode" -msgstr "[SKK] mode latin" +msgstr "" #: ../scm/sj3-key-custom.scm:238 -#, fuzzy msgid "[SJ3] katakana mode" -msgstr "[SKK] mode latin" +msgstr "" #: ../scm/sj3-key-custom.scm:244 msgid "[SJ3] halfwidth katakana mode" @@ -3903,9 +3849,8 @@ msgid "SKK server" msgstr "" #: ../scm/skk-custom.scm:57 -#, fuzzy msgid "Dictionary files" -msgstr "Fichier dictionnaire" +msgstr "" #: ../scm/skk-custom.scm:74 ../scm/tutcode-custom.scm:102 msgid "Commit candidate by heading label keys" @@ -3944,9 +3889,8 @@ msgid "Port number of skkserv" msgstr "" #: ../scm/skk-custom.scm:376 -#, fuzzy msgid "Auto" -msgstr "_A propos" +msgstr "" #: ../scm/skk-custom.scm:377 msgid "IPv4" @@ -3969,9 +3913,8 @@ msgid "Address family of skkserv" msgstr "" #: ../scm/skk-custom.scm:393 -#, fuzzy msgid "System dictionary file" -msgstr "Fichier dictionnaire" +msgstr "" #: ../scm/skk-custom.scm:400 msgid "Personal dictionary file" @@ -4010,9 +3953,8 @@ msgid "Use UNIX look command for completion" msgstr "" #: ../scm/skk-custom.scm:460 -#, fuzzy msgid "Use UNIX look dictionary file" -msgstr "Fichier du dictionnaire personnel" +msgstr "" #: ../scm/skk-custom.scm:475 msgid "Show annotation of candidate word" @@ -4199,23 +4141,20 @@ msgid "uim version of TUT-Code input method" msgstr "" #: ../scm/tutcode-custom.scm:43 -#, fuzzy msgid "TUT-Code dictionaries" -msgstr "Éditer le dictionnaire" +msgstr "" #: ../scm/tutcode-custom.scm:44 msgid "Dictionary settings for TUT-Code" msgstr "" #: ../scm/tutcode-custom.scm:54 -#, fuzzy msgid "Mazegaki dictionary file" -msgstr "Fichier du dictionnaire personnel" +msgstr "" #: ../scm/tutcode-custom.scm:61 -#, fuzzy msgid "Personal mazegaki dictionary file" -msgstr "Fichier du dictionnaire personnel" +msgstr "" #: ../scm/tutcode-custom.scm:68 msgid "Code table file" @@ -4272,9 +4211,8 @@ msgid "[TUT-Code] commit" msgstr "" #: ../scm/tutcode-key-custom.scm:89 -#, fuzzy msgid "[TUT-Code] cancel" -msgstr "[SKK] annuler" +msgstr "" #: ../scm/tutcode-key-custom.scm:95 msgid "[TUT-Code] next candidate" @@ -4321,9 +4259,8 @@ msgid "Wnn server" msgstr "" #: ../scm/wnn-custom.scm:47 -#, fuzzy msgid "Wnn (advanced)" -msgstr "Canna (avancé)" +msgstr "" #: ../scm/wnn-custom.scm:307 msgid "Use value of use remote Wnn server" @@ -4394,14 +4331,12 @@ msgid "[Wnn] commit as transposed kana" msgstr "" #: ../scm/wnn-key-custom.scm:116 -#, fuzzy msgid "[Wnn] on" -msgstr "[SKK] activé" +msgstr "" #: ../scm/wnn-key-custom.scm:123 -#, fuzzy msgid "[Wnn] off" -msgstr "[PRIME] désactivé" +msgstr "" #: ../scm/wnn-key-custom.scm:129 msgid "[Wnn] begin conversion" @@ -4412,9 +4347,8 @@ msgid "[Wnn] commit" msgstr "" #: ../scm/wnn-key-custom.scm:141 -#, fuzzy msgid "[Wnn] cancel" -msgstr "[SKK] annuler" +msgstr "" #: ../scm/wnn-key-custom.scm:147 msgid "[Wnn] next candidate" @@ -4453,9 +4387,8 @@ msgid "[Wnn] backspace" msgstr "" #: ../scm/wnn-key-custom.scm:204 -#, fuzzy msgid "[Wnn] delete" -msgstr "[PRIME] effacer" +msgstr "" #: ../scm/wnn-key-custom.scm:210 msgid "[Wnn] go left" @@ -4474,9 +4407,8 @@ msgid "[Wnn] hiragana mode" msgstr "" #: ../scm/wnn-key-custom.scm:238 -#, fuzzy msgid "[Wnn] katakana mode" -msgstr "[SKK] mode latin" +msgstr "" #: ../scm/wnn-key-custom.scm:244 msgid "[Wnn] halfwidth katakana mode" @@ -4503,9 +4435,8 @@ msgid "Customize uim input method environment" msgstr "" #: ../uim.desktop.in.in.h:2 -#, fuzzy msgid "Input Method" -msgstr "Nom de la méthode d'entrée" +msgstr "" #. FIXME: gettext here to expand %s in accordance with the #. * locale for the selected notification agent. See also the TODO @@ -4578,14 +4509,12 @@ msgid "Already connected." msgstr "" #: ../uim/sj3.c:108 -#, fuzzy msgid "Cannot open main dictionary file." -msgstr "Fichier du dictionnaire personnel" +msgstr "" #: ../uim/sj3.c:109 -#, fuzzy msgid "Cannot open user dictionary file." -msgstr "Fichier du dictionnaire personnel" +msgstr "" #: ../uim/sj3.c:110 msgid "Cannot open study file." @@ -4596,9 +4525,8 @@ msgid "Cannot make user dictionary directory." msgstr "" #: ../uim/sj3.c:112 -#, fuzzy msgid "Cannot make user dictionary file." -msgstr "Fichier du dictionnaire personnel" +msgstr "" #: ../uim/sj3.c:113 msgid "Cannot make study file." @@ -4625,9 +4553,8 @@ msgid "Main dictionary file is not opened." msgstr "" #: ../uim/sj3.c:195 -#, fuzzy msgid "User dictionary file is not opened." -msgstr "Fichier du dictionnaire personnel" +msgstr "" #: ../uim/sj3.c:196 msgid "Study file is not opened." @@ -4638,9 +4565,8 @@ msgid "Main dictionary file cannot close." msgstr "" #: ../uim/sj3.c:198 -#, fuzzy msgid "User dictionary file cannot close." -msgstr "Fichier du dictionnaire personnel" +msgstr "" #: ../uim/sj3.c:199 msgid "Study file cannot close." @@ -4656,14 +4582,12 @@ msgid "Buffer size is too short." msgstr "" #: ../uim/sj3.c:411 -#, fuzzy msgid "Dictionary error." -msgstr "Fichier dictionnaire" +msgstr "" #: ../uim/sj3.c:412 -#, fuzzy msgid "Dictionary is locked." -msgstr "Fichier dictionnaire" +msgstr "" #: ../uim/sj3.c:413 msgid "Invalid yomi string." @@ -4686,9 +4610,8 @@ msgid "Douon is full." msgstr "" #: ../uim/sj3.c:418 -#, fuzzy msgid "Dictionary is full." -msgstr "Fichier dictionnaire" +msgstr "" #: ../uim/sj3.c:419 msgid "Index is full." From 7415af75bc2c81a843dea5e0796410da8791ebfa Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Sun, 3 Aug 2008 07:28:20 +0000 Subject: [PATCH 029/136] * RELNOTE: Fix typo. --- RELNOTE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELNOTE b/RELNOTE index a7e1de2b9..75cadd2cb 100644 --- a/RELNOTE +++ b/RELNOTE @@ -15,7 +15,7 @@ Bug tracking system: http://bugs.freedesktop.org/ What's New ---------- -Critial bug fixes for uim.el users and a few minor fixes against 1.5.1. See NEWS for the detailed changes. +Critical bug fixes for uim.el users and a few minor fixes against 1.5.1. See NEWS for the detailed changes. What's New in 1.5.0 From 9a92f776fb2a9558caef3f5be6e0bf4dc0cf7068 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Thu, 28 Aug 2008 04:34:11 +0000 Subject: [PATCH 030/136] * Port r5531:5536 from trunk. --- gtk/gtk-im-uim.c | 2 +- qt4/immodule/candidatewindow.cpp | 30 +++++++++++++++++++----------- scm/tutcode.scm | 5 ++++- uim/skk.c | 13 +++++++------ xim/ximim.cpp | 1 - xim/ximtrans.cpp | 10 +++++----- 6 files changed, 36 insertions(+), 25 deletions(-) diff --git a/gtk/gtk-im-uim.c b/gtk/gtk-im-uim.c index 7321c4c8f..cb7b7466c 100644 --- a/gtk/gtk-im-uim.c +++ b/gtk/gtk-im-uim.c @@ -1250,11 +1250,11 @@ im_uim_set_use_preedit(GtkIMContext *ic, gboolean use_preedit) uic->preedit_window = gtk_window_new(GTK_WINDOW_POPUP); preedit_label = gtk_label_new(""); gtk_container_add(GTK_CONTAINER(uic->preedit_window), preedit_label); + gtk_widget_show(preedit_label); } uic->preedit_handler_id = g_signal_connect(G_OBJECT(ic), "preedit-changed", G_CALLBACK(show_preedit), preedit_label); - gtk_widget_show_all(uic->preedit_window); } else { if (uic->preedit_handler_id) { g_signal_handler_disconnect(G_OBJECT(ic), uic->preedit_handler_id); diff --git a/qt4/immodule/candidatewindow.cpp b/qt4/immodule/candidatewindow.cpp index c7191e305..4cc291883 100644 --- a/qt4/immodule/candidatewindow.cpp +++ b/qt4/immodule/candidatewindow.cpp @@ -98,7 +98,7 @@ CandidateWindow::CandidateWindow( QWidget *parent, const char * name ) isAlwaysLeft = false; - subWin = new SubWindow( 0 ); + subWin = NULL; } CandidateWindow::~CandidateWindow() @@ -123,11 +123,15 @@ void CandidateWindow::activateCandwin( int dLimit ) candidateIndex = -1; displayLimit = dLimit; pageIndex = 0; + + if ( !subWin ) + subWin = new SubWindow( this ); } void CandidateWindow::deactivateCandwin() { - subWin->cancelHook(); + if ( subWin ) + subWin->cancelHook(); hide(); clearCandidates(); @@ -378,14 +382,16 @@ void CandidateWindow::updateLabel() void CandidateWindow::slotHookSubwindow( Q3ListViewItem * item ) { - // cancel previous hook - subWin->cancelHook(); + if ( subWin ) { + // cancel previous hook + subWin->cancelHook(); - // hook annotation - QString annotationString = item->text( 2 ); - if ( !annotationString.isEmpty() ) - { - subWin->hookPopup( "Annotation", annotationString ); + // hook annotation + QString annotationString = item->text( 2 ); + if ( !annotationString.isEmpty() ) + { + subWin->hookPopup( "Annotation", annotationString ); + } } } @@ -393,13 +399,15 @@ void CandidateWindow::slotHookSubwindow( Q3ListViewItem * item ) void CandidateWindow::moveEvent( QMoveEvent *e ) { // move subwindow - subWin->layoutWindow( e->pos().x() + width(), e->pos().y() ); + if ( subWin ) + subWin->layoutWindow( e->pos().x() + width(), e->pos().y() ); } void CandidateWindow::resizeEvent( QResizeEvent *e ) { // move subwindow - subWin->layoutWindow( pos().x() + e->size().width(), pos().y() ); + if ( subWin ) + subWin->layoutWindow( pos().x() + e->size().width(), pos().y() ); } diff --git a/scm/tutcode.scm b/scm/tutcode.scm index 9072e0682..ed9e4503f 100644 --- a/scm/tutcode.scm +++ b/scm/tutcode.scm @@ -335,7 +335,10 @@ (else (quotient nth tutcode-nr-candidate-max)))) (cur-offset (* cur-page tutcode-nr-candidate-max)) - (cur-labels (list-tail tutcode-heading-label-char-list cur-offset)) + (cur-labels (list-tail + tutcode-heading-label-char-list + (remainder cur-offset + (length tutcode-heading-label-char-list)))) (target-labels (member ch cur-labels)) (offset (if target-labels (- (length cur-labels) (length target-labels)) diff --git a/uim/skk.c b/uim/skk.c index 5f51b38e6..ec45f4d12 100644 --- a/uim/skk.c +++ b/uim/skk.c @@ -3596,19 +3596,20 @@ open_skkserv(const char *hostname, int portnum, int family) if (connect(sock, ai->ai_addr, ai->ai_addrlen) == 0) break; - else - /* FIXME: gettext here to expand %s in accordance with the - * locale for the selected notification agent. See also the TODO - * comment of uim-notify.h -- YamaKen 2008-02-11 */ - uim_notify_fatal(N_("uim-skk: connect to %s port %s failed"), hostname, port); + close(sock); sock = -1; } freeaddrinfo(aitop); - if (sock == -1) + if (sock == -1) { + /* FIXME: gettext here to expand %s in accordance with the + * locale for the selected notification agent. See also the TODO + * comment of uim-notify.h -- YamaKen 2008-02-11 */ + uim_notify_fatal(N_("uim-skk: connect to %s port %s failed"), hostname, port); return 0; + } #if 0 uim_notify_info("uim-skk: SKKSERVER=%s", hostname); diff --git a/xim/ximim.cpp b/xim/ximim.cpp index c2851fa9e..48edfe54e 100644 --- a/xim/ximim.cpp +++ b/xim/ximim.cpp @@ -126,7 +126,6 @@ void XimIM_impl::create_ic(RxPacket *p) if (!ic) { mConn->push_error_packet(mID, icid, ERR_Style, "invalid im style"); - mConn->terminate(); return; } std::pair n(ic->get_icid(), ic); diff --git a/xim/ximtrans.cpp b/xim/ximtrans.cpp index 0bf64ff50..44b22069f 100644 --- a/xim/ximtrans.cpp +++ b/xim/ximtrans.cpp @@ -613,10 +613,6 @@ void Connection::xim_get_im_values(RxPacket *p) rlen += 4; } - // since only one IMAttribute... - t->pushC16(imid); - t->pushC16(16); // length - // XIMATTRIBUTE C16 nr_style; struct input_style *is = get_im_by_id(imid)->getInputStyles(); @@ -624,8 +620,12 @@ void Connection::xim_get_im_values(RxPacket *p) ; } + // since only one IMAttribute... + t->pushC16(imid); + t->pushC16((C16)(8 + nr_style * 4)); + t->pushC16(0); // attribute id - t->pushC16((C16)(nr_style * 4)); // length + t->pushC16((C16)(4 + nr_style * 4)); // length t->pushC16(nr_style); // number t->pushC16(0); From 27c19fc94c86e367d27cfa6ba657990de88c852a Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Fri, 29 Aug 2008 06:44:54 +0000 Subject: [PATCH 031/136] * Port r5538 from trunk. --- qt4/immodule/candidatewindow.cpp | 7 +++++-- qt4/immodule/qhelpermanager.cpp | 27 ++++++++++++++------------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/qt4/immodule/candidatewindow.cpp b/qt4/immodule/candidatewindow.cpp index 4cc291883..94131d761 100644 --- a/qt4/immodule/candidatewindow.cpp +++ b/qt4/immodule/candidatewindow.cpp @@ -81,6 +81,8 @@ CandidateWindow::CandidateWindow( QWidget *parent, const char * name ) cList->setVScrollBarMode( Q3ScrollView::AlwaysOff ); cList->setHScrollBarMode( Q3ScrollView::AlwaysOff ); cList->setAllColumnsShowFocus( true ); + QSizePolicy sp( QSizePolicy::Preferred, QSizePolicy::Preferred, false ); + cList->setSizePolicy( sp ); QObject::connect( cList, SIGNAL( clicked( Q3ListViewItem * ) ), this , SLOT( slotCandidateSelected( Q3ListViewItem * ) ) ); QObject::connect( cList, SIGNAL( selectionChanged( Q3ListViewItem * ) ), @@ -88,6 +90,7 @@ CandidateWindow::CandidateWindow( QWidget *parent, const char * name ) //setup NumberLabel numLabel = new QLabel( this, "candidateLabel" ); + numLabel->adjustSize(); stores.clear(); @@ -434,7 +437,7 @@ QSize CandidateListView::sizeHint( void ) const // 2004-08-02 Kazuki Ohta // FIXME!: - // There may be more proper way. Now width is adjusted by indeterminal 3 spaces. + // There may be more proper way. Now width is adjusted by indeterminal 3 'J'. int maxCharIndex = 0, maxCharCount = 0; for ( int i = 0; i < childCount(); i++ ) { @@ -445,7 +448,7 @@ QSize CandidateListView::sizeHint( void ) const } } QFontMetrics fm( font() ); - width = fm.width( itemAtIndex( maxCharIndex )->text( 0 ) + " " + itemAtIndex( maxCharIndex )->text( 1 ) ); + width = fm.width( itemAtIndex( maxCharIndex )->text( 0 ) + "JJJ" + itemAtIndex( maxCharIndex )->text( 1 ) ); if ( width < MIN_CAND_WIDTH ) width = MIN_CAND_WIDTH; diff --git a/qt4/immodule/qhelpermanager.cpp b/qt4/immodule/qhelpermanager.cpp index fafae3fae..0c47fe65f 100644 --- a/qt4/immodule/qhelpermanager.cpp +++ b/qt4/immodule/qhelpermanager.cpp @@ -55,7 +55,7 @@ static QSocketNotifier *notifier = NULL; extern QUimInputContext *focusedInputContext; extern bool disableFocusedContext; -extern Q3PtrList contextList; +extern QList contextList; QUimHelperManager::QUimHelperManager( QObject *parent ) : QObject( parent ) @@ -152,14 +152,14 @@ void QUimHelperManager::parseHelperStr( const QString &str ) else if ( str.startsWith( "prop_update_custom" ) ) { // for custom api - QUimInputContext * cc; QStringList list = str.split( "\n" ); if ( !list.isEmpty() && !list[ 0 ].isEmpty() && !list[ 1 ].isEmpty() && !list[ 2 ].isEmpty() ) { - for ( cc = contextList.first(); cc; cc = contextList.next() ) + QList::iterator it; + for ( it = contextList.begin(); it != contextList.end(); ++it ) { - uim_prop_update_custom( cc->uimContext(), + uim_prop_update_custom( ( *it )->uimContext(), list[ 1 ].toUtf8(), list[ 2 ].toUtf8() ); break; /* all custom variables are global */ @@ -178,7 +178,6 @@ void QUimHelperManager::parseHelperStr( const QString &str ) void QUimHelperManager::parseHelperStrImChange( const QString &str ) { - QUimInputContext * cc; QStringList list = str.split( "\n" ); QString im_name = list[ 1 ]; QString im_name_sym = "'" + im_name; @@ -195,11 +194,12 @@ void QUimHelperManager::parseHelperStrImChange( const QString &str ) } else if ( str.startsWith( "im_change_whole_desktop" ) ) { - for ( cc = contextList.first(); cc; cc = contextList.next() ) + QList::iterator it; + for ( it = contextList.begin(); it != contextList.end(); ++it ) { - uim_switch_im( cc->uimContext(), im_name.toUtf8() ); - cc->readIMConf(); - uim_prop_update_custom( cc->uimContext(), + uim_switch_im( ( *it )->uimContext(), im_name.toUtf8() ); + ( *it )->readIMConf(); + uim_prop_update_custom( ( *it )->uimContext(), "custom-preserved-default-im-name", im_name_sym.toUtf8() ); } @@ -208,11 +208,12 @@ void QUimHelperManager::parseHelperStrImChange( const QString &str ) { if ( focusedInputContext ) { - for ( cc = contextList.first(); cc; cc = contextList.next() ) + QList::iterator it; + for ( it = contextList.begin(); it != contextList.end(); ++it ) { - uim_switch_im( cc->uimContext(), im_name.toUtf8() ); - cc->readIMConf(); - uim_prop_update_custom( cc->uimContext(), + uim_switch_im( ( *it )->uimContext(), im_name.toUtf8() ); + ( *it )->readIMConf(); + uim_prop_update_custom( ( *it )->uimContext(), "custom-preserved-default-im-name", im_name_sym.toUtf8() ); } From 112c0d7ad0f973b66348ac05297d17415ecb6026 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Fri, 29 Aug 2008 06:57:19 +0000 Subject: [PATCH 032/136] * Update. --- NEWS | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/NEWS b/NEWS index 145008606..f69b44870 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,19 @@ +Overview of changes from 1.5.2 to 1.5.3 +======================================= +* Fixes + - Qt4 bridge (experimental) + * [CRITICAL] Fix bug with Qt4 >= 4.4.1, which makes applications + infinite loop at the startup + * [CRITICAL] Fix uim-helper handling which could cause unexpected crashes + + - uim-xim + * Fix some minor protocol errors + + - uim-tutcode + * Fix out-of-range error when candidates are longer than + tutcode-heading-label-char-list + + Overview of changes from 1.5.1 to 1.5.2 ======================================= * Enhancements From 3ef4793ed7f291da2ccfd49c10ede219aca42c8d Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Fri, 29 Aug 2008 07:44:42 +0000 Subject: [PATCH 033/136] * Port r5541 from trunk. --- qt4/immodule/quiminputcontext.cpp | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/qt4/immodule/quiminputcontext.cpp b/qt4/immodule/quiminputcontext.cpp index b14917371..c818dae37 100644 --- a/qt4/immodule/quiminputcontext.cpp +++ b/qt4/immodule/quiminputcontext.cpp @@ -291,10 +291,27 @@ bool QUimInputContext::filterEvent( const QEvent *event ) case Qt::Key_SingleCandidate: key = UKey_SingleCandidate; break; case Qt::Key_MultipleCandidate: key = UKey_MultipleCandidate; break; case Qt::Key_PreviousCandidate: key = UKey_PreviousCandidate; break; - case Qt::Key_Shift: key = UKey_Shift_key; break; - case Qt::Key_Control: key = UKey_Control_key; break; - case Qt::Key_Alt: key = UKey_Alt_key; break; - case Qt::Key_Meta: key = UKey_Meta_key; break; + // Qt4 seems to add its own modifier even the event is + // KeyPress, which differs from ordinary model. So remove + // them for uim. + case Qt::Key_Shift: key = UKey_Shift_key; + if ( type == QEvent::KeyPress ) + modifier &= ~UMod_Shift; + break; + case Qt::Key_Control: key = UKey_Control_key; + if ( type == QEvent::KeyPress ) + modifier &= ~UMod_Control; + break; + case Qt::Key_Alt: key = UKey_Alt_key; + if ( type == QEvent::KeyPress ) + modifier &= ~UMod_Alt; + break; + case Qt::Key_Meta: key = UKey_Meta_key; +#ifdef Q_WS_X11 + if ( type == QEvent::KeyPress ) + modifier &= ~UMod_Meta; +#endif + break; case Qt::Key_CapsLock: key = UKey_Caps_Lock; break; case Qt::Key_NumLock: key = UKey_Num_Lock; break; case Qt::Key_ScrollLock: key = UKey_Scroll_Lock; break; From 71a6eaffbebb64cffc652ebd4a067b1cc860509d Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Fri, 29 Aug 2008 07:46:10 +0000 Subject: [PATCH 034/136] * Update. --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index f69b44870..f734c124f 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ Overview of changes from 1.5.2 to 1.5.3 * [CRITICAL] Fix bug with Qt4 >= 4.4.1, which makes applications infinite loop at the startup * [CRITICAL] Fix uim-helper handling which could cause unexpected crashes + * Fix key press with shift, control, alt, ane meta keys - uim-xim * Fix some minor protocol errors From 318e47662a3c216803d6d1f30293709812190ab8 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Sun, 31 Aug 2008 13:59:35 +0000 Subject: [PATCH 035/136] * Port r5544 from trunk. --- qt4/immodule/candidatewindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/qt4/immodule/candidatewindow.cpp b/qt4/immodule/candidatewindow.cpp index 94131d761..df59fd26d 100644 --- a/qt4/immodule/candidatewindow.cpp +++ b/qt4/immodule/candidatewindow.cpp @@ -262,6 +262,7 @@ void CandidateWindow::setPage( int page ) updateLabel(); // size adjustment + cList->updateGeometry(); adjustSize(); } From 84e0298c1ccb0e5c8bd67eff219b310f8764543a Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Mon, 1 Sep 2008 02:48:01 +0000 Subject: [PATCH 036/136] * qt4/immodule/candidatewindow.cpp (CandidateListView::sizeHint) : Adjust the width. --- qt4/immodule/candidatewindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qt4/immodule/candidatewindow.cpp b/qt4/immodule/candidatewindow.cpp index df59fd26d..52d138996 100644 --- a/qt4/immodule/candidatewindow.cpp +++ b/qt4/immodule/candidatewindow.cpp @@ -438,7 +438,7 @@ QSize CandidateListView::sizeHint( void ) const // 2004-08-02 Kazuki Ohta // FIXME!: - // There may be more proper way. Now width is adjusted by indeterminal 3 'J'. + // There may be more proper way. Now width is adjusted by indeterminal 5 'J'. int maxCharIndex = 0, maxCharCount = 0; for ( int i = 0; i < childCount(); i++ ) { @@ -449,7 +449,8 @@ QSize CandidateListView::sizeHint( void ) const } } QFontMetrics fm( font() ); - width = fm.width( itemAtIndex( maxCharIndex )->text( 0 ) + "JJJ" + itemAtIndex( maxCharIndex )->text( 1 ) ); + width = fm.width( itemAtIndex( maxCharIndex )->text( 0 ) + "JJJJJ" + itemAtIndex( maxCharIndex )->text( 1 ) ) + itemMargin() * 4 + frameWidth() * 2; + if ( width < MIN_CAND_WIDTH ) width = MIN_CAND_WIDTH; From 96fa4627d48d9fe5075f75afd1b2c58b329e8829 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Fri, 5 Sep 2008 10:43:21 +0000 Subject: [PATCH 037/136] * Port r5548 from trunk. --- helper/pref-gtk.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/helper/pref-gtk.c b/helper/pref-gtk.c index a65bc232c..f8cde6481 100644 --- a/helper/pref-gtk.c +++ b/helper/pref-gtk.c @@ -389,11 +389,19 @@ create_setting_button_box(const char *group_name) static GtkWidget * create_group_widget(const char *group_name) { + GtkWidget *scrolled_win; GtkWidget *vbox; GtkWidget *group_label; struct uim_custom_group *group; char *label_text; + + scrolled_win = gtk_scrolled_window_new(NULL, NULL); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_win), + GTK_POLICY_NEVER, + GTK_POLICY_AUTOMATIC); vbox = gtk_vbox_new(FALSE, 8); + gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled_win), + vbox); gtk_container_set_border_width(GTK_CONTAINER(vbox), 4); @@ -414,7 +422,7 @@ create_group_widget(const char *group_name) uim_custom_group_free(group); - return vbox; + return scrolled_win; } static void create_sub_group_widgets(GtkWidget *parent_widget, const char *parent_group) From 3ecfbf576caeaa4e80905ca4a72ddf1741b7d993 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Fri, 5 Sep 2008 14:44:13 +0000 Subject: [PATCH 038/136] * Port r5550 from trunk. --- helper/toolbar-common-gtk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/helper/toolbar-common-gtk.c b/helper/toolbar-common-gtk.c index 93f6c385f..837cc9d26 100644 --- a/helper/toolbar-common-gtk.c +++ b/helper/toolbar-common-gtk.c @@ -967,6 +967,7 @@ uim_toolbar_trayicon_new(void) " {\n" " GtkWidget::focus-line-width=0\n" " GtkWidget::focus-padding=0\n" + " ythickness=0\n" " }\n" "\n" " widget \"*.uim-systray-button\" style \"uim-systray-button-style\"\n" "\n"); From 9085599f18369c587e5ef67e09e7ca947d3a5399 Mon Sep 17 00:00:00 2001 From: sasugaanija Date: Sat, 6 Sep 2008 06:54:54 +0000 Subject: [PATCH 039/136] * emacs/uim-var.el - (uim-last-key-vector): Change to local variable to improve minibuffer editing. (reported by iratqq) - (uim-merge-next): Ditto - (uim-prefix-arg): Ditto - (uim-wait-next-key): Ditto - (uim-translated-key-vector): Ditto - (uim-untranslated-key-vector): Ditto - (uim-prefix-arg-vector): Ditto --- emacs/uim-var.el | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/emacs/uim-var.el b/emacs/uim-var.el index d9ca5d599..072a94804 100644 --- a/emacs/uim-var.el +++ b/emacs/uim-var.el @@ -264,23 +264,6 @@ keeps the size of it when showing the candidates.") (defvar uim-send-recv-again nil) -(defvar uim-last-key-vector nil - "Recent key vector.") - -;; workaround for FSF Emacs-20/21 -(defvar uim-merge-next nil - "If the value is non-nil, uim-process-input merges next input.") - -(defvar uim-prefix-arg nil - "Recent current-prefix-arg value.") - -;; unprocessed keys -(defvar uim-wait-next-key nil) - -(defvar uim-translated-key-vector nil) -(defvar uim-untranslated-key-vector nil) - -(defvar uim-prefix-arg-vector nil) ;; if non-nil, pressed keys are displayed at echo region (defvar uim-keystroke-displaying nil) @@ -316,6 +299,24 @@ keeps the size of it when showing the candidates.") ;;; Buffer Local Variables +(uim-deflocalvar uim-last-key-vector nil + "Recent key vector.") + +;; workaround for FSF Emacs-20/21 +(uim-deflocalvar uim-merge-next nil +"If the value is non-nil, uim-process-input merges next input.") + +(uim-deflocalvar uim-prefix-arg nil "Recent current-prefix-arg value.") + +;; unprocessed keys +(uim-deflocalvar uim-wait-next-key nil) + +(uim-deflocalvar uim-translated-key-vector nil) +(uim-deflocalvar uim-untranslated-key-vector nil) + +(uim-deflocalvar uim-prefix-arg-vector nil) + + (uim-deflocalvar uim-mode-line-string " U" "mode-line string of uim-mode.") From 6ade01fc92a04ef0c6d24f7aa7770731d74550ab Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Sun, 7 Sep 2008 06:09:04 +0000 Subject: [PATCH 040/136] * NEWS: Update. --- NEWS | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index f734c124f..b98d10cfc 100644 --- a/NEWS +++ b/NEWS @@ -5,15 +5,25 @@ Overview of changes from 1.5.2 to 1.5.3 * [CRITICAL] Fix bug with Qt4 >= 4.4.1, which makes applications infinite loop at the startup * [CRITICAL] Fix uim-helper handling which could cause unexpected crashes - * Fix key press with shift, control, alt, ane meta keys + * Fix key press with shift, control, alt, and meta keys - uim-xim * Fix some minor protocol errors + - uim.el + * Improve minibuffer editing + - uim-tutcode * Fix out-of-range error when candidates are longer than tutcode-heading-label-char-list +* Others + - uim-toolbar-gtk-systray + * Adjust ythickness of the buttons + + - uim-pref-gtk + * Add vertical scrollbar for the setting pane + Overview of changes from 1.5.1 to 1.5.2 ======================================= From 81eef288221e661c68f92a669294c85dfb21871e Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Sun, 7 Sep 2008 08:41:32 +0000 Subject: [PATCH 041/136] * RELNOTE: Update. --- RELNOTE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RELNOTE b/RELNOTE index 75cadd2cb..5e4a079fb 100644 --- a/RELNOTE +++ b/RELNOTE @@ -1,10 +1,10 @@ -uim 1.5.2 Release Note +uim 1.5.3 Release Note ====================== About This Release ------------------ -This distribution of uim 1.5.2 is latest stable release of uim. +This distribution of uim 1.5.3 is latest stable release of uim. Please report us if you find a problem. @@ -15,7 +15,7 @@ Bug tracking system: http://bugs.freedesktop.org/ What's New ---------- -Critical bug fixes for uim.el users and a few minor fixes against 1.5.1. See NEWS for the detailed changes. +Critical bug fixes for Qt4 bridge. Also a few minor fixes against 1.5.2. See NEWS for the detailed changes. What's New in 1.5.0 From 461eb092286bef203109a95589cb564b87ee1764 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Sun, 7 Sep 2008 08:47:35 +0000 Subject: [PATCH 042/136] * Bump version. --- configure.ac | 2 +- uim/uim.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index b35714214..a70a64eee 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ(2.60b) -AC_INIT([uim], [1.5.2], [uim-en@googlegroups.com]) +AC_INIT([uim], [1.5.3], [uim-en@googlegroups.com]) AC_CONFIG_SRCDIR([uim/uim.c]) AC_CONFIG_HEADERS([uim/config.h]) AM_INIT_AUTOMAKE([1.10 dist-bzip2]) diff --git a/uim/uim.h b/uim/uim.h index f60333428..2fcbb7803 100644 --- a/uim/uim.h +++ b/uim/uim.h @@ -43,7 +43,7 @@ extern "C" { #define UIM_VERSION_MAJOR (1) #define UIM_VERSION_MINOR (5) -#define UIM_VERSION_PATCHLEVEL (2) +#define UIM_VERSION_PATCHLEVEL (3) #define UIM_VERSION_REQUIRE(major, minor, patchlevel) \ ((major) < UIM_VERSION_MAJOR \ || ((major) == UIM_VERSION_MAJOR && (minor) < UIM_VERSION_MINOR) \ From 60a6f4534924705b242eedbd12308f38ddd28297 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Sun, 7 Sep 2008 14:05:06 +0000 Subject: [PATCH 043/136] * configure.ac * uim/uim.h - Post release version bump. --- configure.ac | 2 +- uim/uim.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index a70a64eee..8022418c9 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ(2.60b) -AC_INIT([uim], [1.5.3], [uim-en@googlegroups.com]) +AC_INIT([uim], [1.5.4], [uim-en@googlegroups.com]) AC_CONFIG_SRCDIR([uim/uim.c]) AC_CONFIG_HEADERS([uim/config.h]) AM_INIT_AUTOMAKE([1.10 dist-bzip2]) diff --git a/uim/uim.h b/uim/uim.h index 2fcbb7803..7d25402ef 100644 --- a/uim/uim.h +++ b/uim/uim.h @@ -43,7 +43,7 @@ extern "C" { #define UIM_VERSION_MAJOR (1) #define UIM_VERSION_MINOR (5) -#define UIM_VERSION_PATCHLEVEL (3) +#define UIM_VERSION_PATCHLEVEL (4) #define UIM_VERSION_REQUIRE(major, minor, patchlevel) \ ((major) < UIM_VERSION_MAJOR \ || ((major) == UIM_VERSION_MAJOR && (minor) < UIM_VERSION_MINOR) \ From 376300066c18111e484a0b90a672ffa6453f8a23 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Mon, 20 Oct 2008 03:02:58 +0000 Subject: [PATCH 044/136] * Port r5569:5579, r5581:5589, r5593:5595 from trunk. --- doc/COMPATIBILITY | 17 + doc/HELPER-CANDWIN | 39 +- emacs/context.c | 1 + emacs/uim.el | 2 +- fep/uim-fep.c | 2 +- gtk/gtk-im-uim.c | 76 +++- gtk/gtk-im-uim.h | 3 + gtk/uim-cand-win-gtk.c | 155 +++++++- gtk/uim-cand-win-gtk.h | 12 + helper/candwin-gtk.c | 181 +++++++++- helper/pref-gtk-custom-widgets.c | 2 +- helper/pref-gtk.c | 13 + helper/toolbar-common-gtk.c | 4 +- qt/candwin-qt.cpp | 99 ++++++ qt/candwin-qt.h | 6 +- qt/immodule-candidatewindow.cpp | 59 +++- qt/immodule-candidatewindow.h | 12 +- qt/immodule-quiminputcontext.cpp | 85 ++++- qt/immodule-quiminputcontext.h | 10 + qt4/immodule/candidatewindow.cpp | 55 ++- qt4/immodule/candidatewindow.h | 11 +- qt4/immodule/quiminputcontext.cpp | 85 ++++- qt4/immodule/quiminputcontext.h | 10 + scm/Makefile.am | 4 +- scm/generic-custom.scm | 12 + scm/generic.scm | 398 ++++++++++++++++----- scm/pyload.scm | 13 + scm/rk.scm | 10 +- scm/skk.scm | 9 +- scm/tutcode-custom.scm | 2 +- scm/tutcode-key-custom.scm | 6 + scm/tutcode-kigoudic.scm | 568 ++++++++++++++++++++++++++++++ scm/tutcode.scm | 210 ++++++++++- uim/prime.c | 2 +- xim/canddisp.cpp | 42 +++ xim/canddisp.h | 6 + xim/main.cpp | 2 +- xim/ximserver.cpp | 159 ++++++++- xim/ximserver.h | 16 +- 39 files changed, 2198 insertions(+), 200 deletions(-) create mode 100644 scm/tutcode-kigoudic.scm diff --git a/doc/COMPATIBILITY b/doc/COMPATIBILITY index f3f7cc51a..13b1824be 100644 --- a/doc/COMPATIBILITY +++ b/doc/COMPATIBILITY @@ -57,6 +57,23 @@ Each change consist of following fields. All fields are required. The changes are described below in most recently updated order. ------------------------------------------------------------------------------ +Summary: New helper-candwin protocol about setting the candidates +Affects: Helper program developers +Updates: Helper-candwin protocol +Version: 1.6.0 +Revision: ac5584 +Date: 2008-10-07 +Modifier: Etsushi Kato +Related: +URL: +Changes: + (new) "set_nr_candidates" + (new) "set_page_candidates" + (new) "show_page" +Description: + New helper-candwin message from uim-xim to uim-candwin-{gtk,qt} for + the light weight page handling. +------------------------------------------------------------------------------ Summary: Feature provision of 'uim' Affects: uim developers, IM developers Updates: diff --git a/doc/HELPER-CANDWIN b/doc/HELPER-CANDWIN index 1207480b2..df0c4204c 100644 --- a/doc/HELPER-CANDWIN +++ b/doc/HELPER-CANDWIN @@ -21,6 +21,9 @@ Recieving Message format BNF show | hide | deactivate | + set_nr_candidates | + set_page_candidates | + show_page | show_caret_state | update_caret_state | hide_caret_state) "\n" @@ -38,7 +41,7 @@ Recieving Message format BNF activate = "activate" "\n" label label = charset_specifier display_limit_str "\n" candidate_strs display_limit_str = display_limit_label num - display_limit_label = "display_limit" + display_limit_label = "display_limit=" candidate_strs = candidate_str candidate_str candidate_str .... candidate_str = cand_head "\t" cand_candidate "\n" cand_head = str @@ -71,19 +74,47 @@ Recieving Message format BNF deactivate = "deactivate" "\n" - 7. show_caret_state + 7. set_nr_candidates + Activating the candidate window with nr_cands and display_limit + value. This can be used as a replacement of 'activate' message in + combination with following 'set_page_candidates' and 'show_page' + message for the efficient candidate page handling. + + activate = "set_nr_candidates" "\n" nr_cands "\n" display_limit "\n" + nr_cands = num + display_limit = num + + 8. set_page_candidates + Set heading labels and candidates to the selected page of the + candidate window. The order of candidates must be as is. + + set_page_candidates = "set_page_candidates" "\n" label + label = charset_specifier page_str "\n" candidate_strs + page_str = page_label num + page_label = "page=" + candidate_strs = candidate_str candidate_str candidate_str .... + candidate_str = cand_head "\t" cand_candidate "\n" + cand_head = str + cand_candidate = str + + 9. show_page + Selecting the specified page of the candidate window. + + show_page = "show_page" "\n" num "\n" + + 10. show_caret_state Show caret state of the input mode show_caret_state = "show_caret_state" "\n" timeout "\n" caret_state "\n" timeout = num caret_state = str - 8. update_caret_state + 11. update_caret_state Update caret state of the input mode update_caret_state = "update_caret_state" "\n" - 9. hide_caret_state + 12. hide_caret_state Hide caret state of the input mode hide_caret_state = "hide_caret_state" "\n" diff --git a/emacs/context.c b/emacs/context.c index 3a265ce7b..ed4c2dc47 100644 --- a/emacs/context.c +++ b/emacs/context.c @@ -320,6 +320,7 @@ release_uim_agent_context(int context_id) else agent_context_list_head = ptr->next; + free(ua); free(ptr); return context_id; diff --git a/emacs/uim.el b/emacs/uim.el index 5f519ff40..24326bd38 100644 --- a/emacs/uim.el +++ b/emacs/uim.el @@ -1224,7 +1224,7 @@ (when helpermsg (uim-helper-send-message helpermsg)) - (when default + (when (and default (not (uim-get-default-engine))) (uim-update-default-engine default)) (when im diff --git a/fep/uim-fep.c b/fep/uim-fep.c index 46732cbd7..fcd28a8c5 100644 --- a/fep/uim-fep.c +++ b/fep/uim-fep.c @@ -674,7 +674,7 @@ static pid_t my_forkpty(int *amaster, struct termios *termp, struct winsize *win return pid; } } -#elif defined(__svr4__) || defined(__sgi__) +#elif defined(__svr4__) || defined(__sgi__) || defined(__SVR4) static pid_t my_forkpty(int *amaster, struct termios *termp, struct winsize *winp) { pid_t pid; diff --git a/gtk/gtk-im-uim.c b/gtk/gtk-im-uim.c index cb7b7466c..20d02dcff 100644 --- a/gtk/gtk-im-uim.c +++ b/gtk/gtk-im-uim.c @@ -647,16 +647,53 @@ update_prop_list_cb(void *ptr, const char *str) } } +#if IM_UIM_USE_NEW_PAGE_HANDLING +static GSList * +get_page_candidates(IMUIMContext *uic, + guint page, + guint nr, + guint display_limit) +{ + gint i, page_nr, start; + GSList *list = NULL; + + start = page * display_limit; + if (display_limit && (nr - start) > display_limit) + page_nr = display_limit; + else + page_nr = nr - start; + + for (i = start; i < (start + page_nr); i++) { + uim_candidate cand = uim_get_candidate(uic->uc, i, + display_limit ? (int)(i % display_limit) : i); + list = g_slist_prepend(list, cand); + } + list = g_slist_reverse(list); + + return list; +} + +static void +free_candidates(GSList *candidates) +{ + g_slist_foreach(candidates, (GFunc)uim_candidate_free, NULL); + g_slist_free(candidates); +} +#endif /* IM_UIM_USE_NEW_PAGE_HANDLING */ + static void cand_activate_cb(void *ptr, int nr, int display_limit) { IMUIMContext *uic = (IMUIMContext *)ptr; GSList *list = NULL; +#if !IM_UIM_USE_NEW_PAGE_HANDLING uim_candidate cand; gint i; +#endif uic->cwin_is_active = TRUE; +#if !IM_UIM_USE_NEW_PAGE_HANDLING for (i = 0; i < nr; i++) { cand = uim_get_candidate(uic->uc, i, display_limit ? i % display_limit : i); list = g_slist_prepend(list, cand); @@ -667,6 +704,16 @@ cand_activate_cb(void *ptr, int nr, int display_limit) g_slist_foreach(list, (GFunc)uim_candidate_free, NULL); g_slist_free(list); +#else + list = get_page_candidates(uic, 0, nr, display_limit); + + uim_cand_win_gtk_set_nr_candidates(uic->cwin, nr, display_limit); + uic->cwin->candidate_index = -1; /* Don't select any candidate at first */ + uim_cand_win_gtk_set_page_candidates(uic->cwin, 0, list); + uim_cand_win_gtk_set_page(uic->cwin, 0); + + free_candidates(list); +#endif /* IM_UIM_USE_NEW_PAGE_HANDLING */ layout_candwin(uic); gtk_widget_show(GTK_WIDGET(uic->cwin)); @@ -683,9 +730,22 @@ static void cand_select_cb(void *ptr, int index) { IMUIMContext *uic = (IMUIMContext *)ptr; +#if IM_UIM_USE_NEW_PAGE_HANDLING + guint new_page; +#endif layout_candwin(uic); - +#if IM_UIM_USE_NEW_PAGE_HANDLING + new_page = uim_cand_win_gtk_query_new_page_by_cand_select(uic->cwin, index); + + if (!uic->cwin->stores->pdata[new_page]) { + guint nr = uic->cwin->nr_candidates; + guint display_limit = uic->cwin->display_limit; + GSList *list = get_page_candidates(uic, new_page, nr, display_limit); + uim_cand_win_gtk_set_page_candidates(uic->cwin, new_page, list); + free_candidates(list); + } +#endif /* IM_UIM_USE_NEW_PAGE_HANDLING */ g_signal_handlers_block_by_func(uic->cwin, (gpointer)(uintptr_t)index_changed_cb, uic); uim_cand_win_gtk_set_index(uic->cwin, index); g_signal_handlers_unblock_by_func(uic->cwin, (gpointer)(uintptr_t)index_changed_cb, uic); @@ -695,11 +755,25 @@ static void cand_shift_page_cb(void *ptr, int direction) { IMUIMContext *uic = (IMUIMContext *)ptr; +#if IM_UIM_USE_NEW_PAGE_HANDLING + guint new_page; +#endif layout_candwin(uic); g_signal_handlers_block_by_func(uic->cwin, (gpointer)(uintptr_t)index_changed_cb, uic); +#if IM_UIM_USE_NEW_PAGE_HANDLING + new_page = uim_cand_win_gtk_query_new_page_by_shift_page(uic->cwin, + direction); + if (!uic->cwin->stores->pdata[new_page]) { + guint nr = uic->cwin->nr_candidates; + guint display_limit = uic->cwin->display_limit; + GSList *list = get_page_candidates(uic, new_page, nr, display_limit); + uim_cand_win_gtk_set_page_candidates(uic->cwin, new_page, list); + free_candidates(list); + } +#endif /* IM_UIM_USE_NEW_PAGE_HANDLING */ uim_cand_win_gtk_shift_page(uic->cwin, direction); if (uic->cwin->candidate_index != -1) uim_set_candidate_index(uic->uc, uic->cwin->candidate_index); diff --git a/gtk/gtk-im-uim.h b/gtk/gtk-im-uim.h index dfaba9b54..531a5f168 100644 --- a/gtk/gtk-im-uim.h +++ b/gtk/gtk-im-uim.h @@ -54,6 +54,9 @@ #define IM_UIM_USE_SNOOPER 0 #define IM_UIM_USE_TOPLEVEL 1 +/* enable per page candidates handling */ +#define IM_UIM_USE_NEW_PAGE_HANDLING 1 + typedef struct _IMUIMContext { struct _GtkIMContext parent; struct _GtkIMContext *slave; diff --git a/gtk/uim-cand-win-gtk.c b/gtk/uim-cand-win-gtk.c index 649690976..b576b20da 100644 --- a/gtk/uim-cand-win-gtk.c +++ b/gtk/uim-cand-win-gtk.c @@ -259,8 +259,10 @@ uim_cand_win_gtk_dispose (GObject *obj) if (cwin->stores) { guint i; - for (i = 0; i < cwin->stores->len; i++) - g_object_unref(G_OBJECT(cwin->stores->pdata[i])); + for (i = 0; i < cwin->stores->len; i++) { + if (cwin->stores->pdata[i]) + g_object_unref(G_OBJECT(cwin->stores->pdata[i])); + } g_ptr_array_free(cwin->stores, TRUE); cwin->stores = NULL; } @@ -459,6 +461,44 @@ tree_view_button_press(GtkWidget *widget, GdkEventButton *event, gpointer data) return retval; } +void +uim_cand_win_gtk_set_nr_candidates(UIMCandWinGtk *cwin, + guint nr, + guint display_limit) +{ + gint i, nr_stores = 1; + + g_return_if_fail(UIM_IS_CAND_WIN_GTK(cwin)); + + cwin->nr_candidates = nr; + cwin->display_limit = display_limit; + + if (cwin->stores == NULL) + cwin->stores = g_ptr_array_new(); + + /* remove old data */ + if (cwin->page_index >= 0 && cwin->page_index < (int) cwin->stores->len) { + /* Remove data from current page to shrink the window */ + if (cwin->stores->pdata[cwin->page_index]) + gtk_list_store_clear(cwin->stores->pdata[cwin->page_index]); + } + for (i = cwin->stores->len - 1; i >= 0; i--) { + GtkListStore *store = g_ptr_array_remove_index(cwin->stores, i); + if (G_OBJECT(store)) + g_object_unref(G_OBJECT(store)); + } + /* calculate number of GtkListStores to create */ + if (display_limit) { + nr_stores = nr / display_limit; + if (cwin->nr_candidates > display_limit * nr_stores) + nr_stores++; + } + + /* setup dummy array */ + for (i = 0; i < nr_stores; i++) + g_ptr_array_add(cwin->stores, NULL); +} + void uim_cand_win_gtk_set_candidates(UIMCandWinGtk *cwin, guint display_limit, @@ -474,11 +514,13 @@ uim_cand_win_gtk_set_candidates(UIMCandWinGtk *cwin, /* remove old data */ if (cwin->page_index >= 0 && cwin->page_index < (int) cwin->stores->len) { /* Remove data from current page to shrink the window */ - gtk_list_store_clear(cwin->stores->pdata[cwin->page_index]); + if (cwin->stores->pdata[cwin->page_index]) + gtk_list_store_clear(cwin->stores->pdata[cwin->page_index]); } for (i = cwin->stores->len - 1; i >= 0; i--) { GtkListStore *store = g_ptr_array_remove_index(cwin->stores, i); - g_object_unref(G_OBJECT(store)); + if (store) + g_object_unref(G_OBJECT(store)); } cwin->candidate_index = -1; @@ -548,6 +590,50 @@ uim_cand_win_gtk_set_candidates(UIMCandWinGtk *cwin, update_label(cwin); } +void +uim_cand_win_gtk_set_page_candidates(UIMCandWinGtk *cwin, + guint page, + GSList *candidates) +{ + GtkListStore *store; + GSList *node; + gint j, len; + + g_return_if_fail(UIM_IS_CAND_WIN_GTK(cwin)); + + if (candidates == NULL) + return; + + cwin->sub_window.active = FALSE; + len = g_slist_length(candidates); + + /* create GtkListStores, and set candidates */ + store = gtk_list_store_new(NR_COLUMNS, + G_TYPE_STRING, + G_TYPE_STRING, + G_TYPE_STRING); + + cwin->stores->pdata[page] = store; + + /* set candidates */ + for (j = 0, node = g_slist_nth(candidates, j); + j < len; + j++, node = g_slist_next(node)) + { + GtkTreeIter ti; + + if (node) { + uim_candidate cand = node->data; + gtk_list_store_append(store, &ti); + gtk_list_store_set(store, &ti, + COLUMN_HEADING, uim_candidate_get_heading_label(cand), + COLUMN_CANDIDATE, uim_candidate_get_cand_str(cand), + COLUMN_ANNOTATION, NULL, /*uim_candidate_get_annotation(cand),*/ + TERMINATOR); + } + } +} + void uim_cand_win_gtk_clear_candidates(UIMCandWinGtk *cwin) { @@ -606,6 +692,7 @@ uim_cand_win_gtk_set_index(UIMCandWinGtk *cwin, gint index) GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(cwin->view)); gtk_tree_selection_unselect_all(selection); + update_label(cwin); } } @@ -638,19 +725,15 @@ uim_cand_win_gtk_set_page(UIMCandWinGtk *cwin, gint page) len = cwin->stores->len; g_return_if_fail(len); - if (page < 0) { - gtk_tree_view_set_model(GTK_TREE_VIEW(cwin->view), - GTK_TREE_MODEL(cwin->stores->pdata[len - 1])); + if (page < 0) new_page = len - 1; - } else if (page >= (gint) len) { - gtk_tree_view_set_model(GTK_TREE_VIEW(cwin->view), - GTK_TREE_MODEL(cwin->stores->pdata[0])); + else if (page >= (gint) len) new_page = 0; - } else { - gtk_tree_view_set_model(GTK_TREE_VIEW(cwin->view), - GTK_TREE_MODEL(cwin->stores->pdata[page])); + else new_page = page; - } + + gtk_tree_view_set_model(GTK_TREE_VIEW(cwin->view), + GTK_TREE_MODEL(cwin->stores->pdata[new_page])); cwin->page_index = new_page; @@ -693,6 +776,50 @@ uim_cand_win_gtk_shift_page(UIMCandWinGtk *cwin, gboolean forward) } } +guint +uim_cand_win_gtk_query_new_page_by_cand_select(UIMCandWinGtk *cwin, gint index) +{ + guint new_page; + + g_return_val_if_fail(UIM_IS_CAND_WIN_GTK(cwin), 0); + + if (index >= (gint)cwin->nr_candidates) + index = 0; + + if (index >= 0 && cwin->display_limit) + new_page = index / cwin->display_limit; + else + new_page = cwin->page_index; + + return new_page; +} + +guint +uim_cand_win_gtk_query_new_page_by_shift_page(UIMCandWinGtk *cwin, + gboolean forward) +{ + gint index; + guint new_page, len; + + g_return_val_if_fail(UIM_IS_CAND_WIN_GTK(cwin), 0); + + len = cwin->stores->len; + + if (forward) + index = cwin->page_index + 1; + else + index = cwin->page_index - 1; + + if (index < 0) + new_page = len - 1; + else if (index >= (gint)len) + new_page = 0; + else + new_page = index; + + return new_page; +} + void uim_cand_win_gtk_layout(UIMCandWinGtk *cwin, gint topwin_x, gint topwin_y, diff --git a/gtk/uim-cand-win-gtk.h b/gtk/uim-cand-win-gtk.h index e8ab101b9..6877f5305 100644 --- a/gtk/uim-cand-win-gtk.h +++ b/gtk/uim-cand-win-gtk.h @@ -96,6 +96,12 @@ UIMCandWinGtk *uim_cand_win_gtk_new (void); void uim_cand_win_gtk_set_candidates (UIMCandWinGtk *cwin, guint disp_limit, GSList *candidates); +void uim_cand_win_gtk_set_page_candidates (UIMCandWinGtk *cwin, + guint page, + GSList *candidates); +void uim_cand_win_gtk_set_nr_candidates (UIMCandWinGtk *cwin, + guint nr, + guint disp_limit); void uim_cand_win_gtk_clear_candidates (UIMCandWinGtk *cwin); guint uim_cand_win_gtk_get_nr_candidates (UIMCandWinGtk *cwin); gint uim_cand_win_gtk_get_index (UIMCandWinGtk *cwin); @@ -108,6 +114,12 @@ void uim_cand_win_gtk_set_page (UIMCandWinGtk *cwin, gint page); void uim_cand_win_gtk_shift_page (UIMCandWinGtk *cwin, gboolean forward); +guint uim_cand_win_gtk_query_new_page_by_cand_select + (UIMCandWinGtk *cwin, + gint index); +guint uim_cand_win_gtk_query_new_page_by_shift_page + (UIMCandWinGtk *cwin, + gboolean forward); void uim_cand_win_gtk_set_scrollable (UIMCandWinGtk *cwin, gboolean scrollable); diff --git a/helper/candwin-gtk.c b/helper/candwin-gtk.c index 22d7327e3..8b7f7690e 100644 --- a/helper/candwin-gtk.c +++ b/helper/candwin-gtk.c @@ -96,6 +96,7 @@ UIMCandidateWindow *candidate_window_new(void); static gint uim_cand_win_gtk_get_index(UIMCandidateWindow *cwin); static void uim_cand_win_gtk_set_index(UIMCandidateWindow *cwin, gint index); static void uim_cand_win_gtk_set_page(UIMCandidateWindow *cwin, gint page); +static void uim_cand_win_gtk_set_page_candidates(UIMCandidateWindow *cwin, guint page, GSList *candidates); static void uim_cand_win_gtk_layout(void); @@ -150,6 +151,9 @@ static void candwin_update(gchar **str); static void candwin_move(char **str); static void candwin_show(void); static void candwin_deactivate(void); +static void candwin_set_nr_candidates(gchar **str); +static void candwin_set_page_candidates(gchar **str); +static void candwin_show_page(gchar **str); static void str_parse(char *str); static void index_changed_cb(UIMCandidateWindow *cwin) @@ -286,8 +290,10 @@ cb_tree_view_destroy(GtkWidget *widget, GPtrArray *stores) for (i = cwin->stores->len - 1; i >= 0; i--) { GtkListStore *store = g_ptr_array_remove_index(cwin->stores, i); - gtk_list_store_clear(store); - g_object_unref(G_OBJECT(store)); + if (store) { + gtk_list_store_clear(store); + g_object_unref(G_OBJECT(store)); + } } g_ptr_array_free(cwin->stores, TRUE); } @@ -405,8 +411,10 @@ candwin_activate(gchar **str) /* remove old data */ for (i = cwin->stores->len - 1; i >= 0; i--) { GtkListStore *store = g_ptr_array_remove_index(cwin->stores, i); - gtk_list_store_clear(store); - g_object_unref(G_OBJECT(store)); + if (store) { + gtk_list_store_clear(store); + g_object_unref(G_OBJECT(store)); + } } if (!strncmp(str[1], "charset=", 8)) @@ -480,6 +488,7 @@ candwin_activate(gchar **str) } } } + g_slist_free(candidates); uim_cand_win_gtk_set_page(cwin, 0); update_label(cwin); @@ -546,6 +555,100 @@ caret_state_hide() gtk_widget_hide(cwin->caret_state_indicator); } +static void +candwin_set_nr_candidates(gchar **str) +{ + guint nr, display_limit; + gint i, nr_stores = 1; + + sscanf(str[1], "%ud", &nr); + sscanf(str[2], "%ud", &display_limit); + + cwin->candidate_index = -1; + cwin->nr_candidates = nr; + cwin->display_limit = display_limit; + cwin->need_hilite = FALSE; + cwin->is_active = TRUE; + + if (cwin->stores == NULL) + cwin->stores = g_ptr_array_new(); + + /* remove old data */ + for (i = cwin->stores->len - 1; i >= 0; i--) { + GtkListStore *store = g_ptr_array_remove_index(cwin->stores, i); + if (store) { + gtk_list_store_clear(store); + g_object_unref(G_OBJECT(store)); + } + } + + /* calculate number of GtkListStores to create */ + if (display_limit) { + nr_stores = nr / display_limit; + if (nr > display_limit * nr_stores) + nr_stores++; + } + + /* setup dummy array */ + for (i = 0; i < nr_stores; i++) + g_ptr_array_add(cwin->stores, NULL); +} + +static void +candwin_set_page_candidates(gchar **str) +{ + gsize rbytes, wbytes; + gint i; + guint j = 1; + gchar *utf8_str; + const gchar *charset; + GSList *candidates = NULL; + int page; + + if (!strncmp(str[1], "charset=", 8)) + charset = str[1] + 8; + else + charset = "UTF-8"; + + if (!strncmp(str[2], "page=", 5)) { + page = atoi(str[2] + 5); + i = 3; + } else { + /* shouldn't happen */ + page = 0; + i = 2; + } + + for ( ; str[i]; i++) { + if (strcmp(str[i], "") == 0) { + break; + } + utf8_str = g_convert(str[i], + -1, + "UTF-8", + charset, + &rbytes, &wbytes, NULL); + + candidates = g_slist_prepend(candidates, utf8_str); + j++; + } + candidates = g_slist_reverse(candidates); + + uim_cand_win_gtk_set_page_candidates(cwin, page, candidates); + g_slist_free(candidates); +} + +static void +candwin_show_page(gchar **str) +{ + int page; + + sscanf(str[1], "%d", &page); + + uim_cand_win_gtk_set_page(cwin, page); + gtk_widget_show_all(GTK_WIDGET(cwin)); +} + static void str_parse(gchar *str) { gchar **tmp; @@ -573,6 +676,12 @@ static void str_parse(gchar *str) caret_state_update(); } else if (strcmp("hide_caret_state", command) == 0) { caret_state_hide(); + } else if (strcmp("set_nr_candidates", command) == 0) { + candwin_set_nr_candidates(tmp); + } else if (strcmp("set_page_candidates", command) == 0) { + candwin_set_page_candidates(tmp); + } else if (strcmp("show_page", command) == 0) { + candwin_show_page(tmp); } } g_strfreev(tmp); @@ -679,6 +788,7 @@ uim_cand_win_gtk_set_index(UIMCandidateWindow *cwin, gint index) ->view)); gtk_tree_selection_unselect_all(selection); + update_label(cwin); } } @@ -695,20 +805,15 @@ uim_cand_win_gtk_set_page(UIMCandidateWindow *cwin, gint page) len = cwin->stores->len; g_return_if_fail(len); - if (page < 0) { - gtk_tree_view_set_model(GTK_TREE_VIEW(cwin->view), - GTK_TREE_MODEL(cwin->stores->pdata[len - 1])); + if (page < 0) new_page = len - 1; - } else if (page >= (gint) len) { - gtk_tree_view_set_model(GTK_TREE_VIEW(cwin->view), - GTK_TREE_MODEL(cwin->stores->pdata[0])); + else if (page >= (gint) len) new_page = 0; - } else { - gtk_tree_view_set_model(GTK_TREE_VIEW(cwin->view), - - GTK_TREE_MODEL(cwin->stores->pdata[page])); + else new_page = page; - } + + gtk_tree_view_set_model(GTK_TREE_VIEW(cwin->view), + GTK_TREE_MODEL(cwin->stores->pdata[new_page])); cwin->page_index = new_page; @@ -728,8 +833,50 @@ uim_cand_win_gtk_set_page(UIMCandidateWindow *cwin, gint page) /* shrink the window */ gtk_window_resize(GTK_WINDOW(cwin), CANDWIN_DEFAULT_WIDTH, 1); - if (new_index != -1) - uim_cand_win_gtk_set_index(cwin, new_index); + uim_cand_win_gtk_set_index(cwin, new_index); +} + +/* copied from uim-cand-win-gtk.c and adjusted */ +static void +uim_cand_win_gtk_set_page_candidates(UIMCandidateWindow *cwin, + guint page, + GSList *candidates) +{ + GtkListStore *store; + GSList *node; + gint j, len; + + g_return_if_fail(UIM_IS_CANDIDATE_WINDOW(cwin)); + + if (candidates == NULL) + return; + + len = g_slist_length(candidates); + + /* create GtkListStores, and set candidates */ + store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_STRING); + + cwin->stores->pdata[page] = store; + /* set candidates */ + for (j = 0, node = g_slist_nth(candidates, j); + j < len; + j++, node = g_slist_next(node)) + { + GtkTreeIter ti; + + if (node) { + gchar *str = node->data; + gchar **column = g_strsplit(str, "\t", 2); + gtk_list_store_append(store, &ti); + gtk_list_store_set(store, &ti, + COLUMN_HEADING, column[0], + COLUMN_CANDIDATE, column[1], + TERMINATOR); + + g_strfreev(column); + g_free(str); + } + } } static void diff --git a/helper/pref-gtk-custom-widgets.c b/helper/pref-gtk-custom-widgets.c index e76f2453a..f18b05abd 100644 --- a/helper/pref-gtk-custom-widgets.c +++ b/helper/pref-gtk-custom-widgets.c @@ -301,7 +301,7 @@ add_custom_type_integer(GtkWidget *vbox, struct uim_custom *custom) custom->range->as_int.max, /* maximum */ 1.0, 10.0, - 100.0); + 0); spin = gtk_spin_button_new(adjustment, 1.0, 0); gtk_size_group_add_widget(spin_button_sgroup, spin); gtk_box_pack_end (GTK_BOX (hbox), spin, FALSE, TRUE, 0); diff --git a/helper/pref-gtk.c b/helper/pref-gtk.c index f8cde6481..f3a121f6e 100644 --- a/helper/pref-gtk.c +++ b/helper/pref-gtk.c @@ -231,6 +231,17 @@ quit_confirm(void) } } +static gboolean +key_press_cb(GtkWidget *widget, GdkEventKey *event) +{ + if (event->keyval == GDK_Escape) { + quit_confirm(); + return TRUE; + } + + return FALSE; +} + static gint delete_event_cb(GtkWidget *widget, gpointer data) { @@ -498,6 +509,8 @@ create_pref_window(void) g_signal_connect(G_OBJECT (window), "delete_event", G_CALLBACK (delete_event_cb), NULL); + g_signal_connect(G_OBJECT (window), "key_press_event", + G_CALLBACK (key_press_cb), NULL); pref_hbox = gtk_hbox_new(FALSE, 8); diff --git a/helper/toolbar-common-gtk.c b/helper/toolbar-common-gtk.c index 837cc9d26..cf8092271 100644 --- a/helper/toolbar-common-gtk.c +++ b/helper/toolbar-common-gtk.c @@ -845,6 +845,7 @@ register_icon(const gchar *name) GtkIconSet *icon_set; GdkPixbuf *pixbuf; GString *filename; + GError *error = NULL; g_return_val_if_fail(uim_factory, FALSE); @@ -855,8 +856,9 @@ register_icon(const gchar *name) g_string_append(filename, name); g_string_append(filename, ".png"); - pixbuf = gdk_pixbuf_new_from_file(filename->str, NULL); + pixbuf = gdk_pixbuf_new_from_file(filename->str, &error); if (!pixbuf) { + fprintf(stderr, "error: %s\n", error->message); g_string_free(filename, TRUE); return FALSE; } diff --git a/qt/candwin-qt.cpp b/qt/candwin-qt.cpp index b2c441214..ebace9a33 100644 --- a/qt/candwin-qt.cpp +++ b/qt/candwin-qt.cpp @@ -248,6 +248,99 @@ void CandidateWindow::deactivateCand() hide(); isActive = false; } +void CandidateWindow::setNrCandidates( const QStringList &list ) +{ +#if defined(ENABLE_DEBUG) + qDebug( "uim-candwin-qt: setNrCandidates()" ); +#endif + if ( list[ 1 ].isEmpty() || list[ 2 ].isEmpty() ) + return ; + + // remove old data + cList->clear(); + stores.clear(); + + // set default value + candidateIndex = -1; + nrCandidates = list[ 1 ].toInt(); + displayLimit = list[ 2 ].toInt(); + needHilite = false; + isActive = true; + + // setup dummy stores + for ( int i = 0; i < nrCandidates; i++ ) { + CandData d; + stores.append( d ); + } +} +void CandidateWindow::setPageCandidates( const QStringList &list ) +{ +#if defined(ENABLE_DEBUG) + qDebug( "uim-candwin-qt: setPageCandidates()" ); +#endif + /** + * format: set_page_candidates\ncharset=$charset\npage=$value\nhead1\tcand1\nhead2\tcand2\nhead3\tcand3\n + */ + + int page = 0; + + // get charset and create codec + QTextCodec *codec = NULL; + if ( !list[ 1 ].isEmpty() && list[ 1 ].startsWith( "charset" ) ) + { + const QStringList l = QStringList::split( "=", list[ 1 ] ); + codec = QTextCodec::codecForName( l[ 1 ] ); + } + + // get page + if ( !list[ 2 ].isEmpty() && list[ 2 ].startsWith( "page" ) ) + { + const QStringList l = QStringList::split( "=", list[ 2 ] ); + page = l[ 1 ].toInt(); + } + + for ( int i = 3; !list[ i ].isNull(); i++ ) + { + // case list[i] = "" + if ( list[ i ].isEmpty() ) + break; + + // split heading_label and cand_str + QStringList l = QStringList::split( "\t", list [ i ], true ); + + // store data + CandData &d = stores[page * displayLimit + i - 3]; + QString headString; + if ( codec ) + headString = codec->toUnicode( l [ 0 ] ); + else + headString = l [ 0 ]; + + d.label = headString; + + // XXX Current prime (0.4.6) may return candidate string + // containing "\t", and we can't handle annotation in another + // window yet. + l.pop_front(); + QString candString = l.join( "\t" ); + + if ( codec ) + d.str = codec->toUnicode( candString ); + else + d.str = candString; + } +} +void CandidateWindow::showPage( const QStringList &list ) +{ +#if defined(ENABLE_DEBUG) + qDebug( "uim-candwin-qt: showPage()" ); +#endif + const int page = list[ 1 ].toInt(); + + setPage( page ); + adjustCandidateWindowSize(); + show(); +} void CandidateWindow::slotStdinActivated( int fd ) { char buf[ 4096 ]; @@ -300,6 +393,12 @@ void CandidateWindow::strParse( const QString& str ) moveCand( list ); else if ( QString::compare( "deactivate", ( *it ) ) == 0 ) deactivateCand(); + else if ( QString::compare( "set_nr_candidates", ( *it ) ) == 0 ) + setNrCandidates( list ); + else if ( QString::compare( "set_page_candidates", ( *it ) ) == 0 ) + setPageCandidates( list ); + else if ( QString::compare( "show_page", ( *it ) ) == 0 ) + showPage( list ); } } diff --git a/qt/candwin-qt.h b/qt/candwin-qt.h index 62e9eacd3..cd3be52e5 100644 --- a/qt/candwin-qt.h +++ b/qt/candwin-qt.h @@ -64,6 +64,10 @@ class CandidateWindow : public QVBox void showCand(); void deactivateCand(); + void setNrCandidates( const QStringList &list ); + void setPageCandidates( const QStringList &list ); + void showPage( const QStringList &list ); + public slots: void slotStdinActivated( int ); void slotCandidateSelected( QListViewItem* ); @@ -112,7 +116,7 @@ class CandidateListView : public QListView { QListViewItemIterator it( firstChild() ); uint j = 0; - for ( ; it.current() && it.current() != item; ++it, ++j ); + for ( ; it.current() && it.current() != item; ++it, ++j ) ; if ( !it.current() ) return -1; diff --git a/qt/immodule-candidatewindow.cpp b/qt/immodule-candidatewindow.cpp index 044eabef6..ac12e1529 100644 --- a/qt/immodule-candidatewindow.cpp +++ b/qt/immodule-candidatewindow.cpp @@ -105,7 +105,10 @@ CandidateWindow::~CandidateWindow() { // clear stored candidate datas for ( unsigned int i = 0; i < stores.size(); i++ ) - uim_candidate_free( stores[ i ] ); + { + if ( stores[ i ] ) + uim_candidate_free( stores[ i ] ); + } stores.clear(); } } @@ -143,7 +146,10 @@ void CandidateWindow::clearCandidates() // clear stored candidate datas for ( unsigned int i = 0; i < stores.size(); i++ ) - uim_candidate_free( stores[ i ] ); + { + if ( stores[ i ] ) + uim_candidate_free( stores[ i ] ); + } stores.clear(); } @@ -173,6 +179,55 @@ void CandidateWindow::setCandidates( int dl, const QValueList &ca setPage( 0 ); } +#if UIM_QT_USE_NEW_PAGE_HANDLING +void CandidateWindow::setNrCandidates( int nrCands, int dLimit ) +{ +#ifdef ENABLE_DEBUG + qDebug( "setNrCandidates" ); +#endif + // remove old data + if ( !stores.isEmpty() ) + clearCandidates(); + + candidateIndex = -1; + displayLimit = dLimit; + nrCandidates = nrCands; + pageIndex = 0; + + // setup dummy candidates + for ( int i = 0; i < nrCandidates; i++ ) + { + uim_candidate d = NULL; + stores.append( d ); + } + + if ( !subWin ) + subWin = new SubWindow( this ); +} + +void CandidateWindow::setPageCandidates( int page, const QValueList &candidates ) +{ +#ifdef ENABLE_DEBUG + qDebug( "setPageCandidates" ); +#endif + + if ( candidates.isEmpty() ) + return; + + // set candidates + int i, start, pageNr; + start = page * displayLimit; + + if ( displayLimit && ( nrCandidates - start ) > displayLimit ) + pageNr = displayLimit; + else + pageNr = nrCandidates - start; + + for ( i = 0; i < pageNr; i++ ) + stores[ start + i ] = candidates[ i ]; +} +#endif /* UIM_QT_USE_NEW_PAGE_HANDLING */ + void CandidateWindow::setPage( int page ) { #ifdef ENABLE_DEBUG diff --git a/qt/immodule-candidatewindow.h b/qt/immodule-candidatewindow.h index a07b3262c..9cc78be4d 100644 --- a/qt/immodule-candidatewindow.h +++ b/qt/immodule-candidatewindow.h @@ -70,10 +70,17 @@ class CandidateWindow : public QVBox void setIndex( int totalindex ); void setIndexInPage( int index ); + void setNrCandidates( int nrCands, int dLimit ); + void setPageCandidates( int page, const QValueList &candidates ); + void setQUimInputContext( QUimInputContext* m_ic ) { ic = m_ic; } QSize sizeHint(void) const; + int nrCandidates; + int candidateIndex; + int displayLimit; + int pageIndex; protected slots: void slotCandidateSelected( QListViewItem* ); void slotHookSubwindow( QListViewItem* ); @@ -92,11 +99,6 @@ protected slots: QValueList stores; - int nrCandidates; - int candidateIndex; - int displayLimit; - int pageIndex; - bool isAlwaysLeft; SubWindow *subWin; diff --git a/qt/immodule-quiminputcontext.cpp b/qt/immodule-quiminputcontext.cpp index 3eb3d6d86..17f0deee5 100644 --- a/qt/immodule-quiminputcontext.cpp +++ b/qt/immodule-quiminputcontext.cpp @@ -500,16 +500,14 @@ void QUimInputContext::cand_select_cb( void *ptr, int index ) ic->candidateSelect( index ); } -void QUimInputContext::cand_shift_page_cb( void *ptr, int direction ) +void QUimInputContext::cand_shift_page_cb( void *ptr, int forward ) { #ifdef ENABLE_DEBUG qDebug( "cand_shift_page_cb" ); #endif QUimInputContext *ic = ( QUimInputContext* ) ptr; - CandidateWindow *cwin = ic->cwin; - - cwin->shiftPage( direction ); + ic->candidateShiftPage( (bool)forward ); } void QUimInputContext::cand_deactivate_cb( void *ptr ) @@ -677,11 +675,47 @@ int QUimInputContext::getPreeditSelectionLength() } +#if UIM_QT_USE_NEW_PAGE_HANDLING +void QUimInputContext::prepare_page_candidates( int page ) +{ + QValueList list; + list.clear(); + + if ( page < 0 ) + return; + + if (pageFilled[ page ] ) + return; + + /* set page candidates */ + uim_candidate cand; + int pageNr, start, nrCandidates, displayLimit; + + nrCandidates = cwin->nrCandidates; + displayLimit = cwin->displayLimit; + start = page * displayLimit; + + if ( displayLimit && ( nrCandidates - start ) > displayLimit ) + pageNr = displayLimit; + else + pageNr = nrCandidates - start; + + for ( int i = start; i < ( pageNr + start ); i++ ) + { + cand = uim_get_candidate( m_uc, i, displayLimit ? i % displayLimit : i ); + list.append( cand ); + } + pageFilled[ page ] = true; + cwin->setPageCandidates( page, list ); +} +#endif + void QUimInputContext::candidateActivate( int nr, int displayLimit ) { QValueList list; list.clear(); +#if !UIM_QT_USE_NEW_PAGE_HANDLING cwin->activateCandwin( displayLimit ); /* set candidates */ @@ -693,15 +727,58 @@ void QUimInputContext::candidateActivate( int nr, int displayLimit ) } cwin->setCandidates( displayLimit, list ); +#else /* !UIM_QT_USE_NEW_PAGE_HANDLING */ + nrPages = displayLimit ? ( nr - 1 ) / displayLimit + 1 : 1; + pageFilled.clear(); + for ( int i = 0; i < nrPages; i++ ) + pageFilled.append( false ); + + cwin->setNrCandidates( nr, displayLimit ); + + // set page candidates + prepare_page_candidates( 0 ); + cwin->setPage( 0 ); +#endif /* !UIM_QT_USE_NEW_PAGE_HANDLING */ cwin->popup(); candwinIsActive = true; } void QUimInputContext::candidateSelect( int index ) { +#if UIM_QT_USE_NEW_PAGE_HANDLING + int new_page; + + if ( index >= cwin->nrCandidates ) + index = 0; + + if ( index >= 0 && cwin->displayLimit ) + new_page = index / cwin->displayLimit; + else + new_page = cwin->pageIndex; + + prepare_page_candidates( new_page ); +#endif cwin->setIndex( index ); } +void QUimInputContext::candidateShiftPage( bool forward ) +{ +#if UIM_QT_USE_NEW_PAGE_HANDLING + int new_page, index; + + index = forward ? cwin->pageIndex + 1 : cwin->pageIndex - 1; + if ( index < 0 ) + new_page = nrPages - 1; + else if ( index >= nrPages ) + new_page = 0; + else + new_page = index; + + prepare_page_candidates( new_page ); +#endif + cwin->shiftPage( forward ); +} + void QUimInputContext::candidateDeactivate() { cwin->deactivateCandwin(); diff --git a/qt/immodule-quiminputcontext.h b/qt/immodule-quiminputcontext.h index 29727bf9e..cd5bf1885 100644 --- a/qt/immodule-quiminputcontext.h +++ b/qt/immodule-quiminputcontext.h @@ -39,6 +39,7 @@ SUCH DAMAGE. #ifdef Q_WS_X11 #define UIM_QT_USE_JAPANESE_KANA_KEYBOARD_HACK 1 #endif +#define UIM_QT_USE_NEW_PAGE_HANDLING 1 class QString; @@ -129,11 +130,15 @@ class QUimInputContext : public QInputContext //candidate void candidateActivate( int nr, int displayLimit ); void candidateSelect( int index ); + void candidateShiftPage( bool forward ); void candidateDeactivate(); //imsw void switch_app_global_im( const char *str ); void switch_system_global_im( const char *str ); +#if UIM_QT_USE_NEW_PAGE_HANDLING + void prepare_page_candidates( int page ); +#endif #ifdef Q_WS_X11 // for X11 Compose static DefTree *mTreeTop; @@ -161,6 +166,11 @@ class QUimInputContext : public QInputContext CandidateWindow *cwin; static QUimHelperManager *m_HelperManager; + +#if UIM_QT_USE_NEW_PAGE_HANDLING + QValueList pageFilled; + int nrPages; +#endif }; #endif /* Not def: UIM_QT_IMMODULE_QUIMINPUTCONTEXT_H */ diff --git a/qt4/immodule/candidatewindow.cpp b/qt4/immodule/candidatewindow.cpp index 52d138996..cc96b3bfe 100644 --- a/qt4/immodule/candidatewindow.cpp +++ b/qt4/immodule/candidatewindow.cpp @@ -152,7 +152,10 @@ void CandidateWindow::clearCandidates() // clear stored candidate datas for ( int i = 0; i < stores.size(); i++ ) - uim_candidate_free( stores[ i ] ); + { + if ( stores[ i ] ) + uim_candidate_free( stores[ i ] ); + } stores.clear(); } @@ -182,6 +185,56 @@ void CandidateWindow::setCandidates( int dl, const Q3ValueList &c setPage( 0 ); } +#if UIM_QT_USE_NEW_PAGE_HANDLING +void CandidateWindow::setNrCandidates( int nrCands, int dLimit ) +{ +#ifdef ENABLE_DEBUG + qDebug( "setNrCandidates" ); +#endif + + // remove old data + if ( !stores.isEmpty() ) + clearCandidates(); + + candidateIndex = -1; + displayLimit = dLimit; + nrCandidates = nrCands; + pageIndex = 0; + + // setup dummy candidate + for ( int i = 0; i < nrCandidates; i++ ) + { + uim_candidate d = NULL; + stores.append( d ); + } + + if ( !subWin ) + subWin = new SubWindow( this ); +} + +void CandidateWindow::setPageCandidates( int page, const Q3ValueList &candidates ) +{ +#ifdef ENABLE_DEBUG + qDebug( "setPageCandidates" ); +#endif + + if ( candidates.isEmpty() ) + return; + + // set candidates + int i, start, pageNr; + start = page * displayLimit; + + if ( displayLimit && ( nrCandidates - start ) > displayLimit ) + pageNr = displayLimit; + else + pageNr = nrCandidates - start; + + for ( i = 0; i < pageNr; i++ ) + stores[ start + i ] = candidates[ i ]; +} +#endif /* UIM_QT_USE_NEW_PAGE_HANDLING */ + void CandidateWindow::setPage( int page ) { #ifdef ENABLE_DEBUG diff --git a/qt4/immodule/candidatewindow.h b/qt4/immodule/candidatewindow.h index 4d4719b50..fa88fa5ca 100644 --- a/qt4/immodule/candidatewindow.h +++ b/qt4/immodule/candidatewindow.h @@ -70,10 +70,17 @@ class CandidateWindow : public Q3VBox void setIndex( int totalindex ); void setIndexInPage( int index ); + void setNrCandidates( int nrCands, int dLimit ); + void setPageCandidates( int page, const Q3ValueList &candidates ); + void setQUimInputContext( QUimInputContext* m_ic ) { ic = m_ic; } QSize sizeHint(void) const; + int nrCandidates; + int displayLimit; + int candidateIndex; + int pageIndex; protected slots: void slotCandidateSelected( Q3ListViewItem* ); void slotHookSubwindow( Q3ListViewItem* ); @@ -92,10 +99,6 @@ protected slots: Q3ValueList stores; - int nrCandidates; - int candidateIndex; - int displayLimit; - int pageIndex; bool isAlwaysLeft; diff --git a/qt4/immodule/quiminputcontext.cpp b/qt4/immodule/quiminputcontext.cpp index c818dae37..91b71c0e1 100644 --- a/qt4/immodule/quiminputcontext.cpp +++ b/qt4/immodule/quiminputcontext.cpp @@ -548,14 +548,12 @@ void QUimInputContext::cand_select_cb( void *ptr, int index ) ic->candidateSelect( index ); } -void QUimInputContext::cand_shift_page_cb( void *ptr, int direction ) +void QUimInputContext::cand_shift_page_cb( void *ptr, int forward ) { qDebug( "cand_shift_page_cb" ); QUimInputContext *ic = ( QUimInputContext* ) ptr; - CandidateWindow *cwin = ic->cwin; - - cwin->shiftPage( direction ); + ic->candidateShiftPage( (bool)forward ); } void QUimInputContext::cand_deactivate_cb( void *ptr ) @@ -778,12 +776,47 @@ QList QUimInputContext::getPreeditAttrs() return attrs; } +#if UIM_QT_USE_NEW_PAGE_HANDLING +void QUimInputContext::prepare_page_candidates( int page ) +{ + QList list; + list.clear(); + + if ( page < 0 ) + return; + + if ( pageFilled[ page ] ) + return; + + // set page candidates + uim_candidate cand; + int pageNr, start, nrCandidates, displayLimit; + + nrCandidates = cwin->nrCandidates; + displayLimit = cwin->displayLimit; + start = page * displayLimit; + + if ( displayLimit && ( nrCandidates - start ) > displayLimit ) + pageNr = displayLimit; + else + pageNr = nrCandidates - start; + + for ( int i = start; i < ( pageNr + start ); i++ ) + { + cand = uim_get_candidate( m_uc, i, displayLimit ? i % displayLimit : i ); + list.append( cand ); + } + pageFilled[ page ] = true; + cwin->setPageCandidates( page, list ); +} +#endif /* UIM_QT_USE_NEW_PAGE_HANDLING */ void QUimInputContext::candidateActivate( int nr, int displayLimit ) { QList list; list.clear(); +#if !UIM_QT_USE_NEW_PAGE_HANDLING cwin->activateCandwin( displayLimit ); // set candidates @@ -795,15 +828,59 @@ void QUimInputContext::candidateActivate( int nr, int displayLimit ) } cwin->setCandidates( displayLimit, list ); +#else /* !UIM_QT_USE_NEW_PAGE_HANDLING */ + nrPages = displayLimit ? ( nr - 1 ) / displayLimit + 1 : 1; + pageFilled.clear(); + for ( int i = 0; i < nrPages; i++ ) + pageFilled.append( false ); + + cwin->setNrCandidates( nr, displayLimit ); + + // set page candidates + prepare_page_candidates( 0 ); + cwin->setPage( 0 ); +#endif /* !UIM_QT_USE_NEW_PAGE_HANDLING */ cwin->popup(); candwinIsActive = true; } void QUimInputContext::candidateSelect( int index ) { +#if UIM_QT_USE_NEW_PAGE_HANDLING + int new_page; + + if ( index >= cwin->nrCandidates ) + index = 0; + + if ( index >= 0 && cwin->displayLimit ) + new_page = index / cwin->displayLimit; + else + new_page = cwin->pageIndex; + + prepare_page_candidates( new_page ); +#endif /* UIM_QT_USE_NEW_PAGE_HANDLING */ cwin->setIndex( index ); } +void QUimInputContext::candidateShiftPage( bool forward ) +{ +#if UIM_QT_USE_NEW_PAGE_HANDLING + int new_page, index; + + index = forward ? cwin->pageIndex + 1 : cwin->pageIndex - 1; + if ( index < 0 ) + new_page = nrPages - 1; + else if ( index >= nrPages ) + new_page = 0; + else + new_page = index; + + prepare_page_candidates( new_page ); +#endif /* UIM_QT_USE_NEW_PAGE_HANDLING */ + cwin->shiftPage( forward ); +} + + void QUimInputContext::candidateDeactivate() { cwin->deactivateCandwin(); diff --git a/qt4/immodule/quiminputcontext.h b/qt4/immodule/quiminputcontext.h index ba9ffcdaf..5e2575994 100644 --- a/qt4/immodule/quiminputcontext.h +++ b/qt4/immodule/quiminputcontext.h @@ -41,6 +41,7 @@ #ifdef Q_WS_X11 #define UIM_QT_USE_JAPANESE_KANA_KEYBOARD_HACK 1 #endif +#define UIM_QT_USE_NEW_PAGE_HANDLING 1 #include #include @@ -139,11 +140,15 @@ class QUimInputContext : public QInputContext //candidate void candidateActivate( int nr, int displayLimit ); void candidateSelect( int index ); + void candidateShiftPage( bool forward ); void candidateDeactivate(); //imsw void switch_app_global_im( const char *str ); void switch_system_global_im( const char *str ); +#if UIM_QT_USE_NEW_PAGE_HANDLING + void prepare_page_candidates( int page ); +#endif #ifdef Q_WS_X11 // for X11 Compose static DefTree *mTreeTop; @@ -172,6 +177,11 @@ class QUimInputContext : public QInputContext CandidateWindow *cwin; static QUimHelperManager *m_HelperManager; + +#if UIM_QT_USE_NEW_PAGE_HANDLING + QList pageFilled; + int nrPages; +#endif }; #endif /* Not def: UIM_QT4_IMMODULE_QUIMINPUTCONTEXT_H */ diff --git a/scm/Makefile.am b/scm/Makefile.am index aa99843d5..0b8dac62d 100644 --- a/scm/Makefile.am +++ b/scm/Makefile.am @@ -24,8 +24,8 @@ SCM_FILES = plugin.scm im.scm im-custom.scm lazy-load.scm init.scm \ skk.scm skk-editor.scm skk-custom.scm skk-key-custom.scm skk-dialog.scm \ mana.scm mana-custom.scm mana-key-custom.scm \ tcode.scm trycode.scm \ - tutcode.scm tutcode-key-custom.scm \ - tutcode-custom.scm tutcode-bushudic.scm tutcode-rule.scm \ + tutcode.scm tutcode-custom.scm tutcode-key-custom.scm \ + tutcode-bushudic.scm tutcode-rule.scm tutcode-kigoudic.scm \ hangul.scm hangul2.scm hangul3.scm romaja.scm \ byeoru.scm byeoru-dic.scm byeoru-symbols.scm \ byeoru-custom.scm byeoru-key-custom.scm \ diff --git a/scm/generic-custom.scm b/scm/generic-custom.scm index cd58eb6f2..bb853cf3d 100644 --- a/scm/generic-custom.scm +++ b/scm/generic-custom.scm @@ -60,6 +60,13 @@ (N_ "Select candidate by numeral keys") (N_ "long description will be here.")) +(define-custom 'generic-show-candidate-implicitly? #t + '(other-ims candwin) + '(boolean) + (N_ "Show candidate window without explicit conversion action") + (N_ "long description will be here.")) + + ;; activity dependency (custom-add-hook 'generic-candidate-op-count 'custom-activity-hooks @@ -75,3 +82,8 @@ 'custom-activity-hooks (lambda () generic-use-candidate-window?)) + +(custom-add-hook 'generic-show-candidate-implicitly? + 'custom-activity-hooks + (lambda () + generic-use-candidate-window?)) diff --git a/scm/generic.scm b/scm/generic.scm index 6393950b9..63eade15d 100644 --- a/scm/generic.scm +++ b/scm/generic.scm @@ -103,12 +103,14 @@ (define generic-context-rec-spec (append context-rec-spec - '((rk-context #f) - (rk-nth 0) - (on #f) - (candidate-op-count 0) - (raw-commit #f) - (converting #f)))) + '((rk-context #f) + (rk-nth 0) + (on #f) + (candidate-op-count 0) + (raw-commit #f) + (converting #f) + (multi-cand-input #f) + (cands ())))) (define-record 'generic-context generic-context-rec-spec) (define generic-context-new-internal generic-context-new) @@ -125,6 +127,8 @@ (generic-context-set-rk-nth! pc 0) (generic-context-set-candidate-op-count! pc 0) (generic-context-set-converting! pc #f) + (generic-context-set-multi-cand-input! pc #f) + (generic-context-set-cands! pc '()) (rk-flush (generic-context-rk-context pc)))) (define generic-update-preedit @@ -132,13 +136,13 @@ (if (generic-context-raw-commit pc) (generic-context-set-raw-commit! pc #f) (let* ((rkc (generic-context-rk-context pc)) - (cs (rk-current-seq rkc)) + (cands (generic-context-cands pc)) (n (generic-context-rk-nth pc))) (im-clear-preedit pc) (im-pushback-preedit pc preedit-reverse - (if cs - (nth n (cadr cs)) + (if (not (null? cands)) + (nth n cands) (rk-pending rkc))) (im-update-preedit pc))))) @@ -150,12 +154,10 @@ (define generic-commit (lambda (pc) (let* ((rkc (generic-context-rk-context pc)) - (cs (rk-current-seq rkc))) - (if (and - cs - (> (length (cadr cs)) 0)) + (cands (generic-context-cands pc))) + (if (not (null? cands)) (begin - (im-commit pc (nth (generic-context-rk-nth pc) (cadr cs))) + (im-commit pc (nth (generic-context-rk-nth pc) cands)) (im-deactivate-candidate-selector pc) (generic-context-flush pc)) (begin @@ -165,9 +167,9 @@ (define generic-commit-by-numkey (lambda (pc key) (let* ((rkc (generic-context-rk-context pc)) - (cs (rk-current-seq rkc)) + (cands (generic-context-cands pc)) (n (generic-context-rk-nth pc)) - (nr (length (cadr cs))) + (nr (length cands)) (cur-page (if (= generic-nr-candidate-max 0) 0 (quotient n generic-nr-candidate-max))) @@ -180,7 +182,7 @@ (idx (+ (* cur-page generic-nr-candidate-max) compensated-pageidx))) (if (< idx nr) (begin - (im-commit pc (nth idx (cadr cs))) + (im-commit pc (nth idx cands)) (im-deactivate-candidate-selector pc) (generic-context-flush pc) #t) @@ -189,29 +191,35 @@ (define generic-proc-input-state-without-preedit (lambda (pc key state rkc) (cond - ((generic-off-key? key state) - (generic-context-set-on! pc #f) - #f) - ((generic-backspace-key? key state) - (generic-commit-raw pc) - #f) - ((symbol? key) - (generic-commit-raw pc) - #f) - ((and (modifier-key-mask state) - (not (shift-key-mask state))) - (generic-commit-raw pc) - #f) - (else - #t)))) - + ((generic-off-key? key state) + (generic-context-set-on! pc #f) + #f) + ((generic-backspace-key? key state) + (generic-commit-raw pc) + #f) + ((symbol? key) + (generic-commit-raw pc) + #f) + ((and (modifier-key-mask state) + (not (shift-key-mask state))) + (generic-commit-raw pc) + #f) + (else + #t)))) + (define generic-proc-input-state-with-preedit (lambda (pc key state rkc) (cond ((generic-off-key? key state) - (rk-flush rkc) - (generic-context-set-on! pc #f) - #f) + (let ((cands (generic-context-cands pc))) + (if (not (null? cands)) + (begin + (im-commit pc (nth (generic-context-rk-nth pc) cands)) + (generic-context-flush pc)) + (if (not (string=? (rk-pending rkc) "")) ;; flush pending rk + (generic-context-flush pc))) + (generic-context-set-on! pc #f) + #f)) ((generic-prev-candidate-key? key state) (generic-context-set-converting! pc #t) (generic-proc-converting-state pc key state) @@ -223,6 +231,8 @@ ((generic-backspace-key? key state) (rk-backspace rkc) (generic-context-set-rk-nth! pc 0) + (generic-update-input-state-cands pc key state + rkc (rk-context-seq rkc) #f) #f) ((generic-commit-key? key state) (generic-commit pc) @@ -242,6 +252,58 @@ (else #t)))) +(define generic-update-input-state-cands + (lambda (pc key state rkc prev-seq res) + (let* ((cs (rk-current-seq rkc)) + (cands (if cs (cadr cs) '()))) + (generic-context-set-cands! pc cands) + (if (not (rk-partial? rkc)) ;; exact match or no-match + (begin + (if cs + (if (null? (cdr cands)) + ;; single candidate + (begin + (im-commit pc + (nth (generic-context-rk-nth pc) cands)) + (generic-context-flush pc) + (im-deactivate-candidate-selector pc)) + ;; show candidates for the Pinyin like input method + (if (and generic-use-candidate-window? + generic-show-candidate-implicitly?) + (begin + (im-activate-candidate-selector + pc (length cands) generic-nr-candidate-max) + (im-select-candidate pc 0) + (generic-context-set-converting! pc #t) + (generic-context-set-candidate-op-count! + pc + (+ 1 (generic-context-candidate-op-count pc))))))) + ;; commit no-matching key + (if (and + (not cs) + (null? (rk-context-seq rkc)) + (or + (null? prev-seq) + res) + (not (generic-backspace-key? key state))) ;; mmm... + (im-commit-raw pc))) + ;; partial match + (begin + (if cs + (if (not (null? (cdr cands))) + ;; show candidates even in input-state + (begin + (if (and generic-use-candidate-window? + generic-show-candidate-implicitly?) + (begin + (im-activate-candidate-selector + pc (length cands) generic-nr-candidate-max) + (im-select-candidate pc 0) + (generic-context-set-candidate-op-count! + pc (+ 1 (generic-context-candidate-op-count pc))) + (generic-context-set-multi-cand-input! pc #t) + )))))))))) + (define generic-proc-input-state (lambda (pc key state) (let* ((rkc (generic-context-rk-context pc)) @@ -261,48 +323,172 @@ (im-commit pc (nth (generic-context-rk-nth pc) res)) (generic-context-set-rk-nth! pc 0) (generic-context-set-candidate-op-count! pc 0) + (generic-context-set-cands! pc '()) (im-deactivate-candidate-selector pc))) + (generic-update-input-state-cands pc key state rkc seq res)))))) + +(define generic-proc-specific-multi-cand-input-state + (lambda (pc key state rkc) + (cond + ((generic-off-key? key state) + (let ((cands (generic-context-cands pc))) + (if (not (null? cands)) + (begin + (im-commit pc (nth (generic-context-rk-nth pc) cands)) + (generic-context-flush pc)) + (if (not (string=? (rk-pending rkc) "")) ;; flush pending rk + (generic-context-flush pc))) + (generic-context-set-on! pc #f) + (im-deactivate-candidate-selector pc) + #f)) + ((generic-prev-candidate-key? key state) + (generic-context-set-converting! pc #t) + (generic-context-set-multi-cand-input! pc #f) + (generic-proc-converting-state pc key state) + #f) + ((generic-next-candidate-key? key state) + (generic-context-set-converting! pc #t) + (generic-context-set-multi-cand-input! pc #f) + (generic-proc-converting-state pc key state) + #f) + ((generic-prev-page-key? key state) + (generic-context-set-converting! pc #t) + (generic-context-set-multi-cand-input! pc #f) + (generic-proc-converting-state pc key state) + #f) + ((generic-next-page-key? key state) + (generic-context-set-converting! pc #t) + (generic-context-set-multi-cand-input! pc #f) + (im-shift-page-candidate pc #t) + #f) + ((generic-backspace-key? key state) + (rk-backspace rkc) + (generic-context-set-rk-nth! pc 0) + (generic-update-multi-cand-state-cands pc key state + rkc (rk-context-seq rkc) #f) + #f) + ((generic-commit-key? key state) + (generic-context-set-multi-cand-input! pc #f) + (generic-commit pc) + #f) + ((generic-cancel-key? key state) + (im-deactivate-candidate-selector pc) + (generic-context-flush pc) + #f) + ((symbol? key) + (generic-context-set-multi-cand-input! pc #f) + (generic-commit pc) + (im-commit-raw pc) + #f) + ((and generic-commit-candidate-by-numeral-key? + (ichar-numeric? key)) + (if (generic-commit-by-numkey pc key) + (generic-context-set-multi-cand-input! pc #f)) + #f) - (if (not (rk-partial? rkc)) ;; exact match or no-match - (let ((cs (rk-current-seq rkc))) - (if (and - cs - (= (length (cadr cs)) 1)) - (begin - (im-commit pc - (nth (generic-context-rk-nth pc) (cadr cs))) - (generic-context-flush pc) - (im-deactivate-candidate-selector pc))) - ;; commit no-matching key - (if (and - (not cs) - (null? (rk-context-seq rkc)) - (or - (null? seq) - res)) - (im-commit-raw pc))))))))) + ((and (modifier-key-mask state) + (not (shift-key-mask state))) + (generic-context-set-multi-cand-input! pc #f) + (generic-commit pc) + (im-commit-raw pc) + #f) + (else + #t)))) + +(define generic-update-multi-cand-state-cands + (lambda (pc key state rkc prev-seq res) + (let* ((cs (rk-current-seq rkc)) + (cands (if cs (cadr cs) '()))) + (generic-context-set-cands! pc cands) + (if (not (rk-partial? rkc)) ;; exact match or no-match + (begin + (if cs + (if (null? (cdr cands)) + (begin + (im-commit pc + (nth (generic-context-rk-nth pc) cands)) + (generic-context-flush pc) + (im-deactivate-candidate-selector pc)) + ;; show candidates for the Pinyin like input method + (if (and + generic-use-candidate-window? + generic-show-candidate-implicitly?) + (begin + (im-activate-candidate-selector + pc (length cands) generic-nr-candidate-max) + (im-select-candidate pc 0) + (generic-context-set-converting! pc #t))))) + ;; commit no-matching key (backspace only) + (if (and + (not cs) + (null? (rk-context-seq rkc)) + (or + (null? prev-seq) + res) + (generic-backspace-key? key state)) + (begin + (im-deactivate-candidate-selector pc) + (generic-context-set-candidate-op-count! pc 0) + (generic-context-set-multi-cand-input! pc #f)))) + ;; partial match + (begin + (if cs + (if (not (null? (cdr cands))) + (begin + (im-activate-candidate-selector + pc (length cands) generic-nr-candidate-max) + (im-select-candidate pc 0)) + ;; single candidate + (begin + (im-deactivate-candidate-selector pc) + (generic-context-set-candidate-op-count! pc 0) + (generic-context-set-multi-cand-input! pc #f))) + ;; no-candidate + (begin + (im-deactivate-candidate-selector pc) + (generic-context-set-candidate-op-count! pc 0) + (generic-context-set-multi-cand-input! pc #f)))))))) + +(define generic-proc-multi-cand-input-state + (lambda (pc key state) + (let* ((rkc (generic-context-rk-context pc)) + (seq (rk-context-seq rkc)) + (res #f)) + (and + (generic-proc-specific-multi-cand-input-state pc key state rkc) + (begin + (set! res + (rk-push-key! + rkc + (charcode->string key))) + (if res + ;; commit matched word and continue new rk + (begin + (im-commit pc (nth (generic-context-rk-nth pc) res)) + (generic-context-set-rk-nth! pc 0) + (generic-context-set-candidate-op-count! pc 0) + (im-deactivate-candidate-selector pc) + (generic-context-set-multi-cand-input! pc #f))) + (generic-update-multi-cand-state-cands pc key state rkc seq res)))))) (define generic-proc-converting-state (lambda (pc key state) (let* ((rkc (generic-context-rk-context pc)) (n (generic-context-rk-nth pc)) - (cs (rk-current-seq rkc)) - (cands (if cs - (cadr cs) - '())) - (res #f)) + (cands (generic-context-cands pc)) + (nr (length cands))) (and (if (generic-prev-candidate-key? key state) - (if (and - (not (null? cands)) - (> (length (cdr cands)) 0)) + (if (not (null? cands)) + (if (pair? (cdr cands)) + ;; multiple candidates (begin (set! n (- n 1)) (generic-context-set-rk-nth! pc n) (if (< n 0) (begin - (generic-context-set-rk-nth! pc (- (length cands) 1)) - (set! n (- (length cands) 1)))) + (generic-context-set-rk-nth! pc (- nr 1)) + (set! n (- nr 1)))) (generic-context-set-candidate-op-count! pc (+ 1 (generic-context-candidate-op-count pc))) @@ -311,23 +497,29 @@ generic-candidate-op-count) generic-use-candidate-window?) (im-activate-candidate-selector - pc (length cands) generic-nr-candidate-max)) - (if (>= (generic-context-candidate-op-count pc) - generic-candidate-op-count) + pc nr generic-nr-candidate-max)) + (if (and + (>= (generic-context-candidate-op-count pc) + generic-candidate-op-count) + generic-use-candidate-window?) (im-select-candidate pc n)) #f) + ;; single candidate (begin - (im-commit-raw pc) - (generic-context-flush pc) + (generic-commit pc) #f)) + ;; no candidate + (begin + (generic-context-flush pc) + #f)) #t) (if (generic-next-candidate-key? key state) - (if (and - (not (null? cands)) - (> (length (cdr cands)) 0)) + (if (not (null? cands)) + (if (pair? (cdr cands)) + ;; multiple candidates (begin (generic-context-set-rk-nth! pc (+ 1 n)) - (if (<= (length cands) (+ n 1)) + (if (<= nr (+ n 1)) (generic-context-set-rk-nth! pc 0)) (generic-context-set-candidate-op-count! pc @@ -336,27 +528,38 @@ (= (generic-context-candidate-op-count pc) generic-candidate-op-count) generic-use-candidate-window?) - (im-activate-candidate-selector pc (length cands) generic-nr-candidate-max)) - (if (>= (generic-context-candidate-op-count pc) - generic-candidate-op-count) + (im-activate-candidate-selector pc nr + generic-nr-candidate-max)) + (if (and + (>= (generic-context-candidate-op-count pc) + generic-candidate-op-count) + generic-use-candidate-window?) (begin - (if (>= (+ n 1) (length cands)) + (if (>= (+ n 1) nr) (set! n -1)) (im-select-candidate pc (+ n 1)))) #f) + ;; single candidate (begin - (im-commit-raw pc) - (generic-context-flush pc) + (generic-commit pc) #f)) + ;; no candidate + (begin + (generic-context-flush pc) + #f)) #t) (if (and (generic-prev-page-key? key state) - (<= generic-candidate-op-count (generic-context-candidate-op-count pc))) + (<= generic-candidate-op-count + (generic-context-candidate-op-count pc)) + generic-use-candidate-window?) (begin (im-shift-page-candidate pc #f) #f) #t) (if (and (generic-next-page-key? key state) - (<= generic-candidate-op-count (generic-context-candidate-op-count pc))) + (<= generic-candidate-op-count + (generic-context-candidate-op-count pc)) + generic-use-candidate-window?) (begin (im-shift-page-candidate pc #t) #f) @@ -367,6 +570,10 @@ (generic-commit-raw pc)) (generic-context-set-rk-nth! pc 0) (im-deactivate-candidate-selector pc) + (generic-context-set-candidate-op-count! pc 0) + (generic-context-set-converting! pc #f) + (generic-update-input-state-cands pc key state + rkc (rk-context-seq rkc) #f) #f) #t) (if (generic-commit-key? key state) @@ -399,16 +606,14 @@ (im-commit-raw pc) #f) #t) - (let ((cs (rk-current-seq rkc))) - (if (and - cs - (> (length (cadr cs)) 0)) + (begin + (if (not (null? cands)) (im-commit pc - (nth (generic-context-rk-nth pc) (cadr cs)))) + (nth (generic-context-rk-nth pc) cands))) (generic-context-flush pc) (im-deactivate-candidate-selector pc) (generic-proc-input-state pc key state)))))) - + (define generic-proc-off-mode (lambda (pc key state) @@ -428,7 +633,9 @@ (if (generic-context-on pc) (if (generic-context-converting pc) (generic-proc-converting-state pc key state) - (generic-proc-input-state pc key state)) + (if (generic-context-multi-cand-input pc) + (generic-proc-multi-cand-input-state pc key state) + (generic-proc-input-state pc key state))) (generic-proc-off-mode pc key state))) (generic-update-preedit pc) ())) @@ -451,13 +658,11 @@ (define generic-focus-out-handler (lambda (pc) - (let* ((rkc (generic-context-rk-context pc)) - (cs (rk-current-seq rkc))) + (let ((rkc (generic-context-rk-context pc)) + (cands (generic-context-cands pc))) (cond - ((and - cs - (> (length (cadr cs)) 0)) ;; commit - (im-commit pc (nth (generic-context-rk-nth pc) (cadr cs))) + ((not (null? cands)) ;; commit + (im-commit pc (nth (generic-context-rk-nth pc) cands)) (im-deactivate-candidate-selector pc) (generic-context-flush pc) (generic-update-preedit pc)) @@ -470,9 +675,8 @@ (define generic-get-candidate-handler (lambda (pc idx accel-enum-hint) - (let* ((rkc (generic-context-rk-context pc)) - (cs (cadr (rk-current-seq rkc))) - (cand (car (nthcdr idx cs)))) + (let* ((cands (generic-context-cands pc)) + (cand (nth idx cands))) (list cand (digit->string (+ idx 1)) "")))) (define generic-set-candidate-index-handler diff --git a/scm/pyload.scm b/scm/pyload.scm index bae911a83..a71dc8e9f 100644 --- a/scm/pyload.scm +++ b/scm/pyload.scm @@ -68,3 +68,16 @@ (N_ "Pinyin (Traditional)") (N_ "Pinyin input method (Traditional Chinese version)") pinyin-big5-init-handler) + +(define py-new-init-handler + (lambda (id im arg) + (require "py-new.scm") + (generic-context-new id im py-new-rule #f))) + +(generic-register-im + 'py-new + "zh_TW:zh_HK" + "UTF-8" + (N_ "Py new") + (N_ "Py new input method") + py-new-init-handler) diff --git a/scm/rk.scm b/scm/rk.scm index 83119562d..454e348e4 100644 --- a/scm/rk.scm +++ b/scm/rk.scm @@ -73,7 +73,7 @@ (longest-head (reverse (rk-find-longest-head rseq rule))) (head (truncate-list seq - (- (length seq) (length longest-tail)))) + (- len (length longest-tail)))) (partial (rk-lib-find-partial-seq seq rule)) (tail-partial (if (not (null? longest-tail)) @@ -95,7 +95,7 @@ (if (not tail-partial) (let ((matched (rk-lib-find-seq (reverse longest-head) rule)) (tail (reverse (truncate-list (reverse seq) - (- (length seq) + (- len (length longest-head)))))) (if matched (set! res (cadr matched))) @@ -147,14 +147,14 @@ (define rk-backspace (lambda (context) (if - (> (length (rk-context-seq context)) 0) + (pair? (rk-context-seq context)) (begin (rk-context-set-seq! context (cdr (rk-context-seq context))) ;; If the sequence contains only non-representable keysyms after ;; the deletion, flush them. (if (and - (not (null? (rk-context-seq context))) + (pair? (rk-context-seq context)) (null? (remove (lambda (x) (and @@ -169,7 +169,7 @@ (define rk-delete (lambda (context) (if - (> (length (rk-context-seq context)) 0) + (pair? (rk-context-seq context)) (begin (rk-context-set-seq! context (cdr (rk-context-seq context))) diff --git a/scm/skk.scm b/scm/skk.scm index 01cf2dec5..5a977968f 100644 --- a/scm/skk.scm +++ b/scm/skk.scm @@ -1112,12 +1112,11 @@ (skk-rk-pending? sc) (not (rk-current-seq rkc))) ;; ddskk compatible behavior but not in SKK speciation - (begin + (let ((str (rk-push-key! rkc (charcode->string + (ichar-downcase key))))) (skk-context-set-state! sc 'skk-state-kanji) - (skk-append-string sc (rk-push-key! - rkc - (charcode->string - (ichar-downcase key)))) + (if str + (skk-append-string sc str)) #f) (let* ((residual-kana (rk-push-key-last! rkc))) ;; handle preceding "n" diff --git a/scm/tutcode-custom.scm b/scm/tutcode-custom.scm index fd606bac2..13cf1ff98 100644 --- a/scm/tutcode-custom.scm +++ b/scm/tutcode-custom.scm @@ -110,7 +110,7 @@ (define-custom 'tutcode-nr-candidate-max 10 '(tutcode candwin) - '(integer 1 20) + '(integer 1 99) (N_ "Number of candidates in candidate window at a time") (N_ "long description will be here.")) diff --git a/scm/tutcode-key-custom.scm b/scm/tutcode-key-custom.scm index ce7d1045f..5e98d2be1 100644 --- a/scm/tutcode-key-custom.scm +++ b/scm/tutcode-key-custom.scm @@ -59,6 +59,12 @@ (N_ "[TUT-Code] toggle hiragana/katakana mode") (N_ "long description will be here")) +(define-custom 'tutcode-kigou-toggle-key '("_") + '(tutcode-keys1 mode-transition) + '(key) + (N_ "[TUT-Code] toggle kigou mode") + (N_ "long description will be here")) + (define-custom 'tutcode-mazegaki-start-sequence "alj" '(tutcode-keys1 mode-transition) '(string ".*") diff --git a/scm/tutcode-kigoudic.scm b/scm/tutcode-kigoudic.scm new file mode 100644 index 000000000..cc9e0f5a4 --- /dev/null +++ b/scm/tutcode-kigoudic.scm @@ -0,0 +1,568 @@ +;;; +;;; Copyright (c) 2008 uim Project http://code.google.com/p/uim/ +;;; +;;; All rights reserved. +;;; +;;; Redistribution and use in source and binary forms, with or without +;;; modification, are permitted provided that the following conditions +;;; are met: +;;; 1. Redistributions of source code must retain the above copyright +;;; notice, this list of conditions and the following disclaimer. +;;; 2. Redistributions in binary form must reproduce the above copyright +;;; notice, this list of conditions and the following disclaimer in the +;;; documentation and/or other materials provided with the distribution. +;;; 3. Neither the name of authors nor the names of its contributors +;;; may be used to endorse or promote products derived from this software +;;; without specific prior written permission. +;;; +;;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND +;;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +;;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +;;; ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE +;;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +;;; OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +;;; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +;;; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +;;; OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +;;; SUCH DAMAGE. +;;;; + +;;; TUT-Codeεϥ⡼Ѥεɽ +;;; (ѱѿ⡼ɤȤƻȤˤϡ +;;; tutcode-heading-label-char-list-for-kigou-modeȹ碌ɬפ) +; Ƹ䥦ɥǰ٤褦ˤ +; (6355ʸ)ȡ䥦ɥɽϤ˿Ԥ +; (䥦ɥɽϻ뤿)Τ̵ +(define tutcode-kigoudic + '( + ;("" "Υơ") + ;Υơϸ̤ѤԽλͤˤʤΤǰͿ + ("" "ѥڡ") ;ϥ⡼ܻpreeditɽǰ´ʤ褦 + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("" "ޥʥ") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + + ("") + ("" "֥") + ("" "") + ("") + ("") + ("") + ("" "󥰥") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("" "") + ("" "󥰥") + ("") + ("") + ("") + ("") + ("" "") + ("" "") + ("") + ("" "饤") + + ("" "") + ("" "") + ("" "") + ("" "") + ("" "Ⱦ") + ("" "ƥ") + ("" "󥰥顼") + ("" "饦") + ("" "С饤") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("" "") + ("" "Ĺ") + ("" "å") + ("" "ϥե") + ("") + ("") + ("") + ("" "֥") + ("" "֥") ;Ф֥ФϤ䤹褦 + ("") + ("") + ("" "Ϥỳ") + ("" "껳") + ("" "ϤŻ") + ("" "Ż") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("" "軻") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("" "") + ("" "ʬ") + ("" "") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("" "ݰ") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("" "˾") + ("" "礭") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("" "㡼") + ("") + ("") + ("") + ("") + ("") + ("" "礭ʴ") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("" "") + ("" "") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") + ("") +)) diff --git a/scm/tutcode.scm b/scm/tutcode.scm index ed9e4503f..970ba7634 100644 --- a/scm/tutcode.scm +++ b/scm/tutcode.scm @@ -85,6 +85,7 @@ ;;; * 򤼽ѴǤSKKμȤΤǡ ;;; skk.scmΤʴѴɬפʬߡ ;;; * Ѵǽɲá +;;; * ϥ⡼ɤɲá (require "generic.scm") (require-custom "tutcode-custom.scm") @@ -92,6 +93,7 @@ (require-custom "tutcode-key-custom.scm") (load-plugin "skk") ;SKKθ򤼽񤭼θΤᡢlibuim-skk.so (require "tutcode-bushudic.scm") ;Ѵ +(require "tutcode-kigoudic.scm") ;ϥ⡼Ѥεɽ ;;; user configs @@ -107,7 +109,8 @@ (define tutcode-input-mode-actions '(action_tutcode_direct action_tutcode_hiragana - action_tutcode_katakana)) + action_tutcode_katakana + action_tutcode_kigou)) ;;; Ѥ륳ɽ ;;; tutcode-context-new(tutcode-custom-load-rule!) @@ -118,7 +121,7 @@ ;;; tutcode-context-newȿǤ롣 (define tutcode-rule-userconfig ()) -;;; ѥ٥ʸΥꥹ +;;; 򤼽Ѵθѥ٥ʸΥꥹ (define tutcode-heading-label-char-list '("1" "2" "3" "4" "5" "6" "7" "8" "9" "0" "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" @@ -128,6 +131,21 @@ "K" "L" "M" "N" "O" "P" "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z")) +;;; ϥ⡼ɻθѥ٥ʸΥꥹ +;;; (ѱѿ⡼ɤȤƻȤˤϡtutcode-kigoudicȹ碌ɬפ) +(define tutcode-heading-label-char-list-for-kigou-mode + '(" " + "1" "2" "3" "4" "5" "6" "7" "8" "9" "0" + "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" + "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" + "u" "v" "w" "x" "y" "z" + "-" "^" "\\" "@" "[" ";" ":" "]" "," "." "/" + "!" "\"" "#" "$" "%" "&" "'" "(" ")" + "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" + "K" "L" "M" "N" "O" "P" "Q" "R" "S" "T" + "U" "V" "W" "X" "Y" "Z" + "=" "~" "|" "`" "{" "+" "*" "}" "<" ">" "?" "_")) + ;;; implementations ;;; 򤼽ѴνäƤ뤫ɤ @@ -160,12 +178,20 @@ "Ҥ餬ʥ⡼")) (lambda (tc) (and (tutcode-context-on? tc) + (not (eq? (tutcode-context-state tc) + 'tutcode-state-kigou)) (not (tutcode-context-katakana-mode? tc)))) (lambda (tc) (tutcode-prepare-activation tc) - (if (not (tutcode-context-on? tc)) ; Ѵ֤ѹʤ - (tutcode-context-set-state! tc 'tutcode-state-on)) - (tutcode-context-set-katakana-mode! tc #f))) + (if + (or + (not (tutcode-context-on? tc)) ; Ѵ֤ѹʤ + (eq? (tutcode-context-state tc) 'tutcode-state-kigou)) + (begin + (tutcode-reset-candidate-window tc) + (tutcode-context-set-state! tc 'tutcode-state-on))) + (tutcode-context-set-katakana-mode! tc #f) + (tutcode-update-preedit tc))) (register-action 'action_tutcode_katakana (lambda (tc) @@ -175,12 +201,36 @@ "ʥ⡼")) (lambda (tc) (and (tutcode-context-on? tc) + (not (eq? (tutcode-context-state tc) + 'tutcode-state-kigou)) (tutcode-context-katakana-mode? tc))) (lambda (tc) (tutcode-prepare-activation tc) - (if (not (tutcode-context-on? tc)) ; Ѵ֤ѹʤ - (tutcode-context-set-state! tc 'tutcode-state-on)) - (tutcode-context-set-katakana-mode! tc #t))) + (if + (or + (not (tutcode-context-on? tc)) ; Ѵ֤ѹʤ + (eq? (tutcode-context-state tc) 'tutcode-state-kigou)) + (begin + (tutcode-reset-candidate-window tc) + (tutcode-context-set-state! tc 'tutcode-state-on))) + (tutcode-context-set-katakana-mode! tc #t) + (tutcode-update-preedit tc))) + +(register-action 'action_tutcode_kigou + (lambda (tc) + '(ja_fullwidth_alnum + "" + "" + "ϥ⡼")) + (lambda (tc) + (eq? (tutcode-context-state tc) 'tutcode-state-kigou)) + (lambda (tc) + (tutcode-prepare-activation tc) + (if + (not (eq? (tutcode-context-state tc) 'tutcode-state-kigou)) + (tutcode-flush tc)) + (tutcode-begin-kigou-mode tc) + (tutcode-update-preedit tc))) ;; Update widget definitions based on action configurations. The ;; procedure is needed for on-the-fly reconfiguration involving the @@ -201,6 +251,7 @@ ;;; 'tutcode-state-yomi 򤼽Ѵɤ ;;; 'tutcode-state-converting 򤼽Ѵθ ;;; 'tutcode-state-bushu ϡѴ + ;;; 'tutcode-state-kigou ϥ⡼ (state 'tutcode-state-off) ;;; ʥ⡼ɤɤ ;;; #t: ʥ⡼ɡ#f: Ҥ餬ʥ⡼ɡ @@ -303,11 +354,20 @@ n (tutcode-make-string head) "" "" #f))) cand)) +;;; ϥ⡼ɻnܤθ֤ +;;; @param n оݤθֹ +(define (tutcode-get-nth-candidate-for-kigou-mode pc n) + (car (nth n tutcode-kigoudic))) + ;;; 򤼽Ѵθθ֤ ;;; @param pc ƥȥꥹ (define (tutcode-get-current-candidate pc) (tutcode-get-nth-candidate pc (tutcode-context-nth pc))) +;;; ϥ⡼ɻθθ֤ +(define (tutcode-get-current-candidate-for-kigou-mode pc) + (tutcode-get-nth-candidate-for-kigou-mode pc (tutcode-context-nth pc))) + ;;; 򤼽Ѵdzꤷʸ֤ ;;; @param pc ƥȥꥹ (define (tutcode-prepare-commit-string pc) @@ -326,14 +386,24 @@ (tutcode-flush pc) res)) -;;; ꤵ줿٥ʸбꤹ +;;; ϥ⡼ɻ˳ꤷʸ֤ +(define (tutcode-prepare-commit-string-for-kigou-mode pc) + (tutcode-get-current-candidate-for-kigou-mode pc)) + +;;; 򤼽Ѵθˡꤵ줿٥ʸбꤹ (define (tutcode-commit-by-label-key pc ch) + ;; ߸䥦ɥɽƤʤ٥ʸϤ硢 + ;; ߰ʹߤθˤϥ٥ʸбꤹ롣 + ;; (ؽǽ򥪥դˤƸ¤ӽˤƻѤˡ + ;; next-page-key򲡤򸺤餷 + ;; ʤ٤ʤŪθ٤褦ˤ뤿) (let* ((nr (tutcode-context-nr-candidates pc)) (nth (tutcode-context-nth pc)) (cur-page (cond ((= tutcode-nr-candidate-max 0) 0) (else (quotient nth tutcode-nr-candidate-max)))) + ;; ߸䥦ɥɽθꥹȤƬθֹ (cur-offset (* cur-page tutcode-nr-candidate-max)) (cur-labels (list-tail tutcode-heading-label-char-list @@ -353,6 +423,31 @@ (tutcode-context-set-nth! pc idx) (im-commit pc (tutcode-prepare-commit-string pc)))))) +;;; ϥ⡼ɻˡꤵ줿٥ʸбꤹ +(define (tutcode-commit-by-label-key-for-kigou-mode pc ch) + ;; 򤼽ѴȰۤʤꡢߤθꤹ礢 + ;; (ѱѿϥ⡼ɤȤƻȤ褦ˤ뤿) + ;; (ϥ⡼ɻϡٳꤷϢ³ϤǤ褦ˡ + ;; ľθ򤷤Ƥ뤬 + ;; ΤȤ򤼽ѴƱͤθԤȡ + ;; ٥ʸꥹȤ2ܤбꤷƤޤ礬 + ;; (:thǤä硢ѱѿϤȤƤϣˤʤäߤˤʤ) + ;; ᡢ򤼽ѴȤϰۤʤԤ) + (let* ((nr (tutcode-context-nr-candidates pc)) + (nth (tutcode-context-nth pc)) + (labellen (length tutcode-heading-label-char-list-for-kigou-mode)) + (cur-base (quotient nth labellen)) + (offset + (- labellen + (length + (member ch tutcode-heading-label-char-list-for-kigou-mode)))) + (idx (+ (* cur-base labellen) offset))) + (if (and (>= idx 0) + (< idx nr)) + (begin + (tutcode-context-set-nth! pc idx) + (im-commit pc (tutcode-prepare-commit-string-for-kigou-mode pc)))))) + ;;; 򤼽Ѵɤ/Ѵ(ʸꥹhead)ʸɲä롣 ;;; @param pc ƥȥꥹ ;;; @param str ɲäʸ @@ -383,6 +478,16 @@ ;(tutcode-flush pc) ; ̵flushϤʸ󤬾äƤä ))) +;;; ϥ⡼ɤ򳫻Ϥ롣 +;;; @param pc ƥȥꥹ +(define (tutcode-begin-kigou-mode pc) + (tutcode-context-set-nth! pc 0) + (tutcode-context-set-nr-candidates! pc (length tutcode-kigoudic)) + (tutcode-context-set-state! pc 'tutcode-state-kigou) + (tutcode-check-candidate-window-begin pc) + (if (tutcode-context-candidate-window pc) + (im-select-candidate pc 0))) + ;;; 䥦ɥɽ򳫻Ϥ (define (tutcode-check-candidate-window-begin pc) (if (and (not (tutcode-context-candidate-window pc)) @@ -414,7 +519,11 @@ ((tutcode-state-bushu) (let ((h (tutcode-make-string (tutcode-context-head pc)))) (if (string? h) - (im-pushback-preedit pc preedit-none h))))) + (im-pushback-preedit pc preedit-none h)))) + ((tutcode-state-kigou) + ;; 䥦ɥɽǤǤ褦preeditɽ + (im-pushback-preedit pc preedit-reverse + (tutcode-get-current-candidate-for-kigou-mode pc)))) (im-pushback-preedit pc preedit-cursor "") (im-update-preedit pc))) @@ -434,6 +543,9 @@ ((tutcode-off-key? key key-state) (rk-flush rkc) (tutcode-context-set-state! pc 'tutcode-state-off)) + ((tutcode-kigou-toggle-key? key key-state) + (rk-flush rkc) + (tutcode-begin-kigou-mode pc)) ((tutcode-kana-toggle-key? key key-state) (rk-flush rkc) (tutcode-context-kana-toggle pc)) @@ -477,6 +589,57 @@ (tutcode-context-set-state! pc 'tutcode-state-on) (im-commit-raw pc))) +;;; ϥ⡼ɻΥϤ롣 +;;; @param pc ƥȥꥹ +;;; @param key Ϥ줿 +;;; @param key-state ȥ륭ξ +(define (tutcode-proc-state-kigou pc key key-state) + (cond + ((and + (tutcode-vi-escape-key? key key-state) + tutcode-use-with-vi?) + (tutcode-reset-candidate-window pc) + (tutcode-context-set-state! pc 'tutcode-state-off) + (im-commit-raw pc)) ; ESC򥢥ץˤϤ + ((tutcode-off-key? key key-state) + (tutcode-reset-candidate-window pc) + (tutcode-context-set-state! pc 'tutcode-state-off)) + ((tutcode-kigou-toggle-key? key key-state) + (tutcode-reset-candidate-window pc) + (tutcode-context-set-state! pc 'tutcode-state-on)) + ;; ڡѥڡϲǽȤ뤿ᡢ + ;; next-candidate-key?Υåheading-label-char?å + ((and tutcode-commit-candidate-by-label-key? + (not (and (modifier-key-mask key-state) + (not (shift-key-mask key-state)))) + (tutcode-heading-label-char-for-kigou-mode? key)) + (tutcode-commit-by-label-key-for-kigou-mode pc (charcode->string key)) + (if (tutcode-context-candidate-window pc) + (im-select-candidate pc (tutcode-context-nth pc)))) + ((tutcode-next-candidate-key? key key-state) + (tutcode-change-candidate-index pc 1)) + ((tutcode-prev-candidate-key? key key-state) + (tutcode-change-candidate-index pc -1)) + ((tutcode-cancel-key? key key-state) + (tutcode-reset-candidate-window pc) + (tutcode-begin-kigou-mode pc)) + ((tutcode-next-page-key? key key-state) + (tutcode-change-candidate-index pc tutcode-nr-candidate-max)) + ((tutcode-prev-page-key? key key-state) + (tutcode-change-candidate-index pc (- tutcode-nr-candidate-max))) + ((or + (tutcode-commit-key? key key-state) + (tutcode-return-key? key key-state)) + (im-commit pc (tutcode-prepare-commit-string-for-kigou-mode pc))) + ((or + (symbol? key) + (and + (modifier-key-mask key-state) + (not (shift-key-mask key-state)))) + (im-commit-raw pc)) + (else + (im-commit-raw pc)))) + ;;; 򤼽ѴɤϾ֤ΤȤΥϤ롣 ;;; @param pc ƥȥꥹ ;;; @param key Ϥ줿 @@ -665,6 +828,11 @@ (define (tutcode-heading-label-char? key) (member (charcode->string key) tutcode-heading-label-char-list)) +;;; Ϥ줿ϥ⡼ɻθ٥ʸɤĴ٤ +;;; @param key Ϥ줿 +(define (tutcode-heading-label-char-for-kigou-mode? key) + (member (charcode->string key) tutcode-heading-label-char-list-for-kigou-mode)) + ;;; 򤼽Ѵθ֤ΤȤΥϤ롣 ;;; @param pc ƥȥꥹ ;;; @param key Ϥ줿 @@ -812,7 +980,8 @@ ;;; @param pc ƥȥꥹ (define (tutcode-state-has-preedit? pc) (memq (tutcode-context-state pc) - '(tutcode-state-yomi tutcode-state-bushu tutcode-state-converting))) + '(tutcode-state-yomi tutcode-state-bushu tutcode-state-converting + tutcode-state-kigou))) ;;; 줿ȤνοʬԤ ;;; @param pc ƥȥꥹ @@ -828,6 +997,9 @@ (if (tutcode-state-has-preedit? pc) ;; 򤼽ѴѴϡ䢥ɽ (tutcode-update-preedit pc))) + ((tutcode-state-kigou) + (tutcode-proc-state-kigou pc key key-state) + (tutcode-update-preedit pc)) ((tutcode-state-yomi) (tutcode-proc-state-yomi pc key key-state) (tutcode-update-preedit pc)) @@ -871,9 +1043,19 @@ ;;; 䥦ɥʸ뤿˸Ƥִؿ (define (tutcode-get-candidate-handler tc idx accel-enum-hint) - (let ((cand (tutcode-get-nth-candidate tc idx)) - (n (remainder idx (length tutcode-heading-label-char-list)))) - (list cand (nth n tutcode-heading-label-char-list) ""))) + (cond + ((eq? (tutcode-context-state tc) 'tutcode-state-kigou) + (let* ((cand (tutcode-get-nth-candidate-for-kigou-mode tc idx)) + (n (remainder + idx (length tutcode-heading-label-char-list-for-kigou-mode))) + (label (nth n tutcode-heading-label-char-list-for-kigou-mode))) + ;; XXX:annotationɽϸ̵ƤΤǡ""֤Ƥ + (list cand label ""))) + (else + (let* ((cand (tutcode-get-nth-candidate tc idx)) + (n (remainder idx (length tutcode-heading-label-char-list))) + (label (nth n tutcode-heading-label-char-list))) + (list cand label ""))))) ;;; 䥦ɥ򤷤Ȥ˸Ƥִؿ (define (tutcode-set-candidate-index-handler tc idx) diff --git a/uim/prime.c b/uim/prime.c index 8ea136099..6a08f74e1 100644 --- a/uim/prime.c +++ b/uim/prime.c @@ -63,7 +63,7 @@ static FILE *primer, *primew; static pid_t prime_pid = 0; -static char *prime_command = "prime"; +static char *prime_command = "/Library/PRIME/bin/prime"; static char prime_ud_path[MAXPATHLEN]; static int prime_fd = -1; diff --git a/xim/canddisp.cpp b/xim/canddisp.cpp index c859e834c..7e9d173a6 100644 --- a/xim/canddisp.cpp +++ b/xim/canddisp.cpp @@ -138,6 +138,48 @@ void Canddisp::activate(std::vector candidates, int display_limit) check_connection(); } +#if UIM_XIM_USE_NEW_PAGE_HANDLING +void Canddisp::set_nr_candidates(int nr, int display_limit) +{ + if (!candwin_w) + return; + + fprintf(candwin_w, "set_nr_candidates\n"); + fprintf(candwin_w, "%d\n", nr); + fprintf(candwin_w, "%d\n", display_limit); + fprintf(candwin_w, "\n"); + fflush(candwin_w); + check_connection(); +} + +void Canddisp::set_page_candidates(int page, CandList candidates) +{ + std::vector::iterator i; + + if (!candwin_w) + return; + + fprintf(candwin_w, "set_page_candidates\ncharset=UTF-8\npage=%d\n", page); + for (i = candidates.begin(); i != candidates.end(); ++i) + fprintf(candwin_w, "%s\n", *i); + fprintf(candwin_w, "\n"); + fflush(candwin_w); + check_connection(); +} + +void Canddisp::show_page(int page) +{ + if (!candwin_w) + return; + + fprintf(candwin_w, "show_page\n"); + fprintf(candwin_w, "%d\n", page); + fprintf(candwin_w, "\n"); + fflush(candwin_w); + check_connection(); +} +#endif /* UIM_XIM_USE_NEW_PAGE_HANDLING */ + void Canddisp::select(int index, bool need_hilite) { if (!candwin_w) diff --git a/xim/canddisp.h b/xim/canddisp.h index 122e6a182..61ef802d8 100644 --- a/xim/canddisp.h +++ b/xim/canddisp.h @@ -34,6 +34,7 @@ #ifndef UIM_XIM_CANDDISP_H #define UIM_XIM_CANDDISP_H +#include "ximserver.h" #include class Canddisp { @@ -49,6 +50,11 @@ class Canddisp { void show_caret_state(const char *str, int timeout); void update_caret_state(); void hide_caret_state(); +#if UIM_XIM_USE_NEW_PAGE_HANDLING + void set_nr_candidates(int nr, int display_limit); + void set_page_candidates(int page, CandList candidates); + void show_page(int page); +#endif private: void check_connection(); }; diff --git a/xim/main.cpp b/xim/main.cpp index 59d9c1f6c..3f565bc12 100644 --- a/xim/main.cpp +++ b/xim/main.cpp @@ -573,7 +573,7 @@ main(int argc, char **argv) { const char *locale; - printf("UIM-XIM bridge. Now supporting multiple locales.\n"); + printf("uim <-> XIM bridge. Supporting multiple locales.\n"); get_runtime_env(); diff --git a/xim/ximserver.cpp b/xim/ximserver.cpp index 110e3ee5f..06797e613 100644 --- a/xim/ximserver.cpp +++ b/xim/ximserver.cpp @@ -333,6 +333,9 @@ InputContext::InputContext(XimServer *svr, XimIC *ic, const char *engine) mFocusedContext = this; createUimContext(engine); mCandwinActive = false; +#if UIM_XIM_USE_NEW_PAGE_HANDLING + mNumCandidates = 0; +#endif mNumPage = 1; mDisplayLimit = 0; mCaretStateShown = false; @@ -802,20 +805,37 @@ XimIC *InputContext::get_ic() void InputContext::candidate_activate(int nr, int display_limit) { int i; +#if !UIM_XIM_USE_NEW_PAGE_HANDLING const char *cand_str; const char *heading_label; - uim_candidate cand[nr]; - std::vector candidates; char *str; +#else + std::vector::iterator slot_it; +#endif + std::vector candidates; + std::vector::iterator it; Canddisp *disp = canddisp_singleton(); + mDisplayLimit = display_limit; + if (display_limit) + mNumPage = (nr - 1) / display_limit + 1; +#if !UIM_XIM_USE_NEW_PAGE_HANDLING + /* remove old data */ + if (!active_candidates.empty()) { + for (it = active_candidates.begin(); + it != active_candidates.end(); + ++it) + free((char *)*it); + } + active_candidates.clear(); for (i = 0; i < nr; i++) { - cand[i] = uim_get_candidate(mUc, i, + uim_candidate cand; + cand = uim_get_candidate(mUc, i, display_limit ? i % display_limit : i); - cand_str = uim_candidate_get_cand_str(cand[i]); - heading_label = uim_candidate_get_heading_label(cand[i]); - //annotation_str = uim_candidate_get_annotation(cand[i]); + cand_str = uim_candidate_get_cand_str(cand); + heading_label = uim_candidate_get_heading_label(cand); + //annotation_str = uim_candidate_get_annotation(cand); if (cand_str && heading_label) { str = (char *)malloc(strlen(cand_str) + strlen(heading_label) + 2); sprintf(str, "%s\t%s", heading_label, cand_str); @@ -825,16 +845,33 @@ void InputContext::candidate_activate(int nr, int display_limit) fprintf(stderr, "Warning: cand_str at %d is NULL\n", i); candidates.push_back((const char *)strdup("\t")); } + uim_candidate_free(cand); } disp->activate(candidates, display_limit); - for (i = 0; i < nr; i++) { - uim_candidate_free(cand[i]); + active_candidates = candidates; +#else /* !UIM_XIM_USE_NEW_PAGE_HANDLING */ + mNumCandidates = nr; + /* remove old data */ + for (slot_it = mCandidateSlot.begin(); + slot_it != mCandidateSlot.end(); + ++slot_it) { + if (*slot_it != (CandList)0) { + for (it = (*slot_it).begin(); it != (*slot_it).end(); ++it) + free((char *)*it); + } } + mCandidateSlot.clear(); + + /* setup dummy data */ + for (i = 0; i < mNumPage; i++) + mCandidateSlot.push_back((CandList)0); + + prepare_page_candidates(0); + disp->set_nr_candidates(nr, display_limit); + disp->set_page_candidates(0, mCandidateSlot[0]); + disp->show_page(0); +#endif /* !UIM_XIM_USE_NEW_PAGE_HANDLING */ mCandwinActive = true; - active_candidates = candidates; - mDisplayLimit = display_limit; - if (display_limit) - mNumPage = (nr - 1) / display_limit + 1; current_cand_selection = 0; current_page = 0; @@ -845,14 +882,87 @@ void InputContext::candidate_update() { Canddisp *disp = canddisp_singleton(); +#if !UIM_XIM_USE_NEW_PAGE_HANDLING disp->activate(active_candidates, mDisplayLimit); +#else + prepare_page_candidates(current_page); + disp->set_nr_candidates(mNumCandidates, mDisplayLimit); + disp->set_page_candidates(current_page, mCandidateSlot[current_page]); + disp->show_page(current_page); +#endif disp->select(current_cand_selection, need_hilite_selected_cand); disp->show(); } +#if UIM_XIM_USE_NEW_PAGE_HANDLING +void InputContext::prepare_page_candidates(int page) +{ + int i; + int page_nr, start; + const char *cand_str; + const char *heading_label; + char *str; + CandList candidates; + + if (page < 0) + return; + + if (mCandidateSlot[page] != (CandList)0) + return; + + start = page * mDisplayLimit; + if (mDisplayLimit && (mNumCandidates - start) > mDisplayLimit) + page_nr = mDisplayLimit; + else + page_nr = mNumCandidates - start; + + for (i = 0; i < page_nr; i++) { + uim_candidate cand; + cand = uim_get_candidate(mUc, (i + start), + mDisplayLimit ? (i + start) % mDisplayLimit : + (i + start)); + cand_str = uim_candidate_get_cand_str(cand); + heading_label = uim_candidate_get_heading_label(cand); + //annotation_str = uim_candidate_get_annotation(cand); + if (cand_str && heading_label) { + str = (char *)malloc(strlen(cand_str) + strlen(heading_label) + 2); + sprintf(str, "%s\t%s", heading_label, cand_str); + candidates.push_back((const char *)str); + } + else { + fprintf(stderr, "Warning: cand_str at %d is NULL\n", i); + candidates.push_back((const char *)strdup("\t")); + } + uim_candidate_free(cand); + } + + mCandidateSlot[page] = candidates; +} + +int InputContext::prepare_page_candidates_by_index(int index) +{ + int page; + + page = mDisplayLimit ? index / mDisplayLimit : 0; + prepare_page_candidates(page); + + return page; +} +#endif + void InputContext::candidate_select(int index) { Canddisp *disp = canddisp_singleton(); + +#if UIM_XIM_USE_NEW_PAGE_HANDLING + int new_page = prepare_page_candidates_by_index(index); + + if (new_page < 0) + return; // shouldn't happen + + if (current_page != new_page) + disp->set_page_candidates(new_page, mCandidateSlot[new_page]); +#endif disp->select(index, need_hilite_selected_cand); current_cand_selection = index; if (mDisplayLimit) @@ -879,10 +989,20 @@ void InputContext::candidate_shift_page(int direction) new_index = (current_page * mDisplayLimit) + (current_cand_selection % mDisplayLimit); +#if !UIM_XIM_USE_NEW_PAGE_HANDLING if (new_index >= active_candidates.size()) current_cand_selection = active_candidates.size() - 1; +#else + if (new_index >= mNumCandidates) + current_cand_selection = mNumCandidates - 1; +#endif else current_cand_selection = new_index; +#if UIM_XIM_USE_NEW_PAGE_HANDLING + Canddisp *disp = canddisp_singleton(); + prepare_page_candidates(current_page); + disp->set_page_candidates(current_page, mCandidateSlot[current_page]); +#endif } candidate_select(current_cand_selection); if (need_hilite_selected_cand) @@ -896,9 +1016,24 @@ void InputContext::candidate_deactivate() Canddisp *disp = canddisp_singleton(); disp->deactivate(); +#if !UIM_XIM_USE_NEW_PAGE_HANDLING for (i = active_candidates.begin(); i != active_candidates.end(); ++i) { free((char *)*i); } + active_candidates.clear(); +#else + int j; + for (j = 0; j < mNumPage; j++) { + if ((CandList)mCandidateSlot[j] != (CandList)0) { + for (i = mCandidateSlot[j].begin(); + i != mCandidateSlot[j].end(); + ++i) { + free((char *)*i); + } + } + } + mCandidateSlot.clear(); +#endif mCandwinActive = false; current_cand_selection = 0; } diff --git a/xim/ximserver.h b/xim/ximserver.h index 8d870bd20..920e8ceda 100644 --- a/xim/ximserver.h +++ b/xim/ximserver.h @@ -44,6 +44,7 @@ #include "uim/uim.h" #include "compose.h" +#define UIM_XIM_USE_NEW_PAGE_HANDLING 1 // preedit ornament #define PE_NORMAL 0 @@ -53,6 +54,9 @@ typedef wchar_t uchar; typedef std::list uString; +#if UIM_XIM_USE_NEW_PAGE_HANDLING +typedef std::vector CandList; +#endif struct pe_ustring { uString s; int stat; @@ -169,6 +173,10 @@ class InputContext { void candidate_shift_page(int direction); void candidate_deactivate(); void candidate_update(); +#if UIM_XIM_USE_NEW_PAGE_HANDLING + void prepare_page_candidates(int page); + int prepare_page_candidates_by_index(int index); +#endif void update_prop_list(const char *str); void update_prop_label(const char *str); bool hasActiveCandwin(); @@ -210,12 +218,18 @@ class InputContext { Convdisp *mConvdisp; uim_context mUc; bool mCandwinActive; - int mDisplayLimit; + uint mDisplayLimit; +#if UIM_XIM_USE_NEW_PAGE_HANDLING + uint mNumCandidates; +#endif int mNumPage; int current_cand_selection; int current_page; bool need_hilite_selected_cand; std::vector active_candidates; +#if UIM_XIM_USE_NEW_PAGE_HANDLING + std::vector mCandidateSlot; +#endif char *mEngineName; char *mLocaleName; bool mCaretStateShown; From fd64e9af1abb49287229c297c4be06f33b803a3b Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Mon, 20 Oct 2008 03:33:36 +0000 Subject: [PATCH 045/136] * Port r5597 from trunk. --- doc/COMPATIBILITY | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/COMPATIBILITY b/doc/COMPATIBILITY index 13b1824be..e604ac200 100644 --- a/doc/COMPATIBILITY +++ b/doc/COMPATIBILITY @@ -60,7 +60,7 @@ The changes are described below in most recently updated order. Summary: New helper-candwin protocol about setting the candidates Affects: Helper program developers Updates: Helper-candwin protocol -Version: 1.6.0 +Version: 1.5.4 Revision: ac5584 Date: 2008-10-07 Modifier: Etsushi Kato From ff5f9aec9c6655d0b44b601433d66e4168e10469 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Mon, 20 Oct 2008 03:43:14 +0000 Subject: [PATCH 046/136] * Revert local modifications mis-committed in r5596. --- helper/toolbar-common-gtk.c | 4 +--- scm/pyload.scm | 13 ------------- uim/prime.c | 2 +- 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/helper/toolbar-common-gtk.c b/helper/toolbar-common-gtk.c index cf8092271..837cc9d26 100644 --- a/helper/toolbar-common-gtk.c +++ b/helper/toolbar-common-gtk.c @@ -845,7 +845,6 @@ register_icon(const gchar *name) GtkIconSet *icon_set; GdkPixbuf *pixbuf; GString *filename; - GError *error = NULL; g_return_val_if_fail(uim_factory, FALSE); @@ -856,9 +855,8 @@ register_icon(const gchar *name) g_string_append(filename, name); g_string_append(filename, ".png"); - pixbuf = gdk_pixbuf_new_from_file(filename->str, &error); + pixbuf = gdk_pixbuf_new_from_file(filename->str, NULL); if (!pixbuf) { - fprintf(stderr, "error: %s\n", error->message); g_string_free(filename, TRUE); return FALSE; } diff --git a/scm/pyload.scm b/scm/pyload.scm index a71dc8e9f..bae911a83 100644 --- a/scm/pyload.scm +++ b/scm/pyload.scm @@ -68,16 +68,3 @@ (N_ "Pinyin (Traditional)") (N_ "Pinyin input method (Traditional Chinese version)") pinyin-big5-init-handler) - -(define py-new-init-handler - (lambda (id im arg) - (require "py-new.scm") - (generic-context-new id im py-new-rule #f))) - -(generic-register-im - 'py-new - "zh_TW:zh_HK" - "UTF-8" - (N_ "Py new") - (N_ "Py new input method") - py-new-init-handler) diff --git a/uim/prime.c b/uim/prime.c index 6a08f74e1..8ea136099 100644 --- a/uim/prime.c +++ b/uim/prime.c @@ -63,7 +63,7 @@ static FILE *primer, *primew; static pid_t prime_pid = 0; -static char *prime_command = "/Library/PRIME/bin/prime"; +static char *prime_command = "prime"; static char prime_ud_path[MAXPATHLEN]; static int prime_fd = -1; From 317079df8a853928b613a0ecd32d3e0b787decd3 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Mon, 20 Oct 2008 03:46:05 +0000 Subject: [PATCH 047/136] * Revert local modification mis-committed in r5596. --- helper/pref-gtk.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/helper/pref-gtk.c b/helper/pref-gtk.c index f3a121f6e..f8cde6481 100644 --- a/helper/pref-gtk.c +++ b/helper/pref-gtk.c @@ -231,17 +231,6 @@ quit_confirm(void) } } -static gboolean -key_press_cb(GtkWidget *widget, GdkEventKey *event) -{ - if (event->keyval == GDK_Escape) { - quit_confirm(); - return TRUE; - } - - return FALSE; -} - static gint delete_event_cb(GtkWidget *widget, gpointer data) { @@ -509,8 +498,6 @@ create_pref_window(void) g_signal_connect(G_OBJECT (window), "delete_event", G_CALLBACK (delete_event_cb), NULL); - g_signal_connect(G_OBJECT (window), "key_press_event", - G_CALLBACK (key_press_cb), NULL); pref_hbox = gtk_hbox_new(FALSE, 8); From 073c3104bab627d4e81433f005c573dea4b0510e Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Thu, 23 Oct 2008 05:16:24 +0000 Subject: [PATCH 048/136] * NEWS * RELNOTE - Update for 1.5.4. --- NEWS | 33 +++++++++++++++++++++++++++++++++ RELNOTE | 8 +++++--- 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index b98d10cfc..b04bc6600 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,36 @@ +Overview of changes from 1.5.3 to 1.5.4 +======================================= +* Enhancements + - Generic IM + * Cache candidates to improve the performance + * Add an option to show candidate window automatically when + multiple candidates are found + + - uim-tutcode + * New symbol (kigou) input mode + + - GTK+ bridge + - Qt{3,4} bridge + - XIM bridge + * Improve the performance upon activating the window with large + number of candidates + +* Fixes + - uim.el + * Plug memory leak. + * Ignore 'd' command if valid uim-default-im-engine is defined + + - uim-fep + * Fix compilation with Solaris' cc + + - uim-skk + * Fix handling in non-matching upper case character in + skk-proc-state-direct. + + - uim-pref-gtk + * Fix warning with GTK+-2.14.x + + Overview of changes from 1.5.2 to 1.5.3 ======================================= * Fixes diff --git a/RELNOTE b/RELNOTE index 5e4a079fb..332c92b3d 100644 --- a/RELNOTE +++ b/RELNOTE @@ -1,10 +1,10 @@ -uim 1.5.3 Release Note +uim 1.5.4 Release Note ====================== About This Release ------------------ -This distribution of uim 1.5.3 is latest stable release of uim. +This distribution of uim 1.5.4 is latest stable release of uim. Please report us if you find a problem. @@ -15,7 +15,9 @@ Bug tracking system: http://bugs.freedesktop.org/ What's New ---------- -Critical bug fixes for Qt4 bridge. Also a few minor fixes against 1.5.2. See NEWS for the detailed changes. +Minor enhancement about the performance of candidate window behavior +with GTK+/Qt/XIM bridges. Also a few minor fixes against 1.5.3. See +NEWS for the detailed changes. What's New in 1.5.0 From 65f3a4a208b6a4692a996ce69e2274b6ab5c4adc Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Fri, 24 Oct 2008 01:38:48 +0000 Subject: [PATCH 049/136] * Port r5603 from trunk. --- qt4/immodule/quiminputcontextplugin.pro.in | 1 + 1 file changed, 1 insertion(+) diff --git a/qt4/immodule/quiminputcontextplugin.pro.in b/qt4/immodule/quiminputcontextplugin.pro.in index 1e47743c7..9f3ddf12d 100644 --- a/qt4/immodule/quiminputcontextplugin.pro.in +++ b/qt4/immodule/quiminputcontextplugin.pro.in @@ -9,6 +9,7 @@ QT += qt3support INCLUDEPATH += @abs_top_builddir@ @abs_top_builddir@/uim \ @abs_top_builddir@/replace QMAKE_LIBDIR += @abs_top_builddir@/uim +QMAKE_LIBDIR += @abs_top_builddir@/replace # Since the plugin linked with libtool did not work, link the # static libraries directly QMAKE_LIBDIR += @abs_top_builddir@/replace/.libs From 349f90d04d7891f6e79c8a829ebc8d4a0e0b9ac7 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Wed, 29 Oct 2008 11:15:24 +0000 Subject: [PATCH 050/136] * configure.ac * uim/uim.h - Post release version bump. --- configure.ac | 2 +- uim/uim.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 8022418c9..d32c45d4e 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ(2.60b) -AC_INIT([uim], [1.5.4], [uim-en@googlegroups.com]) +AC_INIT([uim], [1.5.5], [uim-en@googlegroups.com]) AC_CONFIG_SRCDIR([uim/uim.c]) AC_CONFIG_HEADERS([uim/config.h]) AM_INIT_AUTOMAKE([1.10 dist-bzip2]) diff --git a/uim/uim.h b/uim/uim.h index 7d25402ef..7187d4cde 100644 --- a/uim/uim.h +++ b/uim/uim.h @@ -43,7 +43,7 @@ extern "C" { #define UIM_VERSION_MAJOR (1) #define UIM_VERSION_MINOR (5) -#define UIM_VERSION_PATCHLEVEL (4) +#define UIM_VERSION_PATCHLEVEL (5) #define UIM_VERSION_REQUIRE(major, minor, patchlevel) \ ((major) < UIM_VERSION_MAJOR \ || ((major) == UIM_VERSION_MAJOR && (minor) < UIM_VERSION_MINOR) \ From 224b3849f91be2c9e7e61a3221a602c55bc69842 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Fri, 14 Nov 2008 11:47:11 +0000 Subject: [PATCH 051/136] * Merge r5610:5613 from trunk. --- gtk/caret-state-indicator.c | 17 +++++++++++++++++ gtk/gtk-im-uim.c | 3 --- gtk/uim-eb.c | 1 + scm/japanese-azik.scm | 6 ++++++ 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/gtk/caret-state-indicator.c b/gtk/caret-state-indicator.c index 118ce7c68..330833d01 100644 --- a/gtk/caret-state-indicator.c +++ b/gtk/caret-state-indicator.c @@ -89,6 +89,20 @@ caret_state_indicator_paint_window(GtkWidget *window) return FALSE; } +static gint +caret_state_indicator_destroy_cb(GtkWidget *window) +{ + GList *label_list, *frame_list; + + label_list = g_object_get_data(G_OBJECT(window), "labels"); + frame_list = g_object_get_data(G_OBJECT(window), "frames"); + + g_list_free(label_list); + g_list_free(frame_list); + + return FALSE; +} + GtkWidget * caret_state_indicator_new(void) { @@ -111,6 +125,9 @@ caret_state_indicator_new(void) g_signal_connect(window, "expose_event", G_CALLBACK(caret_state_indicator_paint_window), NULL); + g_signal_connect(window, "destroy", + G_CALLBACK(caret_state_indicator_destroy_cb), + NULL); gtk_misc_set_alignment(GTK_MISC(label), 0.5, 0.5); diff --git a/gtk/gtk-im-uim.c b/gtk/gtk-im-uim.c index 20d02dcff..7aebbd811 100644 --- a/gtk/gtk-im-uim.c +++ b/gtk/gtk-im-uim.c @@ -1347,11 +1347,8 @@ im_uim_set_client_window(GtkIMContext *ic, GdkWindow *w) IMUIMContext *uic = IM_UIM_CONTEXT(ic); if (w) { - g_object_ref(w); uic->win = w; } else { - if (uic->win) - g_object_unref(uic->win); uic->win = NULL; } update_client_widget(uic); diff --git a/gtk/uim-eb.c b/gtk/uim-eb.c index fa1acb33e..927931ce7 100644 --- a/gtk/uim-eb.c +++ b/gtk/uim-eb.c @@ -109,6 +109,7 @@ uim_eb_destroy (uim_eb *ueb) eb_ref_count--; if (eb_ref_count == 0) eb_finalize_library(); + free(ueb); } diff --git a/scm/japanese-azik.scm b/scm/japanese-azik.scm index ee1cacbf6..1be45aabc 100644 --- a/scm/japanese-azik.scm +++ b/scm/japanese-azik.scm @@ -152,6 +152,7 @@ ((("g" "y" "z"). ())(("" "" "") ("" "" "") ("" "" ""))) ((("g" "z"). ())(("" "" "") ("" "" ""))) ((("h" "d"). ())(("" "" "") ("" "" ""))) + ((("h" "f"). ())("" "" "")) ((("h" "g" "a"). ())(("" "" "") ("" "" ""))) ((("h" "g" "d"). ())(("" "" "") ("" "" "") ("" "" ""))) ((("h" "g" "e"). ())(("" "" "") ("" "" ""))) @@ -241,6 +242,7 @@ ((("l" "i"). ())("" "" "")) ((("l" "o"). ())("" "" "")) ((("l" "u"). ())("" "" "")) + ((("l" "w" "a"). ())("" "" "")) ((("l" "y" "a"). ())("" "" "")) ((("l" "y" "e"). ())(("" "" "") ("" "" ""))) ((("l" "y" "i"). ())(("" "" "") ("" "" ""))) @@ -284,6 +286,7 @@ ((("n"). ())("" "" "")) ((("n" "b"). ())(("" "" "") ("" "" "ʎ"))) ((("n" "d"). ())(("" "" "") ("" "" ""))) + ((("n" "f"). ())("" "" "")) ((("n" "g" "a"). ())(("" "" "") ("" "" ""))) ((("n" "g" "d"). ())(("" "" "") ("" "" "") ("" "" ""))) ((("n" "g" "e"). ())(("" "" "") ("" "" ""))) @@ -317,6 +320,7 @@ ((("n" "y" "z"). ())(("" "" "") ("" "" "") ("" "" ""))) ((("n" "z"). ())(("" "" "") ("" "" ""))) ((("p" "d"). ())(("" "" "͎") ("" "" ""))) + ((("p" "f"). ())(("" "" "Ύ") ("" "" ""))) ((("p" "g" "a"). ())(("" "" "ˎ") ("" "" ""))) ((("p" "g" "d"). ())(("" "" "ˎ") ("" "" "") ("" "" ""))) ((("p" "g" "e"). ())(("" "" "ˎ") ("" "" ""))) @@ -436,6 +440,7 @@ ((("t" "y" "z"). ())(("" "" "") ("" "" "") ("" "" ""))) ((("t" "z"). ())(("" "" "") ("" "" ""))) ((("w" "d"). ())(("" "" "") ("" "" "") ("" "" ""))) + ((("w" "f"). ())(("" "" "") ("" "" ""))) ((("w" "k"). ())(("" "" "") ("" "" "") ("" "" ""))) ((("w" "l"). ())(("" "" "") ("" "" "") ("" "" ""))) ((("w" "n"). ())(("" "" "") ("" "" ""))) @@ -472,6 +477,7 @@ ((("x" "w"). ())(("" "" "") ("" "" "") ("" "" ""))) ((("x" "z"). ())(("" "" "") ("" "" "") ("" "" ""))) ((("y" "e"). ())(("" "" "") ("" "" ""))) + ((("y" "f"). ())("" "" "")) ((("y" "h"). ())(("" "" "") ("" "" ""))) ((("y" "i"). ())("" "" "")) ((("y" "j"). ())(("" "" "") ("" "" ""))) From a8a158ef78716ea66a9d6beebd79fa91a7beb0c0 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Wed, 26 Nov 2008 09:43:19 +0000 Subject: [PATCH 052/136] * Merge r5632 from trunk. --- scm/anthy-utf8.scm | 25 +++++++++++++++++++++++++ scm/anthy.scm | 25 +++++++++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/scm/anthy-utf8.scm b/scm/anthy-utf8.scm index c0910294c..2e83b256b 100644 --- a/scm/anthy-utf8.scm +++ b/scm/anthy-utf8.scm @@ -747,6 +747,30 @@ (else state)))) +(define anthy-utf8-learn-transposing-text + (lambda (ac) + (let ((ac-id (anthy-utf8-context-ac-id ac)) + (transposing-type (anthy-utf8-context-transposing-type ac)) + (preconv-str (anthy-utf8-make-whole-string ac #t anthy-type-hiragana)) + (type #f)) + (define (expand-segment) + (if (not (= (anthy-utf8-lib-get-nr-segments ac-id) 1)) + (begin + (anthy-utf8-lib-resize-segment ac-id 0 1) + (expand-segment)))) + (cond + ((= transposing-type anthy-type-hiragana) + (set! type anthy-candidate-type-hiragana)) + ((= transposing-type anthy-type-katakana) + (set! type anthy-candidate-type-katakana))) + (if (and ac-id + (> (string-length preconv-str) 0) + type) + (begin + (anthy-utf8-lib-set-string ac-id (anthy-utf8-lib-eucjp-to-utf8 preconv-str)) + (expand-segment) + (anthy-utf8-lib-commit-segment ac-id 0 type)))))) + (define anthy-utf8-proc-transposing-state (lambda (ac key key-state) (let ((rotate-list '()) @@ -795,6 +819,7 @@ ; commit (if (anthy-commit-key? key key-state) (begin + (anthy-utf8-learn-transposing-text ac) (im-commit ac (anthy-utf8-lib-eucjp-to-utf8 (anthy-utf8-transposing-text ac))) (anthy-utf8-flush ac) #f) diff --git a/scm/anthy.scm b/scm/anthy.scm index d23245819..51e712c3e 100644 --- a/scm/anthy.scm +++ b/scm/anthy.scm @@ -742,6 +742,30 @@ (else state)))) +(define anthy-learn-transposing-text + (lambda (ac) + (let ((ac-id (anthy-context-ac-id ac)) + (transposing-type (anthy-context-transposing-type ac)) + (preconv-str (anthy-make-whole-string ac #t anthy-type-hiragana)) + (type #f)) + (define (expand-segment) + (if (not (= (anthy-lib-get-nr-segments ac-id) 1)) + (begin + (anthy-lib-resize-segment ac-id 0 1) + (expand-segment)))) + (cond + ((= transposing-type anthy-type-hiragana) + (set! type anthy-candidate-type-hiragana)) + ((= transposing-type anthy-type-katakana) + (set! type anthy-candidate-type-katakana))) + (if (and ac-id + (> (string-length preconv-str) 0) + type) + (begin + (anthy-lib-set-string ac-id preconv-str) + (expand-segment) + (anthy-lib-commit-segment ac-id 0 type)))))) + (define anthy-proc-transposing-state (lambda (ac key key-state) (let ((rotate-list '()) @@ -790,6 +814,7 @@ ; commit (if (anthy-commit-key? key key-state) (begin + (anthy-learn-transposing-text ac) (im-commit ac (anthy-transposing-text ac)) (anthy-flush ac) #f) From 29c0098dcd7545a85b67f3b24452074f1cd7d33c Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Wed, 26 Nov 2008 10:12:43 +0000 Subject: [PATCH 053/136] * NEWS : Update. --- NEWS | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/NEWS b/NEWS index b04bc6600..4264e6d41 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,18 @@ +Overview of changes from 1.5.4 to 1.5.5 +======================================= +* Enhancements + - uim-anthy + - uim-anthy-utf8 + * Learn transposing Katakana/Hiragana string (bug #18630) + + - misc Japanese IM + - AZIK roma-kana table update + +* Fixes + - GTK+ bridge + * Plug memory leaks + + Overview of changes from 1.5.3 to 1.5.4 ======================================= * Enhancements From 598ec34d693db0766a1b341b6f82ecb5bbf9c656 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Wed, 26 Nov 2008 10:14:00 +0000 Subject: [PATCH 054/136] * NEWS : Update. --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 4264e6d41..9c89506a4 100644 --- a/NEWS +++ b/NEWS @@ -6,7 +6,7 @@ Overview of changes from 1.5.4 to 1.5.5 * Learn transposing Katakana/Hiragana string (bug #18630) - misc Japanese IM - - AZIK roma-kana table update + * AZIK roma-kana table update * Fixes - GTK+ bridge From 375068e2429a73c4ae8cca83adee944bd2568303 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Thu, 27 Nov 2008 01:17:09 +0000 Subject: [PATCH 055/136] * Port r5637 from trunk. --- helper/dict-word-win-gtk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helper/dict-word-win-gtk.c b/helper/dict-word-win-gtk.c index 77688cfec..98cb0fd7b 100644 --- a/helper/dict-word-win-gtk.c +++ b/helper/dict-word-win-gtk.c @@ -331,7 +331,7 @@ word_window_necessary_create(WordWindow *window) gtk_table_attach(GTK_TABLE(table1), alignment, 1, 2, 4, 5, GTK_FILL, 0, 5, 5); gtk_widget_show(alignment); - adjustment_freq = (GtkAdjustment*)gtk_adjustment_new(1.0, 1.0, 65535.0, 1.0, 100.0, 100.0); + adjustment_freq = (GtkAdjustment*)gtk_adjustment_new(1.0, 1.0, 65535.0, 1.0, 100.0, 0); spin_freq = gtk_spin_button_new(adjustment_freq, 1.0, 0); gtk_label_set_mnemonic_widget(GTK_LABEL(label), spin_freq); gtk_container_add(GTK_CONTAINER(alignment), spin_freq); From 04341840e9d05f1b82665fdf9c2cb09c47f37fce Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Sun, 30 Nov 2008 05:06:56 +0000 Subject: [PATCH 056/136] * Port r5639 from trunk. --- scm/anthy.scm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scm/anthy.scm b/scm/anthy.scm index 51e712c3e..6c0d2b40f 100644 --- a/scm/anthy.scm +++ b/scm/anthy.scm @@ -758,13 +758,13 @@ (set! type anthy-candidate-type-hiragana)) ((= transposing-type anthy-type-katakana) (set! type anthy-candidate-type-katakana))) - (if (and ac-id - (> (string-length preconv-str) 0) - type) - (begin - (anthy-lib-set-string ac-id preconv-str) - (expand-segment) - (anthy-lib-commit-segment ac-id 0 type)))))) + (if (and ac-id + (> (string-length preconv-str) 0) + type) + (begin + (anthy-lib-set-string ac-id preconv-str) + (expand-segment) + (anthy-lib-commit-segment ac-id 0 type)))))) (define anthy-proc-transposing-state (lambda (ac key key-state) From 484234ee849fe2fa4cb5ed72e9c4e3466bafd8e2 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Tue, 6 Jan 2009 06:42:58 +0000 Subject: [PATCH 057/136] * Port r5646, r5685, r5693, and r5694:5699 from trunk. --- emacs/context.c | 1 + scm/japanese.scm | 10 +++++----- uim/bsdlook.c | 12 +++++++----- uim/skk.c | 32 ++++++++++++++++---------------- uim/uim-error.c | 10 +++++++--- uim/uim-helper-client.c | 1 + 6 files changed, 37 insertions(+), 29 deletions(-) diff --git a/emacs/context.c b/emacs/context.c index ed4c2dc47..8051bf11b 100644 --- a/emacs/context.c +++ b/emacs/context.c @@ -306,6 +306,7 @@ release_uim_agent_context(int context_id) /* free others */ free(ua->encoding); free(ua->im); + free(ua->prop->list); free(ua->prop); free(ua->comstr); diff --git a/scm/japanese.scm b/scm/japanese.scm index 4d3ce2637..535f68420 100644 --- a/scm/japanese.scm +++ b/scm/japanese.scm @@ -474,11 +474,11 @@ ((("z" "w" "e"). ())(("" "" "") ("" "" ""))) ((("z" "w" "o"). ())(("" "" "") ("" "" ""))) - ((("n" "w" "a"). ())(("" "" "") ("" "" ""))) - ((("n" "w" "i"). ())(("" "" "") ("" "" ""))) - ((("n" "w" "u"). ())(("" "" "") ("" "" ""))) - ((("n" "w" "e"). ())(("" "" "") ("" "" ""))) - ((("n" "w" "o"). ())(("" "" "") ("" "" ""))) + ;((("n" "w" "a"). ())(("" "" "") ("" "" ""))) + ;((("n" "w" "i"). ())(("" "" "") ("" "" ""))) + ;((("n" "w" "u"). ())(("" "" "") ("" "" ""))) + ;((("n" "w" "e"). ())(("" "" "") ("" "" ""))) + ;((("n" "w" "o"). ())(("" "" "") ("" "" ""))) ((("b" "w" "a"). ())(("" "" "̎") ("" "" ""))) ((("b" "w" "i"). ())(("" "" "̎") ("" "" ""))) diff --git a/uim/bsdlook.c b/uim/bsdlook.c index 350ca9379..36e226809 100644 --- a/uim/bsdlook.c +++ b/uim/bsdlook.c @@ -163,14 +163,16 @@ uim_look_get(char *string, char *dst, size_t len, uim_look_ctx *ctx) void uim_look_finish(uim_look_ctx *ctx) { - if (!ctx || ctx->front0 == 0) + if (!ctx) return; - if (munmap(ctx->front0, ctx->len) == -1) { + if (ctx->front0 > 0 && munmap(ctx->front0, ctx->len) == -1) perror("uim_look_finish"); - return; - } - close(ctx->fd); + + if (ctx->fd > 0) + close(ctx->fd); + + free(ctx); return; } diff --git a/uim/skk.c b/uim/skk.c index ec45f4d12..f15806b9c 100644 --- a/uim/skk.c +++ b/uim/skk.c @@ -479,6 +479,7 @@ free_skk_line(struct skk_line *sl) } free(sl->head); free(sl->cands); + free(sl); } static struct skk_cand_array * @@ -3539,25 +3540,24 @@ uim_plugin_instance_quit(void) { struct skk_line *sl, *tmp; - if (!skk_dic) - return; - - if (skk_dic->addr) - munmap(skk_dic->addr, skk_dic->size); + if (skk_dic) { + if (skk_dic->addr) + munmap(skk_dic->addr, skk_dic->size); - sl = skk_dic->head.next; - while (sl) { - tmp = sl; - sl = sl->next; - free_skk_line(tmp); - } + sl = skk_dic->head.next; + while (sl) { + tmp = sl; + sl = sl->next; + free_skk_line(tmp); + } - if (skk_dic->skkserv_state & SKK_SERV_CONNECTED) - close_skkserv(); - free(skk_dic->skkserv_hostname); + if (skk_dic->skkserv_state & SKK_SERV_CONNECTED) + close_skkserv(); + free(skk_dic->skkserv_hostname); - free(skk_dic); - skk_dic = NULL; + free(skk_dic); + skk_dic = NULL; + } if (use_look && skk_look_ctx) { uim_look_finish(skk_look_ctx); diff --git a/uim/uim-error.c b/uim/uim-error.c index d35eb9912..abb15aa73 100644 --- a/uim/uim-error.c +++ b/uim/uim-error.c @@ -187,11 +187,15 @@ uim_malloc(size_t size) void * uim_realloc(void *p, size_t size) { - p = realloc(p, size); - if (!p) + void *newp; + + newp = realloc(p, size); + if (!newp) { + free(p); uim_fatal_error("realloc() failed"); + } - return p; + return newp; } void * diff --git a/uim/uim-helper-client.c b/uim/uim-helper-client.c index ed45bba17..bef2a6acb 100644 --- a/uim/uim-helper-client.c +++ b/uim/uim-helper-client.c @@ -153,6 +153,7 @@ uim_helper_close_client_fd(int fd) if (uim_disconnect_cb) uim_disconnect_cb(); + free(uim_read_buf); uim_fd = -1; } From 1264221455c5b30dcd5cab1d485ddba2b263828d Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Tue, 6 Jan 2009 06:55:10 +0000 Subject: [PATCH 058/136] * NEWS : Update. --- NEWS | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/NEWS b/NEWS index 9c89506a4..a282575f6 100644 --- a/NEWS +++ b/NEWS @@ -7,11 +7,19 @@ Overview of changes from 1.5.4 to 1.5.5 - misc Japanese IM * AZIK roma-kana table update + * Don't use "nwa", "nwi", "nwu", "nwe", "nwo" roma-kana sequences + by default * Fixes - GTK+ bridge + - uim.el + - uim-skk + - uim-look * Plug memory leaks + - uim-dict-gtk + * Fix warning with GTK+-2.14.x + Overview of changes from 1.5.3 to 1.5.4 ======================================= From cca2346e41dfb307c7a662946e408ca9f8596449 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Thu, 15 Jan 2009 04:37:13 +0000 Subject: [PATCH 059/136] * Port r5712 from trunk. --- uim/uim-helper-client.c | 1 - 1 file changed, 1 deletion(-) diff --git a/uim/uim-helper-client.c b/uim/uim-helper-client.c index bef2a6acb..ed45bba17 100644 --- a/uim/uim-helper-client.c +++ b/uim/uim-helper-client.c @@ -153,7 +153,6 @@ uim_helper_close_client_fd(int fd) if (uim_disconnect_cb) uim_disconnect_cb(); - free(uim_read_buf); uim_fd = -1; } From 65ba3e57e5c6fa8bf8e83d2726c3f96a2673a674 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Thu, 15 Jan 2009 05:06:40 +0000 Subject: [PATCH 060/136] * Port r5714 from trunk. --- helper/dict-main-gtk.c | 42 ----------------------------------------- uim/uim-helper-client.c | 2 ++ 2 files changed, 2 insertions(+), 42 deletions(-) diff --git a/helper/dict-main-gtk.c b/helper/dict-main-gtk.c index cc2e2807f..fd8fdef56 100644 --- a/helper/dict-main-gtk.c +++ b/helper/dict-main-gtk.c @@ -50,7 +50,6 @@ #include "dict-word-list-view-gtk.h" static unsigned int read_tag; -static int uim_fd; /* file descriptor to connect helper message bus */ static int ae_mode; /* add mode or edit mode */ static int g_startup_dictionary; @@ -60,43 +59,6 @@ enum { NR_MODE }; -static void -helper_disconnect_cb(void) -{ - uim_fd = -1; - g_source_remove(read_tag); -} - -static gboolean -fd_read_cb(GIOChannel *channel, GIOCondition c, gpointer p) -{ - char *tmp; - int fd = g_io_channel_unix_get_fd(channel); - - uim_helper_read_proc(fd); - while ((tmp = uim_helper_get_message())) { - /* parse_helper_str(tmp); */ - g_free(tmp); - tmp = NULL; - } - return TRUE; -} - -static void -check_helper_connection(void) -{ - if (uim_fd < 0) { - uim_fd = uim_helper_init_client_fd(helper_disconnect_cb); - if (uim_fd > 0) { - GIOChannel *channel; - channel = g_io_channel_unix_new(uim_fd); - read_tag = g_io_add_watch(channel, G_IO_IN | G_IO_HUP | G_IO_ERR, - fd_read_cb, NULL); - g_io_channel_unref(channel); - } - } -} - static char * get_error_msg(void) { @@ -275,10 +237,6 @@ main(int argc, char *argv[]) exit(EXIT_FAILURE); } - /* connect to uim helper message bus */ - uim_fd = -1; - check_helper_connection(); - gtk_main (); return 0; diff --git a/uim/uim-helper-client.c b/uim/uim-helper-client.c index ed45bba17..84873e609 100644 --- a/uim/uim-helper-client.c +++ b/uim/uim-helper-client.c @@ -153,6 +153,8 @@ uim_helper_close_client_fd(int fd) if (uim_disconnect_cb) uim_disconnect_cb(); + free(uim_read_buf); + uim_read_buf = NULL; uim_fd = -1; } From a0c1a0511bf196f77ef67fa895265e6d89c34b56 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Thu, 15 Jan 2009 05:24:24 +0000 Subject: [PATCH 061/136] * Port r5716 from trunk. --- uim/uim-helper-client.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/uim/uim-helper-client.c b/uim/uim-helper-client.c index 84873e609..44a8a669a 100644 --- a/uim/uim-helper-client.c +++ b/uim/uim-helper-client.c @@ -125,7 +125,8 @@ int uim_helper_init_client_fd(void (*disconnect_cb)(void)) if (uim_helper_check_connection_fd(fd)) goto error; - uim_read_buf = uim_strdup(""); + if (!uim_read_buf) + uim_read_buf = uim_strdup(""); uim_disconnect_cb = disconnect_cb; uim_fd = fd; @@ -153,8 +154,6 @@ uim_helper_close_client_fd(int fd) if (uim_disconnect_cb) uim_disconnect_cb(); - free(uim_read_buf); - uim_read_buf = NULL; uim_fd = -1; } From 0a9ee83049bc1295b8dc2385956d4a3320ea49bf Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Thu, 15 Jan 2009 11:20:18 +0000 Subject: [PATCH 062/136] * Port r5719 from trunk. --- helper/pref-gtk.c | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/helper/pref-gtk.c b/helper/pref-gtk.c index f8cde6481..49d1474d7 100644 --- a/helper/pref-gtk.c +++ b/helper/pref-gtk.c @@ -62,8 +62,9 @@ static GtkWidget *pref_ok_button = NULL; enum { - GROUP_COLUMN=0, - GROUP_WIDGET=1, + GROUP_COLUMN = 0, + GROUP_WIDGET = 1, + GROUP_SYM = 2, NUM_COLUMNS }; @@ -128,7 +129,7 @@ pref_tree_selection_changed(GtkTreeSelection *selection, GtkTreeStore *store; GtkTreeIter iter; GtkTreeModel *model; - char *group_name; + char *group_name, *group_sym; GtkWidget *group_widget; /* @@ -161,11 +162,17 @@ pref_tree_selection_changed(GtkTreeSelection *selection, gtk_tree_model_get(model, &iter, GROUP_COLUMN, &group_name, GROUP_WIDGET, &group_widget, + GROUP_SYM, &group_sym, -1); if (group_name == NULL) return TRUE; + if (group_widget == NULL) { + group_widget = create_group_widget(group_sym); + gtk_tree_store_set(store, &iter, GROUP_WIDGET, group_widget, -1); + } + /* hide current selected group's widget */ if (current_group_widget) gtk_widget_hide(current_group_widget); @@ -180,6 +187,7 @@ pref_tree_selection_changed(GtkTreeSelection *selection, current_group_widget = group_widget; free(group_name); + free(group_sym); return TRUE; } @@ -250,7 +258,8 @@ create_pref_treeview(void) GtkTreePath *first_path; tree_store = gtk_tree_store_new (NUM_COLUMNS, G_TYPE_STRING, - GTK_TYPE_WIDGET); + GTK_TYPE_WIDGET, + G_TYPE_STRING); pref_tree_view = gtk_tree_view_new(); @@ -266,10 +275,20 @@ create_pref_treeview(void) for (grp = primary_groups; *grp; grp++) { struct uim_custom_group *group = uim_custom_group_get(*grp); gtk_tree_store_append (tree_store, &iter, NULL/* parent iter */); - gtk_tree_store_set (tree_store, &iter, - GROUP_COLUMN, group->label, - GROUP_WIDGET, create_group_widget(*grp), - -1); + /* only set the widget of the first row for now */ + if (grp == primary_groups) { + gtk_tree_store_set (tree_store, &iter, + GROUP_COLUMN, group->label, + GROUP_WIDGET, create_group_widget(*grp), + GROUP_SYM, *grp, + -1); + } else { + gtk_tree_store_set (tree_store, &iter, + GROUP_COLUMN, group->label, + GROUP_WIDGET, NULL, + GROUP_SYM, *grp, + -1); + } uim_custom_group_free(group); } uim_custom_symbol_list_free( primary_groups ); From 83986c68e033214d94d2e05360cf8f4fb65cfef1 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Thu, 15 Jan 2009 13:23:35 +0000 Subject: [PATCH 063/136] * Port r5721 from trunk. --- helper/pref-gtk.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/helper/pref-gtk.c b/helper/pref-gtk.c index 49d1474d7..04296242b 100644 --- a/helper/pref-gtk.c +++ b/helper/pref-gtk.c @@ -239,6 +239,17 @@ quit_confirm(void) } } +static gboolean +key_press_cb(GtkWidget *widget, GdkEventKey *event) +{ + if (event->keyval == GDK_Escape) { + quit_confirm(); + return TRUE; + } + + return FALSE; +} + static gint delete_event_cb(GtkWidget *widget, gpointer data) { @@ -517,6 +528,8 @@ create_pref_window(void) g_signal_connect(G_OBJECT (window), "delete_event", G_CALLBACK (delete_event_cb), NULL); + g_signal_connect(G_OBJECT (window), "key_press_event", + G_CALLBACK (key_press_cb), NULL); pref_hbox = gtk_hbox_new(FALSE, 8); From e2b9c131773b6afaf1d0ac0806190c201f96e6cf Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Sat, 17 Jan 2009 09:01:47 +0000 Subject: [PATCH 064/136] * Port r5727 from trunk. --- qt/pref-customwidgets.cpp | 2 +- qt/pref-qt.cpp | 34 ++++++++++++++++++++++++---------- qt/pref-qt.h | 5 ++++- 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/qt/pref-customwidgets.cpp b/qt/pref-customwidgets.cpp index ca85b2336..e8d21b933 100644 --- a/qt/pref-customwidgets.cpp +++ b/qt/pref-customwidgets.cpp @@ -258,7 +258,7 @@ void CustomPathnameEdit::slotFileDialogFilterSelected( const QString & text ) //---------------------------------------------------------------------------------------- CustomChoiceCombo::CustomChoiceCombo( struct uim_custom *c, QWidget *parent, const char *name) - : QComboBox( parent, name ), + : QComboBox( FALSE, parent, name ), UimCustomItemIface( c ) { QObject::connect( this, SIGNAL(activated(int)), diff --git a/qt/pref-qt.cpp b/qt/pref-qt.cpp index 12744b767..676cf16c0 100644 --- a/qt/pref-qt.cpp +++ b/qt/pref-qt.cpp @@ -65,6 +65,9 @@ #include #include +#define DEFAULT_WINDOW_WIDTH 800 +#define DEFAULT_WINDOW_HEIGHT 600 + #define _FU8(String) QString::fromUtf8(String) UimPrefDialog::UimPrefDialog( QWidget *parent, const char *name ) @@ -146,14 +149,14 @@ void UimPrefDialog::createMainWidgets() this, SLOT(slotSelectionChanged( QListViewItem * )) ); /* Contents Frame */ - QWidget *rightSideWidget = new QWidget( mainSplitter ); - QVBoxLayout *rightVLayout = new QVBoxLayout( rightSideWidget ); - m_groupWidgetStack = new QWidgetStack( rightSideWidget ); - rightVLayout->setSpacing( 6 ); - rightVLayout->addWidget( m_groupWidgetStack ); + QScrollView *rightSideWidget = new QScrollView( mainSplitter ); + rightSideWidget->setResizePolicy(QScrollView::AutoOneFit); + m_groupWidgetStack = new QWidgetStack( rightSideWidget->viewport() ); + rightSideWidget->addChild(m_groupWidgetStack); /* Buttons */ QWidget *buttonHWidget = new QWidget( this ); + buttonHWidget->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed); QHBoxLayout *buttonHLayout = new QHBoxLayout( buttonHWidget ); buttonHLayout->setMargin( 6 ); buttonHLayout->setSpacing( 6 ); @@ -200,6 +203,9 @@ void UimPrefDialog::createGroupWidgets() item = new QListViewItem( m_groupListView, _FU8(group->label) ); GroupPageWidget *w = new GroupPageWidget( m_groupWidgetStack, *grp ); + if ( grp == primary_groups ) + w->setupWidgets(); + QObject::connect( w, SIGNAL(customValueChanged()), this, SLOT(slotCustomValueChanged()) ); @@ -229,6 +235,7 @@ void UimPrefDialog::slotSelectionChanged( QListViewItem * item ) /* switch group widget */ QString grpname = item->text( 0 ); + ((GroupPageWidget *)m_groupWidgetsDict[grpname])->setupWidgets(); m_groupWidgetStack->raiseWidget( m_groupWidgetsDict[grpname] ); #if 0 @@ -385,16 +392,20 @@ GroupPageWidget::GroupPageWidget( QWidget *parent, const char *group_name ) m_customIfaceList.clear(); m_customIfaceList.setAutoDelete( false ); - setupWidgets( group_name ); + m_group_sym = group_name; + m_widget_created = false; } -void GroupPageWidget::setupWidgets( const char *group_name ) +void GroupPageWidget::setupWidgets() { + if ( m_widget_created ) + return; + QVBoxLayout *vLayout = new QVBoxLayout( this ); vLayout->setMargin( 6 ); vLayout->setSpacing( 3 ); - struct uim_custom_group *group = uim_custom_group_get( group_name ); + struct uim_custom_group *group = uim_custom_group_get( (const char *)m_group_sym ); if( group == NULL ) return; @@ -434,7 +445,7 @@ void GroupPageWidget::setupWidgets( const char *group_name ) uim_custom_symbol_list_free( custom_syms ); } #else - char **sub_groups = uim_custom_group_subgroups( group_name ); + char **sub_groups = uim_custom_group_subgroups( (const char *)m_group_sym ); char **sgrp; for( sgrp = sub_groups; *sgrp; sgrp++ ) { @@ -452,7 +463,7 @@ void GroupPageWidget::setupWidgets( const char *group_name ) } /* XXX quick hack to use AND expression of groups */ - QString groups( group_name ); + QString groups( m_group_sym ); groups += " '"; groups += *sgrp; char **custom_syms = uim_custom_collect_by_group( groups ); @@ -479,6 +490,8 @@ void GroupPageWidget::setupWidgets( const char *group_name ) /* bottom up */ vLayout->addStretch(); + + m_widget_created = true; } /* @@ -643,6 +656,7 @@ int main( int argc, char **argv ) QApplication a( argc, argv ); UimPrefDialog *dlg = new UimPrefDialog(); + dlg->resize( DEFAULT_WINDOW_WIDTH, DEFAULT_WINDOW_HEIGHT ); a.setMainWidget( dlg ); dlg->show(); diff --git a/qt/pref-qt.h b/qt/pref-qt.h index 7d698b446..19f7cfaaa 100644 --- a/qt/pref-qt.h +++ b/qt/pref-qt.h @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -116,9 +117,9 @@ class GroupPageWidget : public QWidget { GroupPageWidget( QWidget *parent, const char *group_name ); void setDefault(); + void setupWidgets(); protected: - void setupWidgets( const char *group_name ); UimCustomItemIface *addCustom( QVGroupBox *vbox, const char *custom_sym ); UimCustomItemIface *addCustomTypeBool( QVGroupBox *vbox, struct uim_custom *custom ); @@ -136,6 +137,8 @@ protected slots: protected: QPtrList m_customIfaceList; + QString m_group_sym; + bool m_widget_created; }; #endif /* Not def: UIM_QT_PREF_QT_H */ From 1af7cf15a33b9b3dde676587aba8587a28f0d73e Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Sat, 17 Jan 2009 11:29:03 +0000 Subject: [PATCH 065/136] * Port r5724 from trunk. --- helper/dict-main-gtk.c | 1 - 1 file changed, 1 deletion(-) diff --git a/helper/dict-main-gtk.c b/helper/dict-main-gtk.c index fd8fdef56..56a3ad705 100644 --- a/helper/dict-main-gtk.c +++ b/helper/dict-main-gtk.c @@ -49,7 +49,6 @@ #include "dict-word-list-win-gtk.h" #include "dict-word-list-view-gtk.h" -static unsigned int read_tag; static int ae_mode; /* add mode or edit mode */ static int g_startup_dictionary; From f512f3175eef56635b4282d2d5df14b9d3dda9a5 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Sat, 17 Jan 2009 11:35:33 +0000 Subject: [PATCH 066/136] * Port r5730 from trunk. --- NEWS | 4 ++++ uim/prime.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index a282575f6..908a773c8 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,10 @@ Overview of changes from 1.5.4 to 1.5.5 * Don't use "nwa", "nwi", "nwu", "nwe", "nwo" roma-kana sequences by default + - uim-pref-gtk + - uim-pref-qt + * Reduced startup time + * Fixes - GTK+ bridge - uim.el diff --git a/uim/prime.c b/uim/prime.c index 8ea136099..6a08f74e1 100644 --- a/uim/prime.c +++ b/uim/prime.c @@ -63,7 +63,7 @@ static FILE *primer, *primew; static pid_t prime_pid = 0; -static char *prime_command = "prime"; +static char *prime_command = "/Library/PRIME/bin/prime"; static char prime_ud_path[MAXPATHLEN]; static int prime_fd = -1; From 1f01163744937f989abad00ad91bb5b115e48b0d Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Sat, 17 Jan 2009 11:37:18 +0000 Subject: [PATCH 067/136] * uim/prime.c : Revert r5731. --- uim/prime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uim/prime.c b/uim/prime.c index 6a08f74e1..8ea136099 100644 --- a/uim/prime.c +++ b/uim/prime.c @@ -63,7 +63,7 @@ static FILE *primer, *primew; static pid_t prime_pid = 0; -static char *prime_command = "/Library/PRIME/bin/prime"; +static char *prime_command = "prime"; static char prime_ud_path[MAXPATHLEN]; static int prime_fd = -1; From 26caf0d0fbf69a6a33b6f5ea3764724548356062 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Sat, 17 Jan 2009 11:43:21 +0000 Subject: [PATCH 068/136] * RELNOTE : Update. --- RELNOTE | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/RELNOTE b/RELNOTE index 332c92b3d..8a1a3168e 100644 --- a/RELNOTE +++ b/RELNOTE @@ -1,10 +1,10 @@ -uim 1.5.4 Release Note +uim 1.5.5 Release Note ====================== About This Release ------------------ -This distribution of uim 1.5.4 is latest stable release of uim. +This distribution of uim 1.5.5 is latest stable release of uim. Please report us if you find a problem. @@ -15,9 +15,9 @@ Bug tracking system: http://bugs.freedesktop.org/ What's New ---------- -Minor enhancement about the performance of candidate window behavior -with GTK+/Qt/XIM bridges. Also a few minor fixes against 1.5.3. See -NEWS for the detailed changes. +Plugged memory leaks in general, and improved startup time of uim-pref +tool. Also a few minor fixes/enhancements against 1.5.4. See NEWS for +the detailed changes. What's New in 1.5.0 From 9e7abfb7fdf5d2052926369677ddf208b8a719c7 Mon Sep 17 00:00:00 2001 From: "ek.kato" Date: Wed, 21 Jan 2009 02:16:35 +0000 Subject: [PATCH 069/136] * Port r5762 from trunk. --- COPYING | 2 +- emacs/COPYING | 2 +- emacs/README | 2 +- emacs/README.ja | 2 +- emacs/callback.c | 2 +- emacs/callback.h | 2 +- emacs/candidate.c | 2 +- emacs/candidate.h | 2 +- emacs/commit.c | 2 +- emacs/commit.h | 2 +- emacs/context.c | 2 +- emacs/context.h | 2 +- emacs/debug.c | 2 +- emacs/debug.h | 2 +- emacs/encoding.c | 2 +- emacs/encoding.h | 2 +- emacs/helper-message.c | 2 +- emacs/helper-message.h | 2 +- emacs/helper-server.c | 2 +- emacs/helper-server.h | 2 +- emacs/helper.c | 2 +- emacs/helper.h | 2 +- emacs/im.c | 2 +- emacs/im.h | 2 +- emacs/key.c | 2 +- emacs/key.h | 2 +- emacs/output.c | 2 +- emacs/output.h | 2 +- emacs/preedit.c | 2 +- emacs/preedit.h | 2 +- emacs/prop.c | 2 +- emacs/prop.h | 2 +- emacs/uim-candidate.el | 2 +- emacs/uim-debug.el | 2 +- emacs/uim-el-agent.c | 2 +- emacs/uim-el-agent.h | 2 +- emacs/uim-el-helper-agent.c | 2 +- emacs/uim-el-helper-agent.h | 2 +- emacs/uim-el-types.h | 2 +- emacs/uim-helper.el | 2 +- emacs/uim-key.el | 2 +- emacs/uim-keymap.el | 2 +- emacs/uim-leim.el | 2 +- emacs/uim-preedit.el | 2 +- emacs/uim-util.el | 2 +- emacs/uim-var.el | 2 +- emacs/uim-version.el.in | 2 +- emacs/uim.el | 2 +- examples/uim-custom/uim-custom-dump.c | 2 +- examples/uim-custom/uim-custom-update.c | 2 +- examples/uim-custom/uim-custom-variable.c | 2 +- fep/COPYING | 2 +- fep/callbacks.c | 2 +- fep/callbacks.h | 2 +- fep/draw.c | 2 +- fep/draw.h | 2 +- fep/escseq.c | 2 +- fep/escseq.h | 2 +- fep/helper.c | 2 +- fep/helper.h | 2 +- fep/key.c | 2 +- fep/key.h | 2 +- fep/read.c | 2 +- fep/read.h | 2 +- fep/str.c | 2 +- fep/str.h | 2 +- fep/udsock.c | 2 +- fep/udsock.h | 2 +- fep/uim-fep-tick.c | 2 +- fep/uim-fep.c | 2 +- fep/uim-fep.h | 2 +- gtk/caret-state-indicator.c | 2 +- gtk/caret-state-indicator.h | 2 +- gtk/compose.c | 2 +- gtk/compose.h | 2 +- gtk/gtk-im-uim.c | 2 +- gtk/gtk-im-uim.h | 2 +- gtk/gtk-rc-get-immodule-file.c | 2 +- gtk/key-util-gtk.c | 2 +- gtk/key-util-gtk.h | 2 +- gtk/test/entry.c | 2 +- gtk/text-util.c | 2 +- gtk/text-util.h | 2 +- gtk/uim-cand-win-gtk.c | 2 +- gtk/uim-cand-win-gtk.h | 2 +- gtk/uim-eb.c | 2 +- gtk/uim-eb.h | 2 +- helper/candwin-gtk.c | 2 +- helper/dict-anthy.c | 2 +- helper/dict-anthy.h | 2 +- helper/dict-canna-cclass.c | 2 +- helper/dict-canna-cclass.h | 2 +- helper/dict-canna.c | 2 +- helper/dict-canna.h | 2 +- helper/dict-cclass-dialog.c | 2 +- helper/dict-cclass-dialog.h | 2 +- helper/dict-dict.c | 2 +- helper/dict-dict.h | 2 +- helper/dict-main-gtk.c | 2 +- helper/dict-util.c | 2 +- helper/dict-util.h | 2 +- helper/dict-word-list-view-gtk.c | 2 +- helper/dict-word-list-view-gtk.h | 2 +- helper/dict-word-list-win-gtk.c | 6 +++--- helper/dict-word-list-win-gtk.h | 2 +- helper/dict-word-win-gtk.c | 2 +- helper/dict-word-win-gtk.h | 2 +- helper/dict-word.c | 2 +- helper/dict-word.h | 2 +- helper/im-switcher-gtk.c | 2 +- helper/input-pad-ja.c | 2 +- helper/pref-gtk-custom-widgets.c | 2 +- helper/pref-gtk-custom-widgets.h | 2 +- helper/pref-gtk-keytab.h | 2 +- helper/pref-gtk.c | 2 +- helper/toolbar-applet-gnome.c | 4 ++-- helper/toolbar-common-gtk.c | 2 +- helper/toolbar-standalone-gtk.c | 2 +- helper/toolbar-systray-gtk.c | 2 +- helper/uim-dict-ui.xml.in | 2 +- notify/uim-knotify3.cc | 2 +- notify/uim-libnotify.c | 2 +- pixmaps/uim-m17nlib-relink-icons.in | 2 +- po/fr.po | 6 +++--- po/ja.po | 6 +++--- po/ko.po | 6 +++--- qt/candwin-qt.cpp | 2 +- qt/candwin-qt.h | 2 +- qt/chardict/chardict-bushuviewwidget.cpp | 2 +- qt/chardict/chardict-bushuviewwidget.h | 2 +- qt/chardict/chardict-chargridview.cpp | 2 +- qt/chardict/chardict-chargridview.h | 2 +- qt/chardict/chardict-qt.cpp | 2 +- qt/chardict/chardict-qt.h | 2 +- qt/chardict/chardict-unicodeviewwidget.cpp | 2 +- qt/chardict/chardict-unicodeviewwidget.h | 2 +- qt/chardict/po/ja.po | 2 +- qt/chardict/qtgettext.h | 2 +- qt/immodule-candidatewindow.cpp | 2 +- qt/immodule-candidatewindow.h | 2 +- qt/immodule-plugin.cpp | 2 +- qt/immodule-plugin.h | 2 +- qt/immodule-qhelpermanager.cpp | 2 +- qt/immodule-qhelpermanager.h | 2 +- qt/immodule-qtextutil.cpp | 2 +- qt/immodule-qtextutil.h | 2 +- qt/immodule-quiminfomanager.cpp | 2 +- qt/immodule-quiminfomanager.h | 2 +- qt/immodule-quiminputcontext.cpp | 2 +- qt/immodule-quiminputcontext.h | 2 +- qt/immodule-quiminputcontext_compose.cpp | 2 +- qt/immodule-quiminputcontext_compose.h | 2 +- qt/immodule-quiminputcontext_with_slave.cpp | 2 +- qt/immodule-quiminputcontext_with_slave.h | 2 +- qt/immodule-subwindow.cpp | 2 +- qt/immodule-subwindow.h | 2 +- qt/pref-customwidgets.cpp | 2 +- qt/pref-customwidgets.h | 2 +- qt/pref-qt.cpp | 2 +- qt/pref-qt.h | 2 +- qt/qtgettext.h | 2 +- qt/switcher-qt.cpp | 2 +- qt/switcher-qt.h | 2 +- qt/test/qedittest.cpp | 2 +- qt/toolbar-applet-kde.cpp | 2 +- qt/toolbar-applet-kde.h | 2 +- qt/toolbar-common-quimhelpertoolbar.cpp | 2 +- qt/toolbar-common-quimhelpertoolbar.h | 2 +- qt/toolbar-common-uimstateindicator.cpp | 2 +- qt/toolbar-common-uimstateindicator.h | 2 +- qt/toolbar-standalone-qt.cpp | 2 +- qt/toolbar-standalone-qt.h | 2 +- qt4/edittest/main.cpp | 2 +- qt4/immodule/candidatewindow.cpp | 2 +- qt4/immodule/candidatewindow.h | 2 +- qt4/immodule/debug.h | 2 +- qt4/immodule/plugin.cpp | 2 +- qt4/immodule/plugin.h | 2 +- qt4/immodule/qhelpermanager.cpp | 2 +- qt4/immodule/qhelpermanager.h | 2 +- qt4/immodule/qtextutil.cpp | 2 +- qt4/immodule/qtextutil.h | 2 +- qt4/immodule/quiminfomanager.cpp | 2 +- qt4/immodule/quiminfomanager.h | 2 +- qt4/immodule/quiminputcontext.cpp | 2 +- qt4/immodule/quiminputcontext.h | 2 +- qt4/immodule/quiminputcontext_compose.cpp | 2 +- qt4/immodule/quiminputcontext_compose.h | 2 +- qt4/immodule/quiminputcontext_with_slave.cpp | 2 +- qt4/immodule/quiminputcontext_with_slave.h | 2 +- qt4/immodule/subwindow.cpp | 2 +- qt4/immodule/subwindow.h | 2 +- replace/os_dep.h | 2 +- scm/action.scm | 2 +- scm/anthy-custom.scm | 2 +- scm/anthy-key-custom.scm | 2 +- scm/anthy-utf8-custom.scm | 2 +- scm/anthy-utf8.scm | 2 +- scm/anthy.scm | 2 +- scm/byeoru-custom.scm | 2 +- scm/byeoru-dic.scm | 2 +- scm/byeoru-key-custom.scm | 2 +- scm/byeoru-symbols.scm | 2 +- scm/byeoru.scm | 2 +- scm/canna-custom.scm | 2 +- scm/canna-key-custom.scm | 2 +- scm/canna.scm | 2 +- scm/custom-rt.scm | 2 +- scm/custom.scm | 2 +- scm/deprecated-util.scm | 2 +- scm/direct.scm | 2 +- scm/editline.scm | 2 +- scm/elatin-custom.scm | 2 +- scm/elatin-rules.scm | 2 +- scm/elatin.scm | 2 +- scm/generic-custom.scm | 2 +- scm/generic-key-custom.scm | 2 +- scm/generic.scm | 2 +- scm/hangul.scm | 2 +- scm/hangul2.scm | 2 +- scm/hangul3.scm | 2 +- scm/i18n.scm | 2 +- scm/ichar.scm | 2 +- scm/im-custom.scm | 2 +- scm/im-switcher.scm | 2 +- scm/im.scm | 2 +- scm/init.scm | 2 +- scm/ipa-x-sampa.scm | 2 +- scm/iso-639-1.scm | 2 +- scm/japanese-azik.scm | 2 +- scm/japanese-kana.scm | 2 +- scm/japanese.scm | 2 +- scm/key.scm | 2 +- scm/latin.scm | 2 +- scm/lazy-load.scm | 2 +- scm/load-action.scm | 2 +- scm/look-custom.scm | 2 +- scm/look.scm | 2 +- scm/m17nlib.scm | 2 +- scm/mana-custom.scm | 2 +- scm/mana-key-custom.scm | 2 +- scm/mana.scm | 2 +- scm/pinyin-big5.scm | 2 +- scm/plugin.scm | 2 +- scm/prime-custom.scm | 2 +- scm/prime-key-custom.scm | 2 +- scm/prime.scm | 2 +- scm/pyload.scm | 2 +- scm/pyunihan.scm | 2 +- scm/rk.scm | 2 +- scm/romaja.scm | 2 +- scm/scim.scm | 2 +- scm/sj3-custom.scm | 2 +- scm/sj3-key-custom.scm | 2 +- scm/sj3.scm | 2 +- scm/skk-custom.scm | 2 +- scm/skk-dialog.scm | 2 +- scm/skk-editor.scm | 2 +- scm/skk-key-custom.scm | 2 +- scm/skk.scm | 2 +- scm/spellcheck-custom.scm | 2 +- scm/spellcheck.scm | 2 +- scm/tcode.scm | 2 +- scm/trycode.scm | 2 +- scm/tutcode-bushudic.scm | 2 +- scm/tutcode-custom.scm | 2 +- scm/tutcode-key-custom.scm | 2 +- scm/tutcode-kigoudic.scm | 2 +- scm/tutcode-rule.scm | 2 +- scm/tutcode.scm | 2 +- scm/uim-db.scm | 2 +- scm/uim-module-manager.scm | 2 +- scm/uim-sh.scm | 2 +- scm/ustr.scm | 2 +- scm/util.scm | 2 +- scm/viqr.scm | 2 +- scm/wnn-custom.scm | 2 +- scm/wnn-key-custom.scm | 2 +- scm/wnn.scm | 2 +- scm/zaurus.scm | 2 +- test/run-test.scm | 2 +- test/template.scm | 2 +- test/test-action.scm | 2 +- test/test-anthy.scm | 2 +- test/test-custom-rt.scm | 2 +- test/test-custom.scm | 2 +- test/test-db.scm | 2 +- test/test-example.scm | 2 +- test/test-i18n.scm | 2 +- test/test-im.scm | 2 +- test/test-intl.scm | 2 +- test/test-key.scm | 2 +- test/test-lazy-load.scm | 2 +- test/test-plugin.scm | 2 +- test/test-uim-test-utils.scm | 2 +- test/test-uim-util.scm | 2 +- test/test-ustr.scm | 2 +- test/test-util.scm | 2 +- test/uim-test-utils.scm | 2 +- uim/agent.c | 2 +- uim/anthy-utf8.c | 2 +- uim/anthy.c | 2 +- uim/bsdlook.h | 2 +- uim/canna.c | 2 +- uim/counted-init.c | 2 +- uim/counted-init.h | 2 +- uim/editline.c | 2 +- uim/encoding-table.c | 2 +- uim/iconv.c | 2 +- uim/intl.c | 2 +- uim/look.c | 2 +- uim/m17nlib.c | 2 +- uim/mana.c | 2 +- uim/plugin.c | 2 +- uim/plugin.h | 2 +- uim/prime.c | 2 +- uim/rk.c | 2 +- uim/scim.cpp | 2 +- uim/sj3.c | 2 +- uim/skk.c | 2 +- uim/spellcheck.c | 2 +- uim/test-gc.c | 2 +- uim/uim-custom-enabler.c | 2 +- uim/uim-custom.c | 2 +- uim/uim-custom.h | 2 +- uim/uim-error.c | 2 +- uim/uim-func.c | 2 +- uim/uim-helper-client.c | 2 +- uim/uim-helper-server.c | 2 +- uim/uim-helper.c | 2 +- uim/uim-helper.h | 2 +- uim/uim-im-switcher.h | 2 +- uim/uim-internal.h | 2 +- uim/uim-ipc.c | 2 +- uim/uim-key.c | 2 +- uim/uim-module-manager.c | 2 +- uim/uim-notify.c | 2 +- uim/uim-notify.h | 2 +- uim/uim-posix.c | 2 +- uim/uim-posix.h | 2 +- uim/uim-scm-abbrev.h | 2 +- uim/uim-scm-sigscheme.c | 2 +- uim/uim-scm.h | 2 +- uim/uim-sh.c | 2 +- uim/uim-util.c | 2 +- uim/uim-util.h | 2 +- uim/uim-x-kana-input-hack.c | 2 +- uim/uim-x-util.h | 2 +- uim/uim.c | 2 +- uim/uim.h | 2 +- uim/wnnlib.c | 2 +- uim/wnnlib.h | 2 +- xim/canddisp.cpp | 2 +- xim/canddisp.h | 2 +- xim/compose.cpp | 2 +- xim/compose.h | 2 +- xim/connection.cpp | 2 +- xim/connection.h | 2 +- xim/convdisp.cpp | 2 +- xim/convdisp.h | 2 +- xim/helper.cpp | 2 +- xim/helper.h | 2 +- xim/locale.cpp | 2 +- xim/main.cpp | 2 +- xim/util.cpp | 2 +- xim/util.h | 2 +- xim/xdispatch.h | 2 +- xim/xim.h | 2 +- xim/ximic.cpp | 2 +- xim/ximim.cpp | 2 +- xim/ximpacket.cpp | 2 +- xim/ximpn.h | 2 +- xim/ximserver.cpp | 2 +- xim/ximserver.h | 2 +- xim/ximtrans.cpp | 2 +- 375 files changed, 384 insertions(+), 384 deletions(-) diff --git a/COPYING b/COPYING index b652fc52a..096d72ab9 100644 --- a/COPYING +++ b/COPYING @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------ - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/COPYING b/emacs/COPYING index f4dcd51b3..b32605548 100644 --- a/emacs/COPYING +++ b/emacs/COPYING @@ -1,6 +1,6 @@ uim.el - Emacs uim bridge -Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ +Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/README b/emacs/README index 7c9273ece..7a1d036e3 100644 --- a/emacs/README +++ b/emacs/README @@ -1,6 +1,6 @@ uim.el - Emacs uim bridge -Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ +Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/README.ja b/emacs/README.ja index f8c4206b3..d198fb283 100644 --- a/emacs/README.ja +++ b/emacs/README.ja @@ -1,6 +1,6 @@ uim.el - Emacs uim bridge -Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ +Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/callback.c b/emacs/callback.c index e5cb5b2dc..13aacbbdf 100644 --- a/emacs/callback.c +++ b/emacs/callback.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/callback.h b/emacs/callback.h index 1511e9319..2dafcaf1b 100644 --- a/emacs/callback.h +++ b/emacs/callback.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/candidate.c b/emacs/candidate.c index 695164373..16295327f 100644 --- a/emacs/candidate.c +++ b/emacs/candidate.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/candidate.h b/emacs/candidate.h index 654b4ba68..1de8136cd 100644 --- a/emacs/candidate.h +++ b/emacs/candidate.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/commit.c b/emacs/commit.c index ef9405f7a..439a2e234 100644 --- a/emacs/commit.c +++ b/emacs/commit.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/commit.h b/emacs/commit.h index 405bf579b..a7d2e7a86 100644 --- a/emacs/commit.h +++ b/emacs/commit.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/context.c b/emacs/context.c index 8051bf11b..408bc0ed8 100644 --- a/emacs/context.c +++ b/emacs/context.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/context.h b/emacs/context.h index e9f2d2bc8..0e4ee6f54 100644 --- a/emacs/context.h +++ b/emacs/context.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/debug.c b/emacs/debug.c index 691b6a331..b833e4739 100644 --- a/emacs/debug.c +++ b/emacs/debug.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/debug.h b/emacs/debug.h index c9602a561..fd9eb48c1 100644 --- a/emacs/debug.h +++ b/emacs/debug.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/encoding.c b/emacs/encoding.c index 3a9c3c615..5d773e7b8 100644 --- a/emacs/encoding.c +++ b/emacs/encoding.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/encoding.h b/emacs/encoding.h index 2fc825dfc..93146a0ba 100644 --- a/emacs/encoding.h +++ b/emacs/encoding.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/helper-message.c b/emacs/helper-message.c index 46e31787d..bb01951f5 100644 --- a/emacs/helper-message.c +++ b/emacs/helper-message.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2006-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2006-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/helper-message.h b/emacs/helper-message.h index 54504c83a..3a20a5a7d 100644 --- a/emacs/helper-message.h +++ b/emacs/helper-message.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2006-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2006-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/helper-server.c b/emacs/helper-server.c index f009619cc..c15ce6a28 100644 --- a/emacs/helper-server.c +++ b/emacs/helper-server.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/helper-server.h b/emacs/helper-server.h index e7789033b..64224fe0a 100644 --- a/emacs/helper-server.h +++ b/emacs/helper-server.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/helper.c b/emacs/helper.c index 4d8c3a421..b0f29f65b 100644 --- a/emacs/helper.c +++ b/emacs/helper.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/helper.h b/emacs/helper.h index aa381dfdb..bb97c1734 100644 --- a/emacs/helper.h +++ b/emacs/helper.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/im.c b/emacs/im.c index effbc9427..87bfed76a 100644 --- a/emacs/im.c +++ b/emacs/im.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/im.h b/emacs/im.h index bef5a440b..21b074e2b 100644 --- a/emacs/im.h +++ b/emacs/im.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/key.c b/emacs/key.c index cd1307e39..4386c6f2b 100644 --- a/emacs/key.c +++ b/emacs/key.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/key.h b/emacs/key.h index 8587a94f2..8f075706d 100644 --- a/emacs/key.h +++ b/emacs/key.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/output.c b/emacs/output.c index 1f79698df..b23387660 100644 --- a/emacs/output.c +++ b/emacs/output.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/output.h b/emacs/output.h index 1eb014afb..ddfb80cf7 100644 --- a/emacs/output.h +++ b/emacs/output.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/preedit.c b/emacs/preedit.c index 3cacb9422..7ceff01dc 100644 --- a/emacs/preedit.c +++ b/emacs/preedit.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/preedit.h b/emacs/preedit.h index 1d4efb0dc..bcf03b4a9 100644 --- a/emacs/preedit.h +++ b/emacs/preedit.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/prop.c b/emacs/prop.c index d43bec90f..8af34f052 100644 --- a/emacs/prop.c +++ b/emacs/prop.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/prop.h b/emacs/prop.h index 3e31993d3..d0d80b428 100644 --- a/emacs/prop.h +++ b/emacs/prop.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/uim-candidate.el b/emacs/uim-candidate.el index 0921a3810..d306a830f 100644 --- a/emacs/uim-candidate.el +++ b/emacs/uim-candidate.el @@ -1,5 +1,5 @@ ;; -;; Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ +;; Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ ;; ;; All rights reserved. ;; diff --git a/emacs/uim-debug.el b/emacs/uim-debug.el index e7ec3d5d6..74f56f9a1 100644 --- a/emacs/uim-debug.el +++ b/emacs/uim-debug.el @@ -1,5 +1,5 @@ ;; -;; Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ +;; Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ ;; ;; All rights reserved. ;; diff --git a/emacs/uim-el-agent.c b/emacs/uim-el-agent.c index ad7e06aa5..d03a1e803 100644 --- a/emacs/uim-el-agent.c +++ b/emacs/uim-el-agent.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/uim-el-agent.h b/emacs/uim-el-agent.h index 5c1f42f7e..b70cc8c84 100644 --- a/emacs/uim-el-agent.h +++ b/emacs/uim-el-agent.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/uim-el-helper-agent.c b/emacs/uim-el-helper-agent.c index 3e9dbaea2..9543a1940 100644 --- a/emacs/uim-el-helper-agent.c +++ b/emacs/uim-el-helper-agent.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2006-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2006-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/uim-el-helper-agent.h b/emacs/uim-el-helper-agent.h index 3b1547785..6848e996c 100644 --- a/emacs/uim-el-helper-agent.h +++ b/emacs/uim-el-helper-agent.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2006-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2006-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/uim-el-types.h b/emacs/uim-el-types.h index 5983c5af5..7144771ee 100644 --- a/emacs/uim-el-types.h +++ b/emacs/uim-el-types.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2006-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2006-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/emacs/uim-helper.el b/emacs/uim-helper.el index 7371a4983..feda486ab 100644 --- a/emacs/uim-helper.el +++ b/emacs/uim-helper.el @@ -1,5 +1,5 @@ ;; -;; Copyright (c) 2006-2008 uim Project http://code.google.com/p/uim/ +;; Copyright (c) 2006-2009 uim Project http://code.google.com/p/uim/ ;; ;; All rights reserved. ;; diff --git a/emacs/uim-key.el b/emacs/uim-key.el index 63640196c..1bd406929 100644 --- a/emacs/uim-key.el +++ b/emacs/uim-key.el @@ -1,5 +1,5 @@ ;; -;; Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ +;; Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ ;; ;; All rights reserved. ;; diff --git a/emacs/uim-keymap.el b/emacs/uim-keymap.el index a7a13259f..1a053da66 100644 --- a/emacs/uim-keymap.el +++ b/emacs/uim-keymap.el @@ -1,5 +1,5 @@ ;; -;; Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ +;; Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ ;; ;; All rights reserved. ;; diff --git a/emacs/uim-leim.el b/emacs/uim-leim.el index fa15527c2..02f5f7bd8 100644 --- a/emacs/uim-leim.el +++ b/emacs/uim-leim.el @@ -1,5 +1,5 @@ ;; -;; Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ +;; Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ ;; ;; All rights reserved. ;; diff --git a/emacs/uim-preedit.el b/emacs/uim-preedit.el index 8d3f6692d..c25a9da91 100644 --- a/emacs/uim-preedit.el +++ b/emacs/uim-preedit.el @@ -1,5 +1,5 @@ ;; -;; Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ +;; Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ ;; ;; All rights reserved. ;; diff --git a/emacs/uim-util.el b/emacs/uim-util.el index 7059f852d..aec063a85 100644 --- a/emacs/uim-util.el +++ b/emacs/uim-util.el @@ -1,5 +1,5 @@ ;; -;; Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ +;; Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ ;; ;; All rights reserved. ;; diff --git a/emacs/uim-var.el b/emacs/uim-var.el index 072a94804..0902a6fd2 100644 --- a/emacs/uim-var.el +++ b/emacs/uim-var.el @@ -1,5 +1,5 @@ ;; -;; Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ +;; Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ ;; ;; All rights reserved. ;; diff --git a/emacs/uim-version.el.in b/emacs/uim-version.el.in index fbf39178e..5a308d20e 100644 --- a/emacs/uim-version.el.in +++ b/emacs/uim-version.el.in @@ -1,5 +1,5 @@ ;; -;; Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ +;; Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ ;; ;; All rights reserved. ;; diff --git a/emacs/uim.el b/emacs/uim.el index 24326bd38..1894598ce 100644 --- a/emacs/uim.el +++ b/emacs/uim.el @@ -1,5 +1,5 @@ ;; -;; Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ +;; Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ ;; ;; All rights reserved. ;; diff --git a/examples/uim-custom/uim-custom-dump.c b/examples/uim-custom/uim-custom-dump.c index dc7011ffe..9a4f47e28 100644 --- a/examples/uim-custom/uim-custom-dump.c +++ b/examples/uim-custom/uim-custom-dump.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/examples/uim-custom/uim-custom-update.c b/examples/uim-custom/uim-custom-update.c index 9c86d470b..93c769cfc 100644 --- a/examples/uim-custom/uim-custom-update.c +++ b/examples/uim-custom/uim-custom-update.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/examples/uim-custom/uim-custom-variable.c b/examples/uim-custom/uim-custom-variable.c index 2956cd2a2..649f98c4b 100644 --- a/examples/uim-custom/uim-custom-variable.c +++ b/examples/uim-custom/uim-custom-variable.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/fep/COPYING b/fep/COPYING index 3c16348b2..a7ac88772 100644 --- a/fep/COPYING +++ b/fep/COPYING @@ -1,4 +1,4 @@ - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/fep/callbacks.c b/fep/callbacks.c index 78e34d080..7f180c9d6 100644 --- a/fep/callbacks.c +++ b/fep/callbacks.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/fep/callbacks.h b/fep/callbacks.h index ff4f99196..600b2fb30 100644 --- a/fep/callbacks.h +++ b/fep/callbacks.h @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/fep/draw.c b/fep/draw.c index 3a6561a05..6f99cb0ce 100644 --- a/fep/draw.c +++ b/fep/draw.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/fep/draw.h b/fep/draw.h index e3c8d45bb..8de71e5af 100644 --- a/fep/draw.h +++ b/fep/draw.h @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/fep/escseq.c b/fep/escseq.c index b006cdef1..adc0754b9 100644 --- a/fep/escseq.c +++ b/fep/escseq.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/fep/escseq.h b/fep/escseq.h index 7565e9117..78d3f4a1f 100644 --- a/fep/escseq.h +++ b/fep/escseq.h @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/fep/helper.c b/fep/helper.c index 1497953f2..df3b18a4d 100644 --- a/fep/helper.c +++ b/fep/helper.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/fep/helper.h b/fep/helper.h index 4766bfccd..0c340c7e8 100644 --- a/fep/helper.h +++ b/fep/helper.h @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/fep/key.c b/fep/key.c index 4e87a8018..90f4e789c 100644 --- a/fep/key.c +++ b/fep/key.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/fep/key.h b/fep/key.h index 35638fe58..8544bc475 100644 --- a/fep/key.h +++ b/fep/key.h @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/fep/read.c b/fep/read.c index 7a5d41b57..a724dfa51 100644 --- a/fep/read.c +++ b/fep/read.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/fep/read.h b/fep/read.h index b49af766f..ebc03e055 100644 --- a/fep/read.h +++ b/fep/read.h @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/fep/str.c b/fep/str.c index 1d85b64f6..d20d8522d 100644 --- a/fep/str.c +++ b/fep/str.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/fep/str.h b/fep/str.h index dfa48c296..ed3ef5013 100644 --- a/fep/str.h +++ b/fep/str.h @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/fep/udsock.c b/fep/udsock.c index adba5a8cf..1f4b35a99 100644 --- a/fep/udsock.c +++ b/fep/udsock.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/fep/udsock.h b/fep/udsock.h index ea5862b4b..9fd96ad4e 100644 --- a/fep/udsock.h +++ b/fep/udsock.h @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/fep/uim-fep-tick.c b/fep/uim-fep-tick.c index 95a5a70d6..266ffa0b6 100644 --- a/fep/uim-fep-tick.c +++ b/fep/uim-fep-tick.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/fep/uim-fep.c b/fep/uim-fep.c index fcd28a8c5..0e556707b 100644 --- a/fep/uim-fep.c +++ b/fep/uim-fep.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/fep/uim-fep.h b/fep/uim-fep.h index 8aebc40fd..e62a747e2 100644 --- a/fep/uim-fep.h +++ b/fep/uim-fep.h @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/gtk/caret-state-indicator.c b/gtk/caret-state-indicator.c index 330833d01..819228679 100644 --- a/gtk/caret-state-indicator.c +++ b/gtk/caret-state-indicator.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/gtk/caret-state-indicator.h b/gtk/caret-state-indicator.h index 5d04f3186..efc0b3e3a 100644 --- a/gtk/caret-state-indicator.h +++ b/gtk/caret-state-indicator.h @@ -1,6 +1,6 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/gtk/compose.c b/gtk/compose.c index 568453281..f8860ffa9 100644 --- a/gtk/compose.c +++ b/gtk/compose.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/gtk/compose.h b/gtk/compose.h index 9e235b1f4..5500b2124 100644 --- a/gtk/compose.h +++ b/gtk/compose.h @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/gtk/gtk-im-uim.c b/gtk/gtk-im-uim.c index 7aebbd811..2f0953ff7 100644 --- a/gtk/gtk-im-uim.c +++ b/gtk/gtk-im-uim.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/gtk/gtk-im-uim.h b/gtk/gtk-im-uim.h index 531a5f168..d5e84f008 100644 --- a/gtk/gtk-im-uim.h +++ b/gtk/gtk-im-uim.h @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/gtk/gtk-rc-get-immodule-file.c b/gtk/gtk-rc-get-immodule-file.c index 69588cdff..9060af4f3 100644 --- a/gtk/gtk-rc-get-immodule-file.c +++ b/gtk/gtk-rc-get-immodule-file.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2007-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2007-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/gtk/key-util-gtk.c b/gtk/key-util-gtk.c index 4d364099d..e2a8f5124 100644 --- a/gtk/key-util-gtk.c +++ b/gtk/key-util-gtk.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/gtk/key-util-gtk.h b/gtk/key-util-gtk.h index 2e392f5ab..4e3fb804f 100644 --- a/gtk/key-util-gtk.h +++ b/gtk/key-util-gtk.h @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/gtk/test/entry.c b/gtk/test/entry.c index 4305fcee4..d68876289 100644 --- a/gtk/test/entry.c +++ b/gtk/test/entry.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/gtk/text-util.c b/gtk/text-util.c index 3abff1a50..0070f12f3 100644 --- a/gtk/text-util.c +++ b/gtk/text-util.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2006-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2006-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/gtk/text-util.h b/gtk/text-util.h index 0f02c1b16..183037013 100644 --- a/gtk/text-util.h +++ b/gtk/text-util.h @@ -1,6 +1,6 @@ /* - Copyright (c) 2006-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2006-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/gtk/uim-cand-win-gtk.c b/gtk/uim-cand-win-gtk.c index b576b20da..188bf0374 100644 --- a/gtk/uim-cand-win-gtk.c +++ b/gtk/uim-cand-win-gtk.c @@ -1,6 +1,6 @@ /* - copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/gtk/uim-cand-win-gtk.h b/gtk/uim-cand-win-gtk.h index 6877f5305..e13223ba2 100644 --- a/gtk/uim-cand-win-gtk.h +++ b/gtk/uim-cand-win-gtk.h @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/gtk/uim-eb.c b/gtk/uim-eb.c index 927931ce7..72dfa79f1 100644 --- a/gtk/uim-eb.c +++ b/gtk/uim-eb.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/gtk/uim-eb.h b/gtk/uim-eb.h index b02631a94..0429a3dc3 100644 --- a/gtk/uim-eb.h +++ b/gtk/uim-eb.h @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/helper/candwin-gtk.c b/helper/candwin-gtk.c index 8b7f7690e..7a11ba314 100644 --- a/helper/candwin-gtk.c +++ b/helper/candwin-gtk.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/helper/dict-anthy.c b/helper/dict-anthy.c index 7f7fa7941..bfd0ab588 100644 --- a/helper/dict-anthy.c +++ b/helper/dict-anthy.c @@ -1,7 +1,7 @@ /* * $Id:$ * Copyright (c) 2003,2004 Masahito Omote - * 2005-2008 uim Project http://code.google.com/p/uim/ + * 2005-2009 uim Project http://code.google.com/p/uim/ * * All rights reserved. * diff --git a/helper/dict-anthy.h b/helper/dict-anthy.h index e43b2168a..0373605df 100644 --- a/helper/dict-anthy.h +++ b/helper/dict-anthy.h @@ -1,7 +1,7 @@ /* * $Id:$ * Copyright (c) 2003,2004 Masahito Omote - * 2005-2008 uim Project http://code.google.com/p/uim/ + * 2005-2009 uim Project http://code.google.com/p/uim/ * * All rights reserved. * diff --git a/helper/dict-canna-cclass.c b/helper/dict-canna-cclass.c index f88f6926b..3b0d6bf64 100644 --- a/helper/dict-canna-cclass.c +++ b/helper/dict-canna-cclass.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2003,2004 Masahito Omote - * 2005-2008 uim Project http://code.google.com/p/uim/ + * 2005-2009 uim Project http://code.google.com/p/uim/ * * All rights reserved. * diff --git a/helper/dict-canna-cclass.h b/helper/dict-canna-cclass.h index 95aea8ef4..54624c8cb 100644 --- a/helper/dict-canna-cclass.h +++ b/helper/dict-canna-cclass.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2003,2004 Masahito Omote - * 2005-2008 uim Project http://code.google.com/p/uim/ + * 2005-2009 uim Project http://code.google.com/p/uim/ * * All rights reserved. * diff --git a/helper/dict-canna.c b/helper/dict-canna.c index fa4b259e5..c11e33947 100644 --- a/helper/dict-canna.c +++ b/helper/dict-canna.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2008 uim Project http://code.google.com/p/uim/ + * Copyright (c) 2006-2009 uim Project http://code.google.com/p/uim/ * * All rights reserved. * diff --git a/helper/dict-canna.h b/helper/dict-canna.h index 106c4102e..e4454263b 100644 --- a/helper/dict-canna.h +++ b/helper/dict-canna.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2008 uim Project http://code.google.com/p/uim/ + * Copyright (c) 2006-2009 uim Project http://code.google.com/p/uim/ * * All rights reserved. * diff --git a/helper/dict-cclass-dialog.c b/helper/dict-cclass-dialog.c index 1df473206..8b38f5968 100644 --- a/helper/dict-cclass-dialog.c +++ b/helper/dict-cclass-dialog.c @@ -1,7 +1,7 @@ /* * $Id:$ * Copyright (c) 2003,2004 Masahito Omote - * 2005-2008 uim Project http://code.google.com/p/uim/ + * 2005-2009 uim Project http://code.google.com/p/uim/ * * All rights reserved. * diff --git a/helper/dict-cclass-dialog.h b/helper/dict-cclass-dialog.h index 4c4e04d56..384c88b8f 100644 --- a/helper/dict-cclass-dialog.h +++ b/helper/dict-cclass-dialog.h @@ -1,7 +1,7 @@ /* * $Id:$ * Copyright (c) 2003,2004 Masahito Omote - * 2005-2008 uim Project http://code.google.com/p/uim/ + * 2005-2009 uim Project http://code.google.com/p/uim/ * * All rights reserved. * diff --git a/helper/dict-dict.c b/helper/dict-dict.c index fa24a1a69..cfe6611b3 100644 --- a/helper/dict-dict.c +++ b/helper/dict-dict.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2004-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2004-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/helper/dict-dict.h b/helper/dict-dict.h index 9fa6e1639..149cddbf5 100644 --- a/helper/dict-dict.h +++ b/helper/dict-dict.h @@ -1,6 +1,6 @@ /* - Copyright (c) 2004-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2004-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/helper/dict-main-gtk.c b/helper/dict-main-gtk.c index 56a3ad705..17b5f7034 100644 --- a/helper/dict-main-gtk.c +++ b/helper/dict-main-gtk.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2004-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2004-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/helper/dict-util.c b/helper/dict-util.c index f2bd9e9b6..a56a00a61 100644 --- a/helper/dict-util.c +++ b/helper/dict-util.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2004-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2004-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/helper/dict-util.h b/helper/dict-util.h index bcce24a30..4923b3a34 100644 --- a/helper/dict-util.h +++ b/helper/dict-util.h @@ -1,6 +1,6 @@ /* - Copyright (c) 2004-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2004-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/helper/dict-word-list-view-gtk.c b/helper/dict-word-list-view-gtk.c index 338238d0d..2368fe63d 100644 --- a/helper/dict-word-list-view-gtk.c +++ b/helper/dict-word-list-view-gtk.c @@ -1,7 +1,7 @@ /* * $Id:$ * Copyright (c) 2003,2004 Masahito Omote - * 2005-2008 uim Project http://code.google.com/p/uim/ + * 2005-2009 uim Project http://code.google.com/p/uim/ * * All rights reserved. * diff --git a/helper/dict-word-list-view-gtk.h b/helper/dict-word-list-view-gtk.h index 340665c86..5fc23fe5b 100644 --- a/helper/dict-word-list-view-gtk.h +++ b/helper/dict-word-list-view-gtk.h @@ -1,7 +1,7 @@ /* * $Id:$ * Copyright (c) 2003,2004 Masahito Omote - * 2005-2008 uim Project http://code.google.com/p/uim/ + * 2005-2009 uim Project http://code.google.com/p/uim/ * * All rights reserved. * diff --git a/helper/dict-word-list-win-gtk.c b/helper/dict-word-list-win-gtk.c index 8a1aa50d0..0ce91e689 100644 --- a/helper/dict-word-list-win-gtk.c +++ b/helper/dict-word-list-win-gtk.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2004-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2004-2009 uim Project http://code.google.com/p/uim/ All rights reserved. @@ -582,7 +582,7 @@ help_about_action_cb(GtkAction *action, WordListWindow *window) }; const gchar *copyright = N_( "Copyright (C) 2003-2004 Masahito Omote\n" - "Copyright (C) 2004-2008 uim Project\n" + "Copyright (C) 2004-2009 uim Project\n" "All rights reserved."); transparent = NULL; @@ -606,7 +606,7 @@ help_about_action_cb(GtkAction *action, WordListWindow *window) GtkWidget *about_dialog, *label1; const gchar *copyright = N_( "Copyright 2003-2004 Masahito Omote <omote@utyuuzin.net>\n" - "Copyright 2004-2008 uim Project http://code.google.com/p/uim/\n" + "Copyright 2004-2009 uim Project http://code.google.com/p/uim/\n" "All rights reserved."); gchar *about_name = g_strdup_printf("%s %s \n\n%s \n", _(name), VERSION, _(copyright)); diff --git a/helper/dict-word-list-win-gtk.h b/helper/dict-word-list-win-gtk.h index 9b465db27..92d5761f5 100644 --- a/helper/dict-word-list-win-gtk.h +++ b/helper/dict-word-list-win-gtk.h @@ -1,6 +1,6 @@ /* - Copyright (c) 2004-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2004-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/helper/dict-word-win-gtk.c b/helper/dict-word-win-gtk.c index 98cb0fd7b..23c58c71c 100644 --- a/helper/dict-word-win-gtk.c +++ b/helper/dict-word-win-gtk.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2004-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2004-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/helper/dict-word-win-gtk.h b/helper/dict-word-win-gtk.h index ebe2a6c32..ee1539dac 100644 --- a/helper/dict-word-win-gtk.h +++ b/helper/dict-word-win-gtk.h @@ -1,6 +1,6 @@ /* - Copyright (c) 2004-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2004-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/helper/dict-word.c b/helper/dict-word.c index 23c75dc28..c9e66c3a5 100644 --- a/helper/dict-word.c +++ b/helper/dict-word.c @@ -1,7 +1,7 @@ /* * $Id:$ * Copyright (c) 2003,2004 Masahito Omote - * 2005-2008 uim Project http://code.google.com/p/uim/ + * 2005-2009 uim Project http://code.google.com/p/uim/ * * All rights reserved. * diff --git a/helper/dict-word.h b/helper/dict-word.h index 3afb5a7ec..6769e017c 100644 --- a/helper/dict-word.h +++ b/helper/dict-word.h @@ -1,7 +1,7 @@ /* * $Id:$ * Copyright (c) 2003,2004 Masahito Omote - * 2005-2008 uim Project http://code.google.com/p/uim/ + * 2005-2009 uim Project http://code.google.com/p/uim/ * * All rights reserved. * diff --git a/helper/im-switcher-gtk.c b/helper/im-switcher-gtk.c index dc6a97add..c9f71440a 100644 --- a/helper/im-switcher-gtk.c +++ b/helper/im-switcher-gtk.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2004-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2004-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/helper/input-pad-ja.c b/helper/input-pad-ja.c index c1f5576d3..86612398e 100644 --- a/helper/input-pad-ja.c +++ b/helper/input-pad-ja.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2004-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2004-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/helper/pref-gtk-custom-widgets.c b/helper/pref-gtk-custom-widgets.c index f18b05abd..0f8a2ef30 100644 --- a/helper/pref-gtk-custom-widgets.c +++ b/helper/pref-gtk-custom-widgets.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/helper/pref-gtk-custom-widgets.h b/helper/pref-gtk-custom-widgets.h index 0744d241a..41ac8b5a7 100644 --- a/helper/pref-gtk-custom-widgets.h +++ b/helper/pref-gtk-custom-widgets.h @@ -1,6 +1,6 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/helper/pref-gtk-keytab.h b/helper/pref-gtk-keytab.h index d40b51915..1d193856b 100644 --- a/helper/pref-gtk-keytab.h +++ b/helper/pref-gtk-keytab.h @@ -1,6 +1,6 @@ /* - Copyright (c) 2006-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2006-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/helper/pref-gtk.c b/helper/pref-gtk.c index 04296242b..081aa0fcf 100644 --- a/helper/pref-gtk.c +++ b/helper/pref-gtk.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2005-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/helper/toolbar-applet-gnome.c b/helper/toolbar-applet-gnome.c index b2cc30a4c..4b923901e 100644 --- a/helper/toolbar-applet-gnome.c +++ b/helper/toolbar-applet-gnome.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. @@ -162,7 +162,7 @@ display_about_dialog(BonoboUIComponent *uic, gpointer data, icon = gdk_pixbuf_new_from_file(UIM_PIXMAPSDIR "/uim-icon.png", NULL); dialog = gnome_about_new(_("uim Applet"), VERSION, - "Copyright \xc2\xa9 2003-2008 uim Project.", + "Copyright \xc2\xa9 2003-2009 uim Project.", _("Applet for indicating uim's status"), authors, NULL, diff --git a/helper/toolbar-common-gtk.c b/helper/toolbar-common-gtk.c index 837cc9d26..e2c32cf8f 100644 --- a/helper/toolbar-common-gtk.c +++ b/helper/toolbar-common-gtk.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/helper/toolbar-standalone-gtk.c b/helper/toolbar-standalone-gtk.c index 23675563b..ac02592c8 100644 --- a/helper/toolbar-standalone-gtk.c +++ b/helper/toolbar-standalone-gtk.c @@ -2,7 +2,7 @@ toolbar-standalone-gtk.c: toolbar implementation with GTK+ - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/helper/toolbar-systray-gtk.c b/helper/toolbar-systray-gtk.c index ba6b3e6cf..b83928d00 100644 --- a/helper/toolbar-systray-gtk.c +++ b/helper/toolbar-systray-gtk.c @@ -1,6 +1,6 @@ /* - Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/ + Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/ All rights reserved. diff --git a/helper/uim-dict-ui.xml.in b/helper/uim-dict-ui.xml.in index 53f2c2ee5..6411f51b2 100644 --- a/helper/uim-dict-ui.xml.in +++ b/helper/uim-dict-ui.xml.in @@ -1,6 +1,6 @@