From ab468a0bddd333f206aca7b4d33ec74451267910 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 26 Feb 2002 21:41:31 +0000 Subject: if no sound card are detected AND the user selected things needing a sound card, propose a special case for ISA cards --- perl-install/install_steps_interactive.pm | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index b263d6634..b81b2228d 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -1024,6 +1024,21 @@ sub summary { return _("Remote CUPS server"); #- fall back in case of something wrong. }; + my @sound_cards = arch() !~ /ppc/ ? modules::get_that_type('sound') : modules::load_thiskind('sound'); + + #- if no sound card are detected AND the user selected things needing a sound card, + #- propose a special case for ISA cards + my $isa_sound_card = + !@sound_cards && ($o->{compssUsersChoice}{GAMES} || $o->{compssUsersChoice}{AUDIO}) && + sub { + if ($o->ask_yesorno('', _("Do you have an ISA sound card?"))) { + $o->do_pkgs->install('sndconfig'); + $o->ask_warn('', _("Run \"sndconfig\" after installation to configure your sound card")); + } else { + $o->ask_warn('', _("No sound card detected. Try \"harddrake\" after installation")); + } + }; + $o->ask_from_({ messages => _("Summary"), cancel => '', @@ -1037,7 +1052,8 @@ sub summary { } grep { $_->{driver} eq 'hisax' } detect_devices::probeall()), (map { { label => _("Sound card"), val => $_->{description} } - } arch() !~ /ppc/ ? modules::get_that_type('sound') : modules::load_thiskind('sound')), + } @sound_cards), + if_($isa_sound_card, { label => _("Sound card"), clicked => $isa_sound_card }), (map { { label => _("TV card"), val => $_->{description} } } grep { $_->{driver} eq 'bttv' } detect_devices::probeall()), -- cgit v1.2.1