From 1c0a5f5d51970e0eecfe34e1c7f8ede8bd886f29 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 22 Aug 2005 14:35:49 +0000 Subject: function $advertize must work when chrooted or not, we can't really know if we're chrooted or not --- perl-install/install_steps_gtk.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index 46ac85247..fc43cee55 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -439,7 +439,7 @@ sub installPackages { ugtk2::gtkadd($w->{window}, my $box = gtknew('VBox', spacing => 10)); my $advertize = sub { - my ($update, $o_chroot_dir) = @_; + my ($update) = @_; @install_any::advertising_images or return; foreach ($msg, $progress, $text) { $show_advertising ? $_->hide : $_->show; @@ -449,7 +449,7 @@ sub installPackages { if ($show_advertising && $update) { $change_time = time(); my $f = $install_any::advertising_images[$i++ % @install_any::advertising_images]; - $f =~ s/\Q$o_chroot_dir// if $o_chroot_dir; + $f =~ s/\Q$::prefix// if ! -f $f; log::l("advertising $f"); my $pl = $f; $pl =~ s/\.png$/.pl/; my $icon_name = $f; $icon_name =~ s/\.png$/_icon.png/; @@ -523,7 +523,7 @@ sub installPackages { $current_total_size += $last_size; $last_size = $p->size; gtkset($text, text => (split /\n/, c::from_utf8($p->summary))[0] || ''); - $advertize->(1, $::prefix) if $show_advertising && $total_size > 20_000_000 && time() - $change_time > 20; + $advertize->(1) if $show_advertising && $total_size > 20_000_000 && time() - $change_time > 20; $w->flush; } elsif ($type eq 'inst' && $subtype eq 'progress') { $progress->set_fraction($total ? $amount / $total : 0); -- cgit v1.2.1