diff options
author | Thierry Vignaud <tv@mandriva.org> | 2009-09-07 16:07:02 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2009-09-07 16:07:02 +0000 |
commit | f10c909704d2aca8af201cb4de9eae30c3272fb9 (patch) | |
tree | 402483a74da8d55140c7d0afd27dcf247ed53716 /perl-install/install | |
parent | 91fdaba2b9a34b0bab2a1387b8768d0be5872adc (diff) | |
download | drakx-f10c909704d2aca8af201cb4de9eae30c3272fb9.tar drakx-f10c909704d2aca8af201cb4de9eae30c3272fb9.tar.gz drakx-f10c909704d2aca8af201cb4de9eae30c3272fb9.tar.bz2 drakx-f10c909704d2aca8af201cb4de9eae30c3272fb9.tar.xz drakx-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')
-rw-r--r-- | perl-install/install/NEWS | 1 | ||||
-rw-r--r-- | perl-install/install/steps_gtk.pm | 19 |
2 files changed, 19 insertions, 1 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 22bbaea93..d306cf5b3 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -11,6 +11,7 @@ - install the right kernel-XXX-devel-latest flavor instead of hardcoding 'kernel-desktop-devel-latest' - fix existing raid detection during install (#53159) +- enable to see release notes while installing packages (#34576) Version 12.47 - 1 September 2009 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); |