From 0b690781203ed2113d85e5a53c4d260847c25387 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 3 Sep 2003 16:04:49 +0000 Subject: - move call to ->charsetChanged from install_steps_interactive to install_steps so that we can use it in install_steps_auto_install_non_interactive - don't overload ->selectLanguage to call lang::load_console_font(), overload ->charsetChanged instead --- perl-install/install_steps.pm | 2 ++ perl-install/install_steps_auto_install.pm | 11 +++++------ perl-install/install_steps_interactive.pm | 2 -- perl-install/install_steps_newt.pm | 15 +++++---------- perl-install/install_steps_stdio.pm | 14 +++++--------- 5 files changed, 17 insertions(+), 27 deletions(-) (limited to 'perl-install') diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index a4ab012fa..62e1f699c 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -114,6 +114,8 @@ sub selectLanguage { keyboard::setup($o->{keyboard}) if !$::live; } + $o->charsetChanged; + addToBeDone { lang::write_langs($o->{prefix}, $o->{locale}{langs}); } 'formatPartitions' unless $::g_auto_install; diff --git a/perl-install/install_steps_auto_install.pm b/perl-install/install_steps_auto_install.pm index a4a92f1e3..e83b34267 100644 --- a/perl-install/install_steps_auto_install.pm +++ b/perl-install/install_steps_auto_install.pm @@ -94,6 +94,11 @@ sub wait_message { my ($_o, $_title, $_message) = @_; } +sub charsetChanged { + my ($o) = @_; + lang::load_console_font($o->{locale}); +} + sub errorInStep { my ($_o, $_err) = @_; print "error :(\n"; @@ -107,12 +112,6 @@ sub errorInStep { #-###################################################################################### #- Steps Functions #-###################################################################################### -sub selectLanguage { - my ($o) = @_; - $o->install_steps::selectLanguage; - lang::load_console_font($o->{locale}); -} - sub installPackages { my ($o, $packages) = @_; catch_cdie { $o->install_steps::installPackages($packages) } sub { print formatError($@), "\n"; 1 } diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index fa88007a2..b431c1bf4 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -59,8 +59,6 @@ sub selectLanguage { $o->{locale}{lang} = any::selectLanguage($o, $o->{locale}{lang}, $o->{locale}{langs} ||= {}); install_steps::selectLanguage($o); - $o->charsetChanged; - if ($o->isa('interactive::gtk')) { $o->ask_warn('', formatAlaTeX( "If you see this message it is because you chose a language for diff --git a/perl-install/install_steps_newt.pm b/perl-install/install_steps_newt.pm index 36c6ec8cf..2b01dc82c 100644 --- a/perl-install/install_steps_newt.pm +++ b/perl-install/install_steps_newt.pm @@ -35,6 +35,11 @@ sub new { (bless {}, ref($type) || $type)->SUPER::new($o); } +sub charsetChanged { + my ($o) = @_; + lang::load_console_font($o->{locale}); +} + sub enteringStep { my ($o, $step) = @_; $o->SUPER::enteringStep($step); @@ -46,15 +51,5 @@ sub exitInstall { interactive::newt::end(); } -#-###################################################################################### -#- Steps Functions -#-###################################################################################### -sub selectLanguage { - my ($o) = @_; - $o->SUPER::selectLanguage; - lang::load_console_font($o->{locale}); -} - - 1; diff --git a/perl-install/install_steps_stdio.pm b/perl-install/install_steps_stdio.pm index 223c2f2b5..ac9408b3c 100644 --- a/perl-install/install_steps_stdio.pm +++ b/perl-install/install_steps_stdio.pm @@ -17,6 +17,11 @@ sub new($$) { (bless {}, ref($type) || $type)->SUPER::new($o); } +sub charsetChanged { + my ($o) = @_; + lang::load_console_font($o->{locale}); +} + sub enteringStep { my ($o, $step) = @_; print N("Entering step `%s'\n", translate($o->{steps}{$step}{text})); @@ -28,13 +33,4 @@ sub leavingStep { print "--------\n"; } -#-###################################################################################### -#- Steps Functions -#-###################################################################################### -sub selectLanguage { - my ($o, $first_time) = @_; - $o->SUPER::selectLanguage($first_time); - lang::load_console_font($o->{locale}); -} - 1; -- cgit v1.2.1