summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-08-30 11:31:37 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-08-30 11:31:37 +0000
commitce9bee0f8dd03a89d4a4a1cdc9baffdbd480245d (patch)
tree8f230a4c26293c46ec2ab8d08c6de1145b9cf90e /perl-install/interactive.pm
parent897f77ac5555472e32fa9997bc5ff5584461ca56 (diff)
downloaddrakx-ce9bee0f8dd03a89d4a4a1cdc9baffdbd480245d.tar
drakx-ce9bee0f8dd03a89d4a4a1cdc9baffdbd480245d.tar.gz
drakx-ce9bee0f8dd03a89d4a4a1cdc9baffdbd480245d.tar.bz2
drakx-ce9bee0f8dd03a89d4a4a1cdc9baffdbd480245d.tar.xz
drakx-ce9bee0f8dd03a89d4a4a1cdc9baffdbd480245d.zip
cleanup (translate late, and move methods to upper class)
Diffstat (limited to 'perl-install/interactive.pm')
-rw-r--r--perl-install/interactive.pm12
1 files changed, 8 insertions, 4 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index 6356d14d3..b93df4bdb 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -116,6 +116,9 @@ sub vnew {
interactive::newt->new;
}
+sub ok { N_("Ok") }
+sub cancel { N_("Cancel") }
+
sub enter_console {}
sub leave_console {}
sub suspend {}
@@ -130,6 +133,7 @@ sub exit {
}
}
+
#-######################################################################################
#- Interactive functions
#-######################################################################################
@@ -148,13 +152,13 @@ sub ask_okcancel {
sub ask_warn_ {
my ($o, $common) = @_;
- ask_from_listf_raw_no_check($o, $common, undef, [ $o->ok ]);
+ ask_from_listf_raw_no_check($o, $common, \&translate, [ $o->ok ]);
}
sub ask_yesorno_ {
my ($o, $common, $b_def) = @_;
$common->{cancel} = '';
- ask_from_listf_raw($o, $common, sub { translate($_[0]) }, [ N_("Yes"), N_("No") ], $b_def ? "Yes" : "No") eq "Yes";
+ ask_from_listf_raw($o, $common, \&translate, [ N_("Yes"), N_("No") ], $b_def ? "Yes" : "No") eq "Yes";
}
sub ask_okcancel_ {
@@ -165,7 +169,7 @@ sub ask_okcancel_ {
$common->{focus_cancel} = !$b_def;
ask_from_no_check($o, $common, []);
} else {
- ask_from_listf_raw($o, $common, sub { translate($_[0]) }, [ $o->ok, $o->cancel ], $b_def ? $o->ok : $o->cancel) eq $o->ok;
+ ask_from_listf_raw($o, $common, \&translate, [ $o->ok, $o->cancel ], $b_def ? $o->ok : $o->cancel) eq $o->ok;
}
}
@@ -199,7 +203,7 @@ sub ask_from_list {
sub ask_from_list_ {
my ($o, $title, $message, $l, $o_def) = @_;
- ask_from_listf($o, $title, $message, sub { translate($_[0]) }, $l, $o_def);
+ ask_from_listf($o, $title, $message, \&translate, $l, $o_def);
}
sub ask_from_listf_ {