[uim-commit] r767 - branches/composer/scm

yamaken at freedesktop.org yamaken at freedesktop.org
Mon Mar 7 08:41:12 PST 2005


Author: yamaken
Date: 2005-03-07 08:41:06 -0800 (Mon, 07 Mar 2005)
New Revision: 767

Modified:
   branches/composer/scm/anthy.scm
Log:
* scm/anthy.scm
  - (anthy-transpose-preconv!, anthy-preedit-input!, anthy-flush):
    Support re-edition of transposed preconv string with transposed
    charset. The input mode will be back to original one once the
    transposed string has been committed. See added comments in the
    diff for further information


Modified: branches/composer/scm/anthy.scm
===================================================================
--- branches/composer/scm/anthy.scm	2005-03-07 15:47:08 UTC (rev 766)
+++ branches/composer/scm/anthy.scm	2005-03-07 16:41:06 UTC (rev 767)
@@ -907,7 +907,10 @@
     (let* ((preconv-ustr (anthy-context-preconv-ustr ac))
 	   (ruletree (anthy-transpose-idx->ruletree ac transpose-idx))
 	   (transposed (evmap-ustr-transpose preconv-ustr ruletree)))
-      (anthy-context-set-preconv-ustr! ac transposed))))
+      (anthy-context-set-preconv-ustr! ac transposed)
+      ;; ruletree has changed temporarily until commit to re-edit with
+      ;; transposed charset
+      (anthy-context-set-ruletree! ac ruletree))))
 
 (define anthy-commit-transposed-preconv!
   (lambda (ac transpose-idx)
@@ -975,8 +978,10 @@
 			      (evmap-ustr-input! preconv-ustr ruletree ev)))
 	       (post-preedit? (anthy-has-preedit? ac))
 	       (transit? (not (= preedit? post-preedit?))))
+	  ;; main ruletree must not be changed here to preserve
+	  ;; transposed one
 	  (if transit?
-	      (anthy-select-ruletree! ac))
+	      (anthy-select-actmap-ruletree! ac))
 	  consumed?))))))
 
 (define anthy-init-handler
@@ -997,7 +1002,7 @@
 	(im-deactivate-candidate-selector ac))
     (anthy-context-set-candidate-window! ac #f)
     (anthy-context-set-candidate-op-count! ac 0)
-    (anthy-select-actmap-ruletree! ac)
+    (anthy-select-ruletree! ac)  ;; to reset transposed ruletree
     (anthy-update-preedit ac)  ;; TODO: remove this
     ))
 



More information about the Uim-commit mailing list