From 6e6555aa79b01042ef275f975380463786fdfd2c Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 21 Jan 2003 11:32:31 +0000 Subject: (acceptLicense): handle "Previous ->" correctly, and simplify code (esp. don't set useless_thing_accepted) --- perl-install/install_steps_interactive.pm | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'perl-install') diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 538c39d6f..dfa11e34c 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -79,16 +79,15 @@ so the messages will be displayed in english during installation") if $ENV{LANGU sub acceptLicense { my ($o) = @_; - return if $o->{useless_thing_accepted}; - $o->set_help('license'); - $o->{useless_thing_accepted} = $o->ask_from_list_(N("License agreement"), - formatAlaTeX(install_messages::main_license() . "\n\n\n" . install_messages::warning_about_patents()), - [ N_("Accept"), N_("Refuse") ], "Refuse") eq "Accept" and return; + my $r = $o->ask_from_list_(N("License agreement"), + formatAlaTeX(install_messages::main_license() . "\n\n\n" . install_messages::warning_about_patents()), + [ N_("Accept"), N_("Refuse") ], "Refuse") or die 'already displayed'; - $o->ask_yesorno('', N("Are you sure you refuse the licence?"), 1) and $o->exit; - - &acceptLicense; + if ($r ne "Accept") { + $o->ask_yesorno('', N("Are you sure you refuse the licence?"), 1) and $o->exit; + acceptLicense($o); + } } #------------------------------------------------------------------------------ -- cgit v1.2.1