On 2012-12-18 16:54, Osamu Aoki wrote: >> Since you recommend xim for people who wish to disable IM, what would >> you say if the language-selector UI was changed so that "none" is the >> shown label, but it actually sets xim? Would that make sense to you? > > I do not know the answer ... that was part of the reason somewhat > redundant choice are offered. Please experiment ...
Thanks for your honest reply. Aron, do you have any thoughts on this? I have updated the merge proposals at https://launchpad.net/bugs/1090754 in accordance with the above. The im-config patch is now somewhat neater (attached to this message). -- Gunnar Hjalmarsson https://launchpad.net/~gunnarhj
Description: Add an -l option that prints installed IMs to STDOUT Bug-Ubuntu: https://launchpad.net/bugs/1090754 Forwarded: yes Bug-Debian: http://bugs.debian.org/694941 Author: Gunnar Hjalmarsson <[email protected]> --- im-config-0.19.orig/im-config 2012-05-15 16:06:29.000000000 +0200 +++ im-config-0.19/im-config 2012-12-18 20:41:44.050972922 +0100 @@ -37,6 +37,17 @@ # console dialog IM_CONFIG_DIALOG="console" fi +get_im_config_names() { + for IM_CONFIG_PATH in $IM_CONFIG_DATA/[12345678][0123456789]_*.rc ; do + IM_CONFIG_NAME=$(name_im $IM_CONFIG_PATH) + if avail_menu $IM_CONFIG_NAME && [ $IM_CONFIG_NAME != "none" ]; then + IM_CONFIG_AVAIL="$IM_CONFIG_AVAIL $IM_CONFIG_NAME" + if [ -n "$1" -a "$1" = 'num' ]; then + IM_CONFIG_NUMBER="$(($IM_CONFIG_NUMBER + 1))" + fi + fi + done +} ############################################################# # Perse command line arguments @@ -69,6 +80,10 @@ write_config $IM_CONFIG_NAME $IM_CONFIG_XINPUTRC exit ;; + -l) get_im_config_names + echo $IM_CONFIG_AVAIL + exit 0 + ;; *) eval_gettext \ "\$IM_CONFIG_ID @@ -115,15 +130,8 @@ # UI dialogue for im-config ############################################################# # Check number of installed input methods (10-89) -IM_CONFIG_NUMBER=0 -IM_CONFIG_AVAIL="" -for IM_CONFIG_PATH in $IM_CONFIG_DATA/[12345678][0123456789]_*.rc ; do - IM_CONFIG_NAME=$(name_im $IM_CONFIG_PATH) - if avail_menu $IM_CONFIG_NAME && [ $IM_CONFIG_NAME != "none" ]; then - IM_CONFIG_NUMBER="$(($IM_CONFIG_NUMBER + 1))" - IM_CONFIG_AVAIL="$IM_CONFIG_AVAIL $IM_CONFIG_NAME" - fi -done +get_im_config_names 'num' + IM_CONFIG_MSG="$(eval_gettext "Current configuration for the input method: * Active configuration: \$IM_CONFIG_ACTIVE (normally missing) * Automatic configuration: \$IM_CONFIG_AUTOMATIC (normally ibus or fcitx or uim) --- im-config-0.19.orig/im-config.8 2012-11-28 15:51:57.000000000 +0100 +++ im-config-0.19/im-config.8 2012-12-13 23:52:39.631811155 +0100 @@ -37,6 +37,12 @@ When this \fI<input method name>\fP is "REMOVE" then it always removes the configuration file even if it was not updated by \fBim-config\fP. +.TP 8 +.B \-l +List installed input methods that \fBim-config\fP supports. + +This option prints the names of the installed input methods to STDOUT, and +can be used by UIs in other packages. .SH "DESCRIPTION" This manual page very briefly documents \fBim\-config\fP and the configuration

