From 8ce48e0454f969b01ea6ff1b3c670e3891c08c48 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 9 Dec 2002 20:32:25 +0000 Subject: remove code handling setstep --- perl-install/install2.pm | 11 ----------- perl-install/install_gtk.pm | 1 - perl-install/interactive/newt.pm | 10 ++-------- perl-install/my_gtk.pm | 12 +----------- perl-install/ugtk2.pm | 10 ---------- 5 files changed, 3 insertions(+), 41 deletions(-) diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 190585859..31879d9c7 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -572,17 +572,6 @@ sub main { if ($err) { local $_ = $err; $o->kill_action; - if (/^setstep (.*)/) { - $o->{step} = $1; - $o->{steps}{$1}{done} = 0; - $clicked = 1; - redo MAIN; - } - if (/^set_theme$/) { - require install_gtk; - install_gtk::install_theme($o, 'marble3d'); - redo MAIN; - } if (!/^already displayed/) { eval { $o->errorInStep($_) }; $o->{steps}{$o->{step}}{auto} = 0; diff --git a/perl-install/install_gtk.pm b/perl-install/install_gtk.pm index 9342b2296..cb9610859 100644 --- a/perl-install/install_gtk.pm +++ b/perl-install/install_gtk.pm @@ -156,7 +156,6 @@ sub create_steps_window { $darea->signal_connect(enter_notify_event => sub { $in_button = 1; $draw_pix->($f->('-on')) }); $darea->signal_connect(leave_notify_event => sub { undef $in_button; $draw_pix->($f->('')) }); $darea->signal_connect(button_press_event => sub { $draw_pix->($f->('-click')) }); - $darea->signal_connect(button_release_event => sub { $in_button && die "setstep $step_name\n" }); } gtkpack_(Gtk2::HBox->new(0,5), 0, $darea, 0, Gtk2::Label->new(translate($step->{text}))); } grep { diff --git a/perl-install/interactive/newt.pm b/perl-install/interactive/newt.pm index 1214de57b..5c531f1fc 100644 --- a/perl-install/interactive/newt.pm +++ b/perl-install/interactive/newt.pm @@ -217,18 +217,12 @@ sub ask_fromW_real { my ($canceled); do { - my $r = do { - local $::setstep = 1; - $form->RunForm; - }; + my $r = $form->RunForm; $canceled = $cancel && $$r == $$cancel; if (my ($button) = grep { $$r == ${$_->{w}} } @widgets) { $get_all->(); - my $v = do { - local $::setstep = 1; - $button->{e}{clicked_may_quit}(); - }; + my $v = $button->{e}{clicked_may_quit}(); $form->FormDestroy; Newt::PopWindow(); return $v || &ask_fromW; diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm index 6ac803a74..079f5d5f9 100644 --- a/perl-install/my_gtk.pm +++ b/perl-install/my_gtk.pm @@ -111,7 +111,6 @@ sub main { $o->show; do { - local $::setstep = 1; Gtk->main; } while ($o->{retval} ? $completed && !$completed->() : $canceled && !$canceled->()); $o->destroy; @@ -240,17 +239,8 @@ sub _create_window($$) { } elsif (chr($_[1]{keyval}) eq 'e' && $_[1]{state} & 8) { log::l("Switching to " . ($::expert ? "beginner" : "expert")); $::expert = !$::expert; - } elsif ($d) { - #- previous field is created here :( - my $s; foreach (reverse @{$::o->{orderedSteps}}) { - $s->{previous} = $_ if $s; - $s = $::o->{steps}{$_}; - } - $s = $::o->{step}; - do { $s = $::o->{steps}{$s}{$d} } until !$s || $::o->{steps}{$s}{reachable}; - $::setstep && $s and die "setstep $s\n"; } - }); #- if $::isInstall; + }); $w->signal_connect(size_allocate => sub { my ($wi, $he) = @{$_[1]}[2,3]; diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 066fb8d70..75e579a2a 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -757,7 +757,6 @@ sub main { $o->show; do { - local $::setstep = 1; Gtk2->main; } while ($o->{retval} ? $completed && !$completed->() : $canceled && !$canceled->()); $o->destroy; @@ -873,15 +872,6 @@ sub _create_window($$) { } elsif (chr($event->keyval) eq 'e' && member('mod1-mask', @{$event->state})) { #- alt-e log::l("Switching to " . ($::expert ? "beginner" : "expert")); $::expert = !$::expert; - } elsif ($d) { - #- previous field is created here :( - my $s; foreach (reverse @{$::o->{orderedSteps}}) { - $s->{previous} = $_ if $s; - $s = $::o->{steps}{$_}; - } - $s = $::o->{step}; - do { $s = $::o->{steps}{$s}{$d} } until !$s || $::o->{steps}{$s}{reachable}; - $::setstep && $s and die "setstep $s\n"; } }); #- if $::isInstall; -- cgit v1.2.1