summaryrefslogtreecommitdiffstats
path: root/perl-install/install/steps_gtk.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-09-07 16:07:02 +0000
committerThierry Vignaud <tv@mandriva.org>2009-09-07 16:07:02 +0000
commitf10c909704d2aca8af201cb4de9eae30c3272fb9 (patch)
tree402483a74da8d55140c7d0afd27dcf247ed53716 /perl-install/install/steps_gtk.pm
parent91fdaba2b9a34b0bab2a1387b8768d0be5872adc (diff)
downloaddrakx-backup-do-not-use-f10c909704d2aca8af201cb4de9eae30c3272fb9.tar
drakx-backup-do-not-use-f10c909704d2aca8af201cb4de9eae30c3272fb9.tar.gz
drakx-backup-do-not-use-f10c909704d2aca8af201cb4de9eae30c3272fb9.tar.bz2
drakx-backup-do-not-use-f10c909704d2aca8af201cb4de9eae30c3272fb9.tar.xz
drakx-backup-do-not-use-f10c909704d2aca8af201cb4de9eae30c3272fb9.zip
(installPackages) enable to see release notes while installing packages (#34576)
since we are not in a gtk+ main loop but deep in a callback where librpm performs chroot(), we only fork the release notes viewer when safe
Diffstat (limited to 'perl-install/install/steps_gtk.pm')
-rw-r--r--perl-install/install/steps_gtk.pm19
1 files changed, 18 insertions, 1 deletions
diff --git a/perl-install/install/steps_gtk.pm b/perl-install/install/steps_gtk.pm
index 676d50be4..b5614e670 100644
--- a/perl-install/install/steps_gtk.pm
+++ b/perl-install/install/steps_gtk.pm
@@ -533,6 +533,7 @@ sub installPackages {
local $::noborderWhenEmbedded = 1;
my $w = ugtk2->new(N("Installing"));
state $show_advertising;
+ my $show_release_notes;
my $pkg_log_widget = gtknew('TextView', editable => 0);
my ($advertising_image, $change_time, $i);
@@ -566,6 +567,10 @@ sub installPackages {
$pkg_log_widget->{to_bottom}->('force');
});
+ my $release_notes = any::get_release_notes($o);
+ my $rel_notes = gtknew('Button', text => N("Release Notes"),
+ clicked => sub { $show_release_notes = 1 });
+
ugtk2::gtkadd($w->{window}, my $box = gtknew('VBox', children_tight => [
gtknew('Image_using_pixmap', file_ref => \$advertising_image, show_ref => \$show_advertising),
]));
@@ -580,7 +585,11 @@ sub installPackages {
]),
gtknew('VBox', children_centered => [ gtknew('ProgressBar', fraction_ref => \ (my $progress_total), height => 25) ]),
gtknew('HSeparator'),
- gtknew('HButtonBox', spacing => 5, layout => 'end', children_loose => [ $cancel, $details ]),
+ gtknew('HButtonBox', spacing => 0, layout => 'spread', children_loose => [
+ if_($release_notes, $rel_notes),
+ gtknew('HButtonBox', spacing => 5, layout => 'end',
+ children_loose => [ $cancel, $details ]),
+ ]),
])), 0, 1, 0);
#- for the hide_ref & show_ref to work, we must set $show_advertising after packing
@@ -611,6 +620,14 @@ sub installPackages {
$current_total_size += $last_size;
$last_size = $p->size;
$advertize->(1) if $show_advertising && $total_size > 20_000_000 && time() - $change_time > 20;
+
+ # display release notes if requested, when not chrooted:
+ if ($show_release_notes) {
+ undef $show_release_notes;
+ any::run_display_release_notes($release_notes);
+ $w->flush;
+ }
+
$w->flush;
} elsif ($type eq 'inst' && $subtype eq 'progress') {
gtkval_modify(\$pkg_progress, $total ? $amount / $total : 0);