summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-08-28 14:28:01 +0000
committerThierry Vignaud <tv@mandriva.org>2008-08-28 14:28:01 +0000
commit443bf8e673acc4d83fb3f710bc341fb0dcfe9513 (patch)
treede198024e22a9b3e58e44709fbd19b74090b1304 /perl-install/any.pm
parenta4336664d4635b5f94a90bc20f36f46353ef02de (diff)
downloaddrakx-443bf8e673acc4d83fb3f710bc341fb0dcfe9513.tar
drakx-443bf8e673acc4d83fb3f710bc341fb0dcfe9513.tar.gz
drakx-443bf8e673acc4d83fb3f710bc341fb0dcfe9513.tar.bz2
drakx-443bf8e673acc4d83fb3f710bc341fb0dcfe9513.tar.xz
drakx-443bf8e673acc4d83fb3f710bc341fb0dcfe9513.zip
(acceptLicense,display_release_notes) fix displaying release notes in text mode (#43263)
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm13
1 files changed, 11 insertions, 2 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 950801158..ab8a3ea6b 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -865,6 +865,12 @@ sub autologin {
sub display_release_notes {
my ($o) = @_;
+ if (!$o->isa('interactive::gtk')) {
+ $o->ask_from_({ title => N("Release Notes"),
+ messages => $o->{release_notes}, #formatAlaTeX(messages::main_license()),
+ }, [ {} ]);
+ return;
+ }
require Gtk2::Html2;
require ugtk2;
ugtk2->import(':all');
@@ -901,7 +907,10 @@ sub acceptLicense {
my ($o) = @_;
require messages;
- $o->{release_notes} = join("\n\n", grep { $_ } map {
+ my $ext = $o->isa('interactive::gtk') ? '.html' : '.txt';
+ my $separator = $o->isa('interactive::gtk') ? "\n\n" : '';
+
+ $o->{release_notes} = join($separator, grep { $_ } map {
if ($::isInstall) {
my $f = install::any::getFile_($o->{stage2_phys_medium}, $_);
$f && cat__($f);
@@ -910,7 +919,7 @@ sub acceptLicense {
my $d = find { -e "$_/$file" } glob_("/usr/share/doc/*-release-*");
$d && cat_("$d/$file");
}
- } 'release-notes.html', 'release-notes.' . arch() . '.html');
+ } "release-notes$ext", 'release-notes.' . arch() . $ext);
# we do not handle links:
$o->{release_notes} =~ s!<a href=".*?">(.*?)</a>!$1!g;