From 61441f63bdba1521e6ba62f8e8aecf8cd5f73dfd Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 18 Dec 2003 11:48:29 +0000 Subject: fix spurious previous button at install time on wizards' first steps --- perl-install/ugtk2.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'perl-install/ugtk2.pm') diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index b13ab7514..a0757ef82 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -484,7 +484,12 @@ sub create_okcancel { # @other is a list of extra buttons (usually help (eg: XFdrake/drakx caller) or advanced (eg: interactive caller) button) # extra buttons have the following structure [ label, handler, is_first ] local $::isWizard = $::isWizard && !$w->{pop_it}; - my $cancel = defined $o_cancel || defined $o_ok ? $o_cancel : $::isWizard ? N("<- Previous") : N("Cancel"); + my $cancel; + if (defined $o_cancel || defined $o_ok) { + $cancel = $o_cancel; + } elsif (!$::Wizard_no_previous) { + $cancel = $::isWizard ? N("<- Previous") : N("Cancel"); + } my $ok = defined $o_ok ? $o_ok : $::isWizard ? ($::Wizard_finished ? N("Finish") : N("Next ->")) : N("Ok"); my $bok = $ok && gtksignal_connect($w->{ok} = Gtk2::Button->new($ok), clicked => $w->{ok_clicked} || sub { $w->{retval} = 1; Gtk2->main_quit }); my $bprev; -- cgit v1.2.1