summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2013-11-29 09:42:50 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2013-11-29 09:46:54 +0100
commit89850eb2cbdc105293b3661abad91910fff231ca (patch)
tree564a2eb3493a10e17e6cf85428ae24e916e889a8 /perl-install
parentbaada4e5edbb3f95f0d00631bba0a4b1303f0883 (diff)
downloaddrakx-89850eb2cbdc105293b3661abad91910fff231ca.tar
drakx-89850eb2cbdc105293b3661abad91910fff231ca.tar.gz
drakx-89850eb2cbdc105293b3661abad91910fff231ca.tar.bz2
drakx-89850eb2cbdc105293b3661abad91910fff231ca.tar.xz
drakx-89850eb2cbdc105293b3661abad91910fff231ca.zip
reverse the if branches
rationale: since we no more offer an OSS alternative, the list is empty and thus we were not offering the dialog anymore. However it does more than offering to switch between OSS & ALSA: we do want to offer to configure PA even if we cannot switch to another driver. Thus the GUI is now either show an error dialog if there's no supported sound card of showing PA options
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/harddrake/sound.pm15
1 files changed, 8 insertions, 7 deletions
diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm
index 7605012b8..ce565e03b 100644
--- a/perl-install/harddrake/sound.pm
+++ b/perl-install/harddrake/sound.pm
@@ -129,7 +129,12 @@ sub config {
my $driver = $device->{current_driver} || $device->{driver};
my @alternative = $driver ne $device->{driver} ? $device->{driver} : ();
- if (@alternative) {
+ if ($driver eq "unknown") {
+ $in->ask_from(N("No known driver"),
+ N("There's no known driver for your sound card (%s)",
+ $device->{description}),
+ [ get_any_driver_entry($in, $modules_conf, $driver, $device) ]);
+ } else {
my $new_driver = $driver;
push @alternative, $driver;
my %des = modules::category2modules_and_description('multimedia/sound');
@@ -212,6 +217,7 @@ To use alsa, one can either use:
},
},
[
+ if_(@alternative,
{
label => N("Driver:"), val => \$new_driver, list => \@alternative, default => $new_driver, sort =>1,
allow_empty_list => 1,
@@ -220,7 +226,7 @@ To use alsa, one can either use:
sprintf(($des{$drv} ? "$des{$drv} (%s [%s])"
: "%s [%s]"), $drv, $drv =~ /^snd_/ ? 'ALSA' : 'OSS');
}
- },
+ }),
@common,
]))
{
@@ -230,11 +236,6 @@ To use alsa, one can either use:
do_switch($in, $modules_conf, $device->{current_driver}, $new_driver, $device->{sound_slot_index});
$device->{current_driver} = $new_driver;
}
- } elsif ($driver eq "unknown") {
- $in->ask_from(N("No known driver"),
- N("There's no known driver for your sound card (%s)",
- $device->{description}),
- [ get_any_driver_entry($in, $modules_conf, $driver, $device) ]);
}
end:
}