From a93e62d784e881146d533f917309416796766e19 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 14 Aug 2001 21:51:08 +0000 Subject: - small fixes (esp. gtk sensitive handling) - add ask_file - add "gtk" preference field --- perl-install/interactive.pm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'perl-install/interactive.pm') diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm index 346026645..0f2541943 100644 --- a/perl-install/interactive.pm +++ b/perl-install/interactive.pm @@ -16,6 +16,7 @@ use common; #- help => tooltip #- advanced => wether it is shown in by default or only in advanced mode #- disabled => function returning wether it should be disabled (grayed) +#- gtk => gtk preferences #- type => #- button => (with clicked) (type defaults to button if clicked is there) (val need not be a reference) #- label => (val need not be a reference) (type defaults to label if val is not a reference) @@ -120,6 +121,15 @@ sub ask_okcancel { } } +sub ask_file { + my ($o, $title, $dir) = @_; + $o->ask_fileW($title, $dir); +} +sub ask_fileW { + my ($o, $title, $dir) = @_; + $o->ask_from_entry($title, _("Choose a file")); +} + sub ask_from_list { my ($o, $title, $message, $l, $def, $help) = @_; ask_from_listf($o, $title, $message, undef, $l, $def, $help); @@ -317,7 +327,7 @@ sub ask_browse_tree_info_refW { #- default definition, do not use with too many }, 'flat'); add2hash_($common, { list => $l, #- TODO interactivity of toggle is missing values => $v, - help => sub { $common->{get_info}($_) }, + help => sub { $common->{get_info}($_[0]) }, }); my ($new_v) = $o->ask_many_from_list($common->{title}, $common->{message}, $common) or return; $common->{toggle_nodes}(sub {}, grep { ! delete $h->{$_} } @$new_v); -- cgit v1.2.1