From 2b8b0d8eed2f7acea593bf79a45b0dbd0fbf3443 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 23 Feb 2001 21:35:08 +0000 Subject: (@graphical_steps): specify which step should be interactive --- perl-install/install_steps_auto_install.pm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'perl-install/install_steps_auto_install.pm') diff --git a/perl-install/install_steps_auto_install.pm b/perl-install/install_steps_auto_install.pm index 9eae1794d..3fadfc6ad 100644 --- a/perl-install/install_steps_auto_install.pm +++ b/perl-install/install_steps_auto_install.pm @@ -3,10 +3,12 @@ package install_steps_auto_install; # $Id$ use diagnostics; use strict; use lang; -use vars qw(@ISA $graphical); +use vars qw(@ISA $graphical @graphical_steps); @ISA = qw(install_steps); +@graphical_steps = qw(enteringStep installPackages); + use modules; @@ -22,8 +24,16 @@ sub new { if ($graphical) { require install_steps_gtk; - undef *enteringStep; *enteringStep = \&install_steps_gtk::enteringStep; - undef *installPackages; *installPackages = \&install_steps_gtk::installPackages; + push @ISA, 'interactive_gtk'; + foreach my $f (@graphical_steps) { + no strict 'refs'; + my $pkg = $install_steps_gtk::{$f} ? 'install_steps_gtk' : 'install_steps_interactive'; + log::l("install_steps_auto_install: adding function ", $pkg, "::", $f); + *{"install_steps_auto_install::$f"} = sub { + local @ISA = ('install_steps_gtk', @ISA); + &{$pkg . '::' . $f}; + }; + } goto &install_steps_gtk::new; } else { (bless {}, ref $type || $type)->SUPER::new($o); -- cgit v1.2.1