From a7328ad68fb1e87276c07b5ecfdee37da4210626 Mon Sep 17 00:00:00 2001 From: Derek Jennings Date: Sat, 24 Aug 2013 09:27:28 +0100 Subject: respect default in desktop select --- perl-install/install/steps_gtk.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/perl-install/install/steps_gtk.pm b/perl-install/install/steps_gtk.pm index e27426298..253ea2541 100644 --- a/perl-install/install/steps_gtk.pm +++ b/perl-install/install/steps_gtk.pm @@ -260,18 +260,16 @@ sub reallyChooseDesktop { Custom => N("Custom install"), ); my $prev; - my $default_set = 0; my @l = map { my $val = $_; my $sensitive = grep { $_->[0] =~ /$val->[0]/ or $val->[0] eq 'Custom' } map { $_->{flags} } grep { $_->{path} eq 'Graphical Environment' } map { @$_ } $o->{compssUsers}; - $default_set++ if $sensitive; $choice{$val->[0]} = '0'; $prev = gtknew('CheckButton', text => $val->[1], tip => $tips{$val->[0]}, sensitive => $sensitive ? '1' : '0', toggled => sub { $choice{$val->[0]} = $_[0]->get_active }, - active => $default_set == 1 && $sensitive ? ($choice{$val->[0]} = '1') : '0', + active => $sensitive ? ($default_choice == $_) : '0', ); -- cgit v1.2.1