[uim-commit] r1280 - trunk/scm

yamamoto at freedesktop.org yamamoto at freedesktop.org
Mon Aug 22 05:39:29 PDT 2005


Author: yamamoto
Date: 2005-08-22 05:39:24 -0700 (Mon, 22 Aug 2005)
New Revision: 1280

Modified:
   trunk/scm/anthy.scm
   trunk/scm/canna.scm
   trunk/scm/skk.scm
Log:
* scm/canna.scm
  (canna-reset-handler) : Clear preedit and call canna-flush.
  (canna-flush) : Deactive candidate selector.

* scm/anthy.scm (anthy-reset-handler) : Clear preedit.

* scm/skk.scm (skk-reset-handler) : Clear preedit.


Modified: trunk/scm/anthy.scm
===================================================================
--- trunk/scm/anthy.scm	2005-08-22 11:16:25 UTC (rev 1279)
+++ trunk/scm/anthy.scm	2005-08-22 12:39:24 UTC (rev 1280)
@@ -975,7 +975,10 @@
 (define anthy-reset-handler
   (lambda (ac)
     (if (anthy-context-on ac)
-	(anthy-flush ac))
+        (begin
+          (anthy-flush ac)
+          (im-clear-preedit ac)
+          (im-update-preedit ac)))
     ;; code to commit pending string must not be added to here.
     ;; -- YamaKen 2004-10-21
     ))

Modified: trunk/scm/canna.scm
===================================================================
--- trunk/scm/canna.scm	2005-08-22 11:16:25 UTC (rev 1279)
+++ trunk/scm/canna.scm	2005-08-22 12:39:24 UTC (rev 1280)
@@ -249,6 +249,8 @@
   (canna-context-set-state! cc #f)
   (canna-context-set-index-list! cc ())
   (canna-context-set-transposing! cc #f)
+  (if (canna-context-candidate-window cc)
+        (im-deactivate-candidate-selector cc))
   (canna-context-set-candidate-window! cc #f)
   (canna-context-set-candidate-op-count! cc 0))
 
@@ -872,8 +874,14 @@
       (canna-commit-raw cc)))
 ;;;
 (define (canna-reset-handler cc)
-  (let ((cc-id (canna-context-cc-id cc)))
-    (canna-lib-reset-conversion cc-id)))
+  (if (canna-context-on cc)
+      (begin
+        (canna-flush cc)
+        (im-clear-preedit cc)
+        (im-update-preedit cc)
+        (if (canna-context-state cc)
+          (let ((cc-id (canna-context-cc-id cc)))
+            (canna-lib-reset-conversion cc-id))))))
 
 ;;;
 (define (canna-get-candidate-handler cc idx accel-enum-hint)

Modified: trunk/scm/skk.scm
===================================================================
--- trunk/scm/skk.scm	2005-08-22 11:16:25 UTC (rev 1279)
+++ trunk/scm/skk.scm	2005-08-22 12:39:24 UTC (rev 1280)
@@ -1838,7 +1838,9 @@
 
 (define skk-reset-handler
   (lambda (sc)
-    (skk-flush sc)))
+    (skk-flush sc)
+    (im-clear-preedit sc)
+    (im-update-preedit sc)))
 
 (define skk-get-candidate-handler
   (lambda (sc idx accel-enum-hint)



More information about the uim-commit mailing list