diff options
author | Francois Pons <fpons@mandriva.com> | 2000-04-10 14:06:56 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-04-10 14:06:56 +0000 |
commit | f8ce98a9ff2c26b6b7e613e4c994382c509aa630 (patch) | |
tree | 78bdb38600e4b063e772b534a94515201c6ce701 /perl-install/interactive.pm | |
parent | a4e04610e2ce4e8f97805ba06bd4a02a6dac49f5 (diff) | |
download | drakx-f8ce98a9ff2c26b6b7e613e4c994382c509aa630.tar drakx-f8ce98a9ff2c26b6b7e613e4c994382c509aa630.tar.gz drakx-f8ce98a9ff2c26b6b7e613e4c994382c509aa630.tar.bz2 drakx-f8ce98a9ff2c26b6b7e613e4c994382c509aa630.tar.xz drakx-f8ce98a9ff2c26b6b7e613e4c994382c509aa630.zip |
*** empty log message ***
Diffstat (limited to 'perl-install/interactive.pm')
-rw-r--r-- | perl-install/interactive.pm | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm index 5d4254cc1..55abb5b23 100644 --- a/perl-install/interactive.pm +++ b/perl-install/interactive.pm @@ -113,6 +113,35 @@ sub ask_from_list2($$$$;$) { $o->ask_from_listW($title, [ deref($message) ], $l, $def || $l->[0]); } +sub ask_from_list_with_help_ { + my ($o, $title, $message, $l, $help, $def) = @_; + @$l == 0 and die ''; + @$l == 1 and return $l->[0]; + goto &ask_from_list2_with_help_; +} + +sub ask_from_list_with_help { + my ($o, $title, $message, $l, $help, $def) = @_; + @$l == 0 and die ''; + @$l == 1 and return $l->[0]; + goto &ask_from_list2_with_help; +} + +sub ask_from_list2_with_help_($$$$$;$) { + my ($o, $title, $message, $l, $help, $def) = @_; + untranslate( + ask_from_list_with_help($o, $title, $message, [ map { translate($_) } @$l ], $help, translate($def)), + @$l); +} + +sub ask_from_list2_with_help($$$$$;$) { + my ($o, $title, $message, $l, $help, $def) = @_; + + @$l > 10 and $l = [ sort @$l ]; + + $o->ask_from_list_with_helpW($title, [ deref($message) ], $l, $help, $def || $l->[0]); +} + sub ask_from_treelist { my ($o, $title, $message, $separator, $l, $def) = @_; $o->ask_from_treelistW($title, [ deref($message) ], $separator, [ sort @$l ], $def || $l->[0]); |