[Anthy-dev 379] uim-anthyの入力モード切り換え修正

Back to archive index

YamaKen yamak****@bp*****
2004年 1月 8日 (木) 21:15:22 JST


ヤマケンです。

uim-anthyでuim_set_mode()を使った入力モード切り換えがうまく動か
ないので修正しました。パッチを添付します。

これに関連した質問なんですが、mode-listを使った入力モード切り換
えはpropertyで置き換えられてobsoleteになるんでしょうか? 最近2ch
のAnthy/uimスレでそのような情報を見たような気がするので。

-------------------------------
ヤマケン yamak****@bp*****
-------------- next part --------------
Index: scm/anthy.scm
===================================================================
--- scm/anthy.scm	(revision 330)
+++ scm/anthy.scm	(working copy)
@@ -258,9 +258,19 @@
     (let* ((c (find-context id))
 	   (ac (context-data c)))
       (anthy-flush ac)
-      (if (= mode 0)
-	  (anthy-context-set-on! ac #f)
-	  (anthy-context-set-on! ac #t))
+      (cond  ; `case' is not supported by uim's scheme interpreter (T_T)
+       ((= mode 0)  ; 'direct'
+        (anthy-context-set-on! ac #f)
+        (anthy-context-set-wide-latin! ac #f))
+       ((= mode 1)  ; 'hiragana'
+        (anthy-context-set-on! ac #t)
+        (anthy-context-set-kana-mode! ac #f))
+       ((= mode 2)  ; 'katakana'
+        (anthy-context-set-on! ac #t)
+        (anthy-context-set-kana-mode! ac #t))
+       ((= mode 3)  ; 'wide-latin'
+        (anthy-context-set-on! ac #f)
+        (anthy-context-set-wide-latin! ac #t)))
       (anthy-update-preedit ac id))
     ()))
 


Anthy-dev メーリングリストの案内
Back to archive index