summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-12-15 16:25:42 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-12-15 16:25:42 +0000
commit9b77010c4ff36db450f0218a6198ec5fe7dc2179 (patch)
treec014dd2f030e0f9576dfe883261608fa8912010e /perl-install/any.pm
parenteac3e2367e57f09a0953841823f08f52eda2a89e (diff)
downloaddrakx-9b77010c4ff36db450f0218a6198ec5fe7dc2179.tar
drakx-9b77010c4ff36db450f0218a6198ec5fe7dc2179.tar.gz
drakx-9b77010c4ff36db450f0218a6198ec5fe7dc2179.tar.bz2
drakx-9b77010c4ff36db450f0218a6198ec5fe7dc2179.tar.xz
drakx-9b77010c4ff36db450f0218a6198ec5fe7dc2179.zip
(acceptLicense) move it from install_steps_interactive.pm into any.pm so that
it is availlable from within finish-install
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm31
1 files changed, 31 insertions, 0 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 2ed01df13..596c16516 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -712,6 +712,37 @@ sub autologin {
}
}
+sub acceptLicense {
+ my ($o) = @_;
+
+ $o->{release_notes} = join("\n\n", map {
+ my $f = install_any::getFile($_);
+ $f && cat__($f);
+ } 'release-notes.txt', 'release-notes.' . arch() . '.txt');
+
+ return if $o->{useless_thing_accepted};
+
+ my $r = $::testing ? 'Accept' : 'Refuse';
+
+ $o->ask_from_({ title => N("License agreement"),
+ icon => 'banner-license',
+ cancel => N("Quit"),
+ messages => formatAlaTeX(install_messages::main_license() . "\n\n\n" . install_messages::warning_about_patents()),
+ interactive_help_id => 'acceptLicense',
+ if_(!$::globetrotter, more_buttons => [ [ N("Release Notes"), sub { $o->ask_warn(N("Release Notes"), $o->{release_notes}) }, 1 ] ]),
+ callbacks => { ok_disabled => sub { $r eq 'Refuse' } },
+ },
+ [ { list => [ N_("Accept"), N_("Refuse") ], val => \$r, type => 'list', format => sub { translate($_[0]) } } ])
+ or do {
+ if ($::globetrotter) {
+ run_program::run('killall', 'Xorg');
+ exec("/sbin/reboot");
+ }
+ install_any::ejectCdrom();
+ $o->exit;
+ };
+}
+
sub selectLanguage_install {
my ($in, $locale) = @_;