summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps_gtk.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-04-12 11:51:15 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-04-12 11:51:15 +0000
commit300c42db8c4ebb306fe7b07b656e5d5b1277b015 (patch)
treeb11844555657133fd2e62980e68906f91ab949b7 /perl-install/install_steps_gtk.pm
parentcc3321b90b2ee25deec842e1177d57bd92a4de87 (diff)
downloaddrakx-300c42db8c4ebb306fe7b07b656e5d5b1277b015.tar
drakx-300c42db8c4ebb306fe7b07b656e5d5b1277b015.tar.gz
drakx-300c42db8c4ebb306fe7b07b656e5d5b1277b015.tar.bz2
drakx-300c42db8c4ebb306fe7b07b656e5d5b1277b015.tar.xz
drakx-300c42db8c4ebb306fe7b07b656e5d5b1277b015.zip
(installPackages): fix no advertising with less than 20MB of packages
Diffstat (limited to 'perl-install/install_steps_gtk.pm')
-rw-r--r--perl-install/install_steps_gtk.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index bd5220dc1..760f15122 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -581,7 +581,7 @@ sub installPackages {
my $advertize = sub {
$show_advertising ? $_->hide : $_->show foreach $msg, $progress, $text;
gtkdestroy($advertising) if $advertising;
- if ($show_advertising) {
+ if ($show_advertising && $_[0]) {
$change_time = time();
my $f = $install_any::advertising_images[$i++ % @install_any::advertising_images];
log::l("advertising $f");
@@ -594,7 +594,7 @@ sub installPackages {
$cancel->signal_connect(clicked => sub { $pkgs::cancel_install = 1 });
$details->signal_connect(clicked => sub {
invbool \$show_advertising;
- $advertize->();
+ $advertize->(1);
});
$advertize->();
@@ -615,7 +615,7 @@ sub installPackages {
my $p = pkgs::packageByName($o->{packages}, $name);
$last_size = c::headerGetEntry(pkgs::packageHeader($p), 'size');
$text->set((split /\n/, c::headerGetEntry(pkgs::packageHeader($p), 'summary'))[0] || '');
- $advertize->() if $show_advertising && $total_size > 20 * sqr(1024) && time() - $change_time > 20;
+ $advertize->(1) if $show_advertising && $total_size > 20 * sqr(1024) && time() - $change_time > 20;
$w->flush;
} elsif ($m =~ /^Progressing installing package/) {
$progress->update($_[2] ? $_[1] / $_[2] : 0);