diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-01-21 14:47:57 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-01-21 14:47:57 +0000 |
commit | 7542a3fce82adbe0eb350d18210e1ed9dcf8a8c8 (patch) | |
tree | 26a2038a9ca8fa15ff9701f7136d1ad88feec4bd /perl-install/harddrake | |
parent | 0ec83e412f08613f2a79274e623cb8cb073202b1 (diff) | |
download | drakx-7542a3fce82adbe0eb350d18210e1ed9dcf8a8c8.tar drakx-7542a3fce82adbe0eb350d18210e1ed9dcf8a8c8.tar.gz drakx-7542a3fce82adbe0eb350d18210e1ed9dcf8a8c8.tar.bz2 drakx-7542a3fce82adbe0eb350d18210e1ed9dcf8a8c8.tar.xz drakx-7542a3fce82adbe0eb350d18210e1ed9dcf8a8c8.zip |
if there's no alternative driver or if the current setting does not
please the user, let he pick any driver among multimedia/sound modules
category
Diffstat (limited to 'perl-install/harddrake')
-rw-r--r-- | perl-install/harddrake/sound.pm | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm index be662b4ed..32089c7b7 100644 --- a/perl-install/harddrake/sound.pm +++ b/perl-install/harddrake/sound.pm @@ -169,9 +169,16 @@ sub switch { if ($alternative) { my $new_driver = $alternative->[0]; if ($new_driver eq 'unknown') { - $in->ask_warn(N("No alternative driver"), + $in->ask_from(N("No alternative driver"), N("There's no known OSS/ALSA alternative driver for your sound card (%s) which currently uses \"%s\"", - $device->{description}, $driver)); + $device->{description}, $driver), + [ + { + val => N("Let me pick any driver"), disabled => sub {}, + clicked => sub { &choose_any_driver($in, $driver, $device->{description}); goto end } + }, + ] + ); } elsif ($in->ask_from(N("Sound configuration"), N("Here you can select an alternative driver (either OSS or ALSA) for your sound card (%s).", $device->{description}) . @@ -204,7 +211,11 @@ To use alsa, one can either use: { val => N("Trouble shooting"), disabled => sub {}, clicked => sub { &trouble($in) } - } + }, + { + val => N("Let me pick any driver"), disabled => sub {}, + clicked => sub { &choose_any_driver($in, $driver, $device->{description}) } + }, ])) { return if $new_driver eq $driver; @@ -225,6 +236,7 @@ The new \"%s\" driver'll only be used on next bootstrap.", $driver, $new_driver) N("The \"%s\" driver for your sound card is unlisted"), $driver); } + end: } sub config { @@ -258,6 +270,23 @@ initlevel 3 "))); } +sub choose_any_driver { + my ($in, $driver, $card) = @_; + my $old_driver = $driver; + if ($in->ask_from(N("Choosing an arbitratry driver"), + formatAlaTeX(N("If you really think that you know which driver is the right one for your card +you can pick one in the above list. + +The current driver for your \"%s\" sound card is \"%s\" ", $card, $driver)), + [ + { label => N("Driver:"), val => \$driver, list => [ category2modules("multimedia/sound") ], type => 'combo', default => $driver, sort =>1, separator => '|' }, + ] + )) { + + do_switch($old_driver, $driver); + } +} + sub configure_sound_slots { each_index { |