From aa19bdfd007143ebe13a762072ab12302b8f3a74 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 13 Aug 2002 18:28:57 +0000 Subject: - handle setting 'ok' && 'cancel' - handle isWizard in newt (basic handling) --- perl-install/interactive/newt.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'perl-install/interactive/newt.pm') diff --git a/perl-install/interactive/newt.pm b/perl-install/interactive/newt.pm index 825790789..cd1d25c36 100644 --- a/perl-install/interactive/newt.pm +++ b/perl-install/interactive/newt.pm @@ -167,8 +167,13 @@ sub ask_fromW { $grid; } }; - my ($buttons, $ok, $cancel) = Newt::Grid::ButtonBar(simplify_string($common->{ok} || _("Ok")), - if_($common->{cancel}, simplify_string($common->{cancel}))); + + my ($b1, $b2) = map { simplify_string($_) } + (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)); + ($ok, $cancel) = ($cancel, $ok) if $::isWizard; my $form = Newt::Component::Form(\undef, '', 0); my $window = Newt::Grid::GridBasicWindow(first(myTextbox(@widgets == 0, @{$common->{messages}})), $listg, $buttons); -- cgit v1.2.1