summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-02-20 01:09:07 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-02-20 01:09:07 +0000
commit1d27dbf5e28c61be9eeb078c44f2481fb25e7195 (patch)
tree2ad14181e14cca6244b53fa2c6856e5d17fd8d8d /perl-install/interactive.pm
parenta7463f88ccd1e833fcecec5c76ac47c804e060c0 (diff)
downloaddrakx-1d27dbf5e28c61be9eeb078c44f2481fb25e7195.tar
drakx-1d27dbf5e28c61be9eeb078c44f2481fb25e7195.tar.gz
drakx-1d27dbf5e28c61be9eeb078c44f2481fb25e7195.tar.bz2
drakx-1d27dbf5e28c61be9eeb078c44f2481fb25e7195.tar.xz
drakx-1d27dbf5e28c61be9eeb078c44f2481fb25e7195.zip
major move. now ask_from_list returns false when canceled (it doesn't die 'ask_from_list canceled' anymore)
Diffstat (limited to 'perl-install/interactive.pm')
-rw-r--r--perl-install/interactive.pm10
1 files changed, 7 insertions, 3 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index 928c00c91..1d4dd0c68 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -98,7 +98,12 @@ sub ask_yesorno {
sub ask_okcancel {
my ($o, $title, $message, $def, $help) = @_;
- ask_from_list_($o, $title, $message, [ __("Ok"), __("Cancel") ], $def ? "Ok" : "Cancel", $help) eq "Ok";
+
+ if ($::isWizard) {
+ $o->ask_from_entries_refH({ title => $title, messages => $message, focus_cancel => !$def });
+ } else {
+ ask_from_list_($o, $title, $message, [ __("Ok"), __("Cancel") ], $def ? "Ok" : "Cancel", $help) eq "Ok";
+ }
}
sub ask_from_list {
@@ -131,8 +136,7 @@ sub ask_from_listf_no_check {
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 } ]) or die 'ask_from_list cancel';
- $def;
+ ask_from_entries_refH($o, $title, $message, [ { val => \$def, type => 'list', list => $l, help => $help, format => $f } ]) && $def;
}
}