From 02d83b6b5e31447deb2937619e09150aa52bdee8 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 23 Feb 2005 21:41:26 +0000 Subject: - fix displaying "Advanced" instead of "Basic" in advanced_state by default - cleanup --- perl-install/interactive/gtk.pm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'perl-install') diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm index d29c2df9b..5d35da376 100644 --- a/perl-install/interactive/gtk.pm +++ b/perl-install/interactive/gtk.pm @@ -623,7 +623,10 @@ sub ask_fromW { $first_time = 0; $set_all->(); #- must be done when showing advanced lists (to center selected value) }; - my $advanced_button = [ $common->{advanced_label}, + if ($::expert && @$l2) { + $common->{advanced_state} = 1; + } + my $advanced_button = [ $common->{advanced_state} ? $common->{advanced_label_close} : $common->{advanced_label}, sub { my ($w) = @_; $set_advanced->(!$advanced); @@ -638,10 +641,6 @@ sub ask_fromW { }, 1 ]), if_($common->{more_buttons}, @{$common->{more_buttons}}), ); - if ($::expert && @$l2) { - $common->{advanced_state} = 1; - $advanced_button->[0] = $common->{advanced_label_close}; - } my $buttons_pack = ($common->{ok} || !exists $common->{ok}) && $mainw->create_okcancel($common->{ok}, $common->{cancel}, '', @more_buttons, if_(@$l2, $advanced_button)); my @widgets_to_pack; -- cgit v1.2.1