[openi18n-im:01591] Re: HANGUL_KEYBOARD_TYPE patch
Bo Gavin Tu <[email protected]> Wed, 22 Feb 2006 17:17:22 +0800
| Newsgroups | gmane.comp.internationalization.input-methods |
|---|---|
| Message-ID | <[email protected]> |
hi Choe: this patch can work. Just like i metioned before(i paste previous mail at the end of my reply), this is a good workaround,but not figure out the root cause. So, my suggestion is not to check in this patch into trunk.if you need the feature of "per configuration per user", you can integrate this patch into your private release. thanks again, Gavin > hi Yong-iL: > Thanks a lot for your contribution. > Currently, kole doesn't support "per configuration file per user", so > all system users have to share the same configuration. > SetEnv "HANGUL_KEYBOARD_TYPE" is a good workaround for this > issue.But,i > think the best way is to support "per configuration file per user", > and keep private configuration file under users' home directory. Choe Hwanjin wrote On 12:09,: > Does the patch work?There will be only 1 input method server on that machine.So, you have to set the global env variable to use the patch. > On 2/15/06, Yong-iL Joh <[email protected]> wrote:> I'm using "sebeol 390 keyboard type" for hangul input.>> When I'm using iiimf,> I must change> /usr/lib/im/locale/ko_KR/hangul.conf> for my hangul input.> but, this notebook is pubilc use.> so, I can't change system-wide setting.>> there is a de-facto standard> of selecting hangul keyboard type, "HANGUL_KEYBOARD_TYPE".> # or use export HANGUL_KEYBOARD_TYPE=...> # dubeol: 2> # sebeol final: 3FINAL> # sebeol 390: 390> # sebeol no-shift: 3NOSHIFT>> here is a patch.>> --> Joh, Yong-iL> E-mail: [email protected] [email protected]>>> --- iiimf-12.2/leif/hangul/hangul.conf~ 2003-08-29 21:15:45.000000000 +0900> +++ iiimf-12.2/leif/hangul/hangul.conf 2006-02-15 21:48:54.000000000 +0900> @@ -6,3 +6,9 @@> # sebeol 390: 39> # sebeol no-shift: 3s> keyboard = 2> +> +# or use export HANGUL_KEYBOARD_TYPE=...> +# dube ol: 2> +# sebeol final: 3FINAL> +# sebeol 390: 390> +# sebeol no-shift: 3 N! > OSHIFT> --- iiimf-12.2/leif/hangul/composer.c~ 2005-04-14 00:30:34.000000000 +0900> +++ iiimf-12.2/leif/hangul/composer.c 2006-02-15 21:48:41.000000000 +0900> @@ -1510,6 +1510,7 @@> hangul_load_config(void)> {> const char *conf_filename = HANGUL_CONFIG_FILENAME;> + char *env_keyboard_type = getenv("HANGUL_KEYBOARD_TYPE");> FILE *conf_file;> char key[64];> char value[512];> @@ -1520,6 +1521,24 @@> config.keyboard = keyboard_map_2;> config.composer = hangul_composer_2;>> + if (env_keyboard_type != NULL) {> + strncpy(value, env_keyboard_type, 10);> + if (strcmp(value, "2") == 0) {> + config.keyboard = keyboard_map_2;> + config.composer = hangul_composer_2;> + } else if (strcmp(value, "390") == 0) {> + config.keyboard = keyboard_map_390;> + config.composer = hangul_composer_3;> + } else if (strcmp(value, "3FINAL") == 0) {> + config.keyboard = keyboard_map_3final;> + config.composer ! > = hangul_composer_3;> + } else if (strcmp(value, "3NOSHIF! > T") == 0 > ) {> + config.keyboard = keyboard_map_3sun;> + config.composer = hangul_composer_3;> + }> + return;> + }> +> conf_file = fopen(conf_filename, "r");> if (conf_file == NULL) {> perror(conf_filename);> --- iiimf-12.2/leif/hangul/ChangeLog~ 2006-02-15 21:52:32.000000000 +0900> +++ iiimf-12.2/leif/hangul/ChangeLog 2006-02-15 21:52:17.000000000 +0900> @@ -1,3 +1,9 @@> +2006-02-15 Yong-iL Joh <[email protected]>> +> + * composer.c (HANGUL_KEYBOARD_TYPE): user may set 3beolshik> +> + * hangul.conf (HANGUL_KEYBOARD_TYPE): add comment> +> 2005-04-13 Jens Petersen <[email protected]>>> * Makefile.am (hangul_la_CFLAGS): Use IM_LEIFDIR instead of>>