[uim-commit] r1196 - trunk/scm
yamamoto at freedesktop.org
yamamoto at freedesktop.org
Sun Aug 14 16:44:01 EST 2005
Author: yamamoto
Date: 2005-08-13 23:43:59 -0700 (Sat, 13 Aug 2005)
New Revision: 1196
Modified:
trunk/scm/anthy-key-custom.scm
trunk/scm/anthy.scm
Log:
* scm/anthy.scm:
add hiragana preedit-transposing
(anthy-proc-transposing-state): unset commit-raw flag to update preedit
* scm/anthy-key-custom.scm: add anthy-transpose-as-hiragana-key
Modified: trunk/scm/anthy-key-custom.scm
===================================================================
--- trunk/scm/anthy-key-custom.scm 2005-08-13 08:37:43 UTC (rev 1195)
+++ trunk/scm/anthy-key-custom.scm 2005-08-14 06:43:59 UTC (rev 1196)
@@ -93,6 +93,12 @@
(_ "[Anthy] convert to halfwidth katakana")
(_ "long description will be here"))
+(define-custom 'anthy-transpose-as-hiragana-key '("F6")
+ '(anthy-keys1)
+ '(key)
+ (_ "[Anthy] convert to hiragana")
+ (_ "long description will be here"))
+
(define-custom 'anthy-commit-as-opposite-kana-key '()
'(anthy-keys1)
'(key)
Modified: trunk/scm/anthy.scm
===================================================================
--- trunk/scm/anthy.scm 2005-08-13 08:37:43 UTC (rev 1195)
+++ trunk/scm/anthy.scm 2005-08-14 06:43:59 UTC (rev 1196)
@@ -476,6 +476,9 @@
(define anthy-proc-transposing-state
(lambda (ac key key-state)
(cond
+ ((anthy-transpose-as-hiragana-key? key key-state)
+ (anthy-context-set-transposing-type! ac anthy-type-hiragana))
+
((anthy-transpose-as-katakana-key? key key-state)
(anthy-context-set-transposing-type! ac anthy-type-katakana))
@@ -496,7 +499,8 @@
(if (not (anthy-commit-key? key key-state))
(begin
(anthy-context-set-transposing! ac #f)
- (anthy-proc-input-state ac key key-state))))))))
+ (anthy-proc-input-state ac key key-state)
+ (anthy-context-set-commit-raw! ac #f))))))))
(define anthy-proc-input-state-with-preedit
(lambda (ac key key-state)
@@ -544,7 +548,8 @@
(anthy-flush ac)))
;; Transposing¾õÂ֤ذܹÔ
- ((or (anthy-transpose-as-katakana-key? key key-state)
+ ((or (anthy-transpose-as-hiragana-key? key key-state)
+ (anthy-transpose-as-katakana-key? key key-state)
(anthy-transpose-as-hankana-key? key key-state)
(anthy-transpose-as-latin-key? key key-state)
(anthy-transpose-as-wide-latin-key? key key-state))
@@ -669,6 +674,9 @@
(lambda (ac)
(let* ((transposing-type (anthy-context-transposing-type ac)))
(cond
+ ((= transposing-type anthy-type-hiragana)
+ (anthy-make-whole-string ac #t multi-segment-type-hiragana))
+
((= transposing-type anthy-type-katakana)
(anthy-make-whole-string ac #t multi-segment-type-katakana))
More information about the uim-commit
mailing list