[uim-commit] r222 - trunk/scm

ekato@freedesktop.org ekato@freedesktop.org
Mon Jan 10 06:04:36 PST 2005


Author: ekato
Date: 2005-01-10 06:04:14 -0800 (Mon, 10 Jan 2005)
New Revision: 222

Modified:
   trunk/scm/custom-vars.scm
   trunk/scm/skk.scm
Log:
* scm/skk.scm : Make skk-candidate-op-count behave as intended
  with uim-pref.
* scm/custom-vars.scm : Change skk-candidate-op-count.  Add two
  more skk related options.


Modified: trunk/scm/custom-vars.scm
===================================================================
--- trunk/scm/custom-vars.scm	2005-01-10 12:45:57 UTC (rev 221)
+++ trunk/scm/custom-vars.scm	2005-01-10 14:04:14 UTC (rev 222)
@@ -396,7 +396,7 @@
   (_ "Use candidate window")
   (_ "long description will be here."))
 
-(define-custom 'skk-candidate-op-count 0
+(define-custom 'skk-candidate-op-count 2
   '(skk)
   '(integer 0 99)
   (_ "Conversion key press count to show candidate window")
@@ -434,6 +434,18 @@
   (_ "Visual style")
   (_ "long description will be here."))
 
+(define-custom 'skk-use-numeric-conversion? #t
+  '(skk advanced)
+  '(boolean)
+  (_ "Use numeric conversion")
+  (_ "long description will be here."))
+
+(define-custom 'skk-use-with-vi? #f
+  '(skk advanced)
+  '(boolean)
+  (_ "Frendly for vi user")
+  (_ "long description will be here."))
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 ;; prime

Modified: trunk/scm/skk.scm
===================================================================
--- trunk/scm/skk.scm	2005-01-10 12:45:57 UTC (rev 221)
+++ trunk/scm/skk.scm	2005-01-10 14:04:14 UTC (rev 222)
@@ -57,7 +57,7 @@
 (define skk-dic-init #f)
 ;; configs
 (define skk-use-candidate-window? #t)
-(define skk-candidate-op-count 0)
+(define skk-candidate-op-count 2)
 (define skk-nr-candidate-max 10)
 (define skk-use-recursive-learning? #t)
 (define skk-egg-like-newline? #f)
@@ -604,6 +604,9 @@
       (if res
 	  (begin
 	    (skk-context-set-nth! sc 0)
+	    (skk-check-candidate-window-begin sc)
+	    (if (skk-context-candidate-window sc)
+		(im-select-candidate sc 0))
 	    (skk-context-set-state!
 	     sc 'skk-state-converting))
 	  (if skk-use-recursive-learning?
@@ -1171,8 +1174,10 @@
 	(not
 	 (skk-context-candidate-window sc))
 	skk-use-candidate-window?
+	;; XXX skk-context-candidate-op-count start from 0 with
+	;; the first entry of the candidates
 	(> (skk-context-candidate-op-count sc)
-	   skk-candidate-op-count))
+	   (- skk-candidate-op-count 2)))
 	(begin
 	 (skk-context-set-candidate-window! sc #t)
 	 (if skk-use-numeric-conversion?



More information about the Uim-commit mailing list