summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-02-26 17:39:37 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-02-26 17:39:37 +0000
commit45d1eaa53682429655f3c4332f92754528593106 (patch)
tree68a35e79e98baf7ada693ca7be955590cc12c65c
parent22848164af8c8e0c26a831bc63a1558f24e4ca00 (diff)
downloaddrakx-45d1eaa53682429655f3c4332f92754528593106.tar
drakx-45d1eaa53682429655f3c4332f92754528593106.tar.gz
drakx-45d1eaa53682429655f3c4332f92754528593106.tar.bz2
drakx-45d1eaa53682429655f3c4332f92754528593106.tar.xz
drakx-45d1eaa53682429655f3c4332f92754528593106.zip
(copy_advertising): fix changing for advertising_images
-rw-r--r--perl-install/install_steps_gtk.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index 0f94910ef..3683678e7 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -472,6 +472,8 @@ sub beforeInstallPackages {
$o->SUPER::beforeInstallPackages;
$o->copy_advertising;
}
+
+my @advertising_images;
sub copy_advertising {
my ($o) = @_;
@@ -484,6 +486,7 @@ sub copy_advertising {
chomp;
install_any::getAndSaveFile("Mandrake/share/advertising/$_", "$dir/$_");
}
+ @advertising_images = map { "$dir/$_" } @files;
}
}
@@ -517,8 +520,7 @@ sub installPackages {
$cancel->signal_connect(clicked => sub { $pkgs::cancel_install = 1 });
my ($change_time, $i);
- my @images = glob_("$o->{prefix}/tmp/drakx-images/*");
- if (@images) {
+ if (@advertising_images) {
log::l("hiding");
$msg->hide;
$progress->hide;
@@ -543,9 +545,9 @@ sub installPackages {
$last_size = c::headerGetEntry(pkgs::packageHeader($p), 'size');
$text->set((split /\n/, c::headerGetEntry(pkgs::packageHeader($p), 'summary'))[0] || '');
- if (@images && time() - $change_time > 20) {
+ if (@advertising_images && time() - $change_time > 20) {
$change_time = time();
- my $f = $images[$i++ % @images];
+ my $f = $advertising_images[$i++ % @advertising_images];
log::l("advertising $f");
gtkdestroy($advertising);
gtkpack($box, $advertising = gtkpng($f));