Author: yamaken
Date: Tue Feb  1 10:28:30 2005
New Revision: 467

Modified:
   trunk/scm/anthy-custom.scm
   trunk/scm/canna-custom.scm
   trunk/scm/im-custom.scm
   trunk/scm/skk-custom.scm

Log:
* More custom group division and reorganization

* scm/im-custom.scm
  - (custom-group annotation, custom-group dictionary, custom-group
    segment-sep, custom-group special-op): New custom group
  - (switch-im-key?): Add as null key definition

* scm/skk-custom.scm
  - (custom-group skk-advanced): New custom group
  - Reorganize group of custom variables and reorder. No other
    attributes are modified
* scm/anthy-custom.scm
* scm/canna-custom.scm
  - Ditto


Modified: trunk/scm/anthy-custom.scm
==============================================================================
--- trunk/scm/anthy-custom.scm  (original)
+++ trunk/scm/anthy-custom.scm  Tue Feb  1 10:28:30 2005
@@ -39,6 +39,32 @@
                      (ugettext anthy-im-name-label)
                      (ugettext anthy-im-short-desc))
 
+
+;;
+;; segment separator
+;;
+
+(define-custom 'anthy-show-segment-separator? #f
+  '(anthy segment-sep)
+  '(boolean)
+  (_ "Show segment separator")
+  (_ "long description will be here."))
+
+(define-custom 'anthy-segment-separator "|"
+  '(anthy segment-sep)
+  '(string ".*")
+  (_ "Segment separator")
+  (_ "long description will be here."))
+
+(custom-add-hook 'anthy-segment-separator
+                'custom-activity-hooks
+                (lambda ()
+                  anthy-show-segment-separator?))
+
+;;
+;; candidate window
+;;
+
 (define-custom 'anthy-use-candidate-window? #t
   '(anthy candwin)
   '(boolean)
@@ -78,23 +104,6 @@
                 'custom-activity-hooks
                 (lambda ()
                   anthy-use-candidate-window?))
-
-(define-custom 'anthy-show-segment-separator? #f
-  '(anthy advanced)
-  '(boolean)
-  (_ "Show segment separator")
-  (_ "long description will be here."))
-
-(define-custom 'anthy-segment-separator "|"
-  '(anthy advanced)
-  '(string ".*")
-  (_ "Segment separator")
-  (_ "long description will be here."))
-
-(custom-add-hook 'anthy-segment-separator
-                'custom-activity-hooks
-                (lambda ()
-                  anthy-show-segment-separator?))
 
 ;;
 ;; toolbar

Modified: trunk/scm/canna-custom.scm
==============================================================================
--- trunk/scm/canna-custom.scm  (original)
+++ trunk/scm/canna-custom.scm  Tue Feb  1 10:28:30 2005
@@ -39,43 +39,23 @@
                      (ugettext canna-im-name-label)
                      (ugettext canna-im-short-desc))
 
-(define-custom 'canna-use-candidate-window? #t
-  '(canna candwin)
-  '(boolean)
-  (_ "Use candidate window")
-  (_ "long description will be here."))
-
-(define-custom 'canna-candidate-op-count 1
-  '(canna candwin)
-  '(integer 0 99)
-  (_ "Conversion key press count to show candidate window")
-  (_ "long description will be here."))
+(define-custom-group 'cannaserver
+                    (_ "Canna server")
+                    (_ "long description will be here."))
 
-(define-custom 'canna-nr-candidate-max 10
-  '(canna candwin)
-  '(integer 1 20)
-  (_ "Number of candidates in candidate window at a time")
-  (_ "long description will be here."))
 
-;; activity dependency
-(custom-add-hook 'canna-candidate-op-count
-                'custom-activity-hooks
-                (lambda ()
-                  canna-use-candidate-window?))
-
-(custom-add-hook 'canna-nr-candidate-max
-                'custom-activity-hooks
-                (lambda ()
-                  canna-use-candidate-window?))
+;;
+;; segment separator
+;;
 
 (define-custom 'canna-show-segment-separator? #f
-  '(canna advanced)
+  '(canna segment-sep)
   '(boolean)
   (_ "Show segment separator")
   (_ "long description will be here."))
 
 (define-custom 'canna-segment-separator "|"
-  '(canna advanced)
+  '(canna segment-sep)
   '(string ".*")
   (_ "Segment separator")
   (_ "long description will be here."))
@@ -86,81 +66,37 @@
                   canna-show-segment-separator?))
 
 ;;
-;; canna-server-name
+;; candidate window
 ;;
 
-; TODO: support cannaserver on other host
-(define canna-server-name #f)
-;(define canna-server-name "localhost")
-;(define canna-server-name "127.0.0.1")
-
-(define-custom-group 'cannaserver
-                    (_ "Canna server")
-                    (_ "long description will be here."))
-
-;; warning: must be defined before custom-preserved-canna-server-name
-(define-custom 'custom-activate-canna-server-name? #f
-  '(canna cannaserver)
+(define-custom 'canna-use-candidate-window? #t
+  '(canna candwin)
   '(boolean)
-  (_ "Use Canna server")
+  (_ "Use candidate window")
   (_ "long description will be here."))
 
-(define-custom 'custom-preserved-canna-server-name ""
-  '(canna cannaserver)
-  '(string ".*")
-  (_ "Canna server name")
+(define-custom 'canna-candidate-op-count 1
+  '(canna candwin)
+  '(integer 0 99)
+  (_ "Conversion key press count to show candidate window")
+  (_ "long description will be here."))
+
+(define-custom 'canna-nr-candidate-max 10
+  '(canna candwin)
+  '(integer 1 20)
+  (_ "Number of candidates in candidate window at a time")
   (_ "long description will be here."))
 
 ;; activity dependency
-(custom-add-hook 'custom-preserved-canna-server-name
+(custom-add-hook 'canna-candidate-op-count
                 'custom-activity-hooks
                 (lambda ()
-                  custom-activate-canna-server-name?))
-
-(define custom-hook-get-canna-server-name
-  (lambda ()
-    (set! custom-activate-canna-server-name? canna-server-name)
-    (set! custom-preserved-canna-server-name (or canna-server-name
-                                                
custom-preserved-canna-server-name
-                                                ""))))
-
-;; decode #f from canna-server-name
-(custom-add-hook 'custom-activate-canna-server-name?
-                'custom-get-hooks
-                custom-hook-get-canna-server-name)
-(custom-add-hook 'canna-server-name
-                'custom-get-hooks
-                custom-hook-get-canna-server-name)
-
-(define custom-hook-set-canna-server-name
-  (lambda ()
-    (set! canna-server-name
-         (and custom-activate-canna-server-name?
-              custom-preserved-canna-server-name))))
-
-;; encode #f into canna-server-name
-(custom-add-hook 'custom-activate-canna-server-name?
-                'custom-set-hooks
-                custom-hook-set-canna-server-name)
-(custom-add-hook 'custom-preserved-canna-server-name
-                'custom-set-hooks
-                custom-hook-set-canna-server-name)
-
-(define custom-hook-literalize-preserved-canna-server-name
-  (lambda ()
-    (string-append
-     "(define custom-preserved-canna-server-name "
-     (custom-value-as-literal 'custom-preserved-canna-server-name)
-     ")\n"
-     "(define canna-server-name "
-     (if canna-server-name
-        (string-append "\"" canna-server-name "\"")
-        "#f")
-     ")")))
+                  canna-use-candidate-window?))
 
-(custom-add-hook 'custom-preserved-canna-server-name
-                'custom-literalize-hooks
-                custom-hook-literalize-preserved-canna-server-name)
+(custom-add-hook 'canna-nr-candidate-max
+                'custom-activity-hooks
+                (lambda ()
+                  canna-use-candidate-window?))
 
 
 ;;
@@ -340,3 +276,77 @@
                 'custom-set-hooks
                 (lambda ()
                   (canna-configure-widgets)))
+
+
+;;
+;; canna-server-name
+;;
+
+; TODO: support cannaserver on other host
+(define canna-server-name #f)
+;(define canna-server-name "localhost")
+;(define canna-server-name "127.0.0.1")
+
+;; warning: must be defined before custom-preserved-canna-server-name
+(define-custom 'custom-activate-canna-server-name? #f
+  '(canna cannaserver)
+  '(boolean)
+  (_ "Use Canna server")
+  (_ "long description will be here."))
+
+(define-custom 'custom-preserved-canna-server-name ""
+  '(canna cannaserver)
+  '(string ".*")
+  (_ "Canna server name")
+  (_ "long description will be here."))
+
+;; activity dependency
+(custom-add-hook 'custom-preserved-canna-server-name
+                'custom-activity-hooks
+                (lambda ()
+                  custom-activate-canna-server-name?))
+
+(define custom-hook-get-canna-server-name
+  (lambda ()
+    (set! custom-activate-canna-server-name? canna-server-name)
+    (set! custom-preserved-canna-server-name (or canna-server-name
+                                                
custom-preserved-canna-server-name
+                                                ""))))
+
+;; decode #f from canna-server-name
+(custom-add-hook 'custom-activate-canna-server-name?
+                'custom-get-hooks
+                custom-hook-get-canna-server-name)
+(custom-add-hook 'canna-server-name
+                'custom-get-hooks
+                custom-hook-get-canna-server-name)
+
+(define custom-hook-set-canna-server-name
+  (lambda ()
+    (set! canna-server-name
+         (and custom-activate-canna-server-name?
+              custom-preserved-canna-server-name))))
+
+;; encode #f into canna-server-name
+(custom-add-hook 'custom-activate-canna-server-name?
+                'custom-set-hooks
+                custom-hook-set-canna-server-name)
+(custom-add-hook 'custom-preserved-canna-server-name
+                'custom-set-hooks
+                custom-hook-set-canna-server-name)
+
+(define custom-hook-literalize-preserved-canna-server-name
+  (lambda ()
+    (string-append
+     "(define custom-preserved-canna-server-name "
+     (custom-value-as-literal 'custom-preserved-canna-server-name)
+     ")\n"
+     "(define canna-server-name "
+     (if canna-server-name
+        (string-append "\"" canna-server-name "\"")
+        "#f")
+     ")")))
+
+(custom-add-hook 'custom-preserved-canna-server-name
+                'custom-literalize-hooks
+                custom-hook-literalize-preserved-canna-server-name)

Modified: trunk/scm/im-custom.scm
==============================================================================
--- trunk/scm/im-custom.scm     (original)
+++ trunk/scm/im-custom.scm     Tue Feb  1 10:28:30 2005
@@ -60,6 +60,27 @@
                     (_ "Candidate window")
                     (_ "long description will be here."))
 
+;; subgroup
+(define-custom-group 'annotation
+                     (_ "Annotation")
+                     (_ "long description will be here."))
+
+;; subgroup
+(define-custom-group 'dictionary
+                     (_ "Dictionary")
+                     (_ "long description will be here."))
+
+;; subgroup
+(define-custom-group 'segment-sep
+                     (_ "Segment separator")
+                     (_ "long description will be here."))
+
+;; subgroup
+(define-custom-group 'special-op
+                     (_ "Special operation")
+                     (_ "long description will be here."))
+
+
 ;; 
 ;; default-im-name
 ;;
@@ -217,6 +238,8 @@
 ;;              'custom-activity-hooks
 ;;              (lambda ()
 ;;                enable-im-switch))
+
+(define-key switch-im-key? '())
 
 (define-custom 'uim-color 'uim-color-uim
   '(global)

Modified: trunk/scm/skk-custom.scm
==============================================================================
--- trunk/scm/skk-custom.scm    (original)
+++ trunk/scm/skk-custom.scm    Tue Feb  1 10:28:30 2005
@@ -39,6 +39,15 @@
                      (ugettext skk-im-name-label)
                      (ugettext skk-im-short-desc))
 
+(define-custom-group 'skk-advanced
+                     (_ "SKK (advanced)")
+                     (_ "Advanced settings for SKK"))
+
+
+;;
+;; candidate window
+;;
+
 (define-custom 'skk-use-candidate-window? #t
   '(skk candwin)
   '(boolean)
@@ -58,7 +67,7 @@
   (_ "long description will be here."))
 
 (define-custom 'skk-commit-candidate-by-label-key? #t
-  '(skk candwin advanced)
+  '(skk candwin)
   '(boolean)
   (_ "Commit candidate by heading label keys")
   (_ "long description will be here."))
@@ -79,96 +88,6 @@
                 (lambda ()
                   skk-use-candidate-window?))
 
-(define-custom 'skk-style 'skk-style-ddskk-like
-  '(skk advanced)
-  (list 'choice
-       (list 'skk-style-ddskk-like (_ "ddskk") (_ "Similar to ddskk"))
-       (list 'skk-style-uim (_ "uim") (_ "uim native")))
-  (_ "Visual style")
-  (_ "long description will be here."))
-
-(define-custom 'skk-use-recursive-learning? #t
-  '(skk advanced)
-  '(boolean)
-  (_ "Use recursive learning")
-  (_ "long description will be here."))
-
-(define-custom 'skk-egg-like-newline? #f
-  '(skk advanced)
-  '(boolean)
-  (_ "Use Enter key as just committing (egg-like operation)")
-  (_ "long description will be here."))
-
-;; should be removed if there is no usage
-(define-custom 'skk-commit-newline-explicitly? #f
-  '(skk advanced)
-  '(boolean)
-  (_ "Commit newline as ASCII string instead of native key-event")
-  (_ "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)
-  (_ "Friendly for vi user")
-  (_ "long description will be here."))
-
-(define-custom 'skk-auto-start-henkan? #t
-  '(skk advanced)
-  '(boolean)
-  (_ "Enable auto conversion with punctuation marks")
-  (_ "long description will be here."))
-
-(define-custom 'skk-show-annotation? #t
-  '(skk advanced)
-  '(boolean)
-  (_ "Show annotation of candidate word")
-  (_ "long description will be here."))
-
-(define-custom 'skk-show-annotation-in-preedit? #f
-  '(skk advanced)
-  '(boolean)
-  (_ "Show annotation also in preedit area")
-  (_ "long description will be here."))
-
-(custom-add-hook 'skk-show-annotation-in-preedit?
-                'custom-activity-hooks
-                (lambda ()
-                  skk-show-annotation?))
-
-(custom-add-hook 'skk-show-annotation?
-                'custom-get-hooks
-                (lambda ()
-                  (if (not skk-show-annotation?)
-                      (set! skk-show-annotation-in-preedit? #f))))
-
-(define-custom 'skk-dic-file-name (string-append (sys-datadir)
-                                                "/skk/SKK-JISYO.L")
-  '(skk)
-  '(pathname)
-  (_ "Dictionary file")
-  (_ "long description will be here."))
-
-(define-custom 'skk-personal-dic-filename
-  (string-append (getenv "HOME") "/.skk-jisyo")
-  '(skk)
-  '(pathname)
-  (_ "Personal dictionary file")
-  (_ "long description will be here."))
-
-(define-custom 'skk-uim-personal-dic-filename
-  (string-append (getenv "HOME") "/.skk-uim-jisyo")
-  '(skk)
-  '(pathname)
-  (_ "Personal dictionary file (dedicated to uim)")
-  (_ "long description will be here."))
-
-
 ;;
 ;; toolbar
 ;;
@@ -245,3 +164,107 @@
                 (lambda ()
                   (skk-configure-widgets)))
 
+;;
+;; dictionary
+;;
+
+(define-custom 'skk-dic-file-name (string-append (sys-datadir)
+                                                "/skk/SKK-JISYO.L")
+  '(skk dictionary)
+  '(pathname)
+  (_ "Dictionary file")
+  (_ "long description will be here."))
+
+(define-custom 'skk-personal-dic-filename
+  (string-append (getenv "HOME") "/.skk-jisyo")
+  '(skk dictionary)
+  '(pathname)
+  (_ "Personal dictionary file")
+  (_ "long description will be here."))
+
+(define-custom 'skk-uim-personal-dic-filename
+  (string-append (getenv "HOME") "/.skk-uim-jisyo")
+  '(skk dictionary)
+  '(pathname)
+  (_ "Personal dictionary file (dedicated to uim)")
+  (_ "long description will be here."))
+
+;;
+;; advanced
+;;
+
+(define-custom 'skk-style 'skk-style-ddskk-like
+  '(skk-advanced)
+  (list 'choice
+       (list 'skk-style-ddskk-like (_ "ddskk") (_ "Similar to ddskk"))
+       (list 'skk-style-uim (_ "uim") (_ "uim native")))
+  (_ "Visual style")
+  (_ "long description will be here."))
+
+(define-custom 'skk-use-recursive-learning? #t
+  '(skk-advanced)
+  '(boolean)
+  (_ "Use recursive learning")
+  (_ "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-auto-start-henkan? #t
+  '(skk-advanced)
+  '(boolean)
+  (_ "Enable auto conversion with punctuation marks")
+  (_ "long description will be here."))
+
+;;
+;; annotation
+;;
+
+(define-custom 'skk-show-annotation? #t
+  '(skk-advanced annotation)
+  '(boolean)
+  (_ "Show annotation of candidate word")
+  (_ "long description will be here."))
+
+(define-custom 'skk-show-annotation-in-preedit? #f
+  '(skk-advanced annotation)
+  '(boolean)
+  (_ "Show annotation also in preedit area")
+  (_ "long description will be here."))
+
+(custom-add-hook 'skk-show-annotation-in-preedit?
+                'custom-activity-hooks
+                (lambda ()
+                  skk-show-annotation?))
+
+(custom-add-hook 'skk-show-annotation?
+                'custom-get-hooks
+                (lambda ()
+                  (if (not skk-show-annotation?)
+                      (set! skk-show-annotation-in-preedit? #f))))
+
+;;
+;; special operations
+;;
+
+(define-custom 'skk-use-with-vi? #f
+  '(skk-advanced special-op)
+  '(boolean)
+  (_ "Friendly for vi user")
+  (_ "long description will be here."))
+
+(define-custom 'skk-egg-like-newline? #f
+  '(skk-advanced special-op)
+  '(boolean)
+  (_ "Use Enter key as just committing (egg-like operation)")
+  (_ "long description will be here."))
+
+;; should be removed if there is no usage
+(define-custom 'skk-commit-newline-explicitly? #f
+  '(skk-advanced special-op)
+  '(boolean)
+  (_ "Commit newline as ASCII string instead of native key-event")
+  (_ "long description will be here."))

Reply via email to