summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/interactive.pm')
-rw-r--r--perl-install/interactive.pm12
1 files changed, 11 insertions, 1 deletions
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);