summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps_gtk.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-03-08 16:20:09 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-03-08 16:20:09 +0000
commit54501679f0a96f476c21cfdf4a95698f09f6e183 (patch)
tree400886bfdf96256a007161b28c0f11bbd41f010a /perl-install/install_steps_gtk.pm
parent99fefadac5995e9c23dc41102ebc4cb15c418ec1 (diff)
downloaddrakx-backup-do-not-use-54501679f0a96f476c21cfdf4a95698f09f6e183.tar
drakx-backup-do-not-use-54501679f0a96f476c21cfdf4a95698f09f6e183.tar.gz
drakx-backup-do-not-use-54501679f0a96f476c21cfdf4a95698f09f6e183.tar.bz2
drakx-backup-do-not-use-54501679f0a96f476c21cfdf4a95698f09f6e183.tar.xz
drakx-backup-do-not-use-54501679f0a96f476c21cfdf4a95698f09f6e183.zip
advertising modifs
Diffstat (limited to 'perl-install/install_steps_gtk.pm')
-rw-r--r--perl-install/install_steps_gtk.pm27
1 files changed, 4 insertions, 23 deletions
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index 4687283a7..79012db54 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -481,26 +481,7 @@ sub choosePackagesTree {
sub beforeInstallPackages {
my ($o) = @_;
$o->SUPER::beforeInstallPackages;
- $o->copy_advertising;
-}
-
-my @advertising_images;
-sub copy_advertising {
- my ($o) = @_;
-
- return if $::rootwidth < 800;
-
- my $f = install_any::getFile('Mandrake/share/advertising/list');
- if (my @files = <$f>) {
- my $dir = "$o->{prefix}/tmp/drakx-images";
- mkdir $dir;
- unlink glob_("$dir/*");
- foreach (@files) {
- chomp;
- install_any::getAndSaveFile("Mandrake/share/advertising/$_", "$dir/$_");
- }
- @advertising_images = map { "$dir/$_" } @files;
- }
+ install_any::copy_advertising($o);
}
#------------------------------------------------------------------------------
@@ -533,7 +514,7 @@ sub installPackages {
$cancel->signal_connect(clicked => sub { $pkgs::cancel_install = 1 });
my ($change_time, $i);
- if (@advertising_images) {
+ if (@install_any::advertising_images) {
log::l("hiding");
$msg->hide;
$progress->hide;
@@ -558,9 +539,9 @@ sub installPackages {
$last_size = c::headerGetEntry(pkgs::packageHeader($p), 'size');
$text->set((split /\n/, c::headerGetEntry(pkgs::packageHeader($p), 'summary'))[0] || '');
- if (@advertising_images && time() - $change_time > 20) {
+ if (@install_any::advertising_images && time() - $change_time > 20) {
$change_time = time();
- my $f = $advertising_images[$i++ % @advertising_images];
+ my $f = $install_any::advertising_images[$i++ % @install_any::advertising_images];
log::l("advertising $f");
gtkdestroy($advertising);
gtkpack($box, $advertising = gtkpng($f));