diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-08-18 10:21:23 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-08-18 10:21:23 +0000 |
commit | e88b31fecb94d372c66bcfb79607a651d4a5e686 (patch) | |
tree | 91b7b7d8b7ef715180f1fa42145da93bb280c3c4 /perl-install | |
parent | 31f15eb8d3295ab06c85bb62bc9c4cb42f5ee4bb (diff) | |
download | drakx-e88b31fecb94d372c66bcfb79607a651d4a5e686.tar drakx-e88b31fecb94d372c66bcfb79607a651d4a5e686.tar.gz drakx-e88b31fecb94d372c66bcfb79607a651d4a5e686.tar.bz2 drakx-e88b31fecb94d372c66bcfb79607a651d4a5e686.tar.xz drakx-e88b31fecb94d372c66bcfb79607a651d4a5e686.zip |
fix default IM setting when switching language
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/any.pm | 1 | ||||
-rw-r--r-- | perl-install/lang.pm | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index cde0da8f4..0e2c480a0 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -734,6 +734,7 @@ sub selectCountry { $h->{country}); } @lang::locales; @best == 1 and @best = (); + $locale->{IM} = lang::get_default_im($locale->{lang}); my ($other, $ext_country); member($country, @best) or ($ext_country, $country) = ($country, $ext_country); diff --git a/perl-install/lang.pm b/perl-install/lang.pm index 09b2992cf..6e8c233b0 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -624,10 +624,20 @@ my %xim = ( #- }, ); +my %default_im; + +sub get_default_im { + my ($lang) = @_; + $default_im{$lang}{IM}; +} + sub set_default_im { my ($im, @langs) = @_; add2hash($xim{$_}, $gtkqt_im{$im}) foreach @langs; add2hash($xim{$_}, { XIM_PROGRAM => $im_xim_program{$im}{$_} }) foreach @langs; + foreach (@langs) { + $default_im{$_}{IM} = $im foreach $_, analyse_locale_name($_)->{main}; + } } set_default_im('x-unikey', qw(vi_VN vi_VN.TCVN vi_VN.UTF-8 vi_VN.VISCII)); |