diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-01-09 12:43:45 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-01-09 12:43:45 +0000 |
commit | 775e9840115458aa09bc5c10a73123bc3c7f9c4c (patch) | |
tree | 41cd313a36b61cfa314e1a15cbcd7aef6f2a8173 /perl-install/interactive.pm | |
parent | 9078938c944292dbab9a48fe4d199c13b9e2f394 (diff) | |
download | drakx-backup-do-not-use-775e9840115458aa09bc5c10a73123bc3c7f9c4c.tar drakx-backup-do-not-use-775e9840115458aa09bc5c10a73123bc3c7f9c4c.tar.gz drakx-backup-do-not-use-775e9840115458aa09bc5c10a73123bc3c7f9c4c.tar.bz2 drakx-backup-do-not-use-775e9840115458aa09bc5c10a73123bc3c7f9c4c.tar.xz drakx-backup-do-not-use-775e9840115458aa09bc5c10a73123bc3c7f9c4c.zip |
(ask_from_listf_no_check): add focus_cancel set if defaults to second
element of the list (for a 2 element list)
Diffstat (limited to 'perl-install/interactive.pm')
-rw-r--r-- | perl-install/interactive.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm index e23206d4c..84c5fe6cc 100644 --- a/perl-install/interactive.pm +++ b/perl-install/interactive.pm @@ -123,8 +123,10 @@ sub ask_from_listf_no_check { my ($o, $title, $message, $f, $l, $def, $help) = @_; if (@$l <= 2) { - ask_from_entries_refH_powered_no_check($o, { title => $title, messages => $message, ok => $l->[0] && may_apply($f, $l->[0]), cancel => $l->[1] && may_apply($f, $l->[1]) }, []) - ? $l->[0] : $l->[1]; + ask_from_entries_refH_powered_no_check($o, + { title => $title, messages => $message, ok => $l->[0] && may_apply($f, $l->[0]), + if_($l->[1], cancel => may_apply($f, $l->[1]), focus_cancel => $def eq $l->[1]) }, [] + ) ? $l->[0] : $l->[1]; } else { ask_from_entries_refH($o, $title, $message, [ { val => \$def, type => 'list', list => $l, help => $help, format => $f } ]); $def; |