Bug 4363

Summary: enabled-im-list
Product: UIM Reporter: Etsushi Kato <ek.kato>
Component: generic Scheme codesAssignee: uim-bugs
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Etsushi Kato 2005-09-06 00:08:57 UTC
Currently (from uim-0.4.8), uim-module-manager can manipulate enabled-im-list in
the [system data dir]/uim/installed-modules.scm.

This cause a problem on uim-pref's behavior if unregistering some modules listed
in the enabled-im-list of ~/.uim.d/customs/custom-global.scm.

For example, if 'anthy' is not listed on system's installed-modules.scm but
listed on ~/.uim.d/customs/custom-global.scm, uim-pref shows only 'direct' in
the 'Enabled input methods' in Global settings because custom-valid? fails, and
user cannot edit the list unless saving the setting to the file.

So I propose adding new variable `system-enabled-im-list to the
installed-modules.scm.  Also replace `direct with 'usable-im-list' for default
value when custom-valid? on enabled-im-list fails.

I mean, 

(define system-enabled-im-list enabled-im-list)

  in installed-modules.scm, and

(define usable-im-list
  (lambda ()
    (let ((imlist (filter (lambda (name)
                    (memq name system-enabled-im-list)) enabled-im-list)))
         (if (not (null? imlist))
             imlist
             '(direct)))))

(define-custom 'enabled-im-list (usable-im-list)
    ...
    ...)

  in im-custom.scm.

What do you think?

Cheers,
-- 
Etsushi Kato
ekato@ees.hokudai.ac.jp
Comment 1 Etsushi Kato 2005-09-07 09:06:11 UTC
I've committed the changes in r1452.

Additionally, I've disabled using $prefix/share/uim/modules file in r1451, since
it seems using the file is totally redundant for me.  I think
installed-im-module-list in $prefix/share/uim/installed-modules.scm is sufficient.

Any comments?

Cheers,
Comment 2 Etsushi Kato 2005-09-07 22:03:36 UTC
If there is no objection, I'll port these changes into 0.4 branch tomorrow.

Cheers,
-- 
Etsushi Kato
ekato@ees.hokudai.ac.jp
Comment 3 Etsushi Kato 2005-09-08 21:53:12 UTC
Fixed in r1457.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.