summaryrefslogtreecommitdiffstats
path: root/perl-install/harddrake
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-01-22 09:03:01 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-01-22 09:03:01 +0000
commit4f1c80d9f6dc0648e93fcfeec1606baad0a0cdbb (patch)
tree99ed34a6a587dea77cf08e303e1399143f22d6ed /perl-install/harddrake
parentcb54891249f9ad6484340b424615b87515800258 (diff)
downloaddrakx-backup-do-not-use-4f1c80d9f6dc0648e93fcfeec1606baad0a0cdbb.tar
drakx-backup-do-not-use-4f1c80d9f6dc0648e93fcfeec1606baad0a0cdbb.tar.gz
drakx-backup-do-not-use-4f1c80d9f6dc0648e93fcfeec1606baad0a0cdbb.tar.bz2
drakx-backup-do-not-use-4f1c80d9f6dc0648e93fcfeec1606baad0a0cdbb.tar.xz
drakx-backup-do-not-use-4f1c80d9f6dc0648e93fcfeec1606baad0a0cdbb.zip
- if there's no know driver, offer to pick a driver in the drivers
list in case ldetect-lst isn't up to date but the user know which driver to use - consolidate "pick any driver" entry
Diffstat (limited to 'perl-install/harddrake')
-rw-r--r--perl-install/harddrake/sound.pm25
1 files changed, 14 insertions, 11 deletions
diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm
index 415bd43e0..5b100f398 100644
--- a/perl-install/harddrake/sound.pm
+++ b/perl-install/harddrake/sound.pm
@@ -173,10 +173,7 @@ sub switch {
N("There's no known OSS/ALSA alternative driver for your sound card (%s) which currently uses \"%s\"",
$device->{description}, $driver),
[
- {
- val => N("Let me pick any driver"), disabled => sub {},
- clicked => sub { &choose_any_driver($in, $driver, $device->{description}); goto end }
- },
+ &get_any_driver_entry($in, $driver, $device),
]
);
} elsif ($in->ask_from(N("Sound configuration"),
@@ -212,10 +209,7 @@ 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}) }
- },
+ &get_any_driver_entry($in, $driver, $device),
]))
{
return if $new_driver eq $driver;
@@ -233,12 +227,13 @@ The new \"%s\" driver'll only be used on next bootstrap.", $driver, $new_driver)
N("There's no free driver for your sound card (%s), but there's a proprietary driver at \"%s\".",
$device->{description}, $driver));
} elsif ($driver eq "unknown") {
- $in->ask_warn(N("No known driver"),
+ $in->ask_from(N("No known driver"),
N("There's no known driver for your sound card (%s)",
- $device->{description}));
+ $device->{description}),
+ [ &get_any_driver_entry($in, $driver, $device) ]);
} else {
$in->ask_warn(N("Unkown driver"),
- N("The \"%s\" driver for your sound card is unlisted"),
+ N("Error: The \"%s\" driver for your sound card is unlisted"),
$driver);
}
end:
@@ -292,6 +287,14 @@ The current driver for your \"%s\" sound card is \"%s\" ", $card, $driver)),
}
}
+sub get_any_driver_entry {
+ my ($in, $driver, $device) = @_;
+ {
+ val => N("Let me pick any driver"), disabled => sub {},
+ clicked => sub { &choose_any_driver($in, $driver, $device->{description}); goto end }
+ }
+}
+
sub configure_sound_slots {
each_index {