summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-08-18 10:21:23 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-08-18 10:21:23 +0000
commite88b31fecb94d372c66bcfb79607a651d4a5e686 (patch)
tree91b7b7d8b7ef715180f1fa42145da93bb280c3c4
parent31f15eb8d3295ab06c85bb62bc9c4cb42f5ee4bb (diff)
downloaddrakx-backup-do-not-use-e88b31fecb94d372c66bcfb79607a651d4a5e686.tar
drakx-backup-do-not-use-e88b31fecb94d372c66bcfb79607a651d4a5e686.tar.gz
drakx-backup-do-not-use-e88b31fecb94d372c66bcfb79607a651d4a5e686.tar.bz2
drakx-backup-do-not-use-e88b31fecb94d372c66bcfb79607a651d4a5e686.tar.xz
drakx-backup-do-not-use-e88b31fecb94d372c66bcfb79607a651d4a5e686.zip
fix default IM setting when switching language
-rw-r--r--perl-install/any.pm1
-rw-r--r--perl-install/lang.pm10
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));