summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-08-14 21:51:08 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-08-14 21:51:08 +0000
commita93e62d784e881146d533f917309416796766e19 (patch)
tree2e5a23492836aa50a18f3520d3be17c1aab45ab2 /perl-install/interactive.pm
parent63dc2a3ea6baf4173f31bd9df3fc1b28b1c561eb (diff)
downloaddrakx-backup-do-not-use-a93e62d784e881146d533f917309416796766e19.tar
drakx-backup-do-not-use-a93e62d784e881146d533f917309416796766e19.tar.gz
drakx-backup-do-not-use-a93e62d784e881146d533f917309416796766e19.tar.bz2
drakx-backup-do-not-use-a93e62d784e881146d533f917309416796766e19.tar.xz
drakx-backup-do-not-use-a93e62d784e881146d533f917309416796766e19.zip
- small fixes (esp. gtk sensitive handling)
- add ask_file - add "gtk" preference field
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);