Revision: 6497
Author: deton.kih
Date: Sun Jul 11 02:47:57 2010
Log: * scm/tutcode-key-custom.scm
- (tutcode-stroke-help-toggle-key): New
* scm/tutcode.scm
- (tutcode-toggle-stroke-help): New function to temporarily toggle
use of stroke help window
- (tutcode-proc-state-on, tutcode-proc-state-yomi,
tutcode-proc-state-bushu): Add check of tutcode-stroke-help-toggle-key
http://code.google.com/p/uim/source/detail?r=6497
Modified:
/trunk/scm/tutcode-key-custom.scm
/trunk/scm/tutcode.scm
=======================================
--- /trunk/scm/tutcode-key-custom.scm Sun Apr 4 20:35:54 2010
+++ /trunk/scm/tutcode-key-custom.scm Sun Jul 11 02:47:57 2010
@@ -77,6 +77,12 @@
(N_ "[TUT-Code] bushu conversion mode")
(N_ "long description will be here"))
+(define-custom 'tutcode-stroke-help-toggle-key '("<Control>/")
+ '(tutcode-keys1)
+ '(key)
+ (N_ "[TUT-Code] toggle use of stroke help window")
+ (N_ "long description will be here"))
+
(define-custom 'tutcode-begin-conv-key '(generic-begin-conv-key)
'(tutcode-keys1)
'(key)
=======================================
--- /trunk/scm/tutcode.scm Sun Jul 4 02:58:30 2010
+++ /trunk/scm/tutcode.scm Sun Jul 11 02:47:57 2010
@@ -587,6 +587,19 @@
(im-activate-candidate-selector pc
(length stroke-help)
tutcode-nr-candidate-max-for-kigou-mode))))))
+;;; ²¾ÁÛ¸°ÈפÎɽ¼¨¤ò¹Ô¤¦¤«¤É¤¦¤«¤ÎÀßÄê¤ò°ì»þŪ¤ËÀÚ¤êÂØ¤¨¤ë(¥È¥°¥ë)¡£
+;;; (¾ï¤Ëɽ¼¨¤¹¤ë¤ÈÌܤ¶¤ï¤ê¤Ê¤Î¤Ç¡£ÂǤÁÊý¤Ë̤俤Ȥ¤À¤±É½¼¨¤·¤¿¤¤¡£
+;;; XXX: tc2¤À¤È¡¢°ìÄê»þ´Ö°ÊÆâ¤Ë¼¡¤ÎÂǸ°¤¬Ìµ¤«¤Ã¤¿¤é²¾ÁÛ¸°Èפò
+;;; ɽ¼¨¤¹¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤¬¡¢¸½¾õ¤Îuim¤ÇƱ¤¸¤³¤È¤ò¤¹¤ë¤Î¤ÏÆñ¤·¤½¤¦¡£)
+(define (tutcode-toggle-stroke-help pc)
+ (if tutcode-use-stroke-help-window?
+ (begin
+ (set! tutcode-use-stroke-help-window? #f)
+ (tutcode-reset-candidate-window pc))
+ (begin
+ (set! tutcode-use-stroke-help-window? #t)
+ (tutcode-check-stroke-help-window-begin pc))))
+
;;; Éô¼ó¹çÀ®ÊÑ´¹¡¦¸ò¤¼½ñ¤ÊÑ´¹¤Ç³ÎÄꤷ¤¿Ê¸»ú¤ÎÂǤÁÊý¤òɽ¼¨¤¹¤ë¡£
;;; ɽ·Á¼°¤Î¸õÊ䥦¥£¥ó¥É¥¦¤òÁÛÄꤷ¤Æ¡¢°Ê²¼¤Î¤è¤¦¤Ëɽ¼¨¤¹¤ë¡£
;;; 1¤¬Âè1ÂǸ°¡¢2¤¬Âè2ÂǸ°¡£¡Ö·È¡×
@@ -771,6 +784,8 @@
(if (> (length (rk-context-seq rkc)) 0)
(rk-flush rkc)
(im-commit-raw pc)))
+ ((tutcode-stroke-help-toggle-key? key key-state)
+ (tutcode-toggle-stroke-help pc))
((or
(symbol? key)
(and
@@ -889,6 +904,8 @@
(tutcode-flush pc))
((tutcode-cancel-key? key key-state)
(tutcode-flush pc))
+ ((tutcode-stroke-help-toggle-key? key key-state)
+ (tutcode-toggle-stroke-help pc))
((symbol? key)
(tutcode-flush pc)
(tutcode-proc-state-on pc key key-state))
@@ -973,6 +990,8 @@
(set! res #f)
(if (= (length (tutcode-context-head pc)) 0)
(tutcode-flush pc)))
+ ((tutcode-stroke-help-toggle-key? key key-state)
+ (tutcode-toggle-stroke-help pc))
((or
(symbol? key)
(and