From ede1eacadd1ad9ca90fb1d7ee2508bce4eac3dbe Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Tue, 19 Sep 2000 16:45:48 +0000 Subject: changed `suspend' and `resume' to behave as expected. added `enter_console' and `leave_console' for install_interactive::use_fdisk --- perl-install/Xconfigurator.pm | 4 ++-- perl-install/install_interactive.pm | 4 ++-- perl-install/interactive.pm | 2 ++ perl-install/interactive_gtk.pm | 7 +++++-- perl-install/interactive_newt.pm | 2 ++ 5 files changed, 13 insertions(+), 6 deletions(-) (limited to 'perl-install') diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index d094f27fe..f924b379c 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -271,10 +271,10 @@ NOTE THIS IS EXPERIMENTAL SUPPORT AND MAY FREEZE YOUR COMPUTER.", $xf3_ver)) . " } -x "$prefix$card->{prog}" or $install && do { - $in->suspend if ref($in) =~ /newt/; + $in->suspend; &$install('server', @l) if $card->{use_xf4}; &$install($card->{server}, @l) if !$card->{use_xf4}; - $in->resume if ref($in) =~ /newt/; + $in->resume; }; -x "$prefix$card->{prog}" or die "server $card->{server} is not available (should be in $prefix$card->{prog})"; diff --git a/perl-install/install_interactive.pm b/perl-install/install_interactive.pm index 187fddf1c..45766abaa 100644 --- a/perl-install/install_interactive.pm +++ b/perl-install/install_interactive.pm @@ -158,7 +158,7 @@ When sure, press Ok.")) or return; $solutions{fdisk} = [ -10, _("Use fdisk"), sub { - $o->suspend; + $o->enter_console; foreach (@$hds) { print "\n" x 10, _("You can now partition %s. When you are done, don't forget to save using `w'", partition_table_raw::description($_)); @@ -166,7 +166,7 @@ When you are done, don't forget to save using `w'", partition_table_raw::descrip my $pid = fork or exec "fdisk", devices::make($_->{device}); waitpid($pid, 0); } - $o->resume; + $o->leave_console; 0; } ] if $o->{partitioning}{fdisk}; diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm index e11a72029..8096c4a0c 100644 --- a/perl-install/interactive.pm +++ b/perl-install/interactive.pm @@ -61,6 +61,8 @@ sub vnew { } } +sub enter_console {} +sub leave_console {} sub suspend {} sub resume {} sub end {} diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm index 3a198a5dd..5335909d9 100644 --- a/perl-install/interactive_gtk.pm +++ b/perl-install/interactive_gtk.pm @@ -16,8 +16,11 @@ sub new { $::windowheight ||= 400 if $::isStandalone; goto &interactive::new; } -sub suspend { my ($o) = @_; $o->{suspended} = common::setVirtual(1) } -sub resume { my ($o) = @_; common::setVirtual(delete $o->{suspended}) } +sub enter_console { my ($o) = @_; $o->{suspended} = common::setVirtual(1) } +sub leave_console { my ($o) = @_; common::setVirtual(delete $o->{suspended}) } + +sub suspend {} +sub resume {} sub exit { gtkset_mousecursor_normal(); #- for restoring a normal in any case on standalone diff --git a/perl-install/interactive_newt.pm b/perl-install/interactive_newt.pm index 845bb0767..9aa80b4c8 100644 --- a/perl-install/interactive_newt.pm +++ b/perl-install/interactive_newt.pm @@ -23,6 +23,8 @@ sub new() { bless {}, $_[0]; } +sub enter_console { Newt::Suspend } +sub leave_console { Newt::Suspend } sub suspend { Newt::Suspend } sub resume { Newt::Resume } sub end() { Newt::Finished } -- cgit v1.2.1