~ubuntu-branches/ubuntu/precise/uim/precise

« back to all changes in this revision

Viewing changes to .pc/17_fix_mazegaki_location.patch/scm/tutcode-custom.scm

  • Committer: Package Import Robot
  • Author(s): Ilya Barygin
  • Date: 2011-12-18 16:35:38 UTC
  • mfrom: (1.1.13) (15.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20111218163538-8ktir39z2mjpii8z
Tags: 1:1.7.1-3ubuntu1
* Merge from Debian testing (LP: #818199).
* Remaining changes:
  - debian/uim-qt.install: Fix plugin path for multiarch location.
* Dropped changes:
  - uim-applet-gnome removal (GNOME 3 applet is available)
  - 19_as-needed_compile_fix.dpatch (accepted into Debian package)
* translations.patch: add several files to POTFILE.in to prevent
  intltool-update failure.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
;;; tutcode-custom.scm: Customization variables for tutcode.scm
 
2
;;;
 
3
;;; Copyright (c) 2003-2011 uim Project http://code.google.com/p/uim/
 
4
;;;
 
5
;;; All rights reserved.
 
6
;;;
 
7
;;; Redistribution and use in source and binary forms, with or without
 
8
;;; modification, are permitted provided that the following conditions
 
9
;;; are met:
 
10
;;; 1. Redistributions of source code must retain the above copyright
 
11
;;;    notice, this list of conditions and the following disclaimer.
 
12
;;; 2. Redistributions in binary form must reproduce the above copyright
 
13
;;;    notice, this list of conditions and the following disclaimer in the
 
14
;;;    documentation and/or other materials provided with the distribution.
 
15
;;; 3. Neither the name of authors nor the names of its contributors
 
16
;;;    may be used to endorse or promote products derived from this software
 
17
;;;    without specific prior written permission.
 
18
;;;
 
19
;;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND
 
20
;;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 
21
;;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 
22
;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE
 
23
;;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 
24
;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 
25
;;; OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 
26
;;; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 
27
;;; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 
28
;;; OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 
29
;;; SUCH DAMAGE.
 
30
;;;;
 
31
 
 
32
(require "i18n.scm")
 
33
 
 
34
 
 
35
(define tutcode-im-name-label (N_ "TUT-Code"))
 
36
(define tutcode-im-short-desc (N_ "uim version of TUT-Code input method"))
 
37
 
 
38
(define-custom-group 'tutcode
 
39
                     tutcode-im-name-label
 
40
                     tutcode-im-short-desc)
 
41
 
 
42
(define-custom-group 'tutcode-dict
 
43
                     (N_ "TUT-Code dictionaries")
 
44
                     (N_ "Dictionary settings for TUT-Code"))
 
45
 
 
46
(define-custom-group 'tutcode-bushu
 
47
                     (N_ "Bushu conversion")
 
48
                     (N_ "Bushu conversion settings for TUT-Code"))
 
49
 
 
50
(define-custom-group 'tutcode-mazegaki
 
51
                     (N_ "Mazegaki conversion")
 
52
                     (N_ "Mazegaki conversion settings for TUT-Code"))
 
53
 
 
54
(define-custom-group 'tutcode-prediction
 
55
                    (N_ "Prediction")
 
56
                    (N_ "long description will be here."))
 
57
 
 
58
;;
 
59
;; dictionary
 
60
;;
 
61
 
 
62
(define-custom 'tutcode-dic-filename (string-append (sys-datadir)
 
63
                                                 "/tc/mazegaki.dic")
 
64
  '(tutcode tutcode-dict)
 
65
  '(pathname regular-file)
 
66
  (N_ "Mazegaki dictionary file")
 
67
  (N_ "long description will be here."))
 
68
 
 
69
(define-custom 'tutcode-personal-dic-filename
 
70
  (string-append (or (home-directory (user-name)) "") "/.mazegaki.dic")
 
71
  '(tutcode tutcode-dict)
 
72
  '(pathname regular-file)
 
73
  (N_ "Personal mazegaki dictionary file")
 
74
  (N_ "long description will be here."))
 
75
 
 
76
(define-custom 'tutcode-rule-filename
 
77
  (string-append (sys-pkgdatadir) "/tutcode-rule.scm")
 
78
  '(tutcode)
 
79
  '(pathname regular-file)
 
80
  (N_ "Code table file")
 
81
  (N_ "Code table name is 'filename-rule' when code table file name is 'filename.scm'."))
 
82
 
 
83
(define-custom 'tutcode-enable-mazegaki-learning? #t
 
84
  '(tutcode tutcode-mazegaki)
 
85
  '(boolean)
 
86
  (N_ "Enable learning in mazegaki conversion")
 
87
  (N_ "long description will be here."))
 
88
 
 
89
(define-custom 'tutcode-use-recursive-learning? #t
 
90
  '(tutcode tutcode-mazegaki)
 
91
  '(boolean)
 
92
  (N_ "Use recursive learning")
 
93
  (N_ "long description will be here."))
 
94
 
 
95
(define-custom 'tutcode-use-with-vi? #f
 
96
  '(tutcode)
 
97
  '(boolean)
 
98
  (N_ "Enable vi-cooperative mode")
 
99
  (N_ "long description will be here."))
 
100
 
 
101
(define-custom 'tutcode-use-dvorak? #f
 
102
  '(tutcode)
 
103
  '(boolean)
 
104
  (N_ "Use Dvorak keyboard")
 
105
  (N_ "long description will be here."))
 
106
 
 
107
(define-custom 'tutcode-use-kigou2-mode? #f
 
108
  '(tutcode)
 
109
  '(boolean)
 
110
  (N_ "Enable two stroke kigou mode")
 
111
  (N_ "long description will be here."))
 
112
 
 
113
(define-custom 'tutcode-enable-fallback-surrounding-text? #f
 
114
  '(tutcode)
 
115
  '(boolean)
 
116
  (N_ "Enable fallback of surrounding text API")
 
117
  (N_ "long description will be here."))
 
118
 
 
119
(define-custom 'tutcode-history-size 0
 
120
  '(tutcode)
 
121
  '(integer 0 65535)
 
122
  (N_ "History size")
 
123
  (N_ "long description will be here."))
 
124
 
 
125
(define-custom 'tutcode-mazegaki-yomi-max 10
 
126
  '(tutcode tutcode-mazegaki)
 
127
  '(integer 1 99)
 
128
  (N_ "Maximum length of yomi for postfix mazegaki conversion")
 
129
  (N_ "long description will be here."))
 
130
 
 
131
(define-custom 'tutcode-mazegaki-enable-inflection? #f
 
132
  '(tutcode tutcode-mazegaki)
 
133
  '(boolean)
 
134
  (N_ "Enable inflection in mazegaki conversion")
 
135
  (N_ "long description will be here."))
 
136
 
 
137
(define-custom 'tutcode-mazegaki-suffix-max 4
 
138
  '(tutcode tutcode-mazegaki)
 
139
  '(integer 1 99)
 
140
  (N_ "Maximum length of yomi suffix for mazegaki conversion")
 
141
  (N_ "long description will be here."))
 
142
 
 
143
(define-custom 'tutcode-use-interactive-bushu-conversion? #f
 
144
  '(tutcode tutcode-bushu)
 
145
  '(boolean)
 
146
  (N_ "Enable interactive bushu conversion")
 
147
  (N_ "long description will be here."))
 
148
 
 
149
(define-custom 'tutcode-bushu-index2-filename (string-append (sys-datadir)
 
150
                                                 "/tc/bushu.index2")
 
151
  '(tutcode tutcode-bushu)
 
152
  '(pathname regular-file)
 
153
  (N_ "bushu.index2 file")
 
154
  (N_ "long description will be here."))
 
155
 
 
156
(define-custom 'tutcode-bushu-expand-filename (string-append (sys-datadir)
 
157
                                                 "/tc/bushu.expand")
 
158
  '(tutcode tutcode-bushu)
 
159
  '(pathname regular-file)
 
160
  (N_ "bushu.expand file")
 
161
  (N_ "long description will be here."))
 
162
 
 
163
(define-custom 'tutcode-bushu-help-filename ""
 
164
  '(tutcode tutcode-bushu)
 
165
  '(pathname regular-file)
 
166
  (N_ "bushu.help file")
 
167
  (N_ "long description will be here."))
 
168
 
 
169
;;
 
170
;; candidate window
 
171
;;
 
172
 
 
173
(define-custom 'tutcode-use-candidate-window? #t
 
174
  '(tutcode candwin)
 
175
  '(boolean)
 
176
  (N_ "Use candidate window")
 
177
  (N_ "long description will be here."))
 
178
 
 
179
(define-custom 'tutcode-use-table-style-candidate-window? #f
 
180
  '(tutcode candwin)
 
181
  '(boolean)
 
182
  (N_ "Use table style candidate window")
 
183
  (N_ "long description will be here."))
 
184
 
 
185
(define-custom 'tutcode-candidate-window-table-layout 'qwerty-jis
 
186
  '(tutcode candwin)
 
187
  (list 'choice
 
188
        (list 'qwerty-jis (N_ "qwerty-jis") (N_ "Qwerty JIS"))
 
189
        (list 'qwerty-us (N_ "qwerty-us") (N_ "Qwerty US"))
 
190
        (list 'dvorak (N_ "dvorak") (N_ "Dvorak")))
 
191
  (N_ "Key layout of table style candidate window")
 
192
  (N_ "long description will be here."))
 
193
 
 
194
(define-custom 'tutcode-commit-candidate-by-label-key? #t
 
195
  '(tutcode candwin)
 
196
  '(boolean)
 
197
  (N_ "Commit candidate by heading label keys")
 
198
  (N_ "long description will be here."))
 
199
 
 
200
(define-custom 'tutcode-candidate-op-count 5
 
201
  '(tutcode candwin)
 
202
  '(integer 0 99)
 
203
  (N_ "Conversion key press count to show candidate window")
 
204
  (N_ "long description will be here."))
 
205
 
 
206
(define-custom 'tutcode-nr-candidate-max 10
 
207
  '(tutcode candwin)
 
208
  '(integer 1 99)
 
209
  (N_ "Number of candidates in candidate window at a time")
 
210
  (N_ "long description will be here."))
 
211
 
 
212
(define-custom 'tutcode-nr-candidate-max-for-kigou-mode 10
 
213
  '(tutcode candwin)
 
214
  '(integer 1 99)
 
215
  (N_ "Number of candidates in candidate window at a time for kigou mode")
 
216
  (N_ "long description will be here."))
 
217
 
 
218
(define-custom 'tutcode-nr-candidate-max-for-prediction 10
 
219
  '(tutcode candwin)
 
220
  '(integer 1 99)
 
221
  (N_ "Number of candidates in candidate window at a time for prediction")
 
222
  (N_ "long description will be here."))
 
223
 
 
224
(define-custom 'tutcode-nr-candidate-max-for-guide 10
 
225
  '(tutcode candwin)
 
226
  '(integer 1 99)
 
227
  (N_ "Number of candidates in candidate window at a time for kanji combination guide")
 
228
  (N_ "long description will be here."))
 
229
 
 
230
(define-custom 'tutcode-nr-candidate-max-for-history 10
 
231
  '(tutcode candwin)
 
232
  '(integer 1 99)
 
233
  (N_ "Number of candidates in candidate window at a time for history")
 
234
  (N_ "long description will be here."))
 
235
 
 
236
(define-custom 'tutcode-use-stroke-help-window? #f
 
237
  '(tutcode candwin)
 
238
  '(boolean)
 
239
  (N_ "Use stroke help window")
 
240
  (N_ "long description will be here."))
 
241
 
 
242
(define-custom 'tutcode-use-auto-help-window? #f
 
243
  '(tutcode candwin)
 
244
  '(boolean)
 
245
  (N_ "Use auto help window")
 
246
  (N_ "long description will be here."))
 
247
 
 
248
(define-custom 'tutcode-auto-help-with-real-keys? #f
 
249
  '(tutcode candwin)
 
250
  '(boolean)
 
251
  (N_ "Show real keys on auto help window")
 
252
  (N_ "long description will be here."))
 
253
 
 
254
;; prediction/completion
 
255
(define-custom 'tutcode-use-completion? #f
 
256
  '(tutcode tutcode-prediction)
 
257
  '(boolean)
 
258
  (N_ "Enable completion")
 
259
  (N_ "long description will be here."))
 
260
 
 
261
(define-custom 'tutcode-completion-chars-min 2
 
262
  '(tutcode tutcode-prediction)
 
263
  '(integer 0 65535)
 
264
  (N_ "Minimum character length for completion")
 
265
  (N_ "long description will be here."))
 
266
 
 
267
(define-custom 'tutcode-completion-chars-max 5
 
268
  '(tutcode tutcode-prediction)
 
269
  '(integer 1 65535)
 
270
  (N_ "Maximum character length for completion")
 
271
  (N_ "long description will be here."))
 
272
 
 
273
(define-custom 'tutcode-use-prediction? #f
 
274
  '(tutcode tutcode-prediction)
 
275
  '(boolean)
 
276
  (N_ "Enable input prediction for mazegaki conversion")
 
277
  (N_ "long description will be here."))
 
278
 
 
279
(define-custom 'tutcode-prediction-start-char-count 2
 
280
  '(tutcode tutcode-prediction)
 
281
  '(integer 0 65535)
 
282
  (N_ "Character count to start input prediction")
 
283
  (N_ "long description will be here."))
 
284
 
 
285
(define-custom 'tutcode-use-kanji-combination-guide? #f
 
286
  '(tutcode tutcode-prediction)
 
287
  '(boolean)
 
288
  (N_ "Enable Kanji combination guide")
 
289
  (N_ "long description will be here."))
 
290
 
 
291
(define-custom 'tutcode-stroke-help-with-kanji-combination-guide 'disable
 
292
  '(tutcode tutcode-prediction)
 
293
  (list 'choice
 
294
    (list 'full (N_ "Full stroke help") (N_ "Full stroke help"))
 
295
    (list 'guide-only (N_ "Guide only") (N_ "Guide only"))
 
296
    (list 'disable (N_ "Disable") (N_ "Disable")))
 
297
  (N_ "Show stroke help temporarily by keys in kanji combination guide")
 
298
  (N_ "long description will be here."))
 
299
 
 
300
(define-custom 'tutcode-use-bushu-prediction? #f
 
301
  '(tutcode tutcode-prediction)
 
302
  '(boolean)
 
303
  (N_ "Enable input prediction for bushu conversion")
 
304
  (N_ "long description will be here."))
 
305
 
 
306
;; activity dependency
 
307
(custom-add-hook 'tutcode-candidate-op-count
 
308
                 'custom-activity-hooks
 
309
                 (lambda ()
 
310
                   tutcode-use-candidate-window?))
 
311
 
 
312
(custom-add-hook 'tutcode-nr-candidate-max
 
313
                 'custom-activity-hooks
 
314
                 (lambda ()
 
315
                   tutcode-use-candidate-window?))
 
316
 
 
317
(custom-add-hook 'tutcode-nr-candidate-max-for-kigou-mode
 
318
                 'custom-activity-hooks
 
319
                 (lambda ()
 
320
                   tutcode-use-candidate-window?))
 
321
 
 
322
(custom-add-hook 'tutcode-nr-candidate-max-for-prediction
 
323
                 'custom-activity-hooks
 
324
                 (lambda ()
 
325
                   tutcode-use-candidate-window?))
 
326
 
 
327
(custom-add-hook 'tutcode-nr-candidate-max-for-guide
 
328
                 'custom-activity-hooks
 
329
                 (lambda ()
 
330
                   tutcode-use-candidate-window?))
 
331
 
 
332
(custom-add-hook 'tutcode-auto-help-with-real-keys?
 
333
                 'custom-activity-hooks
 
334
                 (lambda ()
 
335
                   tutcode-use-auto-help-window?))
 
336
 
 
337
(custom-add-hook 'tutcode-use-table-style-candidate-window?
 
338
  'custom-set-hooks
 
339
  (lambda ()
 
340
    (if tutcode-use-table-style-candidate-window?
 
341
      (begin
 
342
        (custom-set-value! 'tutcode-nr-candidate-max
 
343
          (length tutcode-table-heading-label-char-list))
 
344
        (custom-set-value!
 
345
          'tutcode-nr-candidate-max-for-kigou-mode
 
346
          (length tutcode-table-heading-label-char-list-for-kigou-mode))
 
347
        (custom-set-value!
 
348
          'tutcode-nr-candidate-max-for-prediction
 
349
          (length tutcode-heading-label-char-list-for-prediction))
 
350
        (custom-set-value!
 
351
          'tutcode-nr-candidate-max-for-guide
 
352
          (- (length tutcode-table-heading-label-char-list-for-kigou-mode)
 
353
             (length tutcode-heading-label-char-list-for-prediction))))
 
354
      (begin
 
355
        (custom-set-value! 'tutcode-nr-candidate-max 10)
 
356
        (custom-set-value! 'tutcode-nr-candidate-max-for-kigou-mode 10)
 
357
        (custom-set-value! 'tutcode-nr-candidate-max-for-prediction 10)
 
358
        (custom-set-value! 'tutcode-nr-candidate-max-for-guide 10)))))
 
359
 
 
360
(custom-add-hook 'tutcode-candidate-window-table-layout
 
361
                 'custom-activity-hooks
 
362
                 (lambda ()
 
363
                   tutcode-use-table-style-candidate-window?))
 
364
 
 
365
(custom-add-hook 'tutcode-bushu-index2-filename
 
366
                 'custom-activity-hooks
 
367
                 (lambda ()
 
368
                   tutcode-use-interactive-bushu-conversion?))
 
369
 
 
370
(custom-add-hook 'tutcode-bushu-expand-filename
 
371
                 'custom-activity-hooks
 
372
                 (lambda ()
 
373
                   tutcode-use-interactive-bushu-conversion?))