From f889c22d4d72746e06704cd02d3593bd078ee9cd Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 16 Aug 2002 18:07:20 +0000 Subject: fix dialog box with empty buttons (thanks to Hamster ) --- perl-install/interactive/newt.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/perl-install/interactive/newt.pm b/perl-install/interactive/newt.pm index cd1d25c36..37c5a62ef 100644 --- a/perl-install/interactive/newt.pm +++ b/perl-install/interactive/newt.pm @@ -172,7 +172,10 @@ sub ask_fromW { (exists $common->{ok} ? ($common->{ok}, $common->{cancel}) : ($::isWizard ? _("Next") : _("Ok"), $common->{cancel} || ($::isWizard ? _("<- Previous") : _("Cancel")))); - my ($buttons, $ok, $cancel) = Newt::Grid::ButtonBar($::isWizard ? ($b2, $b1) : ($b1, $b2)); + #- b1 is always displayed, so giving it some label :-( + $b1 ||= $::isWizard ? _("Next") : _("Ok"); + my @b2 = if_($b2, $b2); + my ($buttons, $ok, $cancel) = Newt::Grid::ButtonBar($::isWizard ? (@b2, $b1) : ($b1, @b2)); ($ok, $cancel) = ($cancel, $ok) if $::isWizard; my $form = Newt::Component::Form(\undef, '', 0); -- cgit v1.2.1