summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-01-21 11:32:31 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-01-21 11:32:31 +0000
commit6e6555aa79b01042ef275f975380463786fdfd2c (patch)
treec963de7eb58fd7744c80ff9f39a7b542dc0d2bff /perl-install
parent1c1cafe18260b6814b6b29008a2ebeeca60f86c3 (diff)
downloaddrakx-6e6555aa79b01042ef275f975380463786fdfd2c.tar
drakx-6e6555aa79b01042ef275f975380463786fdfd2c.tar.gz
drakx-6e6555aa79b01042ef275f975380463786fdfd2c.tar.bz2
drakx-6e6555aa79b01042ef275f975380463786fdfd2c.tar.xz
drakx-6e6555aa79b01042ef275f975380463786fdfd2c.zip
(acceptLicense): handle "Previous ->" correctly, and simplify code
(esp. don't set useless_thing_accepted)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install_steps_interactive.pm15
1 files changed, 7 insertions, 8 deletions
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);
+ }
}
#------------------------------------------------------------------------------