diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-08-13 18:28:57 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-08-13 18:28:57 +0000 |
commit | aa19bdfd007143ebe13a762072ab12302b8f3a74 (patch) | |
tree | e2808c92df88cc205c76f6cb87768bf32152a07c /perl-install | |
parent | ddec320c9813c04b3e6a6213654a3ff84db89431 (diff) | |
download | drakx-aa19bdfd007143ebe13a762072ab12302b8f3a74.tar drakx-aa19bdfd007143ebe13a762072ab12302b8f3a74.tar.gz drakx-aa19bdfd007143ebe13a762072ab12302b8f3a74.tar.bz2 drakx-aa19bdfd007143ebe13a762072ab12302b8f3a74.tar.xz drakx-aa19bdfd007143ebe13a762072ab12302b8f3a74.zip |
- handle setting 'ok' && 'cancel'
- handle isWizard in newt (basic handling)
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/interactive/http.pm | 2 | ||||
-rw-r--r-- | perl-install/interactive/newt.pm | 9 | ||||
-rw-r--r-- | perl-install/interactive/stdio.pm | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/perl-install/interactive/http.pm b/perl-install/interactive/http.pm index 785446c46..42e116380 100644 --- a/perl-install/interactive/http.pm +++ b/perl-install/interactive/http.pm @@ -102,7 +102,7 @@ sub ask_fromW { print "</table>\n"; print $q->p(); print $q->submit(-name => 'ok_submit', -value => $common->{ok} || _("Ok")); - print $q->submit(-name => 'cancel_submit', -value => $common->{cancel}) if $common->{cancel}; + print $q->submit(-name => 'cancel_submit', -value => $common->{cancel} || _("Cancel")) if $common->{cancel} || !exists $common->{ok}; print $q->hidden('state'), $q->hidden('uid'); print $q->end_form, $q->end_html; 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); diff --git a/perl-install/interactive/stdio.pm b/perl-install/interactive/stdio.pm index 67198d00e..3c8e9cfb7 100644 --- a/perl-install/interactive/stdio.pm +++ b/perl-install/interactive/stdio.pm @@ -36,6 +36,8 @@ sub good_choice { sub ask_fromW { my ($o, $common, $l, $l2) = @_; + add2hash_($common, { ok => _("Ok"), cancel => _("Cancel") }) if !exists $common->{ok}; + ask_fromW_begin: my $already_entries = 0; |