From ffbff73124b5ff7d92283ba6a141131f9ff2b0d4 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 11 Mar 2008 14:58:20 +0000 Subject: (switch) factorize common options --- perl-install/harddrake/sound.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'perl-install/harddrake/sound.pm') diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm index ca1c2352a..8cd3d5283 100644 --- a/perl-install/harddrake/sound.pm +++ b/perl-install/harddrake/sound.pm @@ -235,15 +235,17 @@ sub switch { push @alternative, $driver; my %des = modules::category2modules_and_description('multimedia/sound'); + my @common = ( + get_any_driver_entry($in, $modules_conf, $driver, $device), + ); + if ($new_driver eq 'unknown') { $in->ask_from_({ title => N("No alternative driver"), messages => N("There's no known OSS/ALSA alternative driver for your sound card (%s) which currently uses \"%s\"", $device->{description}, $driver), }, - [ - get_any_driver_entry($in, $modules_conf, $driver, $device), - ] + \@common, ); } elsif ($in->ask_from_({ title => N("Sound configuration"), messages => @@ -281,7 +283,7 @@ To use alsa, one can either use: val => N("Trouble shooting"), disabled => sub {}, clicked => sub { &trouble($in) } }, - get_any_driver_entry($in, $modules_conf, $driver, $device), + @common, ])) { return if $new_driver eq $device->{current_driver}; -- cgit v1.2.1